修复备忘录jscrash

Signed-off-by: zwx1126739 <zhanghong121@huawei.com>
This commit is contained in:
zwx1126739 2024-10-16 16:30:35 +08:00
parent e07e383308
commit 904c66c949
2 changed files with 7 additions and 7 deletions

View File

@ -121,10 +121,10 @@ export class FolderUtil {
}
if (folderData!.uuid === undefined || folderData!.uuid === null) {
LogUtil.info(TAG, "isFolderMoveIn folderData uuid undefined")
folderData.uuid = 'sys_def_unClassified_uuid';
folderData!.uuid = 'sys_def_unClassified_uuid';
}
LogUtil.info(TAG, "isFolderMoveIn folderDataUuid " + folderData.uuid)
return (folderData.uuid == SysDefFolderUuid.UnClassified || folderData.folder_type == FolderType.CusDef)
LogUtil.info(TAG, "isFolderMoveIn folderDataUuid " + folderData!.uuid);
return (folderData!.uuid == SysDefFolderUuid.UnClassified || folderData!.folder_type == FolderType.CusDef);
}
/**

View File

@ -280,18 +280,18 @@ struct NoteDataMoveItemComp {
build() {
Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap }) {
Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap }) {
Image(FolderUtil.getFolderIcon(this.folderItem.uuid))
Image(FolderUtil.getFolderIcon(this.folderItem!.uuid))
.objectFit(ImageFit.Fill)
.width(24)
.height(24)
.flexShrink(0)
.fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, false))
.fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem!.uuid, false))
}
.width(24)
Column() {
Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) {
Text(FolderUtil.getFolderText(this.folderItem))
Text(FolderUtil.getFolderText(this.folderItem!))
.fontSize(16)
.textAlign(TextAlign.Center)
.maxLines(1)
@ -299,7 +299,7 @@ struct NoteDataMoveItemComp {
.flexShrink(1)
.fontWeight(FontWeight.Medium)
Image((FolderUtil.getCommonFolder(this.AllFolderArray, this.CheckedNoteArray) == null
|| FolderUtil.getCommonFolder(this.AllFolderArray, this.CheckedNoteArray) != this.folderItem) ? $r("app.media.foldMove_unselect") : $r("app.media.foldMove_select"))
|| FolderUtil.getCommonFolder(this.AllFolderArray, this.CheckedNoteArray) != this.folderItem!) ? $r("app.media.foldMove_unselect") : $r("app.media.foldMove_select"))
.objectFit(ImageFit.Fill)
.width(24)
.height(24)