idlize

Форк
0
49 строк · 2.8 Кб
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";
3
/*
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
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
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.
16
 */
17
import { storage } from "./Rewrite2";
18
class ArkLocalStoragePropExampleComponent extends ArkStructBase<ArkLocalStoragePropExampleComponent> {
19
    private _entry_local_storage_ = storage;
20
    __initializeStruct(/**/
21
    /** @memo */
22
    content?: () => void, initializers?: Partial<ArkLocalStoragePropExampleComponent>): void {
23
        this._prop = propState<string>(StorageLinkState<string>(this._entry_local_storage_, "storage", "Start").value);
24
    }
25
    _prop!: SyncedProperty<string>;
26
    get prop(): string {
27
        return this._prop!.value;
28
    }
29
    set prop(value: string) {
30
        this._prop!.value = observableProxy(value);
31
    }
32
    /** @memo */
33
    __updateStruct(initializers: Partial<ArkLocalStoragePropExampleComponent> | undefined): void {
34
        this._prop.update(StorageLinkState<string>(this._entry_local_storage_, "storage", "Start").value);
35
    }
36
    /** @memo */
37
    _build(/**/
38
    /** @memo */
39
    builder: ((instance: ArkLocalStoragePropExampleComponent) => void) | undefined) {
40
    }
41
}
42
/** @memo */
43
export function LocalStoragePropExample(style?: any, /**/
44
/** @memo */
45
content?: () => void, initializers?: Partial<ArkLocalStoragePropExampleComponent>): ArkLocalStoragePropExampleComponent {
46
    return ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, initializers);
47
}
48
registerArkuiEntry(LocalStoragePropExample, "Rewrite3");
49
export const __Entry = LocalStoragePropExample;
50

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.