1
import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, ESObject, ForEach, GestureGroup, IDataSource, ImageBitmap, Indicator, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, OffscreenCanvasRenderingContext2D, PanGesture, PanGestureOptions, PatternLockController, PinchGesture, RenderingContextSettings, RichEditorController, Scroller, SearchController, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextInputOptions, TextTimerController, TransitionEffect, VideoController, WebController, XComponentController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui";
2
import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router";
4
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
17
import { storage } from "./Rewrite2";
18
class ArkLocalStoragePropExampleComponent extends ArkStructBase<ArkLocalStoragePropExampleComponent> {
19
private _entry_local_storage_ = storage;
20
__initializeStruct(/**/
22
content?: () => void, initializers?: Partial<ArkLocalStoragePropExampleComponent>): void {
23
this._prop = propState<string>(StorageLinkState<string>(this._entry_local_storage_, "storage", "Start").value);
25
_prop!: SyncedProperty<string>;
27
return this._prop!.value;
29
set prop(value: string) {
30
this._prop!.value = observableProxy(value);
33
__updateStruct(initializers: Partial<ArkLocalStoragePropExampleComponent> | undefined): void {
34
this._prop.update(StorageLinkState<string>(this._entry_local_storage_, "storage", "Start").value);
39
builder: ((instance: ArkLocalStoragePropExampleComponent) => void) | undefined) {
43
export function LocalStoragePropExample(style?: any, /**/
45
content?: () => void, initializers?: Partial<ArkLocalStoragePropExampleComponent>): ArkLocalStoragePropExampleComponent {
46
return ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, initializers);
48
registerArkuiEntry(LocalStoragePropExample, "Rewrite3");
49
export const __Entry = LocalStoragePropExample;