!299 【5.0.1-Release】修复备忘录jscrash

Merge pull request !299 from 张宏/cherry-pick-1731312672
This commit is contained in:
openharmony_ci 2024-11-11 12:22:40 +00:00 committed by Gitee
commit 58ecba1875
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 15 additions and 12 deletions

View File

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

View File

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

View File

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

View File

@ -36,6 +36,7 @@ import router from '@system.router'
import inputMethod from '@ohos.inputMethod';
import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData'
import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
import webview from '@ohos.web.webview';
var time_id: number
@ -57,7 +58,7 @@ export struct NoteContentCompPortrait {
@StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
@Provide('EditModel') editModel: boolean = false
@StorageLink('dpi') dpi: number = 240
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
private editContentFlag = false
private isClickBack: boolean = false
@StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0
@ -483,7 +484,7 @@ export struct ToolBarComp {
@Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('EditModel') editModel: boolean
@StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
onDeleteConfirm() {
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 router from '@ohos.router';
import inputMethod from '@ohos.inputMethod';
import webview from '@ohos.web.webview';
const TAG = "NoteListComp"
@ -157,7 +158,7 @@ export struct NoteListComp {
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray')
@Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('Search') search: boolean
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
@Consume('AsideWidth') asideWidth: number
build() {
@ -204,7 +205,7 @@ struct NoteOverViewComp {
@Consume('ExpandStatus') expandStatus: boolean
@Consume('Search') search: boolean
@Consume('PortraitModel') portraitModel: boolean
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
@State noteNumber: number = undefined
@StorageLink('isUpdate') @Watch('notesNumberChange') isUpdate: boolean = false
@Consume('AsideWidth') asideWidth: number
@ -321,7 +322,7 @@ struct NoteOverViewComp {
export struct NoteItemComp {
public noteItem: NoteData
public spans: any[]
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
@Consume('SelectedFolderData') selectedFolderData: FolderData
@Consume('SelectedNoteData') selectedNoteData: NoteData
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray')
@ -497,7 +498,7 @@ export struct NoteItemListComp {
@Consume('PortraitModel') portraitModel: boolean
@State @Watch('setNoteListLazy') dateList: NoteData[] = [];
@State noteList: noteListData = new noteListData();
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
@StorageLink('isUpdate') @Watch('updateList') isUpdate: boolean = false
updateList() {
@ -649,7 +650,7 @@ export struct OperateNoteComp {
@Consume('PortraitModel') portraitModel: boolean
@Consume('selectedAll') selectedAll: boolean
@StorageLink('isUpdate') isUpdate: boolean = false
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
noteDataMoveDialogCtl: CustomDialogController = new CustomDialogController({
builder: NoteDataMoveDialog({ onConfirm: this.onMoveConfirm.bind(this) }),
alignment: DialogAlignment.Center,
@ -831,7 +832,7 @@ export struct AddNoteComp {
@Consume('EditModel') editModel: boolean
@Consume('ChooseNote') chooseNote: boolean
@Consume('PortraitModel') portraitModel: boolean
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
build() {
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 NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import LayoutUtil from '@ohos/utils/src/main/ets/default/baseUtil/LayoutUtil'
import webview from '@ohos.web.webview';
@Entry
@Component
@ -42,7 +43,7 @@ export struct NoteHomeComp {
@Provide('EditModel') editModel: boolean = false //编辑模式:临时方案
@Provide('Issave') issave: number = 0
@StorageLink('breakPoint') breakPoints: string = 'lg'
controllerShow: WebviewController
controllerShow: webview.WebviewController = new webview.WebviewController();
TAG = "NoteHomeComp_Tablet"
@Provide('AsideWidth') asideWidth: number = 200