1
import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, ESObject, ForEach, GestureGroup, IDataSource, ImageBitmap, Indicator, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, OffscreenCanvasRenderingContext2D, PanGesture, PanGestureOptions, PatternLockController, PinchGesture, RenderingContextSettings, RichEditorController, Scroller, SearchController, StorageLinkState, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextInputOptions, TextTimerController, TransitionEffect, VideoController, WebController, XComponentController, animateTo, observableProxy } from "@koalaui/arkoala-arkui";
2
import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router";
17
export const storage = new LocalStorage();
18
class ArkLocalStorageLinkExampleComponent extends ArkStructBase<ArkLocalStorageLinkExampleComponent> {
19
private _entry_local_storage_ = storage;
22
content?: () => void, initializers?: Partial<ArkLocalStorageLinkExampleComponent>): void {
23
this._link = StorageLinkState<string>(this._entry_local_storage_, "storage", "Start");
25
_link!: MutableState<string>;
27
return this._link!.value;
29
set link(value: string) {
30
this._link!.value = observableProxy(value);
35
builder: ((instance: ArkLocalStorageLinkExampleComponent) => void) | undefined) {
36
ArkText(undefined, undefined, "LocalStorage entry = " + storage.get("storage"));
40
export function LocalStorageLinkExample(style?: any,
42
content?: () => void, initializers?: Partial<ArkLocalStorageLinkExampleComponent>): ArkLocalStorageLinkExampleComponent {
43
return ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, initializers);
45
registerArkuiEntry(LocalStorageLinkExample, "Rewrite2");
46
export const __Entry = LocalStorageLinkExample;