From d3ecb3e2e372dbd8d54178856838c157498eef91 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Tue, 12 Aug 2025 10:34:32 +0800 Subject: [PATCH 1/7] sample StateManagement manualfix Signed-off-by: wangweiyuan --- .../main/ets/commoncomponents/CodeView.ets | 28 ++-- .../main/ets/commoncomponents/TitleBar.ets | 25 +-- .../ets/commoncomponents/TitleBarDark.ets | 25 +-- .../ets/commoncomponents/ViewCodeText.ets | 23 +-- .../ets/outofsyncability/OutOfSyncAbility.ts | 2 +- .../AbilityGlobalDataSync.ets | 13 +- .../AbilityGlobalDataSyncCode.ets | 56 ++++--- .../AbilityOutOfSyncPage.ets | 24 +-- .../LocalStorageLinkPage.ets | 24 +-- .../LocalStoragePropPage.ets | 40 +++-- .../ApplyGlobalDataSync.ets | 11 +- .../ApplyGlobalDataSyncCode.ets | 46 ++--- .../StorageLinkAbilityPage.ets | 22 +-- .../StoragePropAbilityPage.ets | 30 ++-- .../model/AbilityConfigType.ts | 4 +- .../entry/src/main/ets/pages/home/Home.ets | 28 ++-- .../ets/pages/home/TabContentNavigation.ets | 158 ++++++++++-------- .../src/main/ets/pages/home/data/HomeData.ets | 24 ++- .../pages/home/model/CategoricalDataType.ets | 7 +- .../BrotherComponentSync.ets | 6 +- .../BrotherComponentSyncCode.ets | 9 +- .../ConsumeBrotherOneComponent.ets | 30 ++-- .../ConsumeBrotherTwoComponent.ets | 28 ++-- .../LinkBrotherOneComponent.ets | 38 +++-- .../LinkBrotherTwoComponent.ets | 26 +-- .../ProvideFatherComponent.ets | 13 +- .../StateFatherComponent.ets | 12 +- .../multicompomentssync/data/ColorData.ets | 16 +- .../ConsumeDescendentComponent.ets | 28 ++-- .../DeepNestComponentsSync.ets | 6 +- .../DeepNestComponentsSyncCode.ets | 7 +- .../LinkDescendentComponent.ets | 27 +-- .../ProvideGrandfatherComponent.ets | 39 ++--- .../StateGrandfatherComponent.ets | 33 ++-- .../multicompomentssync/model/ColorType.ets | 11 +- .../ObjectLinkComponent.ets | 19 ++- .../ParentChildPartialContentSync.ets | 6 +- .../ParentChildPartialContentSyncCode.ets | 46 ++--- .../uniandbidirectionsync/ComponentLink.ets | 21 ++- .../uniandbidirectionsync/ComponentProp.ets | 25 +-- .../UniAndBidirectionSync.ets | 6 +- .../UniAndBidirectionSyncCode.ets | 32 ++-- .../arraytype/ArrayType.ets | 8 +- .../arraytype/ArrayTypeCode.ets | 58 ++++--- .../decoratedobjecttype/basetype/BaseType.ets | 9 +- .../basetype/BaseTypeCode.ets | 19 ++- .../classobjecttype/ClassObjectType.ets | 6 +- .../classobjecttype/ClassObjectTypeCode.ets | 83 ++++----- .../UpdateBoundComponent.ets | 6 +- .../UpdateBoundComponentCode.ets | 33 ++-- .../entry/src/main/ets/utils/ResourceUtils.ts | 3 +- 51 files changed, 711 insertions(+), 588 deletions(-) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets index 62c1b9de..dd9cdadc 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,11 +21,9 @@ import { Resource, StorageLink, Watch, - $rawfile, Builder, Column, Text, - $r, Color, ItemAlign, Web, @@ -35,6 +33,12 @@ import { Alignment, BarState, SideBarPosition, + TextAttribute, + ColumnOptions, + ClickEvent, + $r, + $rawfile, + Padding } from '@kit.ArkUI'; import webView from '@ohos.web.webview'; @@ -42,7 +46,8 @@ import { TitleBar } from './TitleBar'; @Component export struct CodeView { - @BuilderParam contentView: () => void; + @BuilderParam contentView: () => void = () => { + }; @Link title: Resource; @StorageLink('sideBarShow') sideBarShow: boolean = false; @StorageLink('webSrc') @Watch('webSrcChange') webSrc: Resource = $rawfile('BaseTypeCode.ets.html'); @@ -50,18 +55,19 @@ export struct CodeView { private isShowTitle: boolean = true; private controller: webView.WebviewController = new webView.WebviewController(); - webSrcChange():void { + webSrcChange(propName: string): void { this.controller.loadUrl(this.webSrc); } - @Builder codeView() { - Column({ space: 10 }) { + @Builder + codeView() { + Column({ space: 10.0 } as ColumnOptions) { Text($r('app.string.close')) .fontSize($r('app.float.source_code_font_size')) .fontColor(Color.White) .alignSelf(ItemAlign.End) .id('close') - .onClick(() => { + .onClick((): void => { this.sideBarShow = !this.sideBarShow; }) Column() { @@ -69,9 +75,9 @@ export struct CodeView { .width('100%') .height('100%') } - .height('100%') .width('100%') - .padding({ bottom: $r('app.float.code_view_bottom') }) + .height('100%') + .padding({ bottom: $r('app.float.code_view_bottom') } as Padding) } .height('100%') .padding($r('app.float.page_padding')) @@ -95,7 +101,7 @@ export struct CodeView { } .autoHide(false) .showSideBar(this.sideBarShow) - .layoutWeight(1) + .layoutWeight(1.0) .sideBarWidth('100%') .showControlButton(false) // 大型设备查看源码和界面4:6的比例,所以占60% diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets index 2dfd21d7..10bdfd61 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,6 @@ */ import { - getUIContext, Component, Link, Resource, @@ -23,39 +22,43 @@ import { Row, Button, Image, - $r, Text, Divider, + $r, + ColumnOptions, + TextAttribute, + Margin, + ClickEvent } from '@kit.ArkUI'; +import { Context, UIContext } from '@ohos.arkui.UIContext'; import router from '@ohos.router'; import common from '@ohos.app.ability.common'; import { startSpecifiedAbility } from '../utils/StartAbilityUtils'; -//声明一个上下文信息 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; - @Component export struct TitleBar { @Link title: Resource; private isAbility: boolean = false; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { Row() { - Button() { + Button('') { Image($r('app.media.ic_back')) .size({ width: $r('app.float.icon_back_size'), height: $r('app.float.icon_back_size') }) } .backgroundColor($r('app.color.background_shallow_grey')) .id('backBtn') - .onClick(() => { - this.isAbility ? startSpecifiedAbility(CONTEXT, 'EntryAbility') : getUIContext().getRouter.back(); + .onClick((event: ClickEvent) => { + this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : + this.getUIContext().getRouter().back(); }) Text(this.title) .fontSize($r('app.float.title_font_size')) - .margin({ left: $r('app.float.title_margin') }) + .margin({ left: $r('app.float.title_margin') } as Margin) } .width('100%') .padding($r('app.float.page_padding')) @@ -64,7 +67,7 @@ export struct TitleBar { .width('100%') .height($r('app.float.divider_height')) .color($r('app.color.divider_color')) - .margin({ bottom: 12 }) + .margin({ bottom: 12.0 } as Margin) } .width('100%') } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets index 828207d1..47896704 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,6 @@ */ import { - getUIContext, Component, Link, Resource, @@ -23,40 +22,44 @@ import { Row, Button, Image, - $r, Text, Color, Divider, + $r, + $rawfile, + ColumnOptions, + ClickEvent, + TextAttribute, + Margin } from '@kit.ArkUI'; import router from '@ohos.router'; import common from '@ohos.app.ability.common'; import { startSpecifiedAbility } from '../utils/StartAbilityUtils'; -//声明一个上下文信息 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; - @Component export struct TitleBarDark { @Link title: Resource; private isAbility: boolean = false; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { Row() { - Button() { + Button('') { Image($r('app.media.ic_back_white')) .size({ width: $r('app.float.icon_back_size'), height: $r('app.float.icon_back_size') }) } .id('backBtn') - .onClick(() => { - this.isAbility ? startSpecifiedAbility(CONTEXT, 'EntryAbility') : getUIContext().getRouter.back(); + .onClick((event: ClickEvent) => { + this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : + this.getUIContext().getRouter().back(); }) .backgroundColor($r('app.color.nightnode_color')) Text(this.title) .fontSize($r('app.float.title_font_size')) - .margin({ left: $r('app.float.title_margin') }) + .margin({ left: $r('app.float.title_margin') } as Margin) .fontColor(Color.White) } .width('100%') @@ -66,7 +69,7 @@ export struct TitleBarDark { .width('100%') .height($r('app.float.divider_height')) .color($r('app.color.divider_color')) - .margin({ bottom: 12 }) + .margin({ bottom: 12.0 } as Margin) } .width('100%') } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets index e1ef1367..1fbb679d 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,34 +18,35 @@ import { Component, StorageLink, Resource, - $rawfile, Column, Text, - $r, ItemAlign, AppStorage, FlexAlign, + $r, + $rawfile, + ClickEvent } from '@kit.ArkUI'; @Component export struct ViewCodeText { @StorageLink('sideBarShow') sideBarShow: boolean = false; - private webSrc: Resource = $rawfile('BaseTypeCode.ets.html'); + private webSrc: Resource = $rawfile('BaseTypeCode.ets.html'); build() { - Column(){ + Column() { Text($r('app.string.source_code')) .fontColor($r('app.color.source_code_font_color')) .fontSize($r('app.float.source_code_font_size')) .alignSelf(ItemAlign.End) .id('viewSourceCode') - .onClick(() => { - // 点击查看源码 - AppStorage.SetOrCreate('sideBarShow', !this.sideBarShow); - AppStorage.SetOrCreate('webSrc', this.webSrc); - }) + .onClick((event: ClickEvent) => { + this.sideBarShow = !this.sideBarShow; // 自动同步(因 @StorageLink) + AppStorage.set('sideBarShow', this.sideBarShow); + AppStorage.set('webSrc', this.webSrc); + }); } .width('100%') - .justifyContent(FlexAlign.End) + .justifyContent(FlexAlign.End); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ts index 34907c61..ef48215f 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ts @@ -19,7 +19,7 @@ import Logger from '../utils/Logger'; const TAG = 'OutOfSyncAbility'; -export default class OutOfSyncAbility extends UIAbility { +export class OutOfSyncAbility extends UIAbility { onCreate(want, launchParam): void { Logger.info(TAG, 'Ability onCreate'); } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets index 78a2c917..050ae2b4 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,14 +16,15 @@ import { LocalStorage, + StorageLink, Entry, Component, State, Resource, - $r, LocalStorageLink, Column, AppStorage, + $r } from '@kit.ArkUI'; import { AbilityGlobalDataSyncCode } from './AbilityGlobalDataSyncCode'; @@ -31,9 +32,10 @@ import { CodeView } from '../../../commoncomponents/CodeView'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; -let storage: LocalStorage = LocalStorage.GetShared(); +let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; + @Entry({ storage: "__get_local_storage__" }) @Component struct AbilityGlobalDataSync { @@ -55,10 +57,11 @@ struct AbilityGlobalDataSync { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets index a91fb5a4..40249ee5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,14 +15,11 @@ */ import { - getUIContext, Component, LocalStorageLink, Column, - $rawfile, Row, Text, - $r, Toggle, ToggleType, Color, @@ -34,27 +31,31 @@ import { Button, ButtonType, Divider, + ColumnOptions, + $r, + $rawfile, + Margin, + ClickEvent } from '@kit.ArkUI'; import router from '@ohos.router'; import common from '@ohos.app.ability.common'; import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { startSpecifiedAbility } from '../../../utils/StartAbilityUtils'; - -// 声明一个上下文信息 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Context, UIContext } from '@ohos.arkui.UIContext'; @Component export struct AbilityGlobalDataSyncCode { // 初始化字体大小最小值 - private minFontSize: number = 10; + private minFontSize: number = 10.0; // 和主页、Page1、Page2双向同步内容字体大小 - @LocalStorageLink('contentFontSize') contentFontSize: number = 18; + @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; // 和主页、Page1、Page2双向同步夜间模式状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('AbilityGlobalDataSyncCode.ets.html') }) Row() { @@ -72,7 +73,7 @@ export struct AbilityGlobalDataSyncCode { }) }.justifyContent(FlexAlign.SpaceAround) .width('70%') - .border({ radius: 50, color: Color.Grey, width: $r('app.float.border_width') }) + .border({ radius: 50.0, color: Color.Grey, width: $r('app.float.border_width') }) Text($r('app.string.ability_storage_nightmodelsync')) .fontSize(this.contentFontSize) @@ -91,8 +92,8 @@ export struct AbilityGlobalDataSyncCode { .fontSize($r('app.float.tips_font_size')) Slider({ value: this.contentFontSize, - min: 10, // 字体大小最小值 - max: 30, // 字体大小最大值 + min: 10.0, // 字体大小最小值 + max: 30.0, // 字体大小最大值 style: SliderStyle.OutSet }) .showTips(true) @@ -101,19 +102,19 @@ export struct AbilityGlobalDataSyncCode { this.contentFontSize = value; }) // toFixed(0)将滑动条返回值处理为整数精度 - Text(this.contentFontSize.toFixed(0)) + Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50 }) + }.margin({ top: 50.0 } as Margin) Text($r('app.string.ability_storage_fontsizesync')) .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text($r('app.string.enter_pageone')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -124,11 +125,12 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { - getUIContext().getRouter.pushUrl({ url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage' }); + .onClick((event: ClickEvent) => { + this.getUIContext().getRouter().pushUrl( + { url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage' }); }) - Button() { + Button('') { Text($r('app.string.enter_pagetwo')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -139,12 +141,14 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { - getUIContext().getRouter.pushUrl({ url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage' }); + .onClick((event: ClickEvent) => { + this.getUIContext() + .getRouter() + .pushUrl({ url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage' }); }) - Divider().width('100%').strokeWidth(1) - Button() { + Divider().width('100%').strokeWidth(1.0) + Button('') { Text($r('app.string.enter_ability_outofsync')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -155,11 +159,11 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { - startSpecifiedAbility(CONTEXT,'OutOfSyncAbility'); + .onClick((event: ClickEvent) => { + startSpecifiedAbility(this.CONTEXT, 'OutOfSyncAbility'); }) } .width('100%') - .padding(10) + .padding(10.0) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets index 8e3fbb1a..29137605 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,15 +20,17 @@ import { Component, State, Resource, - $r, LocalStorageLink, Column, - $rawfile, Text, TextAlign, Button, ButtonType, AppStorage, + $r, + $rawfile, + ColumnOptions, + ClickEvent } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -36,9 +38,10 @@ import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; -let storage: LocalStorage = LocalStorage.GetShared(); +let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; + @Entry({ storage: "__get_local_storage__" }) @Component struct AbilityOutOfSyncPage { @@ -48,7 +51,7 @@ struct AbilityOutOfSyncPage { // 和主页、Page1、Page2不同步夜间模式状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; // 和主页、Page1、Page2不同步内容字体大小 - @LocalStorageLink('contentFontSize') contentFontSize: number = 18; + @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; build() { Column() { @@ -58,7 +61,7 @@ struct AbilityOutOfSyncPage { TitleBar({ title: this.title, isAbility: true }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30 }) { + Column({ space: 30.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('AbilityOutOfSyncPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) @@ -76,7 +79,7 @@ struct AbilityOutOfSyncPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -87,7 +90,7 @@ struct AbilityOutOfSyncPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 更新控制夜间模式状态的变量数据,@LocalStorageLink和@LocalStorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -98,10 +101,11 @@ struct AbilityOutOfSyncPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets index 9a49aa49..7daaff2d 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,15 +20,17 @@ import { Component, State, Resource, - $r, LocalStorageLink, Column, - $rawfile, Text, TextAlign, Button, ButtonType, AppStorage, + $r, + $rawfile, + ColumnOptions, + ClickEvent } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -36,9 +38,10 @@ import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; -let storage: LocalStorage = LocalStorage.GetShared(); +let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; + @Entry({ storage: "__get_local_storage__" }) @Component struct StorageLinkAbilityPage { @@ -46,7 +49,7 @@ struct StorageLinkAbilityPage { // 和主页、Page2双向同步夜间模式状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; // 和主页、Page2双向同步内容字体大小 - @LocalStorageLink('contentFontSize') contentFontSize: number = 18; + @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; build() { Column() { @@ -56,7 +59,7 @@ struct StorageLinkAbilityPage { TitleBar({ title: this.title }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30 }) { + Column({ space: 30.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('LocalStorageLinkPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) @@ -69,7 +72,7 @@ struct StorageLinkAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -80,7 +83,7 @@ struct StorageLinkAbilityPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 更新控制夜间模式状态的变量数据,@LocalStorageLink和@StorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -97,10 +100,11 @@ struct StorageLinkAbilityPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets index 0517320e..9fa23e44 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,18 +14,14 @@ * limitations under the License. */ -import { LocalStoragePropRef } from '@kit.ArkUI'; - import { LocalStorage, Entry, Component, State, Resource, - $r, LocalStorageLink, Column, - $rawfile, Text, TextAlign, Button, @@ -35,6 +31,12 @@ import { SliderStyle, SliderChangeMode, AppStorage, + $r, + $rawfile, + ColumnOptions, + ClickEvent, + Margin, + StorageLink } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -42,19 +44,20 @@ import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; -let storage: LocalStorage = LocalStorage.GetShared(); +let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; + @Entry({ storage: "__get_local_storage__" }) @Component struct StoragePropAbilityPage { @State title: Resource = $r('app.string.localStorage_pagetitleone'); // 初始化字体大小最小值 - private minFontSize: number = 10; + private minFontSize: number = 10.0; // 和主页、Page1双向同步夜间模式状态 - @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; + @StorageLink('currentModelStatus') currentModelStatus: boolean = true; // 和主页、Page1单向同步内容字体大小 - @LocalStoragePropRef('contentFontSize') contentFontSize: number = 18; + @StorageLink('contentFontSize') contentFontSize: number = 18.0; build() { Column() { @@ -64,7 +67,7 @@ struct StoragePropAbilityPage { TitleBar({ title: this.title }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 20 }) { + Column({ space: 20.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('LocalStoragePropPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) @@ -77,7 +80,7 @@ struct StoragePropAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -88,7 +91,7 @@ struct StoragePropAbilityPage { .padding($r('app.float.page_padding')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -111,8 +114,8 @@ struct StoragePropAbilityPage { .fontSize($r('app.float.tips_font_size')) Slider({ value: this.contentFontSize, - min: 10, // 字体大小最小值 - max: 30, // 字体大小最大值 + min: 10.0, // 字体大小最小值 + max: 30.0, // 字体大小最大值 style: SliderStyle.OutSet }) .showTips(true) @@ -121,12 +124,12 @@ struct StoragePropAbilityPage { this.contentFontSize = value; }) // toFixed(0)将滑动条返回值处理为整数精度 - Text(this.contentFontSize.toFixed(0)) + Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50 }) + }.margin({ top: 50.0 } as Margin) Text($r('app.string.localStorage_single_fontsize_binding')) .fontSize(this.contentFontSize) @@ -139,10 +142,11 @@ struct StoragePropAbilityPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets index 856c581b..4c580e20 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,13 +19,13 @@ import { Component, State, Resource, - $r, StorageLink, Column, AppStorage, + $r } from '@kit.ArkUI'; -import ApplyGlobalDataSyncCode from './ApplyGlobalDataSyncCode'; +import { ApplyGlobalDataSyncCode } from './ApplyGlobalDataSyncCode'; import { CodeView } from '../../../commoncomponents/CodeView'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; @@ -50,10 +50,11 @@ struct ApplyGlobalDataSync { } }.width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets index 1dfb3add..1e7aa4e7 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,14 +15,11 @@ */ import { - getUIContext, Component, StorageLink, Column, - $rawfile, Row, Text, - $r, Toggle, ToggleType, Color, @@ -34,26 +31,29 @@ import { SliderChangeMode, Button, ButtonType, + ColumnOptions, + $r, + $rawfile, + ClickEvent, + Margin } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { startSpecifiedAbility } from '../../../utils/StartAbilityUtils'; -// 声明一个上下文信息 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; - @Component -export default struct ApplyGlobalDataSyncCode { +export struct ApplyGlobalDataSyncCode { // 和Ability1、Ability2页面双向同步内容字体大小 - @StorageLink('contentFontSize') contentFontSize: number = 18; + @StorageLink('contentFontSize') contentFontSize: number = 18.0; // 和Ability1、Ability2页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; // 初始化字体大小最小值 - private minFontSize: number = 10; + private minFontSize: number = 10.0; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('ApplyGlobalDataSyncCode.ets.html') }) Row() { @@ -68,11 +68,11 @@ export default struct ApplyGlobalDataSyncCode { .onChange((isOn: boolean) => { // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageLink关联的数据变量刷新 this.currentModelStatus = isOn; - AppStorage.SetOrCreate('currentModelStatus', this.currentModelStatus); + AppStorage.set('currentModelStatus', this.currentModelStatus); }) }.justifyContent(FlexAlign.SpaceAround) .width('70%') - .border({ radius: 50, color: Color.Grey, width: $r('app.float.border_width') }) + .border({ radius: 50.0, color: Color.Grey, width: $r('app.float.border_width') }) Text($r('app.string.nightmode_text')) .fontSize(this.contentFontSize) @@ -92,29 +92,29 @@ export default struct ApplyGlobalDataSyncCode { Slider({ value: this.contentFontSize, min: this.minFontSize, // 字体大小最小值 - max: 30, // 字体大小最大值 + max: 30.0, // 字体大小最大值 style: SliderStyle.OutSet }) .showTips(true) .onChange((value: number, mode: SliderChangeMode) => { // 更新控制字体大小状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.contentFontSize = value; - AppStorage.SetOrCreate('contentFontSize', this.contentFontSize); + AppStorage.set('contentFontSize', this.contentFontSize); }) // toFixed(0)将滑动条返回值处理为整数精度 - Text(this.contentFontSize.toFixed(0)) + Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50 }) + }.margin({ top: 50.0 } as Margin) Text($r('app.string.fontSize_singlesync_textone')) .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text($r('app.string.enter_abilityone')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -125,11 +125,11 @@ export default struct ApplyGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { - startSpecifiedAbility(CONTEXT, 'StoragePropAbility'); + .onClick((event: ClickEvent) => { + startSpecifiedAbility(this.CONTEXT, 'StoragePropAbility'); }) - Button() { + Button('') { Text($r('app.string.enter_abilitytwo')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -140,8 +140,8 @@ export default struct ApplyGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { - startSpecifiedAbility(CONTEXT, 'StorageLinkAbility'); + .onClick((event: ClickEvent) => { + startSpecifiedAbility(this.CONTEXT, 'StorageLinkAbility'); }) }.padding($r('app.float.page_padding')) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets index 9b67be21..575e6d41 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,18 +19,19 @@ import { Component, State, Resource, - $r, StorageLink, Column, - $rawfile, Text, TextAlign, Button, ButtonType, AppStorage, + $r, + $rawfile, + ColumnOptions, + ClickEvent } from '@kit.ArkUI'; - import { CodeView } from '../../../commoncomponents/CodeView'; import { ViewCodeText } from '../../../commoncomponents//ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; @@ -45,7 +46,7 @@ struct StorageLinkAbilityPage { // 和主页、Ability1页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; // 和主页、Ability1页面双向同步内容字体大小 - @StorageLink('contentFontSize') contentFontSize: number = 18; + @StorageLink('contentFontSize') contentFontSize: number = 18.0; build() { Column() { @@ -55,7 +56,7 @@ struct StorageLinkAbilityPage { TitleBar({ title: this.title, isAbility: true }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30 }) { + Column({ space: 30.0 } as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('StorageLinkAbilityPage.ets.html') }) Text($r('app.string.both_data_binding')) @@ -68,7 +69,7 @@ struct StorageLinkAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -79,7 +80,7 @@ struct StorageLinkAbilityPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -94,10 +95,11 @@ struct StorageLinkAbilityPage { } }.width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : + $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets index fbb47570..38c08965 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,17 +14,14 @@ * limitations under the License. */ -import { StoragePropRef } from '@kit.ArkUI'; - import { + StoragePropRef, Entry, Component, State, Resource, - $r, StorageLink, Column, - $rawfile, Text, TextAlign, Button, @@ -34,6 +31,11 @@ import { SliderStyle, SliderChangeMode, AppStorage, + $r, + $rawfile, + ColumnOptions, + ClickEvent, + Margin } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -46,11 +48,11 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; struct StoragePropAbilityPage { @State title: Resource = $r('app.string.abilityone_page'); // 初始化字体大小最小值 - private minFontSize: number = 10; + private minFontSize: number = 10.0; // 和主页、Ability2页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; // 和主页、Ability2页面单向同步内容字体大小 - @StoragePropRef('contentFontSize') contentFontSize: number = 18; + private contentFontSize: number = 18.0; build() { Column() { @@ -60,7 +62,7 @@ struct StoragePropAbilityPage { TitleBar({ title: this.title, isAbility: true }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 20 }) { + Column({ space: 20.0 }as ColumnOptions) { // 查看源码 ViewCodeText({ webSrc: $rawfile('StoragePropAbilityPage.ets.html') }) Text($r('app.string.both_data_binding')) @@ -73,7 +75,7 @@ struct StoragePropAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button() { + Button('') { Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -84,7 +86,7 @@ struct StoragePropAbilityPage { .padding($r('app.float.page_padding')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick(() : void=> { // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -108,7 +110,7 @@ struct StoragePropAbilityPage { Slider({ value: this.contentFontSize, min: this.minFontSize, - max: 30, // 字体大小最大值 + max: 30.0, // 字体大小最大值 style: SliderStyle.OutSet }) .showTips(true) @@ -117,12 +119,12 @@ struct StoragePropAbilityPage { this.contentFontSize = value; }) // toFixed(0)将滑动条返回值处理为整数精度 - Text(this.contentFontSize.toFixed(0)) + Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50 }) + }.margin({ top: 50.0 }as Margin) Text($r('app.string.single_fontsize_binding')) .fontSize(this.contentFontSize) @@ -139,6 +141,6 @@ struct StoragePropAbilityPage { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ts index d9e9c567..ec6cc99e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -export type AbilityConfigType = { - bundleName: string, +export interface AbilityConfigType { + bundleName: string; abilityName: string }; \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets index f703d602..04685b36 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,15 +24,18 @@ import { ForEach, TabContent, BarMode, - $r, Builder, Column, Image, Text, HorizontalAlign, + $r, + Padding, + Margin, + ArrayLike } from '@kit.ArkUI'; -import { FirstLevelCategory } from './model/CategoricalDataType'; +import { FirstLevelCategory, SecondLevelCategory, ThirdLevelCategory } from './model/CategoricalDataType'; import { HOME_TABS } from './data/HomeData'; import { TabContentNavigation } from './TabContentNavigation'; @@ -40,19 +43,19 @@ import { TabContentNavigation } from './TabContentNavigation'; @Component struct Home { // 初始化tabsBar的index值为0 - @State tabsIndex: number = 0; + tabsIndex: number = 0.0; @StorageLink('currentBreakpoint') curBp: string = 'sm'; build() { Tabs({ barPosition: this.curBp === 'sm' ? BarPosition.End : BarPosition.Start }) { ForEach(HOME_TABS, (item: FirstLevelCategory, index: number) => { TabContent() { - TabContentNavigation({ categories: item.childNodes }) + TabContentNavigation({ categories: item.childNodes }); } .tabBar(() => { this.CustomTabBar(item, index) }) - }, item => JSON.stringify(item)) + }, (item, index) => index.toString()) } .vertical(this.curBp === 'sm' ? false : true) // 大型设备tabbar的高度为40%,小型设备的高度为56vp @@ -66,21 +69,22 @@ struct Home { }) } - @Builder CustomTabBar(item: FirstLevelCategory, index: number) { + @Builder + CustomTabBar(item: FirstLevelCategory, index: number) { Column() { Image(this.tabsIndex === index ? item.iconSelected : item.icon) - .width(24) - .height(24) - .margin({ bottom: 4 }) + .width(24.0) + .height(24.0) + .margin({ bottom: 4.0 } as Margin) Text(item.tabBarName) - .fontSize(10) + .fontSize(10.0) .fontFamily('HarmonyHeiTi-Medium') .fontColor(this.tabsIndex === index ? $r('app.color.tab_bar_select') : $r('app.color.tab_bar_unselect')) } .width('100%') .id(`tabBar${index}`) - .padding({ top: 6, bottom: 6 }) + .padding({ top: 6.0, bottom: 6.0 } as Padding) .alignItems(HorizontalAlign.Center) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets index 2355b422..8de03237 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,15 +17,12 @@ import { ColumnAttribute, Color, - Preview, Component, Column, List, - ForEach, ListItem, Text, TextAlign, - $r, Blank, Divider, ItemAlign, @@ -33,73 +30,94 @@ import { Row, Image, Alignment, + Padding, + ClickEvent, + Margin, + $r, + ColumnOptions } from '@kit.ArkUI'; import router from '@ohos.router'; import { SecondLevelCategory, ThirdLevelCategory, FourthLevelCategory } from './model/CategoricalDataType'; - -function ColumnStyle(this: ColumnAttribute): this { - this.width('100%'); - this.borderRadius(24); - this.backgroundColor(Color.White); - this.padding({ left: 12, right: 12, bottom: 4, top: 4 }); - return this; +import { UIContext } from '@ohos.arkui.UIContext'; +import { ForEach } from '@ohos.arkui.component'; + +function ColumnStyle(this: ColumnAttribute): ColumnAttribute { + this.width('100%'); + this.borderRadius(24.0); + this.backgroundColor(Color.White); + this.padding({ + left: 12.0, + right: 12.0, + bottom: 4.0, + top: 4.0 + } as Padding); + return this; } -@Preview @Component export struct TabContentNavigation { - private categories: ThirdLevelCategory[] | SecondLevelCategory[] = []; + private categories: (ThirdLevelCategory | SecondLevelCategory)[] = []; - hasSecondLevelCategory(category): boolean { - return category && category.tag ? false : true; + hasSecondLevelCategory(category: ThirdLevelCategory | SecondLevelCategory): boolean { + return (category as SecondLevelCategory).tag !== undefined; } build() { Column() { List() { if (this.categories.length > 0 && this.hasSecondLevelCategory(this.categories[0])) { - ForEach(this.categories, (secondLevelCategory: SecondLevelCategory, secondLevelCategoryIndex: number) => { - ListItem() { - Column() { - Text(secondLevelCategory.title) - .height(48) - .fontSize(14) - .width('100%') - .textAlign(TextAlign.Start) - .fontFamily('HarmonyHeiTi-Medium') - .fontColor($r('app.color.font_color_shallow')) - .padding({ bottom: 4, top: 4, left: 24 }) - + ForEach(this.categories, (item: ThirdLevelCategory | SecondLevelCategory, index: number) => { + if (this.hasSecondLevelCategory(item)) { + const secondLevelCategory = item as SecondLevelCategory; + ListItem() { Column() { - ForEach(secondLevelCategory.childNodes, (thirdLevelCategory: ThirdLevelCategory, - thirdLevelCategoryIndex: number) => { - ThirdLevelNavigation({ - thirdLevelCategory: thirdLevelCategory, - secondLevelCategoryIndex: secondLevelCategoryIndex, - ThirdLevelNavigationIndex: thirdLevelCategoryIndex + Text(secondLevelCategory.title) + .height(48.0) + .fontSize(14.0) + .width('100%') + .textAlign(TextAlign.Start) + .fontFamily('HarmonyHeiTi-Medium') + .fontColor($r('app.color.font_color_shallow')) + .padding({ bottom: 4.0, top: 4.0, left: 24.0 } as Padding) + + Column() { + ForEach(secondLevelCategory.childNodes, (thirdLevelCategory: ThirdLevelCategory, + thirdLevelCategoryIndex: number) => { + ThirdLevelNavigation({ + thirdLevelCategory: thirdLevelCategory, + secondLevelCategoryIndex: index, // 使用外层索引 + ThirdLevelNavigationIndex: thirdLevelCategoryIndex + }) }) - }) + } + .ColumnStyle() } - .ColumnStyle() } } - }) + }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) // 添加key生成函数 } else { - ForEach(this.categories, (thirdLevelCategory: ThirdLevelCategory) => { - ListItem() { - Column() { - ThirdLevelNavigation({ thirdLevelCategory: thirdLevelCategory }) + ForEach(this.categories, (item: ThirdLevelCategory | SecondLevelCategory, index: number) => { + if (!this.hasSecondLevelCategory(item)) { + const thirdLevelCategory = item as ThirdLevelCategory; + ListItem() { + Column() { + ThirdLevelNavigation({ + thirdLevelCategory: thirdLevelCategory, + secondLevelCategoryIndex: -1, // 标记为没有二级分类 + ThirdLevelNavigationIndex: index + }) + } + .ColumnStyle() } - .ColumnStyle() + .margin({ top: 4.0, bottom: 4.0 } as Margin) } - .margin({ top: 4, bottom: 4 }) - }) + }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) // 添加key生成函数 } } .width('100%') - .layoutWeight(1) - .padding({ left: 16, right: 16, top: 4 }) + .layoutWeight(1.0) + .padding({ left: 16.0, right: 16.0, top: 4.0 } as Padding) Blank() @@ -110,7 +128,7 @@ export struct TabContentNavigation { .color($r('app.color.tab_bar_divider')) } .height('100%') - .padding({ top: 12 }) + .padding({ top: 12.0 } as Padding) } } @@ -118,15 +136,15 @@ export struct TabContentNavigation { struct ThirdLevelNavigation { @State isUnfold: boolean = false; private thirdLevelCategory: ThirdLevelCategory; - private ThirdLevelNavigationIndex: int; + private ThirdLevelNavigationIndex: number; private secondLevelCategoryIndex: number; build() { Column() { Row() { Text(this.thirdLevelCategory.title) - .fontSize(16) - .margin({ left: 16 }) + .fontSize(16.0) + .margin({ left: 16.0 } as Margin) .fontFamily('HarmonyHeiTi-Medium') .fontColor($r('app.color.font_color_dark')) @@ -134,41 +152,39 @@ struct ThirdLevelNavigation { if (this.thirdLevelCategory.childNodes) { Image(this.isUnfold ? $r('app.media.ic_down_arrow') : $r('app.media.ic_right_arrow')) - .width(this.isUnfold ? 24 : 12) - .height(this.isUnfold ? 12 : 24) - .margin({ right: this.isUnfold ? 0 : 6 }) + .width(this.isUnfold ? 24.0 : 12.0) + .height(this.isUnfold ? 12.0 : 24.0) + .margin({ right: this.isUnfold ? 0.0 : 6.0 } as Margin) } } - .height(56) + .height(56.0) .width('100%') - .onClick(() => { + .onClick((event: ClickEvent) => { if (this.thirdLevelCategory.childNodes === undefined) { - // Click to jump to the corresponding page - router.push({ - url: this.thirdLevelCategory.url + this.getUIContext().getRouter().pushUrl({ + url: this.thirdLevelCategory.url as string }); } else { this.isUnfold = !this.isUnfold; } }) - // Click to expand the fourth-level category if (this.isUnfold) { - ForEach(this.thirdLevelCategory.childNodes, (fourthLevelCategory: FourthLevelCategory) => { + ForEach(this.thirdLevelCategory.childNodes, (fourthLevelCategory: FourthLevelCategory, index: number) => { Column() { Divider() - .height(1) + .height(1.0) .opacity(0.2) - .margin({ left: 42, right: 8 }) + .margin({ left: 42.0, right: 8.0 } as Margin) .color($r('app.color.font_color_dark')) FourthLevelNavigation({ fourthLevelCategory: fourthLevelCategory }) } - }, item => JSON.stringify(item)) + }, (item: FourthLevelCategory) => item.toString()) // 添加key生成函数 } } - // 整体字符串折行会被识别出来,导致功能异常,只能放在单独一行,1和0分别为首页标题层级index - .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : this.ThirdLevelNavigationIndex}`) + .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : + this.ThirdLevelNavigationIndex}`) } } @@ -179,20 +195,20 @@ struct FourthLevelNavigation { build() { Row() { Text(this.fourthLevelCategory.title) - .fontSize(16) - .layoutWeight(1) - .margin({ left: 42 }) + .fontSize(16.0) + .layoutWeight(1.0) + .margin({ left: 42.0 } as Margin) .align(Alignment.Start) .fontFamily('HarmonyHeiTi-Medium') .fontColor($r('app.color.font_color_dark')) Blank() } - .height(48) + .height(48.0) .width('100%') - .onClick(() => { + .onClick((event: ClickEvent) => { // Click to jump to the corresponding page - router.push({ - url: this.fourthLevelCategory.url + this.getUIContext().getRouter().pushUrl({ + url: this.fourthLevelCategory.url as string }); }) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets index 47d2e612..8b3dc2a3 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets @@ -14,15 +14,13 @@ * limitations under the License. */ -import { $r } from '@kit.ArkUI'; - import { FirstLevelCategory, FourthLevelCategory, SecondLevelCategory, - ThirdLevelCategory + ThirdLevelCategory, } from '../model/CategoricalDataType'; - +import { $r } from '@kit.ArkUI'; const DECORATED_OBJECT_TYPE: FourthLevelCategory[] = [ { @@ -48,12 +46,12 @@ const UPDATE_PRINCIPLE: FourthLevelCategory[] = [ const SINGLE_COMPONENT_CATEGORY: ThirdLevelCategory[] = [ { - tag: 1, + tag: 1.0, title: $r('app.string.decorated_object_type'), childNodes: DECORATED_OBJECT_TYPE }, { - tag: 1, + tag: 1.0, title: $r('app.string.update_principle'), childNodes: UPDATE_PRINCIPLE } @@ -72,23 +70,23 @@ const PARENT_CHILD_SYNC: FourthLevelCategory[] = [ const MULTI_COMPONENTS_CATEGORY: ThirdLevelCategory[] = [ { - tag: 1, + tag: 1.0, title: $r('app.string.parent_child_sync'), childNodes: PARENT_CHILD_SYNC }, { - tag: 1, + tag: 1.0, title: $r('app.string.parent_descendent_sync'), url: 'pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync' }, { - tag: 1, + tag: 1.0, title: $r('app.string.brother_sync'), url: 'pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync' } ]; -const PAGE_LEVEL_CATEGORY: SecondLevelCategory[] = [ +const PAGE_LEVEL_CATEGORY: Array = [ { title: $r('app.string.single_component_state'), childNodes: SINGLE_COMPONENT_CATEGORY @@ -100,14 +98,14 @@ const PAGE_LEVEL_CATEGORY: SecondLevelCategory[] = [ ]; -const APP_LEVEL_CATEGORY: ThirdLevelCategory[] = [ +const APP_LEVEL_CATEGORY: Array = [ { - tag: 1, + tag: 1.0, title: $r('app.string.application_storage_ui'), url: 'pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync', }, { - tag: 1, + tag: 1.0, title: $r('app.string.ability_storage_ui'), url: 'pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync', } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets index 91d93e00..42c31a10 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets @@ -1,7 +1,7 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License") + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -17,13 +17,14 @@ import { Resource } from '@kit.ArkUI'; export interface FirstLevelCategory { - childNodes: SecondLevelCategory[] | ThirdLevelCategory[], + childNodes: Array, iconSelected: Resource, // The icon for the first-level category is selected icon: Resource, // The icon for the first-level category is not selected tabBarName: Resource // First-level category title } export interface SecondLevelCategory { + tag?: number, title: Resource, // Second-level category titles childNodes: ThirdLevelCategory[] } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets index ea5cbd0b..ac8312cd 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { CodeView } from '../../../../commoncomponents/CodeView'; @@ -45,6 +45,6 @@ struct BrotherComponentSync { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets index 906b60d8..8916eba2 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,8 +18,10 @@ import { Component, Column, Text, - $r, TextAlign, + $r, + Margin, + Resource } from '@kit.ArkUI'; import { ProvideFatherComponent } from './ProvideFatherComponent'; @@ -27,7 +29,6 @@ import { StateFatherComponent } from './StateFatherComponent'; @Component export struct BrotherComponentSyncCode { - build() { Column() { Column() { @@ -47,7 +48,7 @@ export struct BrotherComponentSyncCode { // 共同父组件@Provide ProvideFatherComponent() } - .margin({ top: 10 }) + .margin({ top: 10.0 } as Margin) } } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets index ddd0ef45..0ae2e875 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,41 +15,42 @@ */ import { - getUIContext, Component, State, Consume, Resource, Column, - $rawfile, Text, - $r, TextAlign, Row, Select, - Circle, + SelectOption, FlexAlign, Color, + ColumnOptions, + $r, + $rawfile } from '@kit.ArkUI'; +import { Circle } from '@ohos.arkui.component'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; - @Component export struct ConsumeBrotherOneComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和父组件、子组件B双向同步圆形颜色 @Consume consumeCircleColor: Resource; // 和父组件、子组件B双向同步Select组件的Index值 - @Consume currentSelectIndex: number; + @Consume currentSelectIndex: number = 0; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ConsumeBrotherOneComponent.ets.html') }) Text($r('app.string.consume_brothers_title')) @@ -58,19 +59,20 @@ export struct ConsumeBrotherOneComponent { .width('100%') .textAlign(TextAlign.Center) Row() { - Select(this.selectColors) + Select(this.selectValues) .id('consumeSelectCompA') .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number) => { - // 此组件@Consume声明的数据页面更新,兄弟组件@Consume的数据页面同步更新 + .onSelect((index: number, text: string) => { + // 孙组件@Consume声明的数据页面更新,爷组件@Provide的数据页面同步更新 this.currentSelectIndex = index; this.consumeCircleColor = this.selectColors[index as int].color; }) + Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.consumeCircleColor) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets index d9f1247f..c931cccf 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,34 +20,37 @@ import { Consume, Resource, Column, - $rawfile, Text, - $r, TextAlign, Row, Select, - getUIContext, - Circle, FlexAlign, Color, + ColumnOptions, + $r, + $rawfile, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; +import { Circle, } from '@ohos.arkui.component'; @Component export struct ConsumeBrotherTwoComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和父组件、子组件B双向同步圆形颜色 @Consume consumeCircleColor: Resource; // 和父组件、子组件A双向同步Select组件的Index值 @Consume currentSelectIndex: number; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ConsumeBrotherTwoComponent.ets.html') }) Text($r('app.string.consume_brothers_title')) @@ -57,28 +60,29 @@ export struct ConsumeBrotherTwoComponent { .textAlign(TextAlign.Center) .height($r('app.float.button_height')) Row() { - Select(this.selectColors) + Select(this.selectValues) .id('consumeSelectCompB') .selected(this.currentSelectIndex) - .value(getResourceString(getUIContext().getHostContext(this) as common.UIAbilityContext, - this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number) => { + .onSelect((index: number, text: string) => { // 此组件@Consume声明的数据页面更新,兄弟组件@Consume的数据页面同步更新 this.currentSelectIndex = index; this.consumeCircleColor = this.selectColors[index as int].color; }) Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) + .width($r('app.float.circle_size')) + .height($r('app.float.circle_size')) .fill(this.consumeCircleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets index 6ffae7bb..9a59c979 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,41 +15,44 @@ */ import { - getUIContext, Component, State, Link, Resource, Column, - $rawfile, Text, - $r, TextAlign, Row, Select, - Circle, FlexAlign, Color, + ColumnOptions, + $r, + $rawfile, + SizeOptions, + BorderOptions, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; - -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Circle, } from '@ohos.arkui.component'; @Component export struct LinkBrotherOneComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和父组件、子组件B双向同步圆形颜色 @Link circleColor: Resource; // 和父组件、子组件B双向同步Select组件的Index值 @Link currentSelectIndex: number; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('LinkBrotherOneComponent.ets.html') }) Text($r('app.string.link_brothers_title')) @@ -59,27 +62,32 @@ export struct LinkBrotherOneComponent { .textAlign(TextAlign.Center) .fontColor($r('app.color.tips_font_color')) Row() { - Select(this.selectColors) + Select(this.selectValues) .id('linkSelectCompA') .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + // .value(getResourceString(this.CONTEXT, this.selectValues[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number) => { + .onSelect((index: number, text: string) => { // 此组件@Link声明的数据页面更新,兄弟组件@Link的数据页面同步更新 this.currentSelectIndex = index; this.circleColor = this.selectColors[index as int].color; }) Circle() - .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) + .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') } as SizeOptions) .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') } - .padding(10) - .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) + .padding(10.0) + .border({ + radius: $r('app.float.component_radius'), + color: Color.Blue, + width: $r('app.float.border_width') + } as BorderOptions) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets index 85688a14..074bba42 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,34 +20,37 @@ import { Link, Resource, Column, - $rawfile, Text, - $r, TextAlign, Row, Select, - getUIContext, - Circle, FlexAlign, Color, + $r, + $rawfile, + ColumnOptions, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; +import { Circle, } from '@ohos.arkui.component'; @Component export struct LinkBrotherTwoComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和父组件、子组件A双向同步圆形颜色 @Link circleColor: Resource; // 和父组件、子组件A双向同步Select的Index值 @Link currentSelectIndex: number; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('LinkBrotherTwoComponent.ets.html') }) Text($r('app.string.link_brothers_title')) @@ -57,15 +60,16 @@ export struct LinkBrotherTwoComponent { .textAlign(TextAlign.Center) .height($r('app.float.button_height')) Row() { - Select(this.selectColors) + Select(this.selectValues) .id('linkSelectCompB') .selected(this.currentSelectIndex) - .value(getResourceString(getUIContext().getHostContext(this) as common.UIAbilityContext, this.selectColors[this.currentSelectIndex as int].value)) + // .value(getResourceString(this.CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number) => { + .onSelect((index: number, text: string) => { // 此组件@Link声明的数据页面更新,兄弟组件@Link的数据页面同步更新 this.currentSelectIndex = index; this.circleColor = this.selectColors[index as int].color; @@ -76,7 +80,7 @@ export struct LinkBrotherTwoComponent { }.justifyContent(FlexAlign.SpaceAround) .width('100%') } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets index 0079c1a7..a1f72f89 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,12 +19,13 @@ import { State, Provide, Resource, - $r, Column, - $rawfile, Text, TextAlign, Color, + $r, + $rawfile, + ColumnOptions, } from '@kit.ArkUI'; import { ColorType } from '../model/ColorType'; @@ -40,10 +41,10 @@ export struct ProvideFatherComponent { // 共同父组件使用@Provide初始化圆形颜色 @Provide consumeCircleColor: Resource = $r('app.color.circle_blue'); // 初始化Select组件的Index为0 - @Provide currentSelectIndex: number = 0; + @Provide currentSelectIndex: number = 0.0; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ProvideFatherComponent.ets.html') }) Text($r('app.string.parent_titletwo')) @@ -55,7 +56,7 @@ export struct ProvideFatherComponent { ConsumeBrotherOneComponent() // 和父组件双向同步子组件B ConsumeBrotherTwoComponent() - }.padding(10) + }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets index f48e460c..59df408d 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets @@ -18,12 +18,13 @@ import { Component, State, Resource, - $r, Column, - $rawfile, Text, TextAlign, Color, + $r, + $rawfile, + ColumnOptions } from '@kit.ArkUI'; import { ColorType } from '../model/ColorType'; @@ -37,12 +38,11 @@ export struct StateFatherComponent { // 共同父组件使用@State初始化圆形颜色 @State circleColor: Resource = $r('app.color.circle_blue'); // 初始化一个颜色数组 - @State selectColors: ColorType[] = COLOR_SELECT_DATA; // 初始化当前Select的Index为0 - @State currentSelectIndex: number = 0; + @State currentSelectIndex: number = 0.0; build() { - Column({ space: 10 }) { + Column({ space: 10.0 }as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('StateFatherComponent.ets.html') }) Text($r('app.string.parent_titleone')) @@ -60,7 +60,7 @@ export struct StateFatherComponent { circleColor: this.circleColor, currentSelectIndex: this.currentSelectIndex }) - }.padding(10) + }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets index d21954cd..27d7c8eb 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,17 +14,23 @@ * limitations under the License. */ -import { $r } from '@kit.ArkUI'; - import { ColorType } from '../model/ColorType' +import { $r, SelectOption } from '@kit.ArkUI'; export const COLOR_SELECT_DATA: ColorType[] = [ { - value: $r('app.string.select_colorblue'), color: $r('app.color.circle_blue') }, { - value: $r('app.string.select_colorpink'), color: $r('app.color.circle_pink') } +] + +export const NEW_COLOR_SELECT_DATA: SelectOption[] = [ + { + value: $r('app.string.select_colorblue'), + }, + { + value: $r('app.string.select_colorpink'), + } ] \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets index 9f1fc5a8..2f3e46bc 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,55 +15,55 @@ */ import { - getUIContext, Component, State, Consume, Resource, Column, - $rawfile, Row, Select, - $r, - Circle, FlexAlign, Text, TextAlign, Color, + $r, + $rawfile, + Margin, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; - -// 声明一个上下文变量 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Circle, } from '@ohos.arkui.component'; @Component export struct ConsumeDescendentComponent { // 初始化一个颜色数组数据 @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和爷组件双向同步圆形颜色 @Consume consumeCircleColor: Resource; // 和爷组件双向同步Select的Index值 @Consume currentSelectIndex: number; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ConsumeDescendentComponent.ets.html') }) Row() { - Select(this.selectColors) + Select(this.selectValues) .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.tips_font_size') }) .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandsonCompB') - .onSelect((index: number) => { + .onSelect((index: number, text?: string | undefined) => { // 孙组件@Consume声明的数据页面更新,爷组件@Provide的数据页面同步更新 this.currentSelectIndex = index; this.consumeCircleColor = this.selectColors[index as int].color; @@ -74,7 +74,7 @@ export struct ConsumeDescendentComponent { }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6 }) + .margin({ bottom: 6.0 } as Margin) Text($r('app.string.deepnest_descendent_titletwo')) .fontColor($r('app.color.tips_font_color')) @@ -82,7 +82,7 @@ export struct ConsumeDescendentComponent { .width('100%') .textAlign(TextAlign.Center) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Red, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets index ebadb463..69912f32 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { CodeView } from '../../../../commoncomponents/CodeView'; @@ -45,6 +45,6 @@ struct DeepNestComponentsSync { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets index 67687dc5..c061c869 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,8 +18,9 @@ import { Component, Column, Text, - $r, TextAlign, + Margin, + $r } from '@kit.ArkUI'; import { StateGrandfatherComponent } from './StateGrandfatherComponent'; @@ -36,7 +37,7 @@ export struct DeepNestComponentsSyncCode { .textAlign(TextAlign.Start) // 爷组件@State StateGrandfatherComponent() - }.margin({ bottom: 16 }) + }.margin({ bottom: 16.0 } as Margin) Column() { Text($r('app.string.realize_by_provide_consume')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets index 34d01d8d..48da86df 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,53 +15,54 @@ */ import { - getUIContext, Component, State, Link, Resource, Column, - $rawfile, Row, Select, - $r, - Circle, FlexAlign, Text, TextAlign, Color, + $r, + $rawfile, + Margin, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; - -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Circle, } from '@ohos.arkui.component'; @Component export struct LinkDescendentComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 和父组件和爷组件双向同步圆形颜色 @Link circleColor: Resource; // 和父组件和爷组件双向同步Select的Index值 @Link currentSelectIndex: number; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('LinkDescendentComponent.ets.html') }) Row() { - Select(this.selectColors) + Select(this.selectValues) .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.tips_font_size') }) .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandsonCompA') - .onSelect((index: number) => { + .onSelect((index: number, text?: string | undefined) => { // 孙组件@Link组件数据页面更新,爷组件同步更新 this.currentSelectIndex = index; this.circleColor = this.selectColors[index as int].color; @@ -71,7 +72,7 @@ export struct LinkDescendentComponent { .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6 }) + .margin({ bottom: 6.0 } as Margin) Text($r('app.string.deepnest_descendent_titleone')) .fontColor($r('app.color.tips_font_color')) @@ -79,7 +80,7 @@ export struct LinkDescendentComponent { .width('100%') .textAlign(TextAlign.Center) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Red, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets index bfd9f4b3..ad395828 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,81 +15,82 @@ */ import { - getUIContext, Component, State, Provide, Resource, - $r, Column, - $rawfile, Text, TextAlign, Row, Select, - Circle, FlexAlign, Color, + $r, + $rawfile, + Margin, + SelectOption } from '@kit.ArkUI'; - import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { ConsumeDescendentComponent } from './ConsumeDescendentComponent'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; import { getResourceString } from '../../../../utils/ResourceUtils'; - -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Circle, } from '@ohos.arkui.component'; @Component export struct ProvideGrandfatherComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 初始化爷组件@Provide的原型颜色 @Provide consumeCircleColor: Resource = $r('app.color.circle_blue'); // 初始化Select组件的Index @Provide currentSelectIndex: number = 0; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { // 点击查看源码 - ViewCodeText({ webSrc: $rawfile('ProvideGrandfatherComponent.ets.html') }) + ViewCodeText({ webSrc: $rawfile('ProvideGrandfatherComponent.ets.html') }) Text($r('app.string.deepnest_parent_titletwo')) .fontSize($r('app.float.tips_font_size')) .fontColor($r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - .margin({ top: 10 }) + .margin({ top: 10.0 } as Margin) Row() { - Select(this.selectColors) + Select(this.selectValues) .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + // .value(getResourceString(this.CONTEXT, this.selectColors[this.currentSelectIndex].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.tips_font_size') }) .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandfatherCompB') - .onSelect((index: number) => { + .onSelect((index: number, text?: string | undefined) => { // 爷组件@Provide声明的数据页面更新,孙组件@Consume关联的变量同步更新 this.currentSelectIndex = index; - this.consumeCircleColor = this.selectColors[index as int].color; + this.consumeCircleColor = this.selectColors[index].color; }) Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.consumeCircleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6 }) + .margin({ bottom: 6.0 } as Margin) + // 子组件 ConsumeChildComp() - }.padding(10) + }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } @Component struct ConsumeChildComp { - build() { Column() { Text($r('app.string.deepnest_child_titletwo')) @@ -101,7 +102,7 @@ struct ConsumeChildComp { // 双向同步孙组件 ConsumeDescendentComponent() } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets index 0dbf9497..003a2f7d 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,32 +15,30 @@ */ import { - getUIContext, Component, State, Resource, - $r, Column, - $rawfile, Text, TextAlign, Row, Select, - Circle, FlexAlign, Color, Link, + $r, + $rawfile, + ColumnOptions, + SelectOption } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { LinkDescendentComponent } from './LinkDescendentComponent'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; - -// 声明一个上下文变量 -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; +import { Circle } from '@ohos.arkui.component'; @Component export struct StateGrandfatherComponent { @@ -48,11 +46,13 @@ export struct StateGrandfatherComponent { @State circleColor: Resource = $r('app.color.circle_blue'); // 初始化一个颜色数组 @State selectColors: ColorType[] = COLOR_SELECT_DATA; + @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; // 初始化当前select组件的index - @State currentSelectIndex: number = 0; + @State currentSelectIndex: number = 0.0; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('StateGrandfatherComponent.ets.html') }) Text($r('app.string.deepnest_parent_titleone')) @@ -61,15 +61,15 @@ export struct StateGrandfatherComponent { .width('100%') .textAlign(TextAlign.Center) Row() { - Select(this.selectColors) + Select(this.selectValues) .selected(this.currentSelectIndex) - .value(getResourceString(CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) + .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.tips_font_size') }) .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandfatherCompA') - .onSelect((index: number) => { + .onSelect((index: number, text?: string | undefined) => { // 爷组件@State声明的数据页面更新,孙组件@Link关联的变量同步更新 this.currentSelectIndex = index; this.circleColor = this.selectColors[index as int].color; @@ -79,9 +79,10 @@ export struct StateGrandfatherComponent { .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') + // 双向同步子组件 LinkChildComp({ circleColor: this.circleColor, currentSelectIndex: this.currentSelectIndex }) - }.padding(10) + }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } @@ -107,7 +108,7 @@ struct LinkChildComp { currentSelectIndex: this.currentSelectIndex }) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets index 2a6e7aa4..01c27eb3 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,7 +16,8 @@ import { Resource } from '@kit.ArkUI'; -export type ColorType = { - value:Resource, - color:Resource, -}; \ No newline at end of file +export interface ColorType { + color: Resource, +}; + + diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets index 6388b58b..18f738ed 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,14 +18,15 @@ import { Component, ObjectLink, Column, - $rawfile, Text, - $r, TextAlign, Row, TextInput, FlexAlign, Color, + ColumnOptions, + $r, + $rawfile } from '@kit.ArkUI'; import { ClassObject } from './ParentChildPartialContentSyncCode'; @@ -37,7 +38,7 @@ export struct ObjectLinkComponent { @ObjectLink childObjectData: ClassObject; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ObjectLinkComponent.ets.html') }) @@ -51,12 +52,12 @@ export struct ObjectLinkComponent { .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) .textAlign(TextAlign.Center) - .layoutWeight(1) + .layoutWeight(1.0) TextInput({ text: this.childObjectData.attributeType }) - .fontSize(20) - .layoutWeight(1) + .fontSize(20.0) + .layoutWeight(1.0) .id('childAttribute') - .onChange((value: string) => { + .onChange((value: string): void => { // 子组件对象属性更新,父元素同步 this.childObjectData.attributeType = value; }) @@ -64,6 +65,6 @@ export struct ObjectLinkComponent { .justifyContent(FlexAlign.SpaceAround) } .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) - .padding(10) + .padding(10.0) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets index f8ee9d51..38167f62 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { ParentChildPartialContentSyncCode } from './ParentChildPartialContentSyncCode'; @@ -45,6 +45,6 @@ struct ParentChildPartialContentSync { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets index 1b5719da..a6115cf0 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,22 +14,23 @@ * limitations under the License. */ -import { PropRef } from '@kit.ArkUI'; - import { Observed, Resource, - $r, Component, State, Column, - $rawfile, Text, TextAlign, ForEach, Color, ObjectLink, TextInput, + $r, + $rawfile, + ColumnOptions, + PropRef, + ClickEvent } from '@kit.ArkUI'; import { ObjectLinkComponent } from './ObjectLinkComponent'; @@ -48,19 +49,20 @@ export class ClassObject { } // 初始化父组件中的数据 -const PARENT_DATA: ClassObject[] = [new ClassObject($r('app.string.partial_sync_element_one'), $r('app.string.partial_sync_attribute_one')), - new ClassObject($r('app.string.partial_sync_element_two'), $r('app.string.partial_sync_attribute_two')), - new ClassObject($r('app.string.partial_sync_element_three'), $r('app.string.partial_sync_attribute_three'))]; +const PARENT_DATA: ClassObject[] = + [new ClassObject($r('app.string.partial_sync_element_one'), $r('app.string.partial_sync_attribute_one')), + new ClassObject($r('app.string.partial_sync_element_two'), $r('app.string.partial_sync_attribute_two')), + new ClassObject($r('app.string.partial_sync_element_three'), $r('app.string.partial_sync_attribute_three'))]; @Component export struct ParentChildPartialContentSyncCode { // 初始化父组件中状态变量 @State parentData: ClassObject[] = PARENT_DATA; // 与子组件同步的的数据是数组的第几个元素,默认选中第一个 - @State syncIndex: number = 0; + @State syncIndex: number = 0.0; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ParentChildPartialContentSyncCode.ets.html') }) @@ -76,19 +78,19 @@ export struct ParentChildPartialContentSyncCode { ParentCompDataItem({ index: index, syncIndex: this.syncIndex, childObject: item }) } .backgroundColor(index === this.syncIndex ? $r('app.color.component_background_pink') : undefined) - .onClick(() => { + .onClick((): void => { this.syncIndex = index; }) - }, item => JSON.stringify(item)) + }, index => index.toString()) } .width('100%') .backgroundColor($r('app.color.component_background_pink')) //与父组件状态同步的子组件 - ObjectLinkComponent({ childObjectData: this.parentData[this.syncIndex as int] }) + ObjectLinkComponent({ childObjectData: this.parentData[this.syncIndex] }) } .width('100%') - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } @@ -96,8 +98,8 @@ export struct ParentChildPartialContentSyncCode { // 展示数组中单个元素的子组件 @Component struct ParentCompDataItem { - private index: int; - @PropRef syncIndex: number; + private index: number; + syncIndex: number; // 使用@ObjectLink修饰,与父组件中元素同步 @ObjectLink childObject: ClassObject; @@ -105,22 +107,22 @@ struct ParentCompDataItem { Column() { Text(this.childObject.elementType) .width('100%') - .fontSize(20) + .fontSize(20.0) if (this.index === this.syncIndex) { TextInput({ text: this.childObject.attributeType }) - .fontSize(20) - .id(`attribute${this.index + 1}`) - .onChange((value: string) => { + .fontSize(20.0) + .id(`attribute${this.index + 1.0}`) + .onChange((value: string): void => { // 更新父组件中元素的属性,子组件同步 this.childObject.attributeType = value; }) } else { Text(this.childObject.attributeType) .width('100%') - .fontSize(20) + .fontSize(20.0) } } - .padding(10) + .padding(10.0) .id(`arrayElement${this.index}`) } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets index 656da62b..52543e76 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,18 +18,21 @@ import { Component, Link, Column, - $rawfile, Text, - $r, TextAlign, Circle, Button, ButtonType, Color, + ColumnOptions, + $r, + $rawfile, + ClickEvent } from '@kit.ArkUI'; import { COLOR_DATA } from './UniAndBidirectionSyncCode'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; +import { Circle, } from '@ohos.arkui.component'; @Component export struct ChildCompLink { @@ -37,15 +40,15 @@ export struct ChildCompLink { @Link circleColor: string; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 - ViewCodeText({webSrc: $rawfile('ComponentLink.ets.html')}) + ViewCodeText({ webSrc: $rawfile('ComponentLink.ets.html') }) Text($r('app.string.child_component')) .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - .margin(10) + .margin(10.0) Text($r('app.string.both_direction_sync_tips')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) @@ -55,7 +58,7 @@ export struct ChildCompLink { Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) - Button() { + Button('') { Text($r('app.string.both_direction_sync_btn')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) @@ -66,12 +69,12 @@ export struct ChildCompLink { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((): void => { // 点击更新子组件@Link声明的变量,此子组件更新,父组件以及@Prop声明的子组件变量同步 this.circleColor = COLOR_DATA.RED; }) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets index 4348b9a8..867ba5a1 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,38 +14,41 @@ * limitations under the License. */ -import { PropRef } from '@kit.ArkUI'; - import { Component, Column, - $rawfile, Text, - $r, + PropRef, TextAlign, Circle, Button, ButtonType, Color, + ColumnOptions, + $r, + $rawfile, + ClickEvent, + StorageProp } from '@kit.ArkUI'; +import { Circle } from '@ohos.arkui.component'; import { COLOR_DATA } from './UniAndBidirectionSyncCode'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; @Component export struct ChildCompProp { // 圆形颜色,和父组件中的状态变量单向同步,只支持基础类型 - @PropRef circleColor: string; + @StorageProp('circleColor') circleColor: string = 'red'; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ComponentProp.ets.html') }) Text($r('app.string.child_component')) .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - .margin(10) + .margin(10.0) Text($r('app.string.single_direction_sync_tips')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) @@ -55,7 +58,7 @@ export struct ChildCompProp { Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) - Button() { + Button('') { Text($r('app.string.single_direction_sync_btn')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) @@ -66,12 +69,12 @@ export struct ChildCompProp { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((): void => { // 点击更新子组件@Prop声明的变量,此子组件更新,父组件以及@Link声明的子组件变量不同步 this.circleColor = COLOR_DATA.BLUE; }) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets index 7de6e685..d08948f1 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { UniAndBidirectionSyncCode } from './UniAndBidirectionSyncCode'; @@ -45,6 +45,6 @@ struct UniAndBidirectionSync { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets index f904bba3..a959d730 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,22 +18,31 @@ import { Component, State, Column, - $rawfile, Text, - $r, TextAlign, - Circle, Button, ButtonType, Color, + ColumnOptions, + ClickEvent, + $r, + $rawfile } from '@kit.ArkUI'; import { ChildCompLink } from './ComponentLink'; import { ChildCompProp } from './ComponentProp'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; +import { Circle, } from '@ohos.arkui.component'; + +interface ColorData { + GREY: string; + BLUE: string; + PINK: string; + RED: string; +} // 初始化圆形的可设置颜色 -export const COLOR_DATA = { +export const COLOR_DATA: ColorData = { GREY: '#eebebeba', BLUE: '#4A90E2', PINK: '#8DF8BEBE', @@ -46,15 +55,15 @@ export struct UniAndBidirectionSyncCode { @State circleColor: string = COLOR_DATA.GREY; build() { - Column({ space: 10 }) { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('UniAndBidirectionSyncCode.ets.html') }) Text($r('app.string.parent_component')) .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - .margin(10) + .margin(10.0) Text($r('app.string.uni_and_bidirection_sync_tips')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) @@ -64,7 +73,7 @@ export struct UniAndBidirectionSyncCode { .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) // 点击更新父组件的圆形颜色变量,父组件更新,子组件@Link以及@Prop继承的变量同步 - Button() { + Button('') { Text($r('app.string.uni_and_bidirection_sync_btn')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) @@ -75,16 +84,17 @@ export struct UniAndBidirectionSyncCode { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((event: ClickEvent) => { this.circleColor = COLOR_DATA.PINK; }) } + // 单向同步子组件 ChildCompProp({ circleColor: this.circleColor }) // 双向同步子组件 ChildCompLink({ circleColor: this.circleColor }) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets index 06fbbb42..aa4ac22c 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { ArrayTypeCode } from './ArrayTypeCode'; @@ -29,7 +29,7 @@ import { CodeView } from '../../../../../commoncomponents/CodeView' @Entry @Component -struct ArrayType { +struct ArrayTypes { @State title: Resource = $r('app.string.array_type'); build() { @@ -45,6 +45,6 @@ struct ArrayType { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets index 28518fb7..b67912df 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets @@ -1,11 +1,11 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,20 +16,23 @@ import { Resource, - $r, Component, State, Column, - $rawfile, List, ForEach, ListItem, Button, ButtonType, Color, - getUIContext, Text, Divider, + $r, + $rawfile, + ColumnOptions, + ClickEvent, + Margin, + Padding } from '@kit.ArkUI'; import promptAction from '@ohos.promptAction'; @@ -50,10 +53,10 @@ export class ArrayDataType { // 初始化数组数据 const ARRAY_TYPE_AGE_DATA: ArrayDataType[] = [new ArrayDataType(0, 'name', 17), new ArrayDataType(1, 'name', 18), - new ArrayDataType(2, 'name', 19)] + new ArrayDataType(2, 'name', 19)] // 初始化功能按钮字符串数据 const ARRAY_TYPE_BTN: Resource[] = [$r('app.string.array_type_add'), $r('app.string.array_type_delete'), - $r('app.string.array_type_update')]; + $r('app.string.array_type_update')]; @Component export struct ArrayTypeCode { @@ -61,7 +64,7 @@ export struct ArrayTypeCode { @State arrayTypeData: ArrayDataType[] = ARRAY_TYPE_AGE_DATA; build() { - Column({ space: 10 }) { + Column({ space: 10 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ArrayTypeCode.ets.html') }) // 数组内容展示 @@ -70,14 +73,16 @@ export struct ArrayTypeCode { ListItem() { ArrayDataItem({ arrayDataItem: item, itemIndex: index }) } - }, item => JSON.stringify(item)) + }, index => index.toString()) + } .width('100%') .height('40%') .backgroundColor($r('app.color.component_background_pink')) - .padding({ left: 10, right: 10 }) + .padding({ left: 10, right: 10 } as Padding) + // 功能按钮区 - ForEach(ARRAY_TYPE_BTN, (item:Resource, index:number) => { + ForEach(ARRAY_TYPE_BTN, (item: Resource, index: number) => { Button(item) .id(`arrayTypeBtn${index}`) .width('100%') @@ -86,25 +91,26 @@ export struct ArrayTypeCode { .fontSize($r('app.float.button_text_size')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((event: ClickEvent) => { this.handleButtonClick(index) }) - }, item => JSON.stringify(item)) + }, index => index.toString()) } .padding(10) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } - handleButtonClick(index: number){ - switch (index) { + handleButtonClick(index: number) { + const intIndex = index | 0; + switch (intIndex) { case 0: - // 数组添加元素 - this.arrayTypeData.push(new ArrayDataType(this.arrayTypeData.length, `name`, 18)); // 新增元素数据,age为18 + // 数组添加元素 + this.arrayTypeData.push(new ArrayDataType(this.arrayTypeData.length, `name`, 18)); break; case 1: if (this.arrayTypeData.length === 0) { // 当数据没有数据的时候,点击删除按钮,出现提示弹窗 - getUIContext().getPromptAction.showToast({ + promptAction.openToast({ message: $r('app.string.array_type_deletetoast') }); } else { @@ -115,13 +121,14 @@ export struct ArrayTypeCode { case 2: if (this.arrayTypeData.length === 0) { // 当数据没有数据的时候,点击更新按钮,出现提示弹窗 - getUIContext().getPromptAction.showToast({ + promptAction.openToast({ message: $r('app.string.array_type_updatetoast') }); break; } - // 初始化一个对象后给数组中的元素赋值,更新数组元素 - let temp = new ArrayDataType(this.arrayTypeData[0].id, this.arrayTypeData[0].name, this.arrayTypeData[0].age + 1); + // 初始化一个对象后给数组中的元素赋值,更新数组元素 + let temp = + new ArrayDataType(this.arrayTypeData[0].id, this.arrayTypeData[0].name, this.arrayTypeData[0].age + 1); this.arrayTypeData[0] = temp; break; default: @@ -133,7 +140,8 @@ export struct ArrayTypeCode { // 数组Item内容组件 @Component struct ArrayDataItem { - private arrayDataItem: ArrayDataType; + // private arrayDataItem: ArrayDataType; + private arrayDataItem: ArrayDataType = new ArrayDataType(0, "default", 18); private itemIndex: number; build() { @@ -148,8 +156,8 @@ struct ArrayDataItem { .fontSize(20) Divider().width('100%') .strokeWidth(1) - .margin({ top: 20 }) + .margin({ top: 20 } as Margin) } - .margin({ top: 20 }) + .margin({ top: 20 } as Margin) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets index d461a806..d7a36ac5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,12 +19,11 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; - import { BaseTypeCode } from './BaseTypeCode'; import { CodeView } from '../../../../../commoncomponents/CodeView' @@ -35,7 +34,7 @@ struct BaseType { build() { Column() { - CodeView({ title: this.title}){ + CodeView({ title: this.title }) { BaseTypeCode() } } @@ -46,6 +45,6 @@ struct BaseType { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets index 56ccdd7f..d9c69579 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,27 +18,30 @@ import { Component, State, Resource, - $r, Column, - $rawfile, Text, TextAlign, Circle, Button, ButtonType, Color, + $r, + $rawfile, + ColumnOptions, + ClickEvent } from '@kit.ArkUI'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText' +import { Circle } from '@ohos.arkui.component'; @Component export struct BaseTypeCode { @State circleColor: Resource = $r('app.color.circle_pink'); build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 - ViewCodeText({webSrc: $rawfile('BaseTypeCode.ets.html')}) + ViewCodeText({ webSrc: $rawfile('BaseTypeCode.ets.html') }) Text($r('app.string.base_type_tip_text')) .fontColor($r('app.color.tips_font_color')) @@ -48,7 +51,7 @@ export struct BaseTypeCode { Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) - Button() { + Button('') { Text(this.circleColor.id === $r('app.color.circle_pink') .id ? $r('app.string.set_to_blue') : $r('app.string.set_to_pink')) .fontColor($r('app.color.button_text_color')) @@ -60,7 +63,7 @@ export struct BaseTypeCode { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick(() => { + .onClick((event: ClickEvent) => { if (this.circleColor.id === $r('app.color.circle_pink').id) { this.circleColor = $r('app.color.circle_blue'); } else { @@ -68,7 +71,7 @@ export struct BaseTypeCode { } }) } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets index c5b09fdf..e3825994 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { ClassObjectTypeCode } from './ClassObjectTypeCode'; @@ -45,6 +45,6 @@ struct ClassObjectType { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets index cfe7b7f0..8b9031cf 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,15 +14,11 @@ * limitations under the License. */ -import { applyStyles } from '@kit.ArkUI'; - import { - getUIContext, + applyStyles, Component, State, - $r, Column, - $rawfile, Row, Text, TextAlign, @@ -34,45 +30,50 @@ import { ObjectLink, CommonMethod, Observed, + ColumnOptions, + ClickEvent, + $r, + $rawfile, + Padding, + Margin } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; import { getResourceString } from '../../../../../utils/ResourceUtils'; -const CONTEXT: common.UIAbilityContext = getUIContext().getHostContext(this) as common.UIAbilityContext; - @Component export struct ClassObjectTypeCode { // 对象类型状态变量初始化 - @State classObjectData: ParentClass = new ParentClass(getResourceString(CONTEXT, $r('app.string.class_object')), - getResourceString(CONTEXT, $r('app.string.class_attribute')), 1, - new ChildClass(getResourceString(CONTEXT, $r('app.string.class_child_attribute')), 2)); + @State classObjectData: ParentClass = new ParentClass(getResourceString(this.CONTEXT, $r('app.string.class_object')), + getResourceString(this.CONTEXT, $r('app.string.class_attribute')), 1.0, + new ChildClass(getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')), 2.0)); // 更新对象的次数 - private clickedCount: int = 0; + private clickedCount: number = 0.0; + private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ClassObjectTypeCode.ets.html') }) - Column({ space: 15 }) { + Column({ space: 15.0 } as ColumnOptions) { Row() { Text(this.classObjectData.title) - .fontSize(20) + .fontSize(20.0) .textAlign(TextAlign.End) Divider() - .layoutWeight(1) - .strokeWidth(1) - .margin({ top: 20, left: 5 }) + .layoutWeight(1.0) + .strokeWidth(1.0) + .margin({ top: 20.0, left: 5.0 } as Margin) } .width('100%') Column() { Row() { Text(this.classObjectData.attributeTitle) - .fontSize(20) + .fontSize(20.0) Text(`${this.classObjectData.attribute}`) - .fontSize(20) + .fontSize(20.0) .textAlign(TextAlign.End) } .width('100%') @@ -80,27 +81,29 @@ export struct ClassObjectTypeCode { Divider() .width('100%') - .strokeWidth(1) + .strokeWidth(1.0) } .width('100%') - .padding({ left: 50 }) + .padding({ left: 50.0 } as Padding) ChildObjectComp({ childObject: this.classObjectData.child }) // 对象的属性,使用子组件显示 } .width('100%') .backgroundColor($r('app.color.component_background_pink')) - .padding(10) + .padding(10.0) + // 点击更新对象 Button($r('app.string.class_type_update_object')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 更新对象,把新的对象直接赋值给状态变量 this.clickedCount++; - let objectTitle: string = getResourceString(CONTEXT, $r('app.string.class_object')) + this.clickedCount; - let attributeTitle: string = getResourceString(CONTEXT, $r('app.string.class_attribute')) + this.clickedCount; - let childAttributeTitle: string = getResourceString(CONTEXT, $r('app.string.class_child_attribute')) - + this.clickedCount; - let newObject = new ParentClass(objectTitle, attributeTitle, this.classObjectData.attribute + 1, - new ChildClass(childAttributeTitle, this.classObjectData.child.attribute + 1)); + let objectTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_object')) + this.clickedCount; + let attributeTitle: string = + getResourceString(this.CONTEXT, $r('app.string.class_attribute')) + this.clickedCount; + let childAttributeTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')) + + this.clickedCount; + let newObject = new ParentClass(objectTitle, attributeTitle, this.classObjectData.attribute + 1.0, + new ChildClass(childAttributeTitle, this.classObjectData.child.attribute + 1.0)); this.classObjectData = newObject; }) .id('updateObject') @@ -109,7 +112,7 @@ export struct ClassObjectTypeCode { .type(ButtonType.Capsule) .applyStyles(buttonStyle) Button($r('app.string.class_type_update_attribute')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 点击更新对象的属性 this.classObjectData.attribute++; }) @@ -119,7 +122,7 @@ export struct ClassObjectTypeCode { .type(ButtonType.Capsule) .applyStyles(buttonStyle) Button($r('app.string.class_type_update_child_attribute')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 点击更新对象属性的属性 this.classObjectData.child.attribute++; }) @@ -130,7 +133,7 @@ export struct ClassObjectTypeCode { .applyStyles(buttonStyle) } .width('100%') - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } @@ -145,9 +148,9 @@ struct ChildObjectComp { Column() { Row() { Text(this.childObject.title) - .fontSize(20) + .fontSize(20.0) Text(`${this.childObject.attribute}`) - .fontSize(20) + .fontSize(20.0) .textAlign(TextAlign.End) } .width('100%') @@ -155,17 +158,17 @@ struct ChildObjectComp { Divider() .width('100%') - .strokeWidth(1) + .strokeWidth(1.0) } .width('100%') - .padding({ left: 100 }) + .padding({ left: 100.0 } as Padding) } } function buttonStyle(instance: CommonMethod): void { - instance.width('100%'); - instance.height($r('app.float.button_height')); - instance.backgroundColor($r('app.color.button_background_color')); + instance.width('100%'); + instance.height($r('app.float.button_height')); + instance.backgroundColor($r('app.color.button_background_color')); } // 要更新对象属性的属性,对象属性的类需要使用@Observed修饰 diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets index 1f25ab83..a7ba64ef 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,9 +19,9 @@ import { Component, State, Resource, - $r, Column, AppStorage, + $r } from '@kit.ArkUI'; import { UpdateBoundComponentCode } from './UpdateBoundComponentCode'; @@ -45,6 +45,6 @@ struct UpdateBoundComponent { } aboutToDisappear(): void { - AppStorage.SetOrCreate('sideBarShow', false); + AppStorage.set('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets index 17af11f1..d208f78a 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,14 +18,17 @@ import { Component, State, Column, - $rawfile, Text, - $r, Row, FlexAlign, Button, ButtonType, Color, + ColumnOptions, + ClickEvent, + $r, + $rawfile, + Margin } from '@kit.ArkUI'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; @@ -37,12 +40,12 @@ export struct UpdateBoundComponentCode { // 组件内private变量 private content: string = 'content'; // 组件内变量更新的次数 - private updateCount: int = 0; + private updateCount: number = 0.0; build() { - Column({ space: 10 }) { + Column({ space: 10.0 } as ColumnOptions) { // 点击查看源码 - ViewCodeText({webSrc: $rawfile('UpdateBoundComponentCode.ets.html')}) + ViewCodeText({ webSrc: $rawfile('UpdateBoundComponentCode.ets.html') }) Column() { Text($r('app.string.only_update_state')) @@ -55,35 +58,35 @@ export struct UpdateBoundComponentCode { .fontSize($r('app.float.button_text_size')) Text(`${this.titleName}`) // titleName为状态变量,绑定Text组件 .fontColor($r('app.color.button_text_color')) - .fontSize(20) + .fontSize(20.0) } .width('100%') - .margin(10) + .margin(10.0) Text($r('app.string.only_update_private')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) .width('100%') - .margin({ top: 20 }) + .margin({ top: 20.0 } as Margin) Row() { Text($r('app.string.only_update_content')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) Text(`${this.content}`) // content为private,绑定Text组件 .fontColor($r('app.color.button_text_color')) - .fontSize(20) + .fontSize(20.0) } .width('100%') - .margin(10) + .margin(10.0) } .width('100%') - .padding(10) + .padding(10.0) .justifyContent(FlexAlign.SpaceAround) .backgroundColor($r('app.color.component_background_pink')) Column() { Button($r('app.string.update_title_content')) - .onClick(() => { + .onClick((event: ClickEvent) => { // 点击更新@State和Private声明的变量,更新策略为:@State和Private的数据发生变化,@State变量绑定的组件更新,Private变量绑定的组件不更新。 this.updateCount++; this.content = `content ${this.updateCount}`; @@ -99,10 +102,10 @@ export struct UpdateBoundComponentCode { Text($r('app.string.only_update_state_components')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.button_text_size')) - .margin({ top: 30 }) + .margin({ top: 30.0 } as Margin) }.width('100%') } - .padding(10) + .padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ts index 2a793848..bdced81b 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ts @@ -14,13 +14,14 @@ */ import type common from '@ohos.app.ability.common'; +import { resourceManager } from '@kit.LocalizationKit' /** * getResourceString将Resource类型的数据转换成string类型的数据 * @param context * @param ResourceData */ -export function getResourceString(context: common.UIAbilityContext, resourceData: Resource): string { +export function getResourceString(context: common.UIAbilityContext, resourceData: resourceManager.Resource): string { let stringData: string = context.resourceManager.getStringSync(resourceData.id); return stringData; } \ No newline at end of file -- Gitee From 7b48b23d59e650a078954e723fa509363c437b5c Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 13 Aug 2025 14:40:40 +0800 Subject: [PATCH 2/7] =?UTF-8?q?manualfix=5F=E9=9D=99=E6=80=81=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- .../decoratedobjecttype/arraytype/ArrayTypeCode.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets index b67912df..66eea742 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets @@ -1,11 +1,11 @@ 'use static' /* * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, -- Gitee From ab96c0a0402f031fe76dcb838fe234b85aaa98d7 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 18 Aug 2025 10:23:38 +0800 Subject: [PATCH 3/7] sample_SateManagement_TabContentNavigationfix Signed-off-by: wangweiyuan --- .../ets/pages/home/TabContentNavigation.ets | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets index 8de03237..7f6e62e1 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets @@ -20,6 +20,7 @@ import { Component, Column, List, + ForEach, ListItem, Text, TextAlign, @@ -34,13 +35,12 @@ import { ClickEvent, Margin, $r, - ColumnOptions + ColumnOptions, } from '@kit.ArkUI'; import router from '@ohos.router'; import { SecondLevelCategory, ThirdLevelCategory, FourthLevelCategory } from './model/CategoricalDataType'; import { UIContext } from '@ohos.arkui.UIContext'; -import { ForEach } from '@ohos.arkui.component'; function ColumnStyle(this: ColumnAttribute): ColumnAttribute { this.width('100%'); @@ -57,7 +57,8 @@ function ColumnStyle(this: ColumnAttribute): ColumnAttribute { @Component export struct TabContentNavigation { - private categories: (ThirdLevelCategory | SecondLevelCategory)[] = []; + private categories: Array = + new Array(); hasSecondLevelCategory(category: ThirdLevelCategory | SecondLevelCategory): boolean { return (category as SecondLevelCategory).tag !== undefined; @@ -86,7 +87,7 @@ export struct TabContentNavigation { thirdLevelCategoryIndex: number) => { ThirdLevelNavigation({ thirdLevelCategory: thirdLevelCategory, - secondLevelCategoryIndex: index, // 使用外层索引 + secondLevelCategoryIndex: index, ThirdLevelNavigationIndex: thirdLevelCategoryIndex }) }) @@ -135,14 +136,14 @@ export struct TabContentNavigation { @Component struct ThirdLevelNavigation { @State isUnfold: boolean = false; - private thirdLevelCategory: ThirdLevelCategory; + private thirdLevelCategory?: ThirdLevelCategory; private ThirdLevelNavigationIndex: number; private secondLevelCategoryIndex: number; build() { Column() { Row() { - Text(this.thirdLevelCategory.title) + Text(this.thirdLevelCategory?.title) .fontSize(16.0) .margin({ left: 16.0 } as Margin) .fontFamily('HarmonyHeiTi-Medium') @@ -150,7 +151,7 @@ struct ThirdLevelNavigation { Blank() - if (this.thirdLevelCategory.childNodes) { + if (this.thirdLevelCategory?.childNodes) { Image(this.isUnfold ? $r('app.media.ic_down_arrow') : $r('app.media.ic_right_arrow')) .width(this.isUnfold ? 24.0 : 12.0) .height(this.isUnfold ? 12.0 : 24.0) @@ -160,9 +161,9 @@ struct ThirdLevelNavigation { .height(56.0) .width('100%') .onClick((event: ClickEvent) => { - if (this.thirdLevelCategory.childNodes === undefined) { + if (!this.thirdLevelCategory?.childNodes) { this.getUIContext().getRouter().pushUrl({ - url: this.thirdLevelCategory.url as string + url: this.thirdLevelCategory?.url as string }); } else { this.isUnfold = !this.isUnfold; @@ -170,7 +171,7 @@ struct ThirdLevelNavigation { }) if (this.isUnfold) { - ForEach(this.thirdLevelCategory.childNodes, (fourthLevelCategory: FourthLevelCategory, index: number) => { + ForEach(this.thirdLevelCategory?.childNodes!, (fourthLevelCategory: FourthLevelCategory, index: number) => { Column() { Divider() .height(1.0) @@ -180,7 +181,7 @@ struct ThirdLevelNavigation { FourthLevelNavigation({ fourthLevelCategory: fourthLevelCategory }) } - }, (item: FourthLevelCategory) => item.toString()) // 添加key生成函数 + }, (item: FourthLevelCategory) => item.title.toString()) // 添加key生成函数 } } .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : @@ -190,11 +191,11 @@ struct ThirdLevelNavigation { @Component struct FourthLevelNavigation { - private fourthLevelCategory: FourthLevelCategory; + private fourthLevelCategory?: FourthLevelCategory; build() { Row() { - Text(this.fourthLevelCategory.title) + Text(this.fourthLevelCategory?.title) .fontSize(16.0) .layoutWeight(1.0) .margin({ left: 42.0 } as Margin) @@ -208,7 +209,7 @@ struct FourthLevelNavigation { .onClick((event: ClickEvent) => { // Click to jump to the corresponding page this.getUIContext().getRouter().pushUrl({ - url: this.fourthLevelCategory.url as string + url: this.fourthLevelCategory?.url as string }); }) } -- Gitee From 03939afa09078e409247f8a45841d0e392043bf4 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 1 Sep 2025 12:13:10 +0800 Subject: [PATCH 4/7] fix_sample_StateManagement_manualfix_0901 Signed-off-by: wangweiyuan --- .../StateManagement/build-profile.json5 | 21 +++++++- .../main/ets/commoncomponents/CodeView.ets | 20 +++---- .../main/ets/commoncomponents/TitleBar.ets | 14 +++-- .../ets/commoncomponents/TitleBarDark.ets | 13 +++-- .../ets/commoncomponents/ViewCodeText.ets | 11 ++-- .../src/main/ets/entryability/EntryAbility.ts | 2 - .../AbilityGlobalDataSync.ets | 13 ++--- .../AbilityGlobalDataSyncCode.ets | 35 +++++------- .../AbilityOutOfSyncPage.ets | 20 +++---- .../LocalStorageLinkPage.ets | 18 +++---- .../LocalStoragePropPage.ets | 32 ++++------- .../ApplyGlobalDataSync.ets | 13 ++--- .../ApplyGlobalDataSyncCode.ets | 25 +++------ .../StorageLinkAbilityPage.ets | 19 +++---- .../StoragePropAbilityPage.ets | 20 +++---- .../entry/src/main/ets/pages/home/Home.ets | 8 +-- .../ets/pages/home/TabContentNavigation.ets | 21 ++++---- .../src/main/ets/pages/home/data/HomeData.ets | 2 - .../pages/home/model/CategoricalDataType.ets | 3 +- .../BrotherComponentSync.ets | 6 +-- .../BrotherComponentSyncCode.ets | 10 ++-- .../ConsumeBrotherOneComponent.ets | 21 +++----- .../ConsumeBrotherTwoComponent.ets | 16 ++---- .../LinkBrotherOneComponent.ets | 23 +++----- .../LinkBrotherTwoComponent.ets | 15 ++---- .../ProvideFatherComponent.ets | 10 +--- .../StateFatherComponent.ets | 10 +--- .../multicompomentssync/data/ColorData.ets | 7 ++- .../ConsumeDescendentComponent.ets | 17 +++--- .../DeepNestComponentsSync.ets | 6 +-- .../DeepNestComponentsSyncCode.ets | 8 ++- .../LinkDescendentComponent.ets | 18 +++---- .../ProvideGrandfatherComponent.ets | 26 ++++----- .../StateGrandfatherComponent.ets | 24 +++------ .../multicompomentssync/model/ColorType.ets | 4 +- .../ObjectLinkComponent.ets | 11 ++-- .../ParentChildPartialContentSync.ets | 6 +-- .../ParentChildPartialContentSyncCode.ets | 36 +++++-------- .../uniandbidirectionsync/ComponentLink.ets | 16 +++--- .../uniandbidirectionsync/ComponentProp.ets | 15 +++--- .../UniAndBidirectionSync.ets | 6 +-- .../UniAndBidirectionSyncCode.ets | 36 ++++--------- .../arraytype/ArrayType.ets | 6 +-- .../arraytype/ArrayTypeCode.ets | 25 ++------- .../decoratedobjecttype/basetype/BaseType.ets | 9 ++-- .../basetype/BaseTypeCode.ets | 11 ++-- .../classobjecttype/ClassObjectType.ets | 6 +-- .../classobjecttype/ClassObjectTypeCode.ets | 54 ++++++++----------- .../UpdateBoundComponent.ets | 6 +-- .../UpdateBoundComponentCode.ets | 23 ++++---- .../src/main/ets/utils/StartAbilityUtils.ts | 2 - 51 files changed, 303 insertions(+), 496 deletions(-) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 index 23373b24..2012ed6e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 @@ -16,12 +16,29 @@ { "app": { "signingConfigs": [], - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, "products": [ { "name": "default", "signingConfig": "default", + "targetSdkVersion": "20", + "arkTSVersion": "1.2", + "compatibleSdkVersion": "20", + "compileSdkVersion": "20", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" } ] }, diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets index dd9cdadc..70bfed08 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/CodeView.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -38,16 +38,14 @@ import { ClickEvent, $r, $rawfile, - Padding + Padding, } from '@kit.ArkUI'; import webView from '@ohos.web.webview'; import { TitleBar } from './TitleBar'; - @Component export struct CodeView { - @BuilderParam contentView: () => void = () => { - }; + @BuilderParam contentView: () => void = () => {}; @Link title: Resource; @StorageLink('sideBarShow') sideBarShow: boolean = false; @StorageLink('webSrc') @Watch('webSrcChange') webSrc: Resource = $rawfile('BaseTypeCode.ets.html'); @@ -55,19 +53,18 @@ export struct CodeView { private isShowTitle: boolean = true; private controller: webView.WebviewController = new webView.WebviewController(); - webSrcChange(propName: string): void { + webSrcChange(propName: string):void { this.controller.loadUrl(this.webSrc); } - @Builder - codeView() { - Column({ space: 10.0 } as ColumnOptions) { + @Builder codeView() { + Column({ space: 10.0 }as ColumnOptions) { Text($r('app.string.close')) .fontSize($r('app.float.source_code_font_size')) .fontColor(Color.White) .alignSelf(ItemAlign.End) .id('close') - .onClick((): void => { + .onClick(() : void=> { this.sideBarShow = !this.sideBarShow; }) Column() { @@ -77,7 +74,7 @@ export struct CodeView { } .width('100%') .height('100%') - .padding({ bottom: $r('app.float.code_view_bottom') } as Padding) + .padding({ bottom: $r('app.float.code_view_bottom') }as Padding ) } .height('100%') .padding($r('app.float.page_padding')) @@ -104,7 +101,6 @@ export struct CodeView { .layoutWeight(1.0) .sideBarWidth('100%') .showControlButton(false) - // 大型设备查看源码和界面4:6的比例,所以占60% .maxSideBarWidth(this.curBp === 'sm' ? '100%' : '60%') .sideBarPosition(SideBarPosition.End) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets index 10bdfd61..59fda2ae 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBar.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,10 +28,9 @@ import { ColumnOptions, TextAttribute, Margin, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; - -import { Context, UIContext } from '@ohos.arkui.UIContext'; +import { Context,UIContext} from '@ohos.arkui.UIContext'; import router from '@ohos.router'; import common from '@ohos.app.ability.common'; import { startSpecifiedAbility } from '../utils/StartAbilityUtils'; @@ -51,14 +50,13 @@ export struct TitleBar { } .backgroundColor($r('app.color.background_shallow_grey')) .id('backBtn') - .onClick((event: ClickEvent) => { - this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : - this.getUIContext().getRouter().back(); + .onClick((event:ClickEvent) => { + this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : this.getUIContext().getRouter().back(); }) Text(this.title) .fontSize($r('app.float.title_font_size')) - .margin({ left: $r('app.float.title_margin') } as Margin) + .margin({ left: $r('app.float.title_margin') }as Margin) } .width('100%') .padding($r('app.float.page_padding')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets index 47896704..4f249317 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/TitleBarDark.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,7 +30,7 @@ import { ColumnOptions, ClickEvent, TextAttribute, - Margin + Margin, } from '@kit.ArkUI'; import router from '@ohos.router'; @@ -51,15 +51,14 @@ export struct TitleBarDark { .size({ width: $r('app.float.icon_back_size'), height: $r('app.float.icon_back_size') }) } .id('backBtn') - .onClick((event: ClickEvent) => { - this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : - this.getUIContext().getRouter().back(); + .onClick((event:ClickEvent) => { + this.isAbility ? startSpecifiedAbility(this.CONTEXT, 'EntryAbility') : this.getUIContext().getRouter().back(); }) .backgroundColor($r('app.color.nightnode_color')) Text(this.title) .fontSize($r('app.float.title_font_size')) - .margin({ left: $r('app.float.title_margin') } as Margin) + .margin({ left: $r('app.float.title_margin') }as Margin) .fontColor(Color.White) } .width('100%') @@ -69,7 +68,7 @@ export struct TitleBarDark { .width('100%') .height($r('app.float.divider_height')) .color($r('app.color.divider_color')) - .margin({ bottom: 12.0 } as Margin) + .margin({ bottom: 12.0 }as Margin) } .width('100%') } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets index 1fbb679d..2262fde8 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets @@ -1,6 +1,5 @@ -'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +24,7 @@ import { FlexAlign, $r, $rawfile, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; @Component @@ -41,9 +40,9 @@ export struct ViewCodeText { .alignSelf(ItemAlign.End) .id('viewSourceCode') .onClick((event: ClickEvent) => { - this.sideBarShow = !this.sideBarShow; // 自动同步(因 @StorageLink) - AppStorage.set('sideBarShow', this.sideBarShow); - AppStorage.set('webSrc', this.webSrc); + this.sideBarShow = !this.sideBarShow; + AppStorage.setOrCreate('sideBarShow', this.sideBarShow); + AppStorage.setOrCreate('webSrc', this.webSrc); }); } .width('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ts index 65e352cd..f1b80b68 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ts @@ -30,7 +30,6 @@ export default class EntryAbility extends UIAbility { onCreate(want, launchParam): void { this.storage = new LocalStorage(); this.storage.setOrCreate('currentModelStatus', true); - // 设置当前内容字体为18 this.storage.setOrCreate('contentFontSize', FONT_SIZE); Logger.info(TAG, 'Ability onCreate'); } @@ -42,7 +41,6 @@ export default class EntryAbility extends UIAbility { updateBreakpoint(windowWidth: number): void { let windowWidthVp: number = windowWidth / (display.getDefaultDisplaySync().densityDPI / DPI); let curBp: string; - // 520以及840分别为小屏和中屏的最大宽度 if (windowWidthVp < SMALL_SCREEN_WIDTH) { curBp = 'sm'; } else if (windowWidthVp < MIDDLE_SCREEN_WIDTH) { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets index 050ae2b4..80b32c29 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +24,7 @@ import { LocalStorageLink, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { AbilityGlobalDataSyncCode } from './AbilityGlobalDataSyncCode'; @@ -35,17 +35,13 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; - @Entry({ storage: "__get_local_storage__" }) @Component struct AbilityGlobalDataSync { @State title: Resource = $r('app.string.ability_storage_ui'); - // 初始化夜间模式的状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; - build() { Column() { - // 展示不同模式下的标题 if (this.currentModelStatus) { TitleBarDark({ title: this.title }) } else { @@ -57,11 +53,10 @@ struct AbilityGlobalDataSync { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets index 40249ee5..72e0acb5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,7 @@ import { $r, $rawfile, Margin, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; import router from '@ohos.router'; @@ -46,29 +46,25 @@ import { Context, UIContext } from '@ohos.arkui.UIContext'; @Component export struct AbilityGlobalDataSyncCode { - // 初始化字体大小最小值 private minFontSize: number = 10.0; - // 和主页、Page1、Page2双向同步内容字体大小 + @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; - // 和主页、Page1、Page2双向同步夜间模式状态 + @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('AbilityGlobalDataSyncCode.ets.html') }) Row() { Text($r('app.string.nightmode')) .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) - // 控制夜间模式 Toggle({ type: ToggleType.Switch, isOn: this.currentModelStatus }) .id('nightModeSwitch') .selectedColor(Color.Blue) .switchPointColor(Color.White) .onChange((isOn: boolean) => { - // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageLink关联的数据变量刷新 this.currentModelStatus = isOn; }) }.justifyContent(FlexAlign.SpaceAround) @@ -79,7 +75,6 @@ export struct AbilityGlobalDataSyncCode { .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .textAlign(TextAlign.Center) - // slider滑动模块控制字体大小 Column() { Text($r('app.string.fontSize_text')) .fontSize(this.contentFontSize) @@ -92,22 +87,20 @@ export struct AbilityGlobalDataSyncCode { .fontSize($r('app.float.tips_font_size')) Slider({ value: this.contentFontSize, - min: 10.0, // 字体大小最小值 - max: 30.0, // 字体大小最大值 + min: 10.0, + max: 30.0, style: SliderStyle.OutSet }) .showTips(true) .onChange((value: number, mode: SliderChangeMode) => { - // 更新控制字体大小状态的变量数据,@LocalStorageLink和@LocalStorageProp关联的数据变量刷新 this.contentFontSize = value; }) - // toFixed(0)将滑动条返回值处理为整数精度 Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50.0 } as Margin) + }.margin({ top: 50.0 }as Margin) Text($r('app.string.ability_storage_fontsizesync')) .fontSize(this.contentFontSize) @@ -125,7 +118,7 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { + .onClick((event:ClickEvent) => { this.getUIContext().getRouter().pushUrl( { url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage' }); }) @@ -141,10 +134,8 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { - this.getUIContext() - .getRouter() - .pushUrl({ url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage' }); + .onClick((event:ClickEvent) => { + this.getUIContext().getRouter().pushUrl({ url: 'pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage' }); }) Divider().width('100%').strokeWidth(1.0) @@ -159,8 +150,8 @@ export struct AbilityGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { - startSpecifiedAbility(this.CONTEXT, 'OutOfSyncAbility'); + .onClick((event:ClickEvent) => { + startSpecifiedAbility(this.CONTEXT,'OutOfSyncAbility'); }) } .width('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets index 29137605..d9fcb877 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,9 +30,8 @@ import { $r, $rawfile, ColumnOptions, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; - import { CodeView } from '../../../commoncomponents/CodeView'; import { ViewCodeText } from '../../../commoncomponents/ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; @@ -41,16 +40,12 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; - @Entry({ storage: "__get_local_storage__" }) @Component struct AbilityOutOfSyncPage { - // 判断是否关联ability的变量 @State isAbility: boolean = true; @State title: Resource = $r('app.string.localStorage_abilitytitle'); - // 和主页、Page1、Page2不同步夜间模式状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 和主页、Page1、Page2不同步内容字体大小 @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; build() { @@ -61,8 +56,7 @@ struct AbilityOutOfSyncPage { TitleBar({ title: this.title, isAbility: true }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 30.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('AbilityOutOfSyncPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) .fontSize(this.contentFontSize) @@ -90,8 +84,7 @@ struct AbilityOutOfSyncPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { - // 更新控制夜间模式状态的变量数据,@LocalStorageLink和@LocalStorageProp关联的数据变量刷新 + .onClick((event:ClickEvent) => { this.currentModelStatus = !this.currentModelStatus; }) } @@ -101,11 +94,10 @@ struct AbilityOutOfSyncPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets index 7daaff2d..4889b7c5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,7 +30,7 @@ import { $r, $rawfile, ColumnOptions, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -41,14 +41,11 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; - @Entry({ storage: "__get_local_storage__" }) @Component struct StorageLinkAbilityPage { @State title: Resource = $r('app.string.localStorage_pagetitletwo'); - // 和主页、Page2双向同步夜间模式状态 @LocalStorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 和主页、Page2双向同步内容字体大小 @LocalStorageLink('contentFontSize') contentFontSize: number = 18.0; build() { @@ -59,8 +56,7 @@ struct StorageLinkAbilityPage { TitleBar({ title: this.title }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 30.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LocalStorageLinkPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) .fontSize(this.contentFontSize) @@ -83,8 +79,7 @@ struct StorageLinkAbilityPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { - // 更新控制夜间模式状态的变量数据,@LocalStorageLink和@StorageProp关联的数据变量刷新 + .onClick((event:ClickEvent) => { this.currentModelStatus = !this.currentModelStatus; }) @@ -100,11 +95,10 @@ struct StorageLinkAbilityPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets index 9fa23e44..720bd9f5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,7 +36,8 @@ import { ColumnOptions, ClickEvent, Margin, - StorageLink + StorageLink, + } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -47,18 +48,13 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; let storage: LocalStorage = new LocalStorage(); const __get_local_storage__ = (): LocalStorage => storage; - @Entry({ storage: "__get_local_storage__" }) @Component struct StoragePropAbilityPage { @State title: Resource = $r('app.string.localStorage_pagetitleone'); - // 初始化字体大小最小值 private minFontSize: number = 10.0; - // 和主页、Page1双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 和主页、Page1单向同步内容字体大小 @StorageLink('contentFontSize') contentFontSize: number = 18.0; - build() { Column() { if (this.currentModelStatus) { @@ -67,8 +63,7 @@ struct StoragePropAbilityPage { TitleBar({ title: this.title }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 20.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 20.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LocalStoragePropPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) .fontSize(this.contentFontSize) @@ -80,7 +75,7 @@ struct StoragePropAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - Button('') { + Button('') { //修改添加 '' Text(this.currentModelStatus ? $r('app.string.close_nightmode') : $r('app.string.start_nightmode')) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.button_text_color')) .fontSize(this.contentFontSize) @@ -91,8 +86,7 @@ struct StoragePropAbilityPage { .padding($r('app.float.page_padding')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick((event: ClickEvent) => { - // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 + .onClick((event:ClickEvent) => { this.currentModelStatus = !this.currentModelStatus; }) @@ -101,7 +95,6 @@ struct StoragePropAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - // slider模块控制字体大小 Column() { Text($r('app.string.fontSize_text')) .fontSize(this.contentFontSize) @@ -114,22 +107,20 @@ struct StoragePropAbilityPage { .fontSize($r('app.float.tips_font_size')) Slider({ value: this.contentFontSize, - min: 10.0, // 字体大小最小值 - max: 30.0, // 字体大小最大值 + min: 10.0, + max: 30.0, style: SliderStyle.OutSet }) .showTips(true) .onChange((value: number, mode: SliderChangeMode) => { - // 更新控制字体大小的变量数据,@LocalStorageLink关联的数据变量不刷新同步 this.contentFontSize = value; }) - // toFixed(0)将滑动条返回值处理为整数精度 Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50.0 } as Margin) + }.margin({ top: 50.0 }as Margin) Text($r('app.string.localStorage_single_fontsize_binding')) .fontSize(this.contentFontSize) @@ -142,11 +133,10 @@ struct StoragePropAbilityPage { } .width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets index 4c580e20..7ddf5fac 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -22,10 +22,10 @@ import { StorageLink, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; -import { ApplyGlobalDataSyncCode } from './ApplyGlobalDataSyncCode'; +import {ApplyGlobalDataSyncCode} from './ApplyGlobalDataSyncCode'; import { CodeView } from '../../../commoncomponents/CodeView'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; import { TitleBar } from '../../../commoncomponents/TitleBar'; @@ -34,12 +34,10 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; @Component struct ApplyGlobalDataSync { @State title: Resource = $r('app.string.application_storage_ui'); - // 当前夜间模式的状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; build() { Column() { - // 展示不同模式状态下的标题 if (this.currentModelStatus) { TitleBarDark({ title: this.title }) } else { @@ -50,11 +48,10 @@ struct ApplyGlobalDataSync { } }.width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets index 1e7aa4e7..3a0c6b07 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,7 @@ import { $r, $rawfile, ClickEvent, - Margin + Margin, } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; @@ -44,29 +44,23 @@ import { startSpecifiedAbility } from '../../../utils/StartAbilityUtils'; @Component export struct ApplyGlobalDataSyncCode { - // 和Ability1、Ability2页面双向同步内容字体大小 @StorageLink('contentFontSize') contentFontSize: number = 18.0; - // 和Ability1、Ability2页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 初始化字体大小最小值 private minFontSize: number = 10.0; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ApplyGlobalDataSyncCode.ets.html') }) Row() { Text($r('app.string.nightmode')) .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) - // 开发控制夜间模式 Toggle({ type: ToggleType.Switch, isOn: this.currentModelStatus }) .id('nightModeSwitch') .selectedColor(Color.Blue) .switchPointColor(Color.White) .onChange((isOn: boolean) => { - // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageLink关联的数据变量刷新 this.currentModelStatus = isOn; AppStorage.set('currentModelStatus', this.currentModelStatus); }) @@ -78,7 +72,6 @@ export struct ApplyGlobalDataSyncCode { .fontSize(this.contentFontSize) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .textAlign(TextAlign.Center) - // slider滑动模块控制字体大小 Column() { Text($r('app.string.fontSize_text')) .fontSize(this.contentFontSize) @@ -91,23 +84,21 @@ export struct ApplyGlobalDataSyncCode { .fontSize($r('app.float.tips_font_size')) Slider({ value: this.contentFontSize, - min: this.minFontSize, // 字体大小最小值 - max: 30.0, // 字体大小最大值 + min: this.minFontSize, + max: 30.0, style: SliderStyle.OutSet }) .showTips(true) .onChange((value: number, mode: SliderChangeMode) => { - // 更新控制字体大小状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.contentFontSize = value; AppStorage.set('contentFontSize', this.contentFontSize); }) - // toFixed(0)将滑动条返回值处理为整数精度 Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) } .width('80%') - }.margin({ top: 50.0 } as Margin) + }.margin({ top: 50.0 }as Margin) Text($r('app.string.fontSize_singlesync_textone')) .fontSize(this.contentFontSize) @@ -125,7 +116,7 @@ export struct ApplyGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { + .onClick((event:ClickEvent) => { startSpecifiedAbility(this.CONTEXT, 'StoragePropAbility'); }) @@ -140,7 +131,7 @@ export struct ApplyGlobalDataSyncCode { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { + .onClick((event:ClickEvent) => { startSpecifiedAbility(this.CONTEXT, 'StorageLinkAbility'); }) }.padding($r('app.float.page_padding')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets index 575e6d41..6fa74074 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,9 +29,10 @@ import { $r, $rawfile, ColumnOptions, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; + import { CodeView } from '../../../commoncomponents/CodeView'; import { ViewCodeText } from '../../../commoncomponents//ViewCodeText'; import { TitleBarDark } from '../../../commoncomponents/TitleBarDark'; @@ -41,11 +42,8 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; @Component struct StorageLinkAbilityPage { @State title: Resource = $r('app.string.abilitytwo_page'); - // 判断是否关联ability的变量 @State isAbility: boolean = true; - // 和主页、Ability1页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 和主页、Ability1页面双向同步内容字体大小 @StorageLink('contentFontSize') contentFontSize: number = 18.0; build() { @@ -56,8 +54,7 @@ struct StorageLinkAbilityPage { TitleBar({ title: this.title, isAbility: true }) } CodeView({ title: this.title, isShowTitle: false }) { - Column({ space: 30.0 } as ColumnOptions) { - // 查看源码 + Column({ space: 30.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('StorageLinkAbilityPage.ets.html') }) Text($r('app.string.both_data_binding')) .fontSize(this.contentFontSize) @@ -80,8 +77,7 @@ struct StorageLinkAbilityPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .padding($r('app.float.page_padding')) - .onClick((event: ClickEvent) => { - // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 + .onClick((event:ClickEvent) => { this.currentModelStatus = !this.currentModelStatus; }) @@ -95,11 +91,10 @@ struct StorageLinkAbilityPage { } }.width('100%') .height('100%') - .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : - $r('app.color.background_shallow_grey')) + .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets index 38c08965..3a3cc711 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,8 +14,9 @@ * limitations under the License. */ +import { StoragePropRef } from '@kit.ArkUI'; + import { - StoragePropRef, Entry, Component, State, @@ -35,7 +36,8 @@ import { $rawfile, ColumnOptions, ClickEvent, - Margin + Margin, + } from '@kit.ArkUI'; import { CodeView } from '../../../commoncomponents/CodeView'; @@ -47,11 +49,8 @@ import { TitleBar } from '../../../commoncomponents/TitleBar'; @Component struct StoragePropAbilityPage { @State title: Resource = $r('app.string.abilityone_page'); - // 初始化字体大小最小值 private minFontSize: number = 10.0; - // 和主页、Ability2页面双向同步夜间模式状态 @StorageLink('currentModelStatus') currentModelStatus: boolean = true; - // 和主页、Ability2页面单向同步内容字体大小 private contentFontSize: number = 18.0; build() { @@ -63,7 +62,6 @@ struct StoragePropAbilityPage { } CodeView({ title: this.title, isShowTitle: false }) { Column({ space: 20.0 }as ColumnOptions) { - // 查看源码 ViewCodeText({ webSrc: $rawfile('StoragePropAbilityPage.ets.html') }) Text($r('app.string.both_data_binding')) .fontSize(this.contentFontSize) @@ -87,7 +85,6 @@ struct StoragePropAbilityPage { .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) .onClick(() : void=> { - // 更新控制夜间模式状态的变量数据,@StorageLink和@StorageProp关联的数据变量刷新 this.currentModelStatus = !this.currentModelStatus; }) @@ -96,7 +93,6 @@ struct StoragePropAbilityPage { .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - // slider模块控制字体大小 Column() { Text($r('app.string.fontSize_text')) .fontSize(this.contentFontSize) @@ -110,15 +106,13 @@ struct StoragePropAbilityPage { Slider({ value: this.contentFontSize, min: this.minFontSize, - max: 30.0, // 字体大小最大值 + max: 30.0, style: SliderStyle.OutSet }) .showTips(true) .onChange((value: number, mode: SliderChangeMode) => { - // 更新控制字体大小的变量数据,@StorageLink关联的数据变量不刷新同步 this.contentFontSize = value; }) - // toFixed(0)将滑动条返回值处理为整数精度 Text(this.contentFontSize.toFixed(0.0)) .fontColor(this.currentModelStatus ? $r('app.color.color_white') : $r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) @@ -141,6 +135,6 @@ struct StoragePropAbilityPage { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets index 04685b36..04c98aac 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/Home.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -32,7 +32,6 @@ import { $r, Padding, Margin, - ArrayLike } from '@kit.ArkUI'; import { FirstLevelCategory, SecondLevelCategory, ThirdLevelCategory } from './model/CategoricalDataType'; @@ -42,8 +41,7 @@ import { TabContentNavigation } from './TabContentNavigation'; @Entry @Component struct Home { - // 初始化tabsBar的index值为0 - tabsIndex: number = 0.0; + @State tabsIndex: number = 0.0; @StorageLink('currentBreakpoint') curBp: string = 'sm'; build() { @@ -58,9 +56,7 @@ struct Home { }, (item, index) => index.toString()) } .vertical(this.curBp === 'sm' ? false : true) - // 大型设备tabbar的高度为40%,小型设备的高度为56vp .barHeight(this.curBp === 'sm' ? '56vp' : '40%') - // 大型设备tabbar的宽度为56vp,小型设备的宽度为100% .barWidth(this.curBp === 'sm' ? '100%' : '56vp') .barMode(BarMode.Fixed) .backgroundColor($r('app.color.background_shallow_grey')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets index 7f6e62e1..8d072b97 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -41,8 +41,7 @@ import { import router from '@ohos.router'; import { SecondLevelCategory, ThirdLevelCategory, FourthLevelCategory } from './model/CategoricalDataType'; import { UIContext } from '@ohos.arkui.UIContext'; - -function ColumnStyle(this: ColumnAttribute): ColumnAttribute { +function ColumnStyle(this: ColumnAttribute): ColumnAttribute { this.width('100%'); this.borderRadius(24.0); this.backgroundColor(Color.White); @@ -57,8 +56,7 @@ function ColumnStyle(this: ColumnAttribute): ColumnAttribute { @Component export struct TabContentNavigation { - private categories: Array = - new Array(); + private categories: Array = new Array(); hasSecondLevelCategory(category: ThirdLevelCategory | SecondLevelCategory): boolean { return (category as SecondLevelCategory).tag !== undefined; @@ -96,7 +94,7 @@ export struct TabContentNavigation { } } } - }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) // 添加key生成函数 + }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) } else { ForEach(this.categories, (item: ThirdLevelCategory | SecondLevelCategory, index: number) => { if (!this.hasSecondLevelCategory(item)) { @@ -105,7 +103,7 @@ export struct TabContentNavigation { Column() { ThirdLevelNavigation({ thirdLevelCategory: thirdLevelCategory, - secondLevelCategoryIndex: -1, // 标记为没有二级分类 + secondLevelCategoryIndex: -1, ThirdLevelNavigationIndex: index }) } @@ -113,7 +111,7 @@ export struct TabContentNavigation { } .margin({ top: 4.0, bottom: 4.0 } as Margin) } - }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) // 添加key生成函数 + }, (item: ThirdLevelCategory | SecondLevelCategory) => item.toString()) } } .width('100%') @@ -170,7 +168,7 @@ struct ThirdLevelNavigation { } }) - if (this.isUnfold) { + if (this.isUnfold ) { ForEach(this.thirdLevelCategory?.childNodes!, (fourthLevelCategory: FourthLevelCategory, index: number) => { Column() { Divider() @@ -181,11 +179,10 @@ struct ThirdLevelNavigation { FourthLevelNavigation({ fourthLevelCategory: fourthLevelCategory }) } - }, (item: FourthLevelCategory) => item.title.toString()) // 添加key生成函数 + }, (item: FourthLevelCategory) => item.title.toString() ) } } - .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : - this.ThirdLevelNavigationIndex}`) + .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : this.ThirdLevelNavigationIndex}`) } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets index 8b3dc2a3..f05d2619 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets @@ -97,7 +97,6 @@ const PAGE_LEVEL_CATEGORY: Array = [ } ]; - const APP_LEVEL_CATEGORY: Array = [ { tag: 1.0, @@ -111,7 +110,6 @@ const APP_LEVEL_CATEGORY: Array = [ } ]; - export const HOME_TABS: FirstLevelCategory[] = [ { tabBarName: $r('app.string.page_level'), diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets index 42c31a10..876b3dad 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,6 @@ */ import { Resource } from '@kit.ArkUI'; - export interface FirstLevelCategory { childNodes: Array, iconSelected: Resource, // The icon for the first-level category is selected diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets index ac8312cd..27242502 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { CodeView } from '../../../../commoncomponents/CodeView'; @@ -45,6 +45,6 @@ struct BrotherComponentSync { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets index 8916eba2..1a19bff8 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,8 @@ import { TextAlign, $r, Margin, - Resource + Resource, + } from '@kit.ArkUI'; import { ProvideFatherComponent } from './ProvideFatherComponent'; @@ -29,6 +30,7 @@ import { StateFatherComponent } from './StateFatherComponent'; @Component export struct BrotherComponentSyncCode { + build() { Column() { Column() { @@ -36,7 +38,6 @@ export struct BrotherComponentSyncCode { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - // 共同父组件@State StateFatherComponent() } @@ -45,10 +46,9 @@ export struct BrotherComponentSyncCode { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - // 共同父组件@Provide ProvideFatherComponent() } - .margin({ top: 10.0 } as Margin) + .margin({ top: 10.0 }as Margin) } } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets index 0ae2e875..7e9650f4 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,13 +29,12 @@ import { Color, ColumnOptions, $r, - $rawfile + $rawfile, } from '@kit.ArkUI'; - -import { Circle } from '@ohos.arkui.component'; +import { Circle} from '@ohos.arkui.component'; import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; -import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; +import { COLOR_SELECT_DATA,NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; @@ -43,15 +42,12 @@ import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; export struct ConsumeBrotherOneComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和父组件、子组件B双向同步圆形颜色 @Consume consumeCircleColor: Resource; - // 和父组件、子组件B双向同步Select组件的Index值 - @Consume currentSelectIndex: number = 0; + @Consume currentSelectIndex: int = 0; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ConsumeBrotherOneComponent.ets.html') }) Text($r('app.string.consume_brothers_title')) .fontSize($r('app.float.tips_font_size')) @@ -67,9 +63,8 @@ export struct ConsumeBrotherOneComponent { .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number, text: string) => { - // 孙组件@Consume声明的数据页面更新,爷组件@Provide的数据页面同步更新 - this.currentSelectIndex = index; + .onSelect((index: number,text: string ) => { + this.currentSelectIndex = index as int; this.consumeCircleColor = this.selectColors[index as int].color; }) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets index c931cccf..a76c80a3 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -37,21 +37,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct ConsumeBrotherTwoComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和父组件、子组件B双向同步圆形颜色 @Consume consumeCircleColor: Resource; - // 和父组件、子组件A双向同步Select组件的Index值 - @Consume currentSelectIndex: number; + @Consume currentSelectIndex: int; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ConsumeBrotherTwoComponent.ets.html') }) Text($r('app.string.consume_brothers_title')) .fontColor($r('app.color.tips_font_color')) @@ -69,14 +66,11 @@ export struct ConsumeBrotherTwoComponent { .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) .onSelect((index: number, text: string) => { - // 此组件@Consume声明的数据页面更新,兄弟组件@Consume的数据页面同步更新 - this.currentSelectIndex = index; + this.currentSelectIndex = index as int; this.consumeCircleColor = this.selectColors[index as int].color; }) Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) - .width($r('app.float.circle_size')) - .height($r('app.float.circle_size')) .fill(this.consumeCircleColor) }.justifyContent(FlexAlign.SpaceAround) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets index 9a59c979..e9b83ef6 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -39,21 +39,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct LinkBrotherOneComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和父组件、子组件B双向同步圆形颜色 @Link circleColor: Resource; - // 和父组件、子组件B双向同步Select组件的Index值 - @Link currentSelectIndex: number; + @Link currentSelectIndex: int; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LinkBrotherOneComponent.ets.html') }) Text($r('app.string.link_brothers_title')) .fontSize($r('app.float.tips_font_size')) @@ -65,29 +62,23 @@ export struct LinkBrotherOneComponent { Select(this.selectValues) .id('linkSelectCompA') .selected(this.currentSelectIndex) - // .value(getResourceString(this.CONTEXT, this.selectValues[this.currentSelectIndex as int].value)) .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) .onSelect((index: number, text: string) => { - // 此组件@Link声明的数据页面更新,兄弟组件@Link的数据页面同步更新 - this.currentSelectIndex = index; + this.currentSelectIndex = index as int; this.circleColor = this.selectColors[index as int].color; }) Circle() - .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') } as SizeOptions) + .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }as SizeOptions) .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') } .padding(10.0) - .border({ - radius: $r('app.float.component_radius'), - color: Color.Blue, - width: $r('app.float.border_width') - } as BorderOptions) + .border({ radius: $r('app.float.component_radius'), color: Color.Blue, width: $r('app.float.border_width') }as BorderOptions) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets index 074bba42..677e1285 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -37,21 +37,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct LinkBrotherTwoComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和父组件、子组件A双向同步圆形颜色 @Link circleColor: Resource; - // 和父组件、子组件A双向同步Select的Index值 - @Link currentSelectIndex: number; + @Link currentSelectIndex: int; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LinkBrotherTwoComponent.ets.html') }) Text($r('app.string.link_brothers_title')) .fontColor($r('app.color.tips_font_color')) @@ -63,15 +60,13 @@ export struct LinkBrotherTwoComponent { Select(this.selectValues) .id('linkSelectCompB') .selected(this.currentSelectIndex) - // .value(getResourceString(this.CONTEXT, this.selectColors[this.currentSelectIndex as int].value)) .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) .onSelect((index: number, text: string) => { - // 此组件@Link声明的数据页面更新,兄弟组件@Link的数据页面同步更新 - this.currentSelectIndex = index; + this.currentSelectIndex = index as int; this.circleColor = this.selectColors[index as int].color; }) Circle() diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets index a1f72f89..020cab6e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ProvideFatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,25 +36,19 @@ import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; @Component export struct ProvideFatherComponent { - // 初始化一个颜色数组 @State selectColors: ColorType[] = COLOR_SELECT_DATA; - // 共同父组件使用@Provide初始化圆形颜色 @Provide consumeCircleColor: Resource = $r('app.color.circle_blue'); - // 初始化Select组件的Index为0 @Provide currentSelectIndex: number = 0.0; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ProvideFatherComponent.ets.html') }) Text($r('app.string.parent_titletwo')) .fontSize($r('app.float.tips_font_size')) .fontColor($r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - // 和父组件双向同步子组件A ConsumeBrotherOneComponent() - // 和父组件双向同步子组件B ConsumeBrotherTwoComponent() }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets index 59df408d..7b83e2dd 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/StateFatherComponent.ets @@ -24,7 +24,7 @@ import { Color, $r, $rawfile, - ColumnOptions + ColumnOptions, } from '@kit.ArkUI'; import { ColorType } from '../model/ColorType'; @@ -35,27 +35,21 @@ import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; @Component export struct StateFatherComponent { - // 共同父组件使用@State初始化圆形颜色 @State circleColor: Resource = $r('app.color.circle_blue'); - // 初始化一个颜色数组 - // 初始化当前Select的Index为0 - @State currentSelectIndex: number = 0.0; + @State currentSelectIndex: int = 0; build() { Column({ space: 10.0 }as ColumnOptions) { - // 点击查看源码 ViewCodeText({ webSrc: $rawfile('StateFatherComponent.ets.html') }) Text($r('app.string.parent_titleone')) .fontSize($r('app.float.tips_font_size')) .fontColor($r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - // 和父组件双向同步子组件A LinkBrotherOneComponent({ circleColor: this.circleColor, currentSelectIndex: this.currentSelectIndex }) - // 和父组件双向同步子组件B LinkBrotherTwoComponent({ circleColor: this.circleColor, currentSelectIndex: this.currentSelectIndex diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets index 27d7c8eb..08477e7e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/data/ColorData.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,10 @@ */ import { ColorType } from '../model/ColorType' -import { $r, SelectOption } from '@kit.ArkUI'; +import { + $r, + SelectOption, +} from '@kit.ArkUI'; export const COLOR_SELECT_DATA: ColorType[] = [ { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets index 2f3e46bc..880d4fb9 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ConsumeDescendentComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -37,22 +37,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct ConsumeDescendentComponent { - // 初始化一个颜色数组数据 @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和爷组件双向同步圆形颜色 @Consume consumeCircleColor: Resource; - // 和爷组件双向同步Select的Index值 - @Consume currentSelectIndex: number; + @Consume currentSelectIndex: int; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { - // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ConsumeDescendentComponent.ets.html') }) Row() { Select(this.selectValues) @@ -63,9 +59,8 @@ export struct ConsumeDescendentComponent { .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandsonCompB') - .onSelect((index: number, text?: string | undefined) => { - // 孙组件@Consume声明的数据页面更新,爷组件@Provide的数据页面同步更新 - this.currentSelectIndex = index; + .onSelect((index: number,text?: string | undefined) => { + this.currentSelectIndex = index as int; this.consumeCircleColor = this.selectColors[index as int].color; }) Circle() @@ -74,7 +69,7 @@ export struct ConsumeDescendentComponent { }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6.0 } as Margin) + .margin({ bottom: 6.0 }as Margin) Text($r('app.string.deepnest_descendent_titletwo')) .fontColor($r('app.color.tips_font_color')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets index 69912f32..bd9edbd1 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { CodeView } from '../../../../commoncomponents/CodeView'; @@ -45,6 +45,6 @@ struct DeepNestComponentsSync { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets index c061c869..5a1141ff 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,7 +20,7 @@ import { Text, TextAlign, Margin, - $r + $r, } from '@kit.ArkUI'; import { StateGrandfatherComponent } from './StateGrandfatherComponent'; @@ -35,16 +35,14 @@ export struct DeepNestComponentsSyncCode { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - // 爷组件@State StateGrandfatherComponent() - }.margin({ bottom: 16.0 } as Margin) + }.margin({ bottom: 16.0 }as Margin) Column() { Text($r('app.string.realize_by_provide_consume')) .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - // 爷组件@Provide ProvideGrandfatherComponent() } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets index 48da86df..3a7c539d 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,7 +29,7 @@ import { $r, $rawfile, Margin, - SelectOption + SelectOption, } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; @@ -37,21 +37,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct LinkDescendentComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 和父组件和爷组件双向同步圆形颜色 @Link circleColor: Resource; - // 和父组件和爷组件双向同步Select的Index值 - @Link currentSelectIndex: number; + @Link currentSelectIndex: int; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { - // 点击查看源码 ViewCodeText({ webSrc: $rawfile('LinkDescendentComponent.ets.html') }) Row() { Select(this.selectValues) @@ -62,9 +59,8 @@ export struct LinkDescendentComponent { .selectedOptionFont({ size: $r('app.float.tips_font_size') }) .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandsonCompA') - .onSelect((index: number, text?: string | undefined) => { - // 孙组件@Link组件数据页面更新,爷组件同步更新 - this.currentSelectIndex = index; + .onSelect((index: number,text?: string | undefined) => { + this.currentSelectIndex = index as int; this.circleColor = this.selectColors[index as int].color; }) Circle() @@ -72,7 +68,7 @@ export struct LinkDescendentComponent { .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6.0 } as Margin) + .margin({ bottom: 6.0 }as Margin) Text($r('app.string.deepnest_descendent_titleone')) .fontColor($r('app.color.tips_font_color')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets index ad395828..f56f0c71 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/ProvideGrandfatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -32,38 +32,35 @@ import { SelectOption } from '@kit.ArkUI'; + import common from '@ohos.app.ability.common'; import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { ConsumeDescendentComponent } from './ConsumeDescendentComponent'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; import { getResourceString } from '../../../../utils/ResourceUtils'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct ProvideGrandfatherComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 初始化爷组件@Provide的原型颜色 @Provide consumeCircleColor: Resource = $r('app.color.circle_blue'); - // 初始化Select组件的Index - @Provide currentSelectIndex: number = 0; + @Provide currentSelectIndex: int = 0; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { Column() { - // 点击查看源码 - ViewCodeText({ webSrc: $rawfile('ProvideGrandfatherComponent.ets.html') }) + ViewCodeText({ webSrc: $rawfile('ProvideGrandfatherComponent.ets.html') }) Text($r('app.string.deepnest_parent_titletwo')) .fontSize($r('app.float.tips_font_size')) .fontColor($r('app.color.tips_font_color')) .width('100%') .textAlign(TextAlign.Center) - .margin({ top: 10.0 } as Margin) + .margin({ top: 10.0 }as Margin) Row() { Select(this.selectValues) .selected(this.currentSelectIndex) - // .value(getResourceString(this.CONTEXT, this.selectColors[this.currentSelectIndex].value)) .value(this.selectValues[this.currentSelectIndex].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.tips_font_size') }) @@ -71,18 +68,15 @@ export struct ProvideGrandfatherComponent { .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandfatherCompB') .onSelect((index: number, text?: string | undefined) => { - // 爷组件@Provide声明的数据页面更新,孙组件@Consume关联的变量同步更新 - this.currentSelectIndex = index; - this.consumeCircleColor = this.selectColors[index].color; + this.currentSelectIndex = index as int; + this.consumeCircleColor = this.selectColors[index as int].color; }) Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.consumeCircleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') - .margin({ bottom: 6.0 } as Margin) - - // 子组件 + .margin({ bottom: 6.0 }as Margin) ConsumeChildComp() }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) @@ -91,6 +85,7 @@ export struct ProvideGrandfatherComponent { @Component struct ConsumeChildComp { + build() { Column() { Text($r('app.string.deepnest_child_titletwo')) @@ -99,7 +94,6 @@ struct ConsumeChildComp { .width('100%') .textAlign(TextAlign.Center) .height($r('app.float.button_height')) - // 双向同步孙组件 ConsumeDescendentComponent() } .padding(10.0) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets index 003a2f7d..759749e9 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -38,22 +38,18 @@ import { ColorType } from '../model/ColorType'; import { COLOR_SELECT_DATA, NEW_COLOR_SELECT_DATA } from '../data/ColorData'; import { getResourceString } from '../../../../utils/ResourceUtils'; import { ViewCodeText } from '../../../../commoncomponents/ViewCodeText'; -import { Circle } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct StateGrandfatherComponent { - // 初始化爷组件@State的圆形颜色 @State circleColor: Resource = $r('app.color.circle_blue'); - // 初始化一个颜色数组 @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; - // 初始化当前select组件的index - @State currentSelectIndex: number = 0.0; + @State currentSelectIndex: int = 0; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('StateGrandfatherComponent.ets.html') }) Text($r('app.string.deepnest_parent_titleone')) .fontSize($r('app.float.tips_font_size')) @@ -70,8 +66,7 @@ export struct StateGrandfatherComponent { .optionFont({ size: $r('app.float.tips_font_size') }) .id('grandfatherCompA') .onSelect((index: number, text?: string | undefined) => { - // 爷组件@State声明的数据页面更新,孙组件@Link关联的变量同步更新 - this.currentSelectIndex = index; + this.currentSelectIndex = index as int; this.circleColor = this.selectColors[index as int].color; }) Circle() @@ -79,8 +74,6 @@ export struct StateGrandfatherComponent { .fill(this.circleColor) }.justifyContent(FlexAlign.SpaceAround) .width('100%') - - // 双向同步子组件 LinkChildComp({ circleColor: this.circleColor, currentSelectIndex: this.currentSelectIndex }) }.padding(10.0) .border({ radius: $r('app.float.component_radius'), color: Color.Grey, width: $r('app.float.border_width') }) @@ -89,10 +82,8 @@ export struct StateGrandfatherComponent { @Component struct LinkChildComp { - // 和父组件和子组件双向同步圆形颜色 @Link circleColor: Resource; - // 和父组件和子组件双向同步Select的Index值 - @Link currentSelectIndex: number; + @Link currentSelectIndex: int; build() { Column() { @@ -102,10 +93,9 @@ struct LinkChildComp { .width('100%') .textAlign(TextAlign.Center) .height($r('app.float.button_height')) - // 双向同步孙组件 LinkDescendentComponent({ circleColor: this.circleColor, - currentSelectIndex: this.currentSelectIndex + currentSelectIndex: this.currentSelectIndex as int }) } .padding(10.0) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets index 01c27eb3..dbfbee43 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/model/ColorType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,7 +17,7 @@ import { Resource } from '@kit.ArkUI'; export interface ColorType { - color: Resource, + color: Resource, }; diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets index 18f738ed..3c54164f 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ObjectLinkComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,7 +26,7 @@ import { Color, ColumnOptions, $r, - $rawfile + $rawfile, } from '@kit.ArkUI'; import { ClassObject } from './ParentChildPartialContentSyncCode'; @@ -34,12 +34,10 @@ import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; @Component export struct ObjectLinkComponent { - // 使用@ObjectLink修饰,与父组件中元素同步 @ObjectLink childObjectData: ClassObject; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ObjectLinkComponent.ets.html') }) Text($r('app.string.partial_sync_text')) @@ -57,8 +55,7 @@ export struct ObjectLinkComponent { .fontSize(20.0) .layoutWeight(1.0) .id('childAttribute') - .onChange((value: string): void => { - // 子组件对象属性更新,父元素同步 + .onChange((value: string): void=> { this.childObjectData.attributeType = value; }) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets index 38167f62..279bee7b 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { ParentChildPartialContentSyncCode } from './ParentChildPartialContentSyncCode'; @@ -45,6 +45,6 @@ struct ParentChildPartialContentSync { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets index a6115cf0..78e7e844 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,6 +14,8 @@ * limitations under the License. */ +import { PropRef } from '@kit.ArkUI'; + import { Observed, Resource, @@ -29,14 +31,12 @@ import { $r, $rawfile, ColumnOptions, - PropRef, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; import { ObjectLinkComponent } from './ObjectLinkComponent'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; -// 数组中元素的类,使用@Observed修饰 @Observed export class ClassObject { public elementType: Resource; @@ -48,22 +48,17 @@ export class ClassObject { } } -// 初始化父组件中的数据 -const PARENT_DATA: ClassObject[] = - [new ClassObject($r('app.string.partial_sync_element_one'), $r('app.string.partial_sync_attribute_one')), - new ClassObject($r('app.string.partial_sync_element_two'), $r('app.string.partial_sync_attribute_two')), - new ClassObject($r('app.string.partial_sync_element_three'), $r('app.string.partial_sync_attribute_three'))]; +const PARENT_DATA: ClassObject[] = [new ClassObject($r('app.string.partial_sync_element_one'), $r('app.string.partial_sync_attribute_one')), + new ClassObject($r('app.string.partial_sync_element_two'), $r('app.string.partial_sync_attribute_two')), + new ClassObject($r('app.string.partial_sync_element_three'), $r('app.string.partial_sync_attribute_three'))]; @Component export struct ParentChildPartialContentSyncCode { - // 初始化父组件中状态变量 @State parentData: ClassObject[] = PARENT_DATA; - // 与子组件同步的的数据是数组的第几个元素,默认选中第一个 - @State syncIndex: number = 0.0; + @State syncIndex: int = 0; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ParentChildPartialContentSyncCode.ets.html') }) Text($r('app.string.partial_sync_parent_tips')) @@ -71,23 +66,21 @@ export struct ParentChildPartialContentSyncCode { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Start) - // 父组件中List展示状态变量中的内容 Column() { ForEach(this.parentData, (item: ClassObject, index: number) => { Column() { ParentCompDataItem({ index: index, syncIndex: this.syncIndex, childObject: item }) } .backgroundColor(index === this.syncIndex ? $r('app.color.component_background_pink') : undefined) - .onClick((): void => { - this.syncIndex = index; + .onClick(() : void=> { + this.syncIndex = index as int; }) }, index => index.toString()) } .width('100%') .backgroundColor($r('app.color.component_background_pink')) - //与父组件状态同步的子组件 - ObjectLinkComponent({ childObjectData: this.parentData[this.syncIndex] }) + ObjectLinkComponent({ childObjectData: this.parentData[this.syncIndex as int] }) } .width('100%') .padding(10.0) @@ -95,12 +88,10 @@ export struct ParentChildPartialContentSyncCode { } } -// 展示数组中单个元素的子组件 @Component struct ParentCompDataItem { private index: number; syncIndex: number; - // 使用@ObjectLink修饰,与父组件中元素同步 @ObjectLink childObject: ClassObject; build() { @@ -112,8 +103,7 @@ struct ParentCompDataItem { TextInput({ text: this.childObject.attributeType }) .fontSize(20.0) .id(`attribute${this.index + 1.0}`) - .onChange((value: string): void => { - // 更新父组件中元素的属性,子组件同步 + .onChange((value: string):void => { this.childObject.attributeType = value; }) } else { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets index 52543e76..a4aa6fc5 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentLink.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -27,22 +27,20 @@ import { ColumnOptions, $r, $rawfile, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; import { COLOR_DATA } from './UniAndBidirectionSyncCode'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; @Component export struct ChildCompLink { - // 圆形颜色,和父组件中的状态变量双向同步 @Link circleColor: string; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 - ViewCodeText({ webSrc: $rawfile('ComponentLink.ets.html') }) + Column({ space: 10.0 }as ColumnOptions) { + ViewCodeText({webSrc: $rawfile('ComponentLink.ets.html')}) Text($r('app.string.child_component')) .fontSize($r('app.float.tips_font_size')) @@ -54,7 +52,6 @@ export struct ChildCompLink { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Center) - // 绑定@Link变量的Circle组件 Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) @@ -69,8 +66,7 @@ export struct ChildCompLink { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick((): void => { - // 点击更新子组件@Link声明的变量,此子组件更新,父组件以及@Prop声明的子组件变量同步 + .onClick(() : void=> { this.circleColor = COLOR_DATA.RED; }) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets index 867ba5a1..d90d3113 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/ComponentProp.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,11 +14,12 @@ * limitations under the License. */ +import { PropRef } from '@kit.ArkUI'; + import { Component, Column, Text, - PropRef, TextAlign, Circle, Button, @@ -30,19 +31,17 @@ import { ClickEvent, StorageProp } from '@kit.ArkUI'; +import { Circle,} from '@ohos.arkui.component'; -import { Circle } from '@ohos.arkui.component'; import { COLOR_DATA } from './UniAndBidirectionSyncCode'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; @Component export struct ChildCompProp { - // 圆形颜色,和父组件中的状态变量单向同步,只支持基础类型 @StorageProp('circleColor') circleColor: string = 'red'; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ComponentProp.ets.html') }) Text($r('app.string.child_component')) .fontSize($r('app.float.tips_font_size')) @@ -54,7 +53,6 @@ export struct ChildCompProp { .fontSize($r('app.float.tips_font_size')) .width('100%') .textAlign(TextAlign.Center) - // 绑定@Link变量的Circle组件 Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) @@ -69,8 +67,7 @@ export struct ChildCompProp { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick((): void => { - // 点击更新子组件@Prop声明的变量,此子组件更新,父组件以及@Link声明的子组件变量不同步 + .onClick(() : void=> { this.circleColor = COLOR_DATA.BLUE; }) } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets index d08948f1..6a23ae60 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { UniAndBidirectionSyncCode } from './UniAndBidirectionSyncCode'; @@ -45,6 +45,6 @@ struct UniAndBidirectionSync { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets index a959d730..914e7b2a 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSyncCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,38 +26,28 @@ import { ColumnOptions, ClickEvent, $r, - $rawfile + $rawfile, } from '@kit.ArkUI'; import { ChildCompLink } from './ComponentLink'; import { ChildCompProp } from './ComponentProp'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; -import { Circle, } from '@ohos.arkui.component'; +import { Circle,} from '@ohos.arkui.component'; -interface ColorData { - GREY: string; - BLUE: string; - PINK: string; - RED: string; -} - -// 初始化圆形的可设置颜色 -export const COLOR_DATA: ColorData = { - GREY: '#eebebeba', - BLUE: '#4A90E2', - PINK: '#8DF8BEBE', - RED: '#FFF30823', +export enum COLOR_DATA { + GREY = '#eebebeba', + BLUE = '#4A90E2', + PINK = '#8DF8BEBE', + RED = '#FFF30823', } @Component export struct UniAndBidirectionSyncCode { - // 初始化圆形颜色的状态变量 @State circleColor: string = COLOR_DATA.GREY; build() { - Column({ space: 10.0 } as ColumnOptions) { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('UniAndBidirectionSyncCode.ets.html') }) Text($r('app.string.parent_component')) .fontSize($r('app.float.tips_font_size')) @@ -72,7 +62,6 @@ export struct UniAndBidirectionSyncCode { Circle() .size({ width: $r('app.float.circle_size'), height: $r('app.float.circle_size') }) .fill(this.circleColor) - // 点击更新父组件的圆形颜色变量,父组件更新,子组件@Link以及@Prop继承的变量同步 Button('') { Text($r('app.string.uni_and_bidirection_sync_btn')) .fontColor($r('app.color.button_text_color')) @@ -84,14 +73,11 @@ export struct UniAndBidirectionSyncCode { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick((event: ClickEvent) => { + .onClick((event:ClickEvent) => { this.circleColor = COLOR_DATA.PINK; }) } - - // 单向同步子组件 ChildCompProp({ circleColor: this.circleColor }) - // 双向同步子组件 ChildCompLink({ circleColor: this.circleColor }) } .padding(10.0) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets index aa4ac22c..6cc9a724 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { ArrayTypeCode } from './ArrayTypeCode'; @@ -45,6 +45,6 @@ struct ArrayTypes { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets index 66eea742..7409cb06 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets @@ -1,11 +1,11 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,13 +32,12 @@ import { ColumnOptions, ClickEvent, Margin, - Padding + Padding, } from '@kit.ArkUI'; import promptAction from '@ohos.promptAction'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText' -// 数组中元素的类 export class ArrayDataType { public id: number; public name: string; @@ -51,23 +50,18 @@ export class ArrayDataType { } } -// 初始化数组数据 const ARRAY_TYPE_AGE_DATA: ArrayDataType[] = [new ArrayDataType(0, 'name', 17), new ArrayDataType(1, 'name', 18), new ArrayDataType(2, 'name', 19)] -// 初始化功能按钮字符串数据 const ARRAY_TYPE_BTN: Resource[] = [$r('app.string.array_type_add'), $r('app.string.array_type_delete'), $r('app.string.array_type_update')]; @Component export struct ArrayTypeCode { - // 数组类型状态变量初始化 @State arrayTypeData: ArrayDataType[] = ARRAY_TYPE_AGE_DATA; build() { Column({ space: 10 } as ColumnOptions) { - // 点击查看源码 ViewCodeText({ webSrc: $rawfile('ArrayTypeCode.ets.html') }) - // 数组内容展示 List() { ForEach(this.arrayTypeData, (item: ArrayDataType, index: number) => { ListItem() { @@ -80,8 +74,6 @@ export struct ArrayTypeCode { .height('40%') .backgroundColor($r('app.color.component_background_pink')) .padding({ left: 10, right: 10 } as Padding) - - // 功能按钮区 ForEach(ARRAY_TYPE_BTN, (item: Resource, index: number) => { Button(item) .id(`arrayTypeBtn${index}`) @@ -104,29 +96,24 @@ export struct ArrayTypeCode { const intIndex = index | 0; switch (intIndex) { case 0: - // 数组添加元素 this.arrayTypeData.push(new ArrayDataType(this.arrayTypeData.length, `name`, 18)); break; case 1: if (this.arrayTypeData.length === 0) { - // 当数据没有数据的时候,点击删除按钮,出现提示弹窗 promptAction.openToast({ message: $r('app.string.array_type_deletetoast') }); } else { - // 数组删除元素 - this.arrayTypeData.splice(this.arrayTypeData.length - 1, 1); // 删除最后一个元素 + this.arrayTypeData.splice(this.arrayTypeData.length - 1, 1); } break; case 2: if (this.arrayTypeData.length === 0) { - // 当数据没有数据的时候,点击更新按钮,出现提示弹窗 promptAction.openToast({ message: $r('app.string.array_type_updatetoast') }); break; } - // 初始化一个对象后给数组中的元素赋值,更新数组元素 let temp = new ArrayDataType(this.arrayTypeData[0].id, this.arrayTypeData[0].name, this.arrayTypeData[0].age + 1); this.arrayTypeData[0] = temp; @@ -137,10 +124,8 @@ export struct ArrayTypeCode { } } -// 数组Item内容组件 @Component struct ArrayDataItem { - // private arrayDataItem: ArrayDataType; private arrayDataItem: ArrayDataType = new ArrayDataType(0, "default", 18); private itemIndex: number; diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets index d7a36ac5..6831d565 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,9 +21,10 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; + import { BaseTypeCode } from './BaseTypeCode'; import { CodeView } from '../../../../../commoncomponents/CodeView' @@ -34,7 +35,7 @@ struct BaseType { build() { Column() { - CodeView({ title: this.title }) { + CodeView({ title: this.title}){ BaseTypeCode() } } @@ -45,6 +46,6 @@ struct BaseType { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets index d9c69579..13ef84a8 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseTypeCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,7 +28,7 @@ import { $r, $rawfile, ColumnOptions, - ClickEvent + ClickEvent, } from '@kit.ArkUI'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText' @@ -39,9 +39,8 @@ export struct BaseTypeCode { @State circleColor: Resource = $r('app.color.circle_pink'); build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 - ViewCodeText({ webSrc: $rawfile('BaseTypeCode.ets.html') }) + Column({ space: 10.0 }as ColumnOptions) { + ViewCodeText({webSrc: $rawfile('BaseTypeCode.ets.html')}) Text($r('app.string.base_type_tip_text')) .fontColor($r('app.color.tips_font_color')) @@ -63,7 +62,7 @@ export struct BaseTypeCode { .height($r('app.float.button_height')) .type(ButtonType.Capsule) .backgroundColor($r('app.color.button_background_color')) - .onClick((event: ClickEvent) => { + .onClick((event:ClickEvent) => { if (this.circleColor.id === $r('app.color.circle_pink').id) { this.circleColor = $r('app.color.circle_blue'); } else { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets index e3825994..5b94a34b 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { ClassObjectTypeCode } from './ClassObjectTypeCode'; @@ -45,6 +45,6 @@ struct ClassObjectType { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets index 8b9031cf..36af6225 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,8 +14,9 @@ * limitations under the License. */ +import { applyStyles } from '@kit.ArkUI'; + import { - applyStyles, Component, State, Column, @@ -35,7 +36,7 @@ import { $r, $rawfile, Padding, - Margin + Margin, } from '@kit.ArkUI'; import common from '@ohos.app.ability.common'; @@ -44,19 +45,16 @@ import { getResourceString } from '../../../../../utils/ResourceUtils'; @Component export struct ClassObjectTypeCode { - // 对象类型状态变量初始化 @State classObjectData: ParentClass = new ParentClass(getResourceString(this.CONTEXT, $r('app.string.class_object')), - getResourceString(this.CONTEXT, $r('app.string.class_attribute')), 1.0, - new ChildClass(getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')), 2.0)); - // 更新对象的次数 + getResourceString(this.CONTEXT, $r('app.string.class_attribute')), 1.0, + new ChildClass(getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')), 2.0)); private clickedCount: number = 0.0; private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 + Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ClassObjectTypeCode.ets.html') }) - Column({ space: 15.0 } as ColumnOptions) { + Column({ space: 15.0 }as ColumnOptions) { Row() { Text(this.classObjectData.title) .fontSize(20.0) @@ -64,7 +62,7 @@ export struct ClassObjectTypeCode { Divider() .layoutWeight(1.0) .strokeWidth(1.0) - .margin({ top: 20.0, left: 5.0 } as Margin) + .margin({ top: 20.0, left: 5.0 }as Margin) } .width('100%') @@ -84,26 +82,22 @@ export struct ClassObjectTypeCode { .strokeWidth(1.0) } .width('100%') - .padding({ left: 50.0 } as Padding) + .padding({ left: 50.0 }as Padding ) - ChildObjectComp({ childObject: this.classObjectData.child }) // 对象的属性,使用子组件显示 + ChildObjectComp({ childObject: this.classObjectData.child }) } .width('100%') .backgroundColor($r('app.color.component_background_pink')) .padding(10.0) - - // 点击更新对象 Button($r('app.string.class_type_update_object')) - .onClick((event: ClickEvent) => { - // 更新对象,把新的对象直接赋值给状态变量 + .onClick((event:ClickEvent) => { this.clickedCount++; let objectTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_object')) + this.clickedCount; - let attributeTitle: string = - getResourceString(this.CONTEXT, $r('app.string.class_attribute')) + this.clickedCount; + let attributeTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_attribute')) + this.clickedCount; let childAttributeTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')) - + this.clickedCount; + + this.clickedCount; let newObject = new ParentClass(objectTitle, attributeTitle, this.classObjectData.attribute + 1.0, - new ChildClass(childAttributeTitle, this.classObjectData.child.attribute + 1.0)); + new ChildClass(childAttributeTitle, this.classObjectData.child.attribute + 1.0)); this.classObjectData = newObject; }) .id('updateObject') @@ -112,8 +106,7 @@ export struct ClassObjectTypeCode { .type(ButtonType.Capsule) .applyStyles(buttonStyle) Button($r('app.string.class_type_update_attribute')) - .onClick((event: ClickEvent) => { - // 点击更新对象的属性 + .onClick((event:ClickEvent) => { this.classObjectData.attribute++; }) .id('updateObjectAttribute') @@ -122,8 +115,7 @@ export struct ClassObjectTypeCode { .type(ButtonType.Capsule) .applyStyles(buttonStyle) Button($r('app.string.class_type_update_child_attribute')) - .onClick((event: ClickEvent) => { - // 点击更新对象属性的属性 + .onClick((event:ClickEvent) => { this.classObjectData.child.attribute++; }) .id('updateAttributeOfAttribute') @@ -138,10 +130,8 @@ export struct ClassObjectTypeCode { } } -// 对象中属性的组件 @Component struct ChildObjectComp { - // 使用@ObjectLink修饰,与父组件同步对象的属性 @ObjectLink childObject: ChildClass; build() { @@ -161,17 +151,16 @@ struct ChildObjectComp { .strokeWidth(1.0) } .width('100%') - .padding({ left: 100.0 } as Padding) + .padding({ left: 100.0 }as Padding ) } } function buttonStyle(instance: CommonMethod): void { - instance.width('100%'); - instance.height($r('app.float.button_height')); - instance.backgroundColor($r('app.color.button_background_color')); + instance.width('100%'); + instance.height($r('app.float.button_height')); + instance.backgroundColor($r('app.color.button_background_color')); } -// 要更新对象属性的属性,对象属性的类需要使用@Observed修饰 @Observed class ChildClass { public title: string; @@ -195,6 +184,5 @@ class ParentClass { this.attributeTitle = attributeTitle; this.attribute = attribute; this.child = child; - } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets index a7ba64ef..2abd7013 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import { Resource, Column, AppStorage, - $r + $r, } from '@kit.ArkUI'; import { UpdateBoundComponentCode } from './UpdateBoundComponentCode'; @@ -45,6 +45,6 @@ struct UpdateBoundComponent { } aboutToDisappear(): void { - AppStorage.set('sideBarShow', false); + AppStorage.setOrCreate('sideBarShow', false); } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets index d208f78a..a0fe31dd 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponentCode.ets @@ -1,6 +1,6 @@ 'use static' /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,24 +28,20 @@ import { ClickEvent, $r, $rawfile, - Margin + Margin, } from '@kit.ArkUI'; import { ViewCodeText } from '../../../../../commoncomponents/ViewCodeText'; @Component export struct UpdateBoundComponentCode { - // 组件内状态变量 @State titleName: string = 'title'; - // 组件内private变量 private content: string = 'content'; - // 组件内变量更新的次数 private updateCount: number = 0.0; build() { - Column({ space: 10.0 } as ColumnOptions) { - // 点击查看源码 - ViewCodeText({ webSrc: $rawfile('UpdateBoundComponentCode.ets.html') }) + Column({ space: 10.0 }as ColumnOptions) { + ViewCodeText({webSrc: $rawfile('UpdateBoundComponentCode.ets.html')}) Column() { Text($r('app.string.only_update_state')) @@ -56,7 +52,7 @@ export struct UpdateBoundComponentCode { Text($r('app.string.only_update_title')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) - Text(`${this.titleName}`) // titleName为状态变量,绑定Text组件 + Text(`${this.titleName}`) .fontColor($r('app.color.button_text_color')) .fontSize(20.0) } @@ -67,12 +63,12 @@ export struct UpdateBoundComponentCode { .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.tips_font_size')) .width('100%') - .margin({ top: 20.0 } as Margin) + .margin({ top: 20.0 }as Margin) Row() { Text($r('app.string.only_update_content')) .fontColor($r('app.color.button_text_color')) .fontSize($r('app.float.button_text_size')) - Text(`${this.content}`) // content为private,绑定Text组件 + Text(`${this.content}`) .fontColor($r('app.color.button_text_color')) .fontSize(20.0) } @@ -86,8 +82,7 @@ export struct UpdateBoundComponentCode { Column() { Button($r('app.string.update_title_content')) - .onClick((event: ClickEvent) => { - // 点击更新@State和Private声明的变量,更新策略为:@State和Private的数据发生变化,@State变量绑定的组件更新,Private变量绑定的组件不更新。 + .onClick((event:ClickEvent) => { this.updateCount++; this.content = `content ${this.updateCount}`; this.titleName = `title ${this.updateCount}`; @@ -102,7 +97,7 @@ export struct UpdateBoundComponentCode { Text($r('app.string.only_update_state_components')) .fontColor($r('app.color.tips_font_color')) .fontSize($r('app.float.button_text_size')) - .margin({ top: 30.0 } as Margin) + .margin({ top: 30.0 }as Margin) }.width('100%') } .padding(10.0) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ts index 388a260f..44f93ec4 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ts @@ -24,11 +24,9 @@ export function startSpecifiedAbility(context: common.UIAbilityContext, abilityN }; context.startAbility(abilityConfig, (err) => { if (err.code) { - // 处理业务逻辑错误 Logger.error(`startAbility failed, code is ${err.code}, message is ${err.message}`); return; } - // 执行正常业务 Logger.info('startAbility succeed'); }); } \ No newline at end of file -- Gitee From 073b121d1cb2707cdd685b30852bb7356332ccc5 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 1 Sep 2025 14:23:50 +0800 Subject: [PATCH 5/7] fix_sample_stateManagement_maualfix_0901 Signed-off-by: wangweiyuan --- .../decoratedobjecttype/arraytype/ArrayTypeCode.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets index 7409cb06..b1fc1e35 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayTypeCode.ets @@ -1,11 +1,11 @@ 'use static' /* * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, -- Gitee From a71e016ac4342b42826af71444c724f0196acd27 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 8 Sep 2025 15:22:46 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=9D=A2=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=98=BE=E7=A4=BA=EF=BC=8CWebviewController=E5=B7=B2?= =?UTF-8?q?=E6=8F=90=E5=8D=95DTS2025090506994?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- OAT.xml | 3 + .../ets/constants/ImageViewerConstants.d.ets | 7 + .../main/ets/entryability/EntryAbility.d.ets | 15 + .../EntryBackupAbility.d.ets | 10 + .../ets/model/CommonLazyDataSourceModel.d.ets | 26 + .../src/main/ets/model/OffsetModel.d.ets | 18 + .../src/main/ets/model/PositionModel.d.ets | 7 + .../src/main/ets/model/RotateModel.d.ets | 15 + .../src/main/ets/model/ScaleModel.d.ets | 19 + .../ets/constants/ImageViewerConstants.ts | 8 + .../src/main/ets/entryability/EntryAbility.ts | 16 + .../entrybackupability/EntryBackupAbility.ts | 11 + .../ets/model/CommonLazyDataSourceModel.ts | 23 + .../static/src/main/ets/model/OffsetModel.ts | 18 + .../src/main/ets/model/PositionModel.ts | 7 + .../static/src/main/ets/model/RotateModel.ts | 15 + .../static/src/main/ets/model/ScaleModel.ts | 19 + .../ets/constants/ImageViewerConstants.ts | 6 + .../src/main/ets/entryability/EntryAbility.ts | 17 + .../entrybackupability/EntryBackupAbility.ts | 12 + .../ets/model/CommonLazyDataSourceModel.ts | 23 + .../src/main/ets/model/OffsetModel.ts | 9 + .../src/main/ets/model/PositionModel.ts | 6 + .../src/main/ets/model/RotateModel.ts | 8 + .../src/main/ets/model/ScaleModel.ts | 9 + .../ets/constants/ImageViewerConstants.d.ets | 7 + .../main/ets/entryability/EntryAbility.d.ets | 15 + .../EntryBackupAbility.d.ets | 10 + .../ets/model/CommonLazyDataSourceModel.d.ets | 26 + .../src/main/ets/model/OffsetModel.d.ets | 17 + .../src/main/ets/model/PositionModel.d.ets | 6 + .../src/main/ets/model/RotateModel.d.ets | 14 + .../src/main/ets/model/ScaleModel.d.ets | 18 + .../ImageViewer/oh-package-lock.json5 | 43 + .../StateManagement/.gitignore | 4 +- .../StateManagement/AppScope/app.json5 | 24 +- .../resources/base/media/background.png | Bin 0 -> 91942 bytes .../resources/base/media/foreground.png | Bin 0 -> 15325 bytes .../resources/base/media/layered_image.json | 7 + .../StateManagement/build-profile.json5 | 23 +- .../StateManagement/entry/.gitignore | 4 +- .../StateManagement/entry/build-profile.json5 | 19 +- .../StateManagement/entry/hvigorfile.ts | 8 +- .../entry/obfuscation-rules.txt | 23 + .../StateManagement/entry/oh-package.json5 | 11 +- .../ets/commoncomponents/ViewCodeText.ets | 1 + .../main/ets/entryability/EntryAbility.ets | 97 ++ .../ets/outofsyncability/OutOfSyncAbility.ets | 60 ++ .../AbilityGlobalDataSync.ets | 5 +- .../LocalStorageLinkPage.ets | 5 +- .../LocalStoragePropPage.ets | 5 +- .../ApplyGlobalDataSync.ets | 5 +- .../model/AbilityConfigType.ets | 19 + .../ets/pages/home/TabContentNavigation.ets | 10 +- .../src/main/ets/pages/home/data/HomeData.ets | 23 +- .../pages/home/model/CategoricalDataType.ets | 6 +- .../BrotherComponentSync.ets | 5 +- .../ConsumeBrotherOneComponent.ets | 14 +- .../ConsumeBrotherTwoComponent.ets | 12 +- .../LinkBrotherOneComponent.ets | 6 +- .../LinkBrotherTwoComponent.ets | 6 +- .../DeepNestComponentsSync.ets | 5 +- .../LinkDescendentComponent.ets | 6 +- .../StateGrandfatherComponent.ets | 8 +- .../ParentChildPartialContentSync.ets | 5 +- .../UniAndBidirectionSync.ets | 5 +- .../arraytype/ArrayType.ets | 5 +- .../decoratedobjecttype/basetype/BaseType.ets | 6 +- .../classobjecttype/ClassObjectType.ets | 5 +- .../classobjecttype/ClassObjectTypeCode.ets | 35 +- .../UpdateBoundComponent.ets | 5 +- .../storagelinkability/StorageLinkAbility.ets | 60 ++ .../storagepropability/StoragePropAbility.ets | 60 ++ .../entry/src/main/ets/utils/Logger.ets | 45 + .../src/main/ets/utils/ResourceUtils.ets | 27 + .../src/main/ets/utils/StartAbilityUtils.ets | 33 + .../entry/src/main/module.json5 | 27 +- .../main/resources/base/element/string.json | 3 + .../resources/base/media/layered_image.png | Bin 0 -> 6790 bytes .../main/resources/dark/element/color.json | 8 + .../src/ohosTest/ets/test/Ability.test.ets | 827 +----------------- .../entry/src/ohosTest/ets/test/List.test.ets | 4 +- .../entry/src/ohosTest/module.json5 | 34 +- .../hvigor/hvigor-config.json5 | 23 +- .../StateManagement/hvigorfile.ts | 8 +- .../StateManagement/oh-package.json5 | 16 +- 86 files changed, 1170 insertions(+), 975 deletions(-) create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets create mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/oh-package-lock.json5 create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/background.png create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/foreground.png create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/layered_image.json create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/obfuscation-rules.txt create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagelinkability/StorageLinkAbility.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagepropability/StoragePropAbility.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/Logger.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ets create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/media/layered_image.png create mode 100644 sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/dark/element/color.json diff --git a/OAT.xml b/OAT.xml index 0e2a9e26..1a64ff47 100644 --- a/OAT.xml +++ b/OAT.xml @@ -139,6 +139,9 @@ Note:If the text contains special characters, please escape them according to th + + + diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets new file mode 100644 index 00000000..5191b72b --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets @@ -0,0 +1,7 @@ +'use static' +export declare function main(): void; +export declare class ImageViewerConstants { + public static get ANIMATE_DURATION(): number; + public static get SWIPER_CACHE_COUNT(): number; + public constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets new file mode 100644 index 00000000..4c51b5d2 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets @@ -0,0 +1,15 @@ +'use static' +import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; +import { window } from "@kit.ArkUI"; +export declare function main(): void; +export declare const DOMAIN: number = 0.0; +declare class EntryAbility extends UIAbility { + public onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void; + public onDestroy(): void; + public onWindowStageCreate(windowStage: window.WindowStage): void; + public onWindowStageDestroy(): void; + public onForeground(): void; + public onBackground(): void; + public constructor(); +} +export default EntryAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets new file mode 100644 index 00000000..ad174cd3 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets @@ -0,0 +1,10 @@ +'use static' +import { BackupExtensionAbility, BundleVersion } from "@kit.CoreFileKit"; +export declare function main(): void; +export declare const DOMAIN: number; +declare class EntryBackupAbility extends BackupExtensionAbility { + public onBackup(): Promise; + public onRestore(bundleVersion: BundleVersion): Promise; + public constructor(); +} +export default EntryBackupAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets new file mode 100644 index 00000000..b3a9c0b3 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets @@ -0,0 +1,26 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +import { IDataSource, DataChangeListener } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class BasicDataSource implements IDataSource { + public totalCount(): number; + public getData(index: number): T; + public registerDataChangeListener(listener: DataChangeListener): void; + public unregisterDataChangeListener(listener: DataChangeListener): void; + public notifyDataReload(): void; + public notifyDataAdd(index: number): void; + public notifyDataChange(index: number): void; + public notifyDataDelete(index: number): void; + public notifyDataMove(from: number, to: number): void; + public constructor(); +} +@Observed +export declare class CommonLazyDataSourceModel extends BasicDataSource { + public totalCount(): number; + public getData(index: number): T; + public addData(index: number, data: T): void; + public pushData(data: T): void; + public clearAndPushAll(data: Array): void; + public constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets new file mode 100644 index 00000000..5996b930 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets @@ -0,0 +1,18 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class OffsetModel { + public get currentX(): number; + public set currentX(value: number); + public get currentY(): number; + public set currentY(value: number); + public get lastX(): number; + public set lastX(value: number); + public get lastY(): number; + public set lastY(value: number); + public reset(): void; + public stash(): void; + public toString(): string; + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets new file mode 100644 index 00000000..dd1e6097 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets @@ -0,0 +1,7 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class PositionModel { + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets new file mode 100644 index 00000000..61290bdb --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets @@ -0,0 +1,15 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class RotateModel { + public get currentRotate(): number; + public set currentRotate(value: number); + public get lastRotate(): number; + public set lastRotate(value: number); + public get startAngle(): number; + public set startAngle(value: number); + public reset(): void; + public stash(): void; + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets new file mode 100644 index 00000000..4d705a34 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets @@ -0,0 +1,19 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class ScaleModel { + public get scaleValue(): number; + public set scaleValue(value: number); + public get lastValue(): number; + public set lastValue(value: number); + public get maxScaleValue(): number; + public set maxScaleValue(value: number); + public get extraScaleValue(): number; + public set extraScaleValue(value: number); + public get defaultScaleValue(): number; + public reset(): void; + public stash(): void; + public toString(): string; + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts new file mode 100644 index 00000000..f33b6608 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts @@ -0,0 +1,8 @@ +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;', 'main'); +export const ImageViewerConstants = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;'); +export const ANIMATE_DURATION = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'ANIMATE_DURATION'); +export const SWIPER_CACHE_COUNT = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'SWIPER_CACHE_COUNT'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 00000000..938de8f1 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,16 @@ +import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; +import { window } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;', 'main'); +export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;').DOMAIN; +const EntryAbility = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;'); +export default EntryAbility; +export const onCreate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onCreate'); +export const onDestroy = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onDestroy'); +export const onWindowStageCreate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageCreate'); +export const onWindowStageDestroy = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageDestroy'); +export const onForeground = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onForeground'); +export const onBackground = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onBackground'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts new file mode 100644 index 00000000..bdbca82a --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts @@ -0,0 +1,11 @@ +import { BackupExtensionAbility } from "@kit.CoreFileKit"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;', 'main'); +export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;').DOMAIN; +const EntryBackupAbility = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;'); +export default EntryBackupAbility; +export const onBackup = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onBackup'); +export const onRestore = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onRestore'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts new file mode 100644 index 00000000..292d78b4 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts @@ -0,0 +1,23 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;', 'main'); +export const BasicDataSource = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;'); +export const totalCount = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'totalCount'); +export const getData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'getData'); +export const registerDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'registerDataChangeListener'); +export const unregisterDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'unregisterDataChangeListener'); +export const notifyDataReload = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataReload'); +export const notifyDataAdd = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataAdd'); +export const notifyDataChange = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataChange'); +export const notifyDataDelete = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataDelete'); +export const notifyDataMove = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataMove'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'constructor'); +export const CommonLazyDataSourceModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;'); +export const totalCount = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'totalCount'); +export const getData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'getData'); +export const addData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'addData'); +export const pushData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'pushData'); +export const clearAndPushAll = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'clearAndPushAll'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts new file mode 100644 index 00000000..4d7d9f04 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts @@ -0,0 +1,18 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/OffsetModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/ETSGLOBAL;', 'main'); +export const OffsetModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;'); +export const currentX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentX'); +export const currentX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentX'); +export const currentY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentY'); +export const currentY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentY'); +export const lastX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastX'); +export const lastX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastX'); +export const lastY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastY'); +export const lastY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastY'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'stash'); +export const toString = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'toString'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts new file mode 100644 index 00000000..eccc2a43 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts @@ -0,0 +1,7 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/PositionModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/PositionModel/ETSGLOBAL;', 'main'); +export const PositionModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/PositionModel/PositionModel;'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/PositionModel/PositionModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts new file mode 100644 index 00000000..7072ecbf --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts @@ -0,0 +1,15 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/RotateModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/ETSGLOBAL;', 'main'); +export const RotateModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;'); +export const currentRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'currentRotate'); +export const currentRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'currentRotate'); +export const lastRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'lastRotate'); +export const lastRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'lastRotate'); +export const startAngle = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'startAngle'); +export const startAngle = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'startAngle'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'stash'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts new file mode 100644 index 00000000..19f195c5 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts @@ -0,0 +1,19 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/ScaleModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ETSGLOBAL;', 'main'); +export const ScaleModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;'); +export const scaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'scaleValue'); +export const scaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'scaleValue'); +export const lastValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'lastValue'); +export const lastValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'lastValue'); +export const maxScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'maxScaleValue'); +export const maxScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'maxScaleValue'); +export const extraScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'extraScaleValue'); +export const extraScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'extraScaleValue'); +export const defaultScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'defaultScaleValue'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'stash'); +export const toString = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'toString'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts new file mode 100644 index 00000000..5635c008 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts @@ -0,0 +1,6 @@ +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;', 'main'); +export const ImageViewerConstants = (globalThis as any).Panda.getClass('Lentry/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 00000000..376ce3e5 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,17 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from "@kit.AbilityKit"; +import { hilog } from "@kit.PerformanceAnalysisKit"; +import { window } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;', 'main'); +export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;').DOMAIN; +const EntryAbility = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;'); +export default EntryAbility; +export const onCreate = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onCreate'); +export const onDestroy = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onDestroy'); +export const onWindowStageCreate = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageCreate'); +export const onWindowStageDestroy = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageDestroy'); +export const onForeground = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onForeground'); +export const onBackground = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onBackground'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts new file mode 100644 index 00000000..dcad2072 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts @@ -0,0 +1,12 @@ +import { hilog } from "@kit.PerformanceAnalysisKit"; +import { BackupExtensionAbility } from "@kit.CoreFileKit"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;', 'main'); +export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;').DOMAIN; +const EntryBackupAbility = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;'); +export default EntryBackupAbility; +export const onBackup = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onBackup'); +export const onRestore = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onRestore'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts new file mode 100644 index 00000000..0a2cad72 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts @@ -0,0 +1,23 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;', 'main'); +export const BasicDataSource = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;'); +export const totalCount = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'totalCount'); +export const getData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'getData'); +export const registerDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'registerDataChangeListener'); +export const unregisterDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'unregisterDataChangeListener'); +export const notifyDataReload = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataReload'); +export const notifyDataAdd = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataAdd'); +export const notifyDataChange = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataChange'); +export const notifyDataDelete = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataDelete'); +export const notifyDataMove = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataMove'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'constructor'); +export const CommonLazyDataSourceModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;'); +export const totalCount = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'totalCount'); +export const getData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'getData'); +export const addData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'addData'); +export const pushData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'pushData'); +export const clearAndPushAll = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'clearAndPushAll'); +export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts new file mode 100644 index 00000000..bbafdd06 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts @@ -0,0 +1,9 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/OffsetModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/ETSGLOBAL;', 'main'); +export const OffsetModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/OffsetModel/OffsetModel;'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'stash'); +export const toString = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'toString'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts new file mode 100644 index 00000000..3c4ed676 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts @@ -0,0 +1,6 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/PositionModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/PositionModel/ETSGLOBAL;', 'main'); +export const PositionModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/PositionModel/PositionModel;'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts new file mode 100644 index 00000000..93091aa2 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts @@ -0,0 +1,8 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/RotateModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/ETSGLOBAL;', 'main'); +export const RotateModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/RotateModel/RotateModel;'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/RotateModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/RotateModel;', 'stash'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts new file mode 100644 index 00000000..84e0427c --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts @@ -0,0 +1,9 @@ +import { Observed } from "@kit.ArkUI"; +let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/ScaleModel/ETSGLOBAL;'); +ETSGLOBAL._$init$_(); +export {}; +export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ETSGLOBAL;', 'main'); +export const ScaleModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/ScaleModel/ScaleModel;'); +export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'reset'); +export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'stash'); +export const toString = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'toString'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets new file mode 100644 index 00000000..b89582b3 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets @@ -0,0 +1,7 @@ +'use static' +export declare function main(): void; +export declare class ImageViewerConstants { + public static get ANIMATE_DURATION(): number; + public static get SWIPER_CACHE_COUNT(): number; + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets new file mode 100644 index 00000000..eacd3894 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets @@ -0,0 +1,15 @@ +'use static' +import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; +import { window } from "@kit.ArkUI"; +export declare function main(): void; +export declare const DOMAIN: number; +declare class EntryAbility extends UIAbility { + public onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void; + public onDestroy(): void; + public onWindowStageCreate(windowStage: window.WindowStage): void; + public onWindowStageDestroy(): void; + public onForeground(): void; + public onBackground(): void; + constructor(); +} +export default EntryAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets new file mode 100644 index 00000000..2dda69c4 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets @@ -0,0 +1,10 @@ +'use static' +import { BackupExtensionAbility, BundleVersion } from "@kit.CoreFileKit"; +export declare function main(): void; +export declare const DOMAIN: number; +declare class EntryBackupAbility extends BackupExtensionAbility { + public onBackup(): Promise; + public onRestore(bundleVersion: BundleVersion): Promise; + constructor(); +} +export default EntryBackupAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets new file mode 100644 index 00000000..53c0638c --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets @@ -0,0 +1,26 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +import { IDataSource, DataChangeListener } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class BasicDataSource implements IDataSource { + public totalCount(): number; + public getData(index: number): T; + public registerDataChangeListener(listener: DataChangeListener): void; + public unregisterDataChangeListener(listener: DataChangeListener): void; + public notifyDataReload(): void; + public notifyDataAdd(index: number): void; + public notifyDataChange(index: number): void; + public notifyDataDelete(index: number): void; + public notifyDataMove(from: number, to: number): void; + constructor(); +} +@Observed +export declare class CommonLazyDataSourceModel extends BasicDataSource { + public totalCount(): number; + public getData(index: number): T; + public addData(index: number, data: T): void; + public pushData(data: T): void; + public clearAndPushAll(data: Array): void; + constructor(); +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets new file mode 100644 index 00000000..6687768b --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets @@ -0,0 +1,17 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class OffsetModel { + public get currentX(): number; + public set currentX(value: number); + public get currentY(): number; + public set currentY(value: number); + public get lastX(): number; + public set lastX(value: number); + public get lastY(): number; + public set lastY(value: number); + public reset(): void; + public stash(): void; + public toString(): string; +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets new file mode 100644 index 00000000..ca1bb586 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets @@ -0,0 +1,6 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class PositionModel { +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets new file mode 100644 index 00000000..cdc23d03 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets @@ -0,0 +1,14 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class RotateModel { + public get currentRotate(): number; + public set currentRotate(value: number); + public get lastRotate(): number; + public set lastRotate(value: number); + public get startAngle(): number; + public set startAngle(value: number); + public reset(): void; + public stash(): void; +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets new file mode 100644 index 00000000..176f31fe --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets @@ -0,0 +1,18 @@ +'use static' +import { Observed } from "@kit.ArkUI"; +export declare function main(): void; +@Observed +export declare class ScaleModel { + public get scaleValue(): number; + public set scaleValue(value: number); + public get lastValue(): number; + public set lastValue(value: number); + public get maxScaleValue(): number; + public set maxScaleValue(value: number); + public get extraScaleValue(): number; + public set extraScaleValue(value: number); + public get defaultScaleValue(): number; + public reset(): void; + public stash(): void; + public toString(): string; +} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/oh-package-lock.json5 b/sample/EnhanceSampleArk1.2/ImageViewer/oh-package-lock.json5 new file mode 100644 index 00000000..ef831b53 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/ImageViewer/oh-package-lock.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.21": { + "name": "@ohos/hypium", + "version": "1.0.21", + "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.21.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/.gitignore b/sample/EnhanceSampleArk1.2/StateManagement/.gitignore index 42904af5..d2ff2014 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/.gitignore +++ b/sample/EnhanceSampleArk1.2/StateManagement/.gitignore @@ -1,4 +1,5 @@ /node_modules +/oh_modules /local.properties /.idea **/build @@ -7,4 +8,5 @@ /.clangd /.clang-format /.clang-tidy -/oh_modules \ No newline at end of file +**/.test +/.appanalyzer \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 index 10a0cdb2..a8ee954e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 @@ -1,26 +1,10 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - { "app": { - "bundleName": "com.samples.statemanagement", - "vendor": "samples", + "bundleName": "com.example.myapplication", + "vendor": "example", "versionCode": 1000000, "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true + "icon": "$media:layered_image", + "label": "$string:app_name" } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/background.png b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f GIT binary patch literal 91942 zcma%jXIK;3mNp0q9;J9tQ6L}(1shFzC_yJ4lDn zMF~o;fk0?MN&s@*G$N*V-pj#% zc8%$pJKu3H6B9PCPuxW2f19*Z$HpUUF(3}g7#RA-OX&8^G6)=p#i`)Dwb3Nq8~qFn z<^fU=`t_De-dZt2UTFpm04@e4TEsxg1E>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a(8~DmpqYV$F48y=zhXh(yf7 zCn^qid0U>gYPEE*7i=9I?|UkBu;OjU)X!D-ia9&vii#sl3oRt?s>hTjM)ha{$NScIquF~C(_jty`8VFG< z{^yY?SpGR>+2PDmb02!#w|s-~A|kJ6bPiRO{rmdY1OKBQ=x>_PTKkSw@iS@MPfY>a M;JyCV_snDe2la%mzyJUM literal 0 HcmV?d00001 diff --git a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/layered_image.json b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/layered_image.json new file mode 100644 index 00000000..fb499204 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 index 2012ed6e..118cc94b 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,15 +15,28 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + { + "name": "default", + "material": { + "certpath": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.cer", + "keyAlias": "debugKey", + "keyPassword": "0000001B221C6418DEFD83C2487414C4E8BD598C319F4CAC030B4D3C2C7D3481A604828555E107B1054C92", + "profile": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.p12", + "storePassword": "0000001B13824B61C1F99760150E80D7FEE89B7AF692A6396D77B672BF622B16132D1AB781CC37A968B638" + } + } + ], "products": [ { "name": "default", "signingConfig": "default", - "targetSdkVersion": "20", + "targetSdkVersion": "6.0.0(20)", "arkTSVersion": "1.2", - "compatibleSdkVersion": "20", - "compileSdkVersion": "20", + "compatibleSdkVersion": "6.0.0(20)", + "compileSdkVersion": "6.0.0(20)", "runtimeOS": "HarmonyOS", "buildOption": { "strictMode": { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/.gitignore b/sample/EnhanceSampleArk1.2/StateManagement/entry/.gitignore index 5a6ba80f..e2713a27 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/.gitignore +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/.gitignore @@ -1,4 +1,6 @@ /node_modules +/oh_modules /.preview /build -/.cxx \ No newline at end of file +/.cxx +/.test \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/build-profile.json5 b/sample/EnhanceSampleArk1.2/StateManagement/entry/build-profile.json5 index ddd6e5f1..e7569e30 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/build-profile.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/build-profile.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,9 +14,24 @@ */ { - "apiType": 'stageMode', + "apiType": "stageMode", "buildOption": { }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], "targets": [ { "name": "default" diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/hvigorfile.ts b/sample/EnhanceSampleArk1.2/StateManagement/entry/hvigorfile.ts index f9973af5..cfa8a00f 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/hvigorfile.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/hvigorfile.ts @@ -13,5 +13,9 @@ * limitations under the License. */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { hapTasks } from '@ohos/hvigor-ohos-plugin'; +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/obfuscation-rules.txt b/sample/EnhanceSampleArk1.2/StateManagement/entry/obfuscation-rules.txt new file mode 100644 index 00000000..272efb6c --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/oh-package.json5 b/sample/EnhanceSampleArk1.2/StateManagement/entry/oh-package.json5 index 907d65a0..c9cb6c81 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/oh-package.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/oh-package.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,11 +14,12 @@ */ { - "license": "ISC", - "devDependencies": {}, "name": "entry", - "description": "example description", - "repository": {}, "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", "dependencies": {} } + diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets index 2262fde8..7cfca7f4 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/commoncomponents/ViewCodeText.ets @@ -1,3 +1,4 @@ +'use static' /* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 00000000..0c8f2a87 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import Want from '@ohos.app.ability.Want'; +import type window from '@ohos.window'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import Logger from '../utils/Logger'; +import display from '@ohos.display'; + +import { AppStorage, LocalStorage } from '@kit.ArkUI'; + +const TAG: string = 'EntryAbility'; +const FONT_SIZE: number = 18; +const DPI: number = 160; +const SMALL_SCREEN_WIDTH: number = 520; +const MIDDLE_SCREEN_WIDTH: number = 520; + +export default class EntryAbility extends UIAbility { + private storage!: LocalStorage; + + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + hilog.info(0x0000, 'testTag', 'EntryAbility onCreate'); + this.storage = new LocalStorage(); + this.storage.setOrCreate('currentModelStatus', true); + this.storage.setOrCreate('contentFontSize', FONT_SIZE); + hilog.info(0x0000, 'testTag', '11111111111'); + Logger.info(TAG, 'Ability onCreate'); + } + + onDestroy(): void { + // Logger.info(TAG, 'Ability onDestroy'); + } + + updateBreakpoint(windowWidth: number): void { + let windowWidthVp: number = windowWidth / (display.getDefaultDisplaySync().densityDPI / DPI); + let curBp: string; + if (windowWidthVp < SMALL_SCREEN_WIDTH) { + curBp = 'sm'; + } else if (windowWidthVp < MIDDLE_SCREEN_WIDTH) { + curBp = 'md'; + } else { + curBp = 'lg'; + } + // Logger.info(TAG, `breakpoint: ${curBp}`); + AppStorage.setOrCreate('currentBreakpoint', curBp); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + // Logger.info(TAG, 'Ability onWindowStageCreate'); + windowStage.getMainWindow().then((windowObj) => { + let windowWidth: number = windowObj.getWindowProperties().windowRect.width; + this.updateBreakpoint(windowWidth); + windowObj.on('windowSizeChange', (currentWindowSize) => { + let currentWindowWidth: number = currentWindowSize.width; + this.updateBreakpoint(currentWindowWidth); + + if (windowObj.getWindowProperties().isFullScreen) { + // Logger.info(TAG, 'isFullScreen'); + } + if (windowObj.getWindowProperties().isLayoutFullScreen) { + // Logger.info(TAG, 'isLayoutFullScreen'); + } + }); + }); + windowStage.loadContent('pages/home/Home', this.storage); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + // Logger.info(TAG, 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + // Logger.info(TAG, 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + // Logger.info(TAG, 'Ability onBackground'); + } +} diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ets new file mode 100644 index 00000000..9fab77c9 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/outofsyncability/OutOfSyncAbility.ets @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import Want from '@ohos.app.ability.Want'; +import type window from '@ohos.window'; +import Logger from '../utils/Logger'; + +const TAG = 'OutOfSyncAbility'; + +export class OutOfSyncAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + Logger.info(TAG, 'Ability onCreate'); + } + + onDestroy(): void { + Logger.info(TAG, 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + Logger.info(TAG, 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/applylevelstagemanagement/abilityglobaldatasync/AbilityOutOfSyncPage', (err, data) => { + if (err && err.code) { + Logger.error(TAG, `Failed to load the content. Cause: %{public}s${JSON.stringify(err)}`); + return; + } + Logger.info(TAG, `Succeeded in loading the content. Data: %{public}s${JSON.stringify(data)}}`); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + Logger.info(TAG, 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + Logger.info(TAG, 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + Logger.info(TAG, 'Ability onBackground'); + } +} diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets index 80b32c29..05c00053 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync.ets @@ -47,9 +47,10 @@ struct AbilityGlobalDataSync { } else { TitleBar({ title: this.title }) } - CodeView({ title: this.title, isShowTitle: false }) { + // TODO Exception + // CodeView({ title: this.title, isShowTitle: false }) { AbilityGlobalDataSyncCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets index 4889b7c5..3c6ed9e6 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStorageLinkPage.ets @@ -55,7 +55,8 @@ struct StorageLinkAbilityPage { } else { TitleBar({ title: this.title }) } - CodeView({ title: this.title, isShowTitle: false }) { + // TODO Exception + // CodeView({ title: this.title, isShowTitle: false }) { Column({ space: 30.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LocalStorageLinkPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) @@ -92,7 +93,7 @@ struct StorageLinkAbilityPage { .height('100%') .padding($r('app.float.page_padding')) } - } + // } .width('100%') .height('100%') .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets index 720bd9f5..381c2d6e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/abilityglobaldatasync/LocalStoragePropPage.ets @@ -62,7 +62,8 @@ struct StoragePropAbilityPage { } else { TitleBar({ title: this.title }) } - CodeView({ title: this.title, isShowTitle: false }) { + // TODO Exception + // CodeView({ title: this.title, isShowTitle: false }) { Column({ space: 20.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('LocalStoragePropPage.ets.html') }) Text($r('app.string.localStorage_both_data_binding')) @@ -130,7 +131,7 @@ struct StoragePropAbilityPage { } .padding($r('app.float.page_padding')) } - } + // } .width('100%') .height('100%') .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets index 7ddf5fac..f5aba86e 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync.ets @@ -43,9 +43,10 @@ struct ApplyGlobalDataSync { } else { TitleBar({ title: this.title }) } - CodeView({ title: this.title, isShowTitle: false }) { + // TODO Exception + // CodeView({ title: this.title, isShowTitle: false }) { ApplyGlobalDataSyncCode() - } + // } }.width('100%') .height('100%') .backgroundColor(this.currentModelStatus ? $r('app.color.nightnode_color') : $r('app.color.background_shallow_grey')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ets new file mode 100644 index 00000000..ec6cc99e --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/applylevelstagemanagement/model/AbilityConfigType.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface AbilityConfigType { + bundleName: string; + abilityName: string +}; \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets index 8d072b97..8465800a 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/TabContentNavigation.ets @@ -36,6 +36,7 @@ import { Margin, $r, ColumnOptions, + Scroll, } from '@kit.ArkUI'; import router from '@ohos.router'; @@ -59,11 +60,12 @@ export struct TabContentNavigation { private categories: Array = new Array(); hasSecondLevelCategory(category: ThirdLevelCategory | SecondLevelCategory): boolean { - return (category as SecondLevelCategory).tag !== undefined; + return category.type === "secondLevelCategory"; } build() { Column() { + Blank() List() { if (this.categories.length > 0 && this.hasSecondLevelCategory(this.categories[0])) { ForEach(this.categories, (item: ThirdLevelCategory | SecondLevelCategory, index: number) => { @@ -168,7 +170,7 @@ struct ThirdLevelNavigation { } }) - if (this.isUnfold ) { + if (this.isUnfold) { ForEach(this.thirdLevelCategory?.childNodes!, (fourthLevelCategory: FourthLevelCategory, index: number) => { Column() { Divider() @@ -179,7 +181,7 @@ struct ThirdLevelNavigation { FourthLevelNavigation({ fourthLevelCategory: fourthLevelCategory }) } - }, (item: FourthLevelCategory) => item.title.toString() ) + }, (item: FourthLevelCategory) => item.title.toString()) } } .id(`secondLevelMenu${this.secondLevelCategoryIndex}${this.secondLevelCategoryIndex === 1 ? 0 : this.ThirdLevelNavigationIndex}`) @@ -207,7 +209,7 @@ struct FourthLevelNavigation { // Click to jump to the corresponding page this.getUIContext().getRouter().pushUrl({ url: this.fourthLevelCategory?.url as string - }); + }) }) } } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets index f05d2619..3a562037 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/data/HomeData.ets @@ -48,12 +48,14 @@ const SINGLE_COMPONENT_CATEGORY: ThirdLevelCategory[] = [ { tag: 1.0, title: $r('app.string.decorated_object_type'), - childNodes: DECORATED_OBJECT_TYPE + childNodes: DECORATED_OBJECT_TYPE, + type: "thirdLevelCategory" }, { tag: 1.0, title: $r('app.string.update_principle'), - childNodes: UPDATE_PRINCIPLE + childNodes: UPDATE_PRINCIPLE, + type: "thirdLevelCategory" } ]; @@ -72,28 +74,33 @@ const MULTI_COMPONENTS_CATEGORY: ThirdLevelCategory[] = [ { tag: 1.0, title: $r('app.string.parent_child_sync'), - childNodes: PARENT_CHILD_SYNC + childNodes: PARENT_CHILD_SYNC, + type: "thirdLevelCategory" }, { tag: 1.0, title: $r('app.string.parent_descendent_sync'), - url: 'pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync' + url: 'pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync', + type: "thirdLevelCategory" }, { tag: 1.0, title: $r('app.string.brother_sync'), - url: 'pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync' + url: 'pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync', + type: "thirdLevelCategory" } ]; const PAGE_LEVEL_CATEGORY: Array = [ { title: $r('app.string.single_component_state'), - childNodes: SINGLE_COMPONENT_CATEGORY + childNodes: SINGLE_COMPONENT_CATEGORY, + type: "secondLevelCategory" }, { title: $r('app.string.multi_component_sync'), - childNodes: MULTI_COMPONENTS_CATEGORY + childNodes: MULTI_COMPONENTS_CATEGORY, + type: "secondLevelCategory" } ]; @@ -102,11 +109,13 @@ const APP_LEVEL_CATEGORY: Array = [ tag: 1.0, title: $r('app.string.application_storage_ui'), url: 'pages/applylevelstagemanagement/applyglobaldatasync/ApplyGlobalDataSync', + type: "thirdLevelCategory" }, { tag: 1.0, title: $r('app.string.ability_storage_ui'), url: 'pages/applylevelstagemanagement/abilityglobaldatasync/AbilityGlobalDataSync', + type: "thirdLevelCategory" } ]; diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets index 876b3dad..9db7516a 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/home/model/CategoricalDataType.ets @@ -25,14 +25,16 @@ export interface FirstLevelCategory { export interface SecondLevelCategory { tag?: number, title: Resource, // Second-level category titles - childNodes: ThirdLevelCategory[] + childNodes: ThirdLevelCategory[], + type: string } export interface ThirdLevelCategory { tag: number, // Third-level category tag title: Resource, // Third-level category headings url?: string, // Third-level category detail page URL - childNodes?: FourthLevelCategory[] + childNodes?: FourthLevelCategory[], + type: string } export interface FourthLevelCategory { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets index 27242502..099d1439 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/BrotherComponentSync.ets @@ -34,9 +34,10 @@ struct BrotherComponentSync { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { BrotherComponentSyncCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets index 7e9650f4..76d385ef 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherOneComponent.ets @@ -43,8 +43,12 @@ export struct ConsumeBrotherOneComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @Consume consumeCircleColor: Resource; - @Consume currentSelectIndex: int = 0; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + @Consume currentSelectIndex: number = 0.0; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column({ space: 10.0 }as ColumnOptions) { @@ -58,13 +62,13 @@ export struct ConsumeBrotherOneComponent { Select(this.selectValues) .id('consumeSelectCompA') .selected(this.currentSelectIndex) - .value(this.selectValues[this.currentSelectIndex].value) + .value(this.selectValues[this.currentSelectIndex as int].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) - .onSelect((index: number,text: string ) => { - this.currentSelectIndex = index as int; + .onSelect((index: number, text: string ) => { + this.currentSelectIndex = index; this.consumeCircleColor = this.selectColors[index as int].color; }) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets index a76c80a3..d662c8d0 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/ConsumeBrotherTwoComponent.ets @@ -44,8 +44,12 @@ export struct ConsumeBrotherTwoComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @Consume consumeCircleColor: Resource; - @Consume currentSelectIndex: int; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + @Consume currentSelectIndex: number = 0.0; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column({ space: 10.0 }as ColumnOptions) { @@ -60,13 +64,13 @@ export struct ConsumeBrotherTwoComponent { Select(this.selectValues) .id('consumeSelectCompB') .selected(this.currentSelectIndex) - .value(this.selectValues[this.currentSelectIndex].value) + .value(this.selectValues[this.currentSelectIndex as int].value) .fontColor($r('app.color.button_text_color')) .font({ size: $r('app.float.select_font_size') }) .selectedOptionFont({ size: $r('app.float.select_font_size') }) .optionFont({ size: $r('app.float.select_font_size') }) .onSelect((index: number, text: string) => { - this.currentSelectIndex = index as int; + this.currentSelectIndex = index; this.consumeCircleColor = this.selectColors[index as int].color; }) Circle() diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets index e9b83ef6..f5291111 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherOneComponent.ets @@ -47,7 +47,11 @@ export struct LinkBrotherOneComponent { @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @Link circleColor: Resource; @Link currentSelectIndex: int; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column({ space: 10.0 }as ColumnOptions) { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets index 677e1285..f250002f 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/brothercomponentssync/LinkBrotherTwoComponent.ets @@ -45,7 +45,11 @@ export struct LinkBrotherTwoComponent { @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @Link circleColor: Resource; @Link currentSelectIndex: int; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column({ space: 10.0 }as ColumnOptions) { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets index bd9edbd1..5d9515a2 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/DeepNestComponentsSync.ets @@ -34,9 +34,10 @@ struct DeepNestComponentsSync { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { DeepNestComponentsSyncCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets index 3a7c539d..35553504 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/LinkDescendentComponent.ets @@ -45,7 +45,11 @@ export struct LinkDescendentComponent { @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @Link circleColor: Resource; @Link currentSelectIndex: int; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column() { diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets index 759749e9..b200da55 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/deepnestcomponentssync/StateGrandfatherComponent.ets @@ -46,7 +46,11 @@ export struct StateGrandfatherComponent { @State selectColors: ColorType[] = COLOR_SELECT_DATA; @State selectValues: SelectOption[] = NEW_COLOR_SELECT_DATA; @State currentSelectIndex: int = 0; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + } build() { Column({ space: 10.0 }as ColumnOptions) { @@ -95,7 +99,7 @@ struct LinkChildComp { .height($r('app.float.button_height')) LinkDescendentComponent({ circleColor: this.circleColor, - currentSelectIndex: this.currentSelectIndex as int + currentSelectIndex: this.currentSelectIndex }) } .padding(10.0) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets index 279bee7b..c5740323 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/parentchildpartialcontentsync/ParentChildPartialContentSync.ets @@ -34,9 +34,10 @@ struct ParentChildPartialContentSync { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { ParentChildPartialContentSyncCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets index 6a23ae60..69e5d875 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/multicompomentssync/parentchildcomponentsync/uniandbidirectionsync/UniAndBidirectionSync.ets @@ -34,9 +34,10 @@ struct UniAndBidirectionSync { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { UniAndBidirectionSyncCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets index 6cc9a724..059f5dcb 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/arraytype/ArrayType.ets @@ -34,9 +34,10 @@ struct ArrayTypes { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { ArrayTypeCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets index 6831d565..fca92781 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/basetype/BaseType.ets @@ -24,7 +24,6 @@ import { $r, } from '@kit.ArkUI'; - import { BaseTypeCode } from './BaseTypeCode'; import { CodeView } from '../../../../../commoncomponents/CodeView' @@ -35,9 +34,10 @@ struct BaseType { build() { Column() { - CodeView({ title: this.title}){ + // TODO Exception + // CodeView({ title: this.title }) { BaseTypeCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets index 5b94a34b..f4ac2699 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectType.ets @@ -34,9 +34,10 @@ struct ClassObjectType { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { ClassObjectTypeCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets index 36af6225..f49669fe 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/decoratedobjecttype/classobjecttype/ClassObjectTypeCode.ets @@ -45,18 +45,23 @@ import { getResourceString } from '../../../../../utils/ResourceUtils'; @Component export struct ClassObjectTypeCode { - @State classObjectData: ParentClass = new ParentClass(getResourceString(this.CONTEXT, $r('app.string.class_object')), - getResourceString(this.CONTEXT, $r('app.string.class_attribute')), 1.0, - new ChildClass(getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')), 2.0)); + @State classObjectData: ParentClass | undefined = undefined; private clickedCount: number = 0.0; - private CONTEXT: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + private CONTEXT: common.UIAbilityContext | undefined = undefined; + + aboutToAppear() { + this.CONTEXT = ((this.getUIContext()?.getHostContext()) as common.UIAbilityContext); + this.classObjectData = new ParentClass(getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_object')), + getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_attribute')), 1.0, + new ChildClass(getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_child_attribute')), 2.0)); + } build() { Column({ space: 10.0 }as ColumnOptions) { ViewCodeText({ webSrc: $rawfile('ClassObjectTypeCode.ets.html') }) Column({ space: 15.0 }as ColumnOptions) { Row() { - Text(this.classObjectData.title) + Text((this.classObjectData as ParentClass).title) .fontSize(20.0) .textAlign(TextAlign.End) Divider() @@ -68,9 +73,9 @@ export struct ClassObjectTypeCode { Column() { Row() { - Text(this.classObjectData.attributeTitle) + Text((this.classObjectData as ParentClass).attributeTitle) .fontSize(20.0) - Text(`${this.classObjectData.attribute}`) + Text(`${(this.classObjectData as ParentClass).attribute}`) .fontSize(20.0) .textAlign(TextAlign.End) } @@ -84,7 +89,7 @@ export struct ClassObjectTypeCode { .width('100%') .padding({ left: 50.0 }as Padding ) - ChildObjectComp({ childObject: this.classObjectData.child }) + ChildObjectComp({ childObject: (this.classObjectData as ParentClass).child }) } .width('100%') .backgroundColor($r('app.color.component_background_pink')) @@ -92,12 +97,12 @@ export struct ClassObjectTypeCode { Button($r('app.string.class_type_update_object')) .onClick((event:ClickEvent) => { this.clickedCount++; - let objectTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_object')) + this.clickedCount; - let attributeTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_attribute')) + this.clickedCount; - let childAttributeTitle: string = getResourceString(this.CONTEXT, $r('app.string.class_child_attribute')) + let objectTitle: string = getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_object')) + this.clickedCount; + let attributeTitle: string = getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_attribute')) + this.clickedCount; + let childAttributeTitle: string = getResourceString(this.CONTEXT as common.UIAbilityContext, $r('app.string.class_child_attribute')) + this.clickedCount; - let newObject = new ParentClass(objectTitle, attributeTitle, this.classObjectData.attribute + 1.0, - new ChildClass(childAttributeTitle, this.classObjectData.child.attribute + 1.0)); + let newObject = new ParentClass(objectTitle, attributeTitle, (this.classObjectData as ParentClass).attribute + 1.0, + new ChildClass(childAttributeTitle, (this.classObjectData as ParentClass).child.attribute + 1.0)); this.classObjectData = newObject; }) .id('updateObject') @@ -107,7 +112,7 @@ export struct ClassObjectTypeCode { .applyStyles(buttonStyle) Button($r('app.string.class_type_update_attribute')) .onClick((event:ClickEvent) => { - this.classObjectData.attribute++; + (this.classObjectData as ParentClass).attribute++; }) .id('updateObjectAttribute') .fontColor($r('app.color.button_text_color')) @@ -116,7 +121,7 @@ export struct ClassObjectTypeCode { .applyStyles(buttonStyle) Button($r('app.string.class_type_update_child_attribute')) .onClick((event:ClickEvent) => { - this.classObjectData.child.attribute++; + (this.classObjectData as ParentClass).child.attribute++; }) .id('updateAttributeOfAttribute') .fontColor($r('app.color.button_text_color')) diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets index 2abd7013..8e8c4f71 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/pages/pagelevelstagemanagement/singlecomponentstatevariables/updatetactics/updateboundcomponent/UpdateBoundComponent.ets @@ -34,9 +34,10 @@ struct UpdateBoundComponent { build() { Column() { - CodeView({ title: this.title }) { + // TODO Exception + // CodeView({ title: this.title }) { UpdateBoundComponentCode() - } + // } } .width('100%') .height('100%') diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagelinkability/StorageLinkAbility.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagelinkability/StorageLinkAbility.ets new file mode 100644 index 00000000..4fadccb7 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagelinkability/StorageLinkAbility.ets @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import Want from '@ohos.app.ability.Want'; +import type window from '@ohos.window'; +import Logger from '../utils/Logger'; + +const TAG = 'StorageLinkAbility'; + +export default class StorageLinkAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + Logger.info(TAG, 'Ability onCreate'); + } + + onDestroy(): void { + Logger.info(TAG, 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + Logger.info(TAG, 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/applylevelstagemanagement/applyglobaldatasync/StorageLinkAbilityPage', (err, data) => { + if (err && err.code) { + Logger.error(TAG, 'Failed to load the content. Cause: %{public}s'); + return; + } + Logger.info(TAG, 'Succeeded in loading the content. Data: %{public}s'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + Logger.info(TAG, 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + Logger.info(TAG, 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + Logger.info(TAG, 'Ability onBackground'); + } +} diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagepropability/StoragePropAbility.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagepropability/StoragePropAbility.ets new file mode 100644 index 00000000..96bfb200 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/storagepropability/StoragePropAbility.ets @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import Want from '@ohos.app.ability.Want'; +import type window from '@ohos.window'; +import Logger from '../utils/Logger'; + +const TAG = 'StoragePropAbility'; + +export default class StoragePropAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + Logger.info(TAG, 'Ability onCreate'); + } + + onDestroy(): void { + Logger.info(TAG, 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + Logger.info(TAG, 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/applylevelstagemanagement/applyglobaldatasync/StoragePropAbilityPage', (err, data) => { + if (err && err.code) { + Logger.error(TAG, 'Failed to load the content. Cause: %{public}s'); + return; + } + Logger.info(TAG, 'Succeeded in loading the content. Data: %{public}s'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + Logger.info(TAG, 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + Logger.info(TAG, 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + Logger.info(TAG, 'Ability onBackground'); + } +} diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/Logger.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/Logger.ets new file mode 100644 index 00000000..93892bc2 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/Logger.ets @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import hilog from '@ohos.hilog'; + +const FORMAT: string = '%{public}s, %{public}s'; + +class Logger { + + private prefix: string; + + constructor(prefix: string) { + this.prefix = prefix; + } + + debug(...args: string[]): void { + hilog.debug(0xFF00, this.prefix, FORMAT, args); + } + + info(...args: string[]): void { + hilog.info(0xFF00, this.prefix, FORMAT, args); + } + + warn(...args: string[]): void { + hilog.warn(0xFF00, this.prefix, FORMAT, args); + } + + error(...args: string[]): void { + hilog.error(0xFF00, this.prefix, FORMAT, args); + } +} + +export default new Logger('Sample_StateManagement'); \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ets new file mode 100644 index 00000000..bdced81b --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/ResourceUtils.ets @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type common from '@ohos.app.ability.common'; +import { resourceManager } from '@kit.LocalizationKit' + +/** + * getResourceString将Resource类型的数据转换成string类型的数据 + * @param context + * @param ResourceData + */ +export function getResourceString(context: common.UIAbilityContext, resourceData: resourceManager.Resource): string { + let stringData: string = context.resourceManager.getStringSync(resourceData.id); + return stringData; +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ets new file mode 100644 index 00000000..f23a4715 --- /dev/null +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/ets/utils/StartAbilityUtils.ets @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type common from '@ohos.app.ability.common'; +import Want from '@ohos.app.ability.Want'; +import type { AbilityConfigType } from '../pages/applylevelstagemanagement/model/AbilityConfigType'; +import Logger from './Logger'; + +export function startSpecifiedAbility(context: common.UIAbilityContext, abilityName: string): void { + let abilityConfig: Want = { + bundleName: 'com.samples.statemanagement', + abilityName: abilityName + }; + context.startAbility(abilityConfig, (err) => { + if (err && err.code) { + Logger.error(`startAbility failed, code is ${err.code}, message is ${err.message}`); + return; + } + Logger.info('startAbility succeed'); + }); +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/module.json5 b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/module.json5 index 862cca18..ac5fbe01 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/module.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/module.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,8 +20,9 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "default", - "tablet" + "phone", + "tablet", + "2in1" ], "deliveryWithInstall": true, "installationFree": false, @@ -29,37 +30,27 @@ "abilities": [ { "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", + "srcEntry": "./ets/entryability/EntryAbility.ets", "description": "$string:EntryAbility_desc", "icon": "$media:icon", "label": "$string:EntryAbility_label", "startWindowIcon": "$media:icon", "startWindowBackground": "$color:start_window_background", - "visible": true, + "exported": true, "skills": [ { "entities": [ "entity.system.home" ], "actions": [ - "action.system.home" + "ohos.want.action.home" ] } ] }, - { - "name": "StoragePropAbility", - "srcEntrance": "./ets/storagepropability/StoragePropAbility.ts", - "description": "$string:storagepropability_desc", - "icon": "$media:icon", - "label": "$string:storagepropability_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "visible": true - }, { "name": "StorageLinkAbility", - "srcEntrance": "./ets/storagelinkability/StorageLinkAbility.ts", + "srcEntry": "./ets/storagelinkability/StorageLinkAbility.ets", "description": "$string:storagelinkability_desc", "icon": "$media:icon", "label": "$string:storagelinkability_label", @@ -69,7 +60,7 @@ }, { "name": "OutOfSyncAbility", - "srcEntrance": "./ets/outofsyncability/OutOfSyncAbility.ts", + "srcEntry": "./ets/outofsyncability/OutOfSyncAbility.ets", "description": "$string:outofsyncability_desc", "icon": "$media:icon", "label": "$string:outofsyncability_label", diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/element/string.json b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/element/string.json index a94a8616..e886661b 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/element/string.json +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/element/string.json @@ -427,6 +427,9 @@ { "name": "outofsyncability_label", "value": "label" + },{ + "name": "app_name", + "value": "MyApplication" } ] } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/media/layered_image.png b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/main/resources/base/media/layered_image.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%V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QL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(function () { + beforeAll(() => { // Presets an action, which is performed only once before all test cases of the test suite start. // This API supports only one parameter: preset action function. - }); - beforeEach(function () { + }) + beforeEach(() => { // Presets an action, which is performed before each unit test case starts. // The number of execution times is the same as the number of test cases defined by **it**. // This API supports only one parameter: preset action function. - }); - afterEach(function () { + }) + afterEach(() => { // Presets a clear action, which is performed after each unit test case ends. // The number of execution times is the same as the number of test cases defined by **it**. // This API supports only one parameter: clear action function. - }); - afterAll(function () { + }) + afterAll(() => { // Presets a clear action, which is performed after all test cases of the test suite end. // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, function () { - - Logger.info("Sample_StateManagement test start") - /** - * 打开应用 - */ - it(BUNDLE + 'StartAbility_001', 0, async function (done) { - Logger.info(TAG, BUNDLE + 'StartAbility_001 begin') - let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - try { - await abilityDelegator.startAbility({ - bundleName: 'com.samples.statemanagement', - abilityName: 'EntryAbility' - }) - done() - } catch (exception) { - Logger.info(TAG, `StartAbility_001 end ${JSON.stringify(exception)}`) - expect(0).assertEqual(exception.code) - done() - } - Logger.info(TAG, BUNDLE + 'StartAbility_001' + ' end') - }) - - /** - * 打开折叠层 - */ - it(BUNDLE + 'FolderLayerFunction_001', 0, async function () { - let testName = 'FolderLayerFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let driver = Driver.create(); - await driver.delayMs(500); - // 打开修饰对象模块的折叠 - await driver.assertComponentExist(ON.id('secondLevelMenu00')); - let decoratedOject = await driver.findComponent(ON.id('secondLevelMenu00')); - await decoratedOject.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.id('secondLevelMenu01')); - let updatedBound = await driver.findComponent(ON.id('secondLevelMenu01')); - await updatedBound.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.id('secondLevelMenu10')); - let multiComponentsSync = await driver.findComponent(ON.id('secondLevelMenu10')); - await multiComponentsSync.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 测试基础类型状态管理 - */ - it(BUNDLE + 'BaseTypeFunction_001', 0, async function () { - let testName = 'BaseTypeFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入基础类型页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.base_type')))); - let enterPage = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.base_type')))); - await enterPage.click(); - await driver.delayMs(500); - // 设置圆形颜色 - await driver.assertComponentExist(ON.id('circleColorBtn')); - let setCircleColor = await driver.findComponent(ON.id('circleColorBtn')); - await setCircleColor.click(); - await driver.delayMs(500); - // 再次设置圆形颜色 - await setCircleColor.click(); - await driver.delayMs(500); - // 查看源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 测试数组类型状态管理 - */ - it(BUNDLE + 'ArrayTypeFunction_001', 0, async function () { - let testName = 'ArrayTypeFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入数组类型页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.array_type')))); - let enterPage = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.array_type')))); - await enterPage.click(); - await driver.delayMs(500); - // 点击删除元素 - await driver.assertComponentExist(ON.id('arrayTypeBtn1')); - let arrayTypeDeleteBtn = await driver.findComponent(ON.id('arrayTypeBtn1')); - await arrayTypeDeleteBtn.click(); - await driver.delayMs(500); - await arrayTypeDeleteBtn.click(); - await driver.delayMs(500); - await arrayTypeDeleteBtn.click(); - await driver.delayMs(500); - await arrayTypeDeleteBtn.click(); - await driver.delayMs(500); - // 点击添加元素 - await driver.assertComponentExist(ON.id('arrayTypeBtn0')); - let arrayTypeAddBtn = await driver.findComponent(ON.id('arrayTypeBtn0')); - await arrayTypeAddBtn.click(); - await driver.delayMs(500); - // 点击更新元素 - await driver.assertComponentExist(ON.id('arrayTypeBtn2')); - let arrayTypeUpdateBtn = await driver.findComponent(ON.id('arrayTypeBtn2')); - await arrayTypeUpdateBtn.click(); - await driver.delayMs(500); - await arrayTypeDeleteBtn.click(); - await driver.delayMs(500); - await arrayTypeUpdateBtn.click(); - await driver.delayMs(500); - await arrayTypeAddBtn.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }) - - /** - * 测试类对象类型状态管理 - */ - it(BUNDLE + 'ObjectTypeFunction_001', 0, async function () { - let testName = 'ObjectTypeFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入类对象类型页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.class_type')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.class_type')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击更新对象 - await driver.assertComponentExist(ON.id('updateObject')); - let updateObjectBtn = await driver.findComponent(ON.id('updateObject')); - await updateObjectBtn.click(); - await driver.delayMs(500); - await updateObjectBtn.click(); - await driver.delayMs(500); - // 点击更新对象属性 - await driver.assertComponentExist(ON.id('updateObjectAttribute')); - let updateObjectAttributeBtn = await driver.findComponent(ON.id('updateObjectAttribute')); - await updateObjectAttributeBtn.click(); - await driver.delayMs(500); - await updateObjectAttributeBtn.click(); - await driver.delayMs(500); - // 点击更新属性的属性 - await driver.assertComponentExist(ON.id('updateAttributeOfAttribute')); - let updateAttributeOfAttributeBtn = await driver.findComponent(ON.id('updateAttributeOfAttribute')); - await updateAttributeOfAttributeBtn.click(); - await driver.delayMs(500); - await updateAttributeOfAttributeBtn.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 测试只更新所绑定的组件 - */ - it(BUNDLE + 'UpdateBindComponentFunction_001', 0, async function () { - let testName = 'UpdateBindComponentFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入只更新所绑定的组件页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.only_update_bound_components')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.only_update_bound_components')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击更新对象 - await driver.assertComponentExist(ON.id('titleAndContentBtn')); - let updateTitleAndContent = await driver.findComponent(ON.id('titleAndContentBtn')); - await updateTitleAndContent.click(); - await driver.delayMs(500); - await updateTitleAndContent.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 测试单、双向同步 - */ - it(BUNDLE + 'SingleBindFunction_001', 0, async function () { - let testName = 'SingleBindFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入单双向同步页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.single_and_two_way_sync')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.single_and_two_way_sync')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击设置粉色 - await driver.assertComponentExist(ON.id('pinkColorBtn')); - let pinkColorBtn = await driver.findComponent(ON.id('pinkColorBtn')); - await pinkColorBtn.click(); - await driver.delayMs(500); - // 设置蓝色 - await driver.assertComponentExist(ON.id('blueColorBtn')); - let blueColorBtn = await driver.findComponent(ON.id('blueColorBtn')); - await blueColorBtn.click(); - await driver.delayMs(500); - // 设置红色 - await driver.assertComponentExist(ON.id('redColorBtn')); - let redColorBtn = await driver.findComponent(ON.id('redColorBtn')); - await redColorBtn.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }) - - /** - * 测试子组件同步父组件的内容 - */ - it(BUNDLE + 'ChildParentFunction_001', 0, async function () { - let testName = 'ChildParentFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入单双向同步页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.partial_sync')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.partial_sync')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击修改父组件第一个属性文本 - let inputMethodController = inputMethod.getController(); - await driver.assertComponentExist(ON.id('attribute1')); - let attributeOne = await driver.findComponent(ON.id('attribute1')); - await attributeOne.inputText('123'); - inputMethodController.stopInputSession(); - await driver.delayMs(500); - // 点击修改子组件属性文本 - await driver.assertComponentExist(ON.id('childAttribute')); - let childAttribute = await driver.findComponent(ON.id('childAttribute')); - await childAttribute.click(); - await driver.delayMs(500); - await childAttribute.inputText('321'); - inputMethodController.stopInputSession(); - await driver.delayMs(500); - // 点击修改父组件第二个属性文本 - await driver.assertComponentExist(ON.id('arrayElement1')); - let arrayElementOne = await driver.findComponent(ON.id('arrayElement1')); - await arrayElementOne.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.id('attribute2')); - let attributeTwo = await driver.findComponent(ON.id('attribute2')); - await attributeTwo.inputText('456'); - inputMethodController.stopInputSession(); - await driver.delayMs(500); - // 点击修改父组件第三个属性文本 - await driver.assertComponentExist(ON.id('arrayElement2')); - let arrayElementTwo = await driver.findComponent(ON.id('arrayElement2')); - await arrayElementTwo.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.id('attribute3')); - let attributeThree = await driver.findComponent(ON.id('attribute3')); - await attributeThree.click(); - await driver.delayMs(500); - await attributeThree.inputText('789'); - inputMethodController.stopInputSession(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }) - - /** - * 测试爷孙组件之间状态同步 - */ - it(BUNDLE + 'DeepBindFunction_001', 0, async function () { - let testName = 'DeepBindFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入单双向同步页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.parent_descendent_sync')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.parent_descendent_sync')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击孙组件select组件并选择颜色 - await driver.assertComponentExist(ON.id('grandsonCompA')); - let grandsonA = await driver.findComponent(ON.id('grandsonCompA')); - await grandsonA.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - let selectedPink = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - await selectedPink.click(); - await driver.delayMs(500); - // 点击爷组件select组件并选择颜色 - await driver.assertComponentExist(ON.id('grandfatherCompA')); - let grandfatherCompA = await driver.findComponent(ON.id('grandfatherCompA')); - await grandfatherCompA.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - let selectedBlueCompA = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - await selectedBlueCompA.click(); - await driver.delayMs(500); - // 点击孙组件select组件并选择颜色 - await driver.assertComponentExist(ON.id('grandsonCompB')); - let grandsonCompB = await driver.findComponent(ON.id('grandsonCompB')); - await grandsonCompB.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - let selectedPinkCompB = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - await selectedPinkCompB.click(); - await driver.delayMs(500); - // 点击爷组件select组件并选择颜色 - await driver.assertComponentExist(ON.id('grandfatherCompB')); - let grandfatherCompB = await driver.findComponent(ON.id('grandfatherCompB')); - await grandfatherCompB.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - let selectedBlueCompB = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - await selectedBlueCompB.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500) - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 测试兄弟组件之间状态同步 - */ - it(BUNDLE + 'BrotherBindFunction_001', 0, async function () { - let testName = 'BrotherBindFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 进入单双向同步页面 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.brother_sync')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.brother_sync')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击子组件B中的select组件并选择颜色 - await driver.assertComponentExist(ON.id('linkSelectCompB')); - let linkSelectCompB = await driver.findComponent(ON.id('linkSelectCompB')); - await linkSelectCompB.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - let linkselectedPinkB = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - await linkselectedPinkB.click(); - await driver.delayMs(500); - // 点击子组件B中的select组件并选择颜色 - await driver.assertComponentExist(ON.id('linkSelectCompA')); - let linkSelectCompA = await driver.findComponent(ON.id('linkSelectCompA')); - await linkSelectCompA.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - let linkselectedBlueA = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - await linkselectedBlueA.click(); - await driver.delayMs(500); - // 点击子组件B中的select组件并选择颜色 - await driver.assertComponentExist(ON.id('consumeSelectCompB')); - let consumeSelectCompB = await driver.findComponent(ON.id('consumeSelectCompB')); - await consumeSelectCompB.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - let consumeSelectedPinkB = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorpink')))); - await consumeSelectedPinkB.click(); - await driver.delayMs(500); - // 点击子组件B中的select组件并选择颜色 - await driver.assertComponentExist(ON.id('consumeSelectCompA')); - let consumeSelectCompA = await driver.findComponent(ON.id('consumeSelectCompA')); - await consumeSelectCompA.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - let consumeSelectedBlueA = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.select_colorblue')))); - await consumeSelectedBlueA.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 应用内全局数据与UI之间的状态同步 - */ - it(BUNDLE + 'GlobalSynFunction_001', 0, async function () { - let testName = 'GlobalSynFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - // 切换到应用级状态变量 - await driver.assertComponentExist(ON.id('tabBar1')); - let applyLeval = await driver.findComponent(ON.id('tabBar1')); - await applyLeval.click(); - await driver.delayMs(500); - // 进入应用内全局数据与UI之间的状态同步 - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.application_storage_ui')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.application_storage_ui')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击Toggle组件,控制夜间模式 - await driver.assertComponentExist(ON.id('nightModeSwitch')); - let nightModeSwitch = await driver.findComponent(ON.id('nightModeSwitch')); - await nightModeSwitch.click(); - await driver.delayMs(500); - // 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整 - await driver.drag(320, 473, 420, 473, 800) - await driver.delayMs(500); - // 进入Ability1 - await driver.assertComponentExist(ON.id('enterAbilityOne')); - let enterAbilityOne = await driver.findComponent(ON.id('enterAbilityOne')); - await enterAbilityOne.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - // 进入Ability2 - await driver.assertComponentExist(ON.id('enterAbilityTwo')); - let enterAbilityTwo = await driver.findComponent(ON.id('enterAbilityTwo')); - await enterAbilityTwo.click(); - await driver.delayMs(500); - // 返回 - await driver.pressBack(); - await driver.delayMs(500); - // 再次进入Ability1 - await enterAbilityOne.click(); - await driver.delayMs(500); - // 点击控制夜间模式按钮 - await driver.assertComponentExist(ON.id('nightModeSwitchTwo')); - let nightModeSwitchTwo = await driver.findComponent(ON.id('nightModeSwitchTwo')); - await nightModeSwitchTwo.click(); - await driver.delayMs(500); - // 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整 - await driver.drag(320, 745, 420, 745, 800) - await driver.delayMs(500); - // 返回首页 - await driver.pressBack(); - await driver.delayMs(500); - // 进入Ability2 - await enterAbilityTwo.click(); - await driver.delayMs(500); - // 点击控制夜间模式按钮 - await driver.assertComponentExist(ON.id('nightModeSwitchThree')); - let nightModeSwitchThree = await driver.findComponent(ON.id('nightModeSwitchThree')); - await nightModeSwitchThree.click(); - await driver.delayMs(500); - // 返回首页 - await driver.pressBack(); - await driver.delayMs(500); - // 再次进入Ability1 - await enterAbilityOne.click(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - // 返回 - await driver.pressBack(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500) - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - /** - * 应用内全局数据与UI之间的状态同步 - */ - it(BUNDLE + 'AbilitySynFunction_001', 0, async function () { - let testName = 'AbilitySynFunction' - Logger.info(TAG, BUNDLE + testName + ' begin') - - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - let context = await abilityDelegatorRegistry.getAppContext(); - let manager = context.resourceManager; - - let driver: Driver = Driver.create(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.ability_storage_ui')))); - let enterPageText = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.ability_storage_ui')))); - await enterPageText.click(); - await driver.delayMs(500); - // 点击Toggle组件,控制夜间模式 - await driver.assertComponentExist(ON.id('nightModeSwitch')); - let nightModeSwitch = await driver.findComponent(ON.id('nightModeSwitch')); - await nightModeSwitch.click(); - await driver.delayMs(500); - // 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整 - await driver.drag(320, 470, 420, 470, 800) - await driver.delayMs(500); - // 进入Page1 - await driver.assertComponentExist(ON.id('enterPageOne')); - let enterPageOne = await driver.findComponent(ON.id('enterPageOne')); - await enterPageOne.click(); - await driver.delayMs(500); - // 返回 - await driver.assertComponentExist(ON.id('backBtn')); - let backBtn = await driver.findComponent(ON.id('backBtn')); - await backBtn.click(); - await driver.delayMs(500); - // 进入Page2 - await driver.assertComponentExist(ON.id('enterPageTwo')); - let enterPageTwo = await driver.findComponent(ON.id('enterPageTwo')); - await enterPageTwo.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 进入跨Ability页面 - await driver.assertComponentExist(ON.id('enterOutOfAbility')); - let enterAbility = await driver.findComponent(ON.id('enterOutOfAbility')); - await enterAbility.click(); - await driver.delayMs(500); - // 返回 - await driver.pressBack(); - await driver.delayMs(500); - // 进入Page1 - await enterPageOne.click(); - await driver.delayMs(500); - // 点击控制夜间模式按钮 - await driver.assertComponentExist(ON.id('nightModeSwitchTwo')); - let nightModeSwitchTwo = await driver.findComponent(ON.id('nightModeSwitchTwo')); - await nightModeSwitchTwo.click(); - await driver.delayMs(500); - // 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整 - await driver.drag(320, 745, 380, 745, 800) - await driver.delayMs(500); - // 返回首页 - await driver.pressBack(); - await driver.delayMs(500); - // 进入Ability - await enterAbility.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 进入Page2 - await enterPageTwo.click(); - await driver.delayMs(500); - // 点击控制夜间模式按钮 - await driver.assertComponentExist(ON.id('nightModeSwitchThree')); - let nightModeSwitchThree = await driver.findComponent(ON.id('nightModeSwitchThree')); - await nightModeSwitchThree.click(); - await driver.delayMs(500); - // 返回首页 - await driver.pressBack(); - await driver.delayMs(500); - // 再次进入Page1 - await enterPageOne.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 再次进入Ability - await enterAbility.click(); - await driver.delayMs(500); - await driver.assertComponentExist(ON.id('nightModeSwitchFour')); - let nightModeSwitchFour = await driver.findComponent(ON.id('nightModeSwitchFour')); - await nightModeSwitchFour.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 再次进入Page1 - await enterPageOne.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 进入Page2 - await enterPageTwo.click(); - await driver.delayMs(500); - await driver.pressBack(); - await driver.delayMs(500); - // 展示源码 - await driver.assertComponentExist(ON.id('viewSourceCode')); - let viewSourceCode = await driver.findComponent(ON.id('viewSourceCode')); - await viewSourceCode.click(); - await driver.delayMs(500); - // 关闭web源码 - await driver.assertComponentExist(ON.id('close')); - let closeWebBtn = await driver.findComponent(ON.id('close')); - await closeWebBtn.click(); - await driver.delayMs(500); - - Logger.info(TAG, BUNDLE + testName + ' end') - }); - - Logger.info("Sample_StateManagement test end") + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); }) }) } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/ets/test/List.test.ets b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/ets/test/List.test.ets index 76e5c3bb..1eac52fc 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/ets/test/List.test.ets +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/ets/test/List.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,9 +14,7 @@ */ import abilityTest from './Ability.test'; -//import appTest from './App.test'; export default function testsuite() { abilityTest(); -// appTest(); } \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/module.json5 b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/module.json5 index 22e2c611..6b9889e8 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/module.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/entry/src/ohosTest/module.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,36 +17,12 @@ "module": { "name": "entry_test", "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", "deviceTypes": [ - "default", - "tablet" + "phone", + "tablet", + "2in1" ], "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:test_pages", - "abilities": [ - { - "name": "TestAbility", - "srcEntrance": "./ets/testability/TestAbility.ets", - "description": "$string:TestAbility_desc", - "icon": "$media:icon", - "label": "$string:TestAbility_label", - "visible": true, - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] + "installationFree": false } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/hvigor/hvigor-config.json5 b/sample/EnhanceSampleArk1.2/StateManagement/hvigor/hvigor-config.json5 index 83512251..b8fea3f0 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/hvigor/hvigor-config.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,8 +14,25 @@ */ { - "hvigorVersion": "2.0.0", + "modelVersion": "6.0.0", "dependencies": { - "@ohos/hvigor-ohos-plugin": "2.0.0" + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | "ultrafine" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + // "optimizationStrategy": "memory" /* Define the optimization strategy. Value: [ "memory" | "performance" ]. Default: "memory" */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/hvigorfile.ts b/sample/EnhanceSampleArk1.2/StateManagement/hvigorfile.ts index f6a51f2e..e3340f07 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/hvigorfile.ts +++ b/sample/EnhanceSampleArk1.2/StateManagement/hvigorfile.ts @@ -13,5 +13,9 @@ * limitations under the License. */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/sample/EnhanceSampleArk1.2/StateManagement/oh-package.json5 b/sample/EnhanceSampleArk1.2/StateManagement/oh-package.json5 index ebf20792..692d45a3 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/oh-package.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/oh-package.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,11 @@ */ { - "license": "ISC", - "devDependencies": { - "@ohos/hypium": "1.0.6" + "modelVersion": "6.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, - "name": "myapplication", - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": {} + "devDependencies": { + } } -- Gitee From 7780f84a3c594f65dbfbedf6e78d698e9c5b1018 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 8 Sep 2025 16:03:22 +0800 Subject: [PATCH 7/7] fix code check Signed-off-by: wangweiyuan --- .../ets/constants/ImageViewerConstants.d.ets | 7 ----- .../main/ets/entryability/EntryAbility.d.ets | 15 ----------- .../EntryBackupAbility.d.ets | 10 ------- .../ets/model/CommonLazyDataSourceModel.d.ets | 26 ------------------- .../src/main/ets/model/OffsetModel.d.ets | 18 ------------- .../src/main/ets/model/PositionModel.d.ets | 7 ----- .../src/main/ets/model/RotateModel.d.ets | 15 ----------- .../src/main/ets/model/ScaleModel.d.ets | 19 -------------- .../ets/constants/ImageViewerConstants.ts | 8 ------ .../src/main/ets/entryability/EntryAbility.ts | 16 ------------ .../entrybackupability/EntryBackupAbility.ts | 11 -------- .../ets/model/CommonLazyDataSourceModel.ts | 23 ---------------- .../static/src/main/ets/model/OffsetModel.ts | 18 ------------- .../src/main/ets/model/PositionModel.ts | 7 ----- .../static/src/main/ets/model/RotateModel.ts | 15 ----------- .../static/src/main/ets/model/ScaleModel.ts | 19 -------------- .../ets/constants/ImageViewerConstants.ts | 6 ----- .../src/main/ets/entryability/EntryAbility.ts | 17 ------------ .../entrybackupability/EntryBackupAbility.ts | 12 --------- .../ets/model/CommonLazyDataSourceModel.ts | 23 ---------------- .../src/main/ets/model/OffsetModel.ts | 9 ------- .../src/main/ets/model/PositionModel.ts | 6 ----- .../src/main/ets/model/RotateModel.ts | 8 ------ .../src/main/ets/model/ScaleModel.ts | 9 ------- .../ets/constants/ImageViewerConstants.d.ets | 7 ----- .../main/ets/entryability/EntryAbility.d.ets | 15 ----------- .../EntryBackupAbility.d.ets | 10 ------- .../ets/model/CommonLazyDataSourceModel.d.ets | 26 ------------------- .../src/main/ets/model/OffsetModel.d.ets | 17 ------------ .../src/main/ets/model/PositionModel.d.ets | 6 ----- .../src/main/ets/model/RotateModel.d.ets | 14 ---------- .../src/main/ets/model/ScaleModel.d.ets | 18 ------------- .../StateManagement/AppScope/app.json5 | 24 ++++++++++++++--- .../StateManagement/build-profile.json5 | 15 +---------- 34 files changed, 21 insertions(+), 455 deletions(-) delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets delete mode 100644 sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets deleted file mode 100644 index 5191b72b..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets +++ /dev/null @@ -1,7 +0,0 @@ -'use static' -export declare function main(): void; -export declare class ImageViewerConstants { - public static get ANIMATE_DURATION(): number; - public static get SWIPER_CACHE_COUNT(): number; - public constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets deleted file mode 100644 index 4c51b5d2..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entryability/EntryAbility.d.ets +++ /dev/null @@ -1,15 +0,0 @@ -'use static' -import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; -import { window } from "@kit.ArkUI"; -export declare function main(): void; -export declare const DOMAIN: number = 0.0; -declare class EntryAbility extends UIAbility { - public onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void; - public onDestroy(): void; - public onWindowStageCreate(windowStage: window.WindowStage): void; - public onWindowStageDestroy(): void; - public onForeground(): void; - public onBackground(): void; - public constructor(); -} -export default EntryAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets deleted file mode 100644 index ad174cd3..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets +++ /dev/null @@ -1,10 +0,0 @@ -'use static' -import { BackupExtensionAbility, BundleVersion } from "@kit.CoreFileKit"; -export declare function main(): void; -export declare const DOMAIN: number; -declare class EntryBackupAbility extends BackupExtensionAbility { - public onBackup(): Promise; - public onRestore(bundleVersion: BundleVersion): Promise; - public constructor(); -} -export default EntryBackupAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets deleted file mode 100644 index b3a9c0b3..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets +++ /dev/null @@ -1,26 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -import { IDataSource, DataChangeListener } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class BasicDataSource implements IDataSource { - public totalCount(): number; - public getData(index: number): T; - public registerDataChangeListener(listener: DataChangeListener): void; - public unregisterDataChangeListener(listener: DataChangeListener): void; - public notifyDataReload(): void; - public notifyDataAdd(index: number): void; - public notifyDataChange(index: number): void; - public notifyDataDelete(index: number): void; - public notifyDataMove(from: number, to: number): void; - public constructor(); -} -@Observed -export declare class CommonLazyDataSourceModel extends BasicDataSource { - public totalCount(): number; - public getData(index: number): T; - public addData(index: number, data: T): void; - public pushData(data: T): void; - public clearAndPushAll(data: Array): void; - public constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets deleted file mode 100644 index 5996b930..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/OffsetModel.d.ets +++ /dev/null @@ -1,18 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class OffsetModel { - public get currentX(): number; - public set currentX(value: number); - public get currentY(): number; - public set currentY(value: number); - public get lastX(): number; - public set lastX(value: number); - public get lastY(): number; - public set lastY(value: number); - public reset(): void; - public stash(): void; - public toString(): string; - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets deleted file mode 100644 index dd1e6097..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/PositionModel.d.ets +++ /dev/null @@ -1,7 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class PositionModel { - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets deleted file mode 100644 index 61290bdb..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/RotateModel.d.ets +++ /dev/null @@ -1,15 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class RotateModel { - public get currentRotate(): number; - public set currentRotate(value: number); - public get lastRotate(): number; - public set lastRotate(value: number); - public get startAngle(): number; - public set startAngle(value: number); - public reset(): void; - public stash(): void; - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets deleted file mode 100644 index 4d705a34..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgen/static/src/main/ets/model/ScaleModel.d.ets +++ /dev/null @@ -1,19 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class ScaleModel { - public get scaleValue(): number; - public set scaleValue(value: number); - public get lastValue(): number; - public set lastValue(value: number); - public get maxScaleValue(): number; - public set maxScaleValue(value: number); - public get extraScaleValue(): number; - public set extraScaleValue(value: number); - public get defaultScaleValue(): number; - public reset(): void; - public stash(): void; - public toString(): string; - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts deleted file mode 100644 index f33b6608..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/constants/ImageViewerConstants.ts +++ /dev/null @@ -1,8 +0,0 @@ -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;', 'main'); -export const ImageViewerConstants = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;'); -export const ANIMATE_DURATION = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'ANIMATE_DURATION'); -export const SWIPER_CACHE_COUNT = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'SWIPER_CACHE_COUNT'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index 938de8f1..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; -import { window } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;', 'main'); -export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/ETSGLOBAL;').DOMAIN; -const EntryAbility = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;'); -export default EntryAbility; -export const onCreate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onCreate'); -export const onDestroy = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onDestroy'); -export const onWindowStageCreate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageCreate'); -export const onWindowStageDestroy = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageDestroy'); -export const onForeground = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onForeground'); -export const onBackground = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onBackground'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entryability/EntryAbility/EntryAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts deleted file mode 100644 index bdbca82a..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BackupExtensionAbility } from "@kit.CoreFileKit"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;', 'main'); -export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;').DOMAIN; -const EntryBackupAbility = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;'); -export default EntryBackupAbility; -export const onBackup = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onBackup'); -export const onRestore = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onRestore'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts deleted file mode 100644 index 292d78b4..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;', 'main'); -export const BasicDataSource = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;'); -export const totalCount = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'totalCount'); -export const getData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'getData'); -export const registerDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'registerDataChangeListener'); -export const unregisterDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'unregisterDataChangeListener'); -export const notifyDataReload = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataReload'); -export const notifyDataAdd = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataAdd'); -export const notifyDataChange = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataChange'); -export const notifyDataDelete = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataDelete'); -export const notifyDataMove = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataMove'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'constructor'); -export const CommonLazyDataSourceModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;'); -export const totalCount = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'totalCount'); -export const getData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'getData'); -export const addData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'addData'); -export const pushData = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'pushData'); -export const clearAndPushAll = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'clearAndPushAll'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts deleted file mode 100644 index 4d7d9f04..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/OffsetModel.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/OffsetModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/ETSGLOBAL;', 'main'); -export const OffsetModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;'); -export const currentX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentX'); -export const currentX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentX'); -export const currentY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentY'); -export const currentY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'currentY'); -export const lastX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastX'); -export const lastX = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastX'); -export const lastY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastY'); -export const lastY = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'lastY'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'stash'); -export const toString = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'toString'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/OffsetModel/OffsetModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts deleted file mode 100644 index eccc2a43..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/PositionModel.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/PositionModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/PositionModel/ETSGLOBAL;', 'main'); -export const PositionModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/PositionModel/PositionModel;'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/PositionModel/PositionModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts deleted file mode 100644 index 7072ecbf..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/RotateModel.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/RotateModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/ETSGLOBAL;', 'main'); -export const RotateModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;'); -export const currentRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'currentRotate'); -export const currentRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'currentRotate'); -export const lastRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'lastRotate'); -export const lastRotate = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'lastRotate'); -export const startAngle = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'startAngle'); -export const startAngle = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'startAngle'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'stash'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/RotateModel/RotateModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts deleted file mode 100644 index 19f195c5..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/declgen/static/src/main/ets/model/ScaleModel.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/ScaleModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ETSGLOBAL;', 'main'); -export const ScaleModel = (globalThis as any).Panda.getClass('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;'); -export const scaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'scaleValue'); -export const scaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'scaleValue'); -export const lastValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'lastValue'); -export const lastValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'lastValue'); -export const maxScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'maxScaleValue'); -export const maxScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'maxScaleValue'); -export const extraScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'extraScaleValue'); -export const extraScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'extraScaleValue'); -export const defaultScaleValue = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'defaultScaleValue'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'stash'); -export const toString = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'toString'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/declgen/static/src/main/ets/model/ScaleModel/ScaleModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts deleted file mode 100644 index 5635c008..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/constants/ImageViewerConstants.ts +++ /dev/null @@ -1,6 +0,0 @@ -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/constants/ImageViewerConstants/ETSGLOBAL;', 'main'); -export const ImageViewerConstants = (globalThis as any).Panda.getClass('Lentry/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/constants/ImageViewerConstants/ImageViewerConstants;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index 376ce3e5..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from "@kit.AbilityKit"; -import { hilog } from "@kit.PerformanceAnalysisKit"; -import { window } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;', 'main'); -export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/ETSGLOBAL;').DOMAIN; -const EntryAbility = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;'); -export default EntryAbility; -export const onCreate = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onCreate'); -export const onDestroy = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onDestroy'); -export const onWindowStageCreate = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageCreate'); -export const onWindowStageDestroy = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onWindowStageDestroy'); -export const onForeground = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onForeground'); -export const onBackground = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'onBackground'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entryability/EntryAbility/EntryAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts deleted file mode 100644 index dcad2072..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/entrybackupability/EntryBackupAbility.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { hilog } from "@kit.PerformanceAnalysisKit"; -import { BackupExtensionAbility } from "@kit.CoreFileKit"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;', 'main'); -export const DOMAIN = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/ETSGLOBAL;').DOMAIN; -const EntryBackupAbility = (globalThis as any).Panda.getClass('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;'); -export default EntryBackupAbility; -export const onBackup = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onBackup'); -export const onRestore = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'onRestore'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/entrybackupability/EntryBackupAbility/EntryBackupAbility;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts deleted file mode 100644 index 0a2cad72..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/CommonLazyDataSourceModel.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/ETSGLOBAL;', 'main'); -export const BasicDataSource = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;'); -export const totalCount = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'totalCount'); -export const getData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'getData'); -export const registerDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'registerDataChangeListener'); -export const unregisterDataChangeListener = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'unregisterDataChangeListener'); -export const notifyDataReload = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataReload'); -export const notifyDataAdd = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataAdd'); -export const notifyDataChange = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataChange'); -export const notifyDataDelete = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataDelete'); -export const notifyDataMove = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'notifyDataMove'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/BasicDataSource;', 'constructor'); -export const CommonLazyDataSourceModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;'); -export const totalCount = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'totalCount'); -export const getData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'getData'); -export const addData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'addData'); -export const pushData = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'pushData'); -export const clearAndPushAll = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'clearAndPushAll'); -export const constructor = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/CommonLazyDataSourceModel/CommonLazyDataSourceModel;', 'constructor'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts deleted file mode 100644 index bbafdd06..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/OffsetModel.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/OffsetModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/ETSGLOBAL;', 'main'); -export const OffsetModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/OffsetModel/OffsetModel;'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'stash'); -export const toString = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/OffsetModel/OffsetModel;', 'toString'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts deleted file mode 100644 index 3c4ed676..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/PositionModel.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/PositionModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/PositionModel/ETSGLOBAL;', 'main'); -export const PositionModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/PositionModel/PositionModel;'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts deleted file mode 100644 index 93091aa2..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/RotateModel.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/RotateModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/ETSGLOBAL;', 'main'); -export const RotateModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/RotateModel/RotateModel;'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/RotateModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/RotateModel/RotateModel;', 'stash'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts deleted file mode 100644 index 84e0427c..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/declgenBridgeCode/src/main/ets/model/ScaleModel.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observed } from "@kit.ArkUI"; -let ETSGLOBAL = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/ScaleModel/ETSGLOBAL;'); -ETSGLOBAL._$init$_(); -export {}; -export const main = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ETSGLOBAL;', 'main'); -export const ScaleModel = (globalThis as any).Panda.getClass('Lentry/src/main/ets/model/ScaleModel/ScaleModel;'); -export const reset = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'reset'); -export const stash = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'stash'); -export const toString = (globalThis as any).Panda.getFunction('Lentry/src/main/ets/model/ScaleModel/ScaleModel;', 'toString'); diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets deleted file mode 100644 index b89582b3..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/constants/ImageViewerConstants.d.ets +++ /dev/null @@ -1,7 +0,0 @@ -'use static' -export declare function main(): void; -export declare class ImageViewerConstants { - public static get ANIMATE_DURATION(): number; - public static get SWIPER_CACHE_COUNT(): number; - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets deleted file mode 100644 index eacd3894..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entryability/EntryAbility.d.ets +++ /dev/null @@ -1,15 +0,0 @@ -'use static' -import { AbilityConstant, UIAbility, Want } from "@kit.AbilityKit"; -import { window } from "@kit.ArkUI"; -export declare function main(): void; -export declare const DOMAIN: number; -declare class EntryAbility extends UIAbility { - public onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void; - public onDestroy(): void; - public onWindowStageCreate(windowStage: window.WindowStage): void; - public onWindowStageDestroy(): void; - public onForeground(): void; - public onBackground(): void; - constructor(); -} -export default EntryAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets deleted file mode 100644 index 2dda69c4..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/entrybackupability/EntryBackupAbility.d.ets +++ /dev/null @@ -1,10 +0,0 @@ -'use static' -import { BackupExtensionAbility, BundleVersion } from "@kit.CoreFileKit"; -export declare function main(): void; -export declare const DOMAIN: number; -declare class EntryBackupAbility extends BackupExtensionAbility { - public onBackup(): Promise; - public onRestore(bundleVersion: BundleVersion): Promise; - constructor(); -} -export default EntryBackupAbility; diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets deleted file mode 100644 index 53c0638c..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/CommonLazyDataSourceModel.d.ets +++ /dev/null @@ -1,26 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -import { IDataSource, DataChangeListener } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class BasicDataSource implements IDataSource { - public totalCount(): number; - public getData(index: number): T; - public registerDataChangeListener(listener: DataChangeListener): void; - public unregisterDataChangeListener(listener: DataChangeListener): void; - public notifyDataReload(): void; - public notifyDataAdd(index: number): void; - public notifyDataChange(index: number): void; - public notifyDataDelete(index: number): void; - public notifyDataMove(from: number, to: number): void; - constructor(); -} -@Observed -export declare class CommonLazyDataSourceModel extends BasicDataSource { - public totalCount(): number; - public getData(index: number): T; - public addData(index: number, data: T): void; - public pushData(data: T): void; - public clearAndPushAll(data: Array): void; - constructor(); -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets deleted file mode 100644 index 6687768b..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/OffsetModel.d.ets +++ /dev/null @@ -1,17 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class OffsetModel { - public get currentX(): number; - public set currentX(value: number); - public get currentY(): number; - public set currentY(value: number); - public get lastX(): number; - public set lastX(value: number); - public get lastY(): number; - public set lastY(value: number); - public reset(): void; - public stash(): void; - public toString(): string; -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets deleted file mode 100644 index ca1bb586..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/PositionModel.d.ets +++ /dev/null @@ -1,6 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class PositionModel { -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets deleted file mode 100644 index cdc23d03..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/RotateModel.d.ets +++ /dev/null @@ -1,14 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class RotateModel { - public get currentRotate(): number; - public set currentRotate(value: number); - public get lastRotate(): number; - public set lastRotate(value: number); - public get startAngle(): number; - public set startAngle(value: number); - public reset(): void; - public stash(): void; -} diff --git a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets b/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets deleted file mode 100644 index 176f31fe..00000000 --- a/sample/EnhanceSampleArk1.2/ImageViewer/entry/declgen/static/src/main/ets/model/ScaleModel.d.ets +++ /dev/null @@ -1,18 +0,0 @@ -'use static' -import { Observed } from "@kit.ArkUI"; -export declare function main(): void; -@Observed -export declare class ScaleModel { - public get scaleValue(): number; - public set scaleValue(value: number); - public get lastValue(): number; - public set lastValue(value: number); - public get maxScaleValue(): number; - public set maxScaleValue(value: number); - public get extraScaleValue(): number; - public set extraScaleValue(value: number); - public get defaultScaleValue(): number; - public reset(): void; - public stash(): void; - public toString(): string; -} diff --git a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 index a8ee954e..54a17abb 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/AppScope/app.json5 @@ -1,10 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "app": { - "bundleName": "com.example.myapplication", - "vendor": "example", + "bundleName": "com.samples.statemanagement", + "vendor": "samples", "versionCode": 1000000, "versionName": "1.0.0", - "icon": "$media:layered_image", - "label": "$string:app_name" + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true } } diff --git a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 index 118cc94b..5a762afa 100644 --- a/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 +++ b/sample/EnhanceSampleArk1.2/StateManagement/build-profile.json5 @@ -15,20 +15,7 @@ { "app": { - "signingConfigs": [ - { - "name": "default", - "material": { - "certpath": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.cer", - "keyAlias": "debugKey", - "keyPassword": "0000001B221C6418DEFD83C2487414C4E8BD598C319F4CAC030B4D3C2C7D3481A604828555E107B1054C92", - "profile": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "C:/Users/Administrator/.ohos/config/openharmony/default_test_new_7Dxo2Gn7T8nQLjmWfRfSzpsSGC0pisGUh2tWi1zLexE=.p12", - "storePassword": "0000001B13824B61C1F99760150E80D7FEE89B7AF692A6396D77B672BF622B16132D1AB781CC37A968B638" - } - } - ], + "signingConfigs": [], "products": [ { "name": "default", -- Gitee