!341 代码优化

Merge pull request !341 from 孟立/master
This commit is contained in:
openharmony_ci 2024-11-14 06:12:16 +00:00 committed by Gitee
commit 4a2685d5f0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -433,7 +433,7 @@ function sendDlpFileOpenProperties() {
}
function isValidPath(path: string): Boolean {
if (path.indexOf('/./') !== -1 || path.indexOf('/../') !== -1) {
if (path.indexOf('./') !== -1 || path.indexOf('../') !== -1) {
return false;
}
return true;

View File

@ -503,8 +503,8 @@ struct encryptedSharing {
getScrollHeight(newValue: SizeOptions) {
const height = newValue.height as number;
this.scrollHeight = height - Constants.SHARE_BUTTON_COLUMN_BOTTOM - Constants.SHARE_TITLE_HEAD_HEIGHT
- Constants.SHARE_TITLE_HEAD_MARGIN_TOP - Constants.SHARE_TITLE_HEAD_MARGIN_BOTTOM;
this.scrollHeight = height - Constants.SHARE_BUTTON_COLUMN_BOTTOM - Constants.SHARE_TITLE_HEAD_HEIGHT -
Constants.SHARE_TITLE_HEAD_MARGIN_TOP - Constants.SHARE_TITLE_HEAD_MARGIN_BOTTOM;
if (this.scrollHeight > Constants.SHARE_TEXTAREA_MAX_HEIGHT) {
this.scrollHeight = Constants.SHARE_TEXTAREA_MAX_HEIGHT;
}