idlize

Форк
0
89 строк · 3.5 Кб
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, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextInputOptions, TextTimerController, TransitionEffect, VideoController, WebController, XComponentController, animateTo } from "@koalaui/arkoala-arkui";
2
/*
3
 * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
export function Foo() {
17
    return "string";
18
}
19
export function Text() {
20
    return "string";
21
}
22
export class ArkStructComponent extends ArkStructBase<ArkStructComponent> {
23
    private _entry_local_storage_ = new LocalStorage();
24
    __initializeStruct(/**/
25
    /** @memo */
26
    content?: () => void, initializers?: Partial<ArkStructComponent>): void {
27
        this._param = initializers?.param ?? (0);
28
    }
29
    _param!: number;
30
    get param(): number {
31
        return this._param;
32
    }
33
    set param(value: number) {
34
        this._param = value;
35
    }
36
    /** @memo */
37
    _build(/**/
38
    /** @memo */
39
    builder: ((instance: ArkStructComponent) => void) | undefined) { }
40
}
41
export class ArkStructWithContentComponent extends ArkStructBase<ArkStructWithContentComponent> {
42
    private _entry_local_storage_ = new LocalStorage();
43
    __initializeStruct(/**/
44
    /** @memo */
45
    content?: () => void, initializers?: Partial<ArkStructWithContentComponent>): void {
46
        this._param = initializers?.param ?? (0);
47
        if (initializers?.content) {
48
            this._content = initializers?.content;
49
        }
50
        if (!this._content && content)
51
            this._content = content;
52
    }
53
    _param!: number;
54
    get param(): number {
55
        return this._param;
56
    }
57
    set param(value: number) {
58
        this._param = value;
59
    }
60
    /** @memo */
61
    _content!: () => void;
62
    /** @memo */
63
    get content(): () => void {
64
        return this._content;
65
    }
66
    set content(/**/
67
    /** @memo */
68
    value: () => void) {
69
        this._content = value;
70
    }
71
    /** @memo */
72
    _build(/**/
73
    /** @memo */
74
    builder: ((instance: ArkStructWithContentComponent) => void) | undefined) {
75
        this.content();
76
    }
77
}
78
/** @memo */
79
export function Struct(style?: any, /**/
80
/** @memo */
81
content?: () => void, initializers?: Partial<ArkStructComponent>): ArkStructComponent {
82
    return ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, initializers);
83
}
84
/** @memo */
85
export function StructWithContent(style?: any, /**/
86
/** @memo */
87
content?: () => void, initializers?: Partial<ArkStructWithContentComponent>): ArkStructWithContentComponent {
88
    return ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, initializers);
89
}
90

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

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

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

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