!298 修复备忘录jscrash

Merge pull request !298 from 张宏/1111
This commit is contained in:
openharmony_ci 2024-11-11 06:33:38 +00:00 committed by Gitee
commit bc51861abe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 15 additions and 12 deletions

View File

@ -189,7 +189,7 @@ struct FolderItemComp {
@Consume('Longpress') longpress: boolean @Consume('Longpress') longpress: boolean
@Consume('SelectedColor') selectedColor: string @Consume('SelectedColor') selectedColor: string
@Consume('PortraitModel') portraitModel: boolean @Consume('PortraitModel') portraitModel: boolean
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
@State isLongPress: boolean = false @State isLongPress: boolean = false
TAG = "FolderItemComp" TAG = "FolderItemComp"
@StorageLink('isUpdate') isUpdate: boolean = false @StorageLink('isUpdate') isUpdate: boolean = false

View File

@ -272,7 +272,7 @@ export struct ToolBarComp {
@StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
@Consume('Issave') issave: number @Consume('Issave') issave: number
@Consume('EditModel') editModel: boolean @Consume('EditModel') editModel: boolean
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
editContentDialogCtl: CustomDialogController = new CustomDialogController({ editContentDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditContentDialog({ confirm: this.confirm.bind(this) }), builder: EditContentDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Bottom, alignment: DialogAlignment.Bottom,

View File

@ -350,7 +350,7 @@ export struct NoteContentOverViewComp {
@Consume('RefreshFlag') refreshFlag: number @Consume('RefreshFlag') refreshFlag: number
@StorageLink('isUpdate') isUpdate: boolean = false @StorageLink('isUpdate') isUpdate: boolean = false
NoteDataMoveArray: FolderData[] NoteDataMoveArray: FolderData[]
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
editTitleDialogCtl: CustomDialogController = new CustomDialogController({ editTitleDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditTitleDialog({ confirm: this.confirm.bind(this) }), builder: EditTitleDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Center, alignment: DialogAlignment.Center,

View File

@ -36,6 +36,7 @@ import router from '@system.router'
import inputMethod from '@ohos.inputMethod'; import inputMethod from '@ohos.inputMethod';
import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData' import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData'
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
import webview from '@ohos.web.webview';
var time_id: number var time_id: number
@ -57,7 +58,7 @@ export struct NoteContentCompPortrait {
@StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
@Provide('EditModel') editModel: boolean = false @Provide('EditModel') editModel: boolean = false
@StorageLink('dpi') dpi: number = 240 @StorageLink('dpi') dpi: number = 240
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
private editContentFlag = false private editContentFlag = false
private isClickBack: boolean = false private isClickBack: boolean = false
@StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0 @StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0
@ -483,7 +484,7 @@ export struct ToolBarComp {
@Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('EditModel') editModel: boolean @Consume('EditModel') editModel: boolean
@StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
onDeleteConfirm() { onDeleteConfirm() {
if (this.selectedFolderData.uuid != SysDefFolderUuid.RecentDeletes) { if (this.selectedFolderData.uuid != SysDefFolderUuid.RecentDeletes) {

View File

@ -34,6 +34,7 @@ import SearchModel from '@ohos/utils/src/main/ets/default/model/searchModel/Sear
import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
import router from '@ohos.router'; import router from '@ohos.router';
import inputMethod from '@ohos.inputMethod'; import inputMethod from '@ohos.inputMethod';
import webview from '@ohos.web.webview';
const TAG = "NoteListComp" const TAG = "NoteListComp"
@ -157,7 +158,7 @@ export struct NoteListComp {
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray')
@Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('Search') search: boolean @Consume('Search') search: boolean
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
@Consume('AsideWidth') asideWidth: number @Consume('AsideWidth') asideWidth: number
build() { build() {
@ -204,7 +205,7 @@ struct NoteOverViewComp {
@Consume('ExpandStatus') expandStatus: boolean @Consume('ExpandStatus') expandStatus: boolean
@Consume('Search') search: boolean @Consume('Search') search: boolean
@Consume('PortraitModel') portraitModel: boolean @Consume('PortraitModel') portraitModel: boolean
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
@State noteNumber: number = undefined @State noteNumber: number = undefined
@StorageLink('isUpdate') @Watch('notesNumberChange') isUpdate: boolean = false @StorageLink('isUpdate') @Watch('notesNumberChange') isUpdate: boolean = false
@Consume('AsideWidth') asideWidth: number @Consume('AsideWidth') asideWidth: number
@ -321,7 +322,7 @@ struct NoteOverViewComp {
export struct NoteItemComp { export struct NoteItemComp {
public noteItem: NoteData public noteItem: NoteData
public spans: any[] public spans: any[]
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
@Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('SelectedNoteData') selectedNoteData: NoteData
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray')
@ -503,7 +504,7 @@ export struct NoteItemListComp {
@Consume('PortraitModel') portraitModel: boolean @Consume('PortraitModel') portraitModel: boolean
@State @Watch('setNoteListLazy') dateList: NoteData[] = []; @State @Watch('setNoteListLazy') dateList: NoteData[] = [];
@State noteList: noteListData = new noteListData(); @State noteList: noteListData = new noteListData();
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
@StorageLink('isUpdate') @Watch('updateList') isUpdate: boolean = false @StorageLink('isUpdate') @Watch('updateList') isUpdate: boolean = false
updateList() { updateList() {
@ -655,7 +656,7 @@ export struct OperateNoteComp {
@Consume('PortraitModel') portraitModel: boolean @Consume('PortraitModel') portraitModel: boolean
@Consume('selectedAll') selectedAll: boolean @Consume('selectedAll') selectedAll: boolean
@StorageLink('isUpdate') isUpdate: boolean = false @StorageLink('isUpdate') isUpdate: boolean = false
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
noteDataMoveDialogCtl: CustomDialogController = new CustomDialogController({ noteDataMoveDialogCtl: CustomDialogController = new CustomDialogController({
builder: NoteDataMoveDialog({ onConfirm: this.onMoveConfirm.bind(this) }), builder: NoteDataMoveDialog({ onConfirm: this.onMoveConfirm.bind(this) }),
alignment: DialogAlignment.Center, alignment: DialogAlignment.Center,
@ -837,7 +838,7 @@ export struct AddNoteComp {
@Consume('EditModel') editModel: boolean @Consume('EditModel') editModel: boolean
@Consume('ChooseNote') chooseNote: boolean @Consume('ChooseNote') chooseNote: boolean
@Consume('PortraitModel') portraitModel: boolean @Consume('PortraitModel') portraitModel: boolean
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
build() { build() {
Image($r('app.media.addNote')) Image($r('app.media.addNote'))

View File

@ -22,6 +22,7 @@ import { circleColorArray } from '@ohos/utils/src/main/ets/default/model/NoteBas
import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import LayoutUtil from '@ohos/utils/src/main/ets/default/baseUtil/LayoutUtil' import LayoutUtil from '@ohos/utils/src/main/ets/default/baseUtil/LayoutUtil'
import webview from '@ohos.web.webview';
@Entry @Entry
@Component @Component
@ -42,7 +43,7 @@ export struct NoteHomeComp {
@Provide('EditModel') editModel: boolean = false //编辑模式:临时方案 @Provide('EditModel') editModel: boolean = false //编辑模式:临时方案
@Provide('Issave') issave: number = 0 @Provide('Issave') issave: number = 0
@StorageLink('breakPoint') breakPoints: string = 'lg' @StorageLink('breakPoint') breakPoints: string = 'lg'
controllerShow: WebviewController controllerShow: webview.WebviewController = new webview.WebviewController();
TAG = "NoteHomeComp_Tablet" TAG = "NoteHomeComp_Tablet"
@Provide('AsideWidth') asideWidth: number = 200 @Provide('AsideWidth') asideWidth: number = 200