• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { Slider } from '@kit.ArkUI';
17
18@Entry
19@Component
20struct Test {
21  @State num: number = 0
22  @State a: MyClassA = new MyClassA()
23
24  build() {
25    Column() {
26      Button('按钮')
27        .backgroundColor('#ffffff')
28      Circle() {
29
30      }
31
32      MyComponent1() {
33
34      }
35
36      Text("Test")
37    }.width("100%")
38  }
39}
40
41enum Color {
42  Green
43}
44
45function Circle() {
46
47}
48
49@Component
50struct MyComponent1 {
51  @State count: number = 0;
52
53  build() {
54    Row() {
55      Slider(){}
56    }
57  }
58}
59
60@Extend(Text)
61function cardStyle()
62{
63  .backgroundColor(Color.Green)
64}
65
66@AnimatableExtend(Column)
67function animatableWidth(width: number) {
68  .width(width)
69}
70
71@Component
72struct MyComponent2 {
73  @State value: number = 0;
74
75  build() {
76    Row() {
77      Slider({
78        value: $$this.value
79      })
80    }
81  }
82}
83
84class MyClassA {}
85
86function processImageFit(imageFit: ImageFit): void {
87}
88
89function Calendar() {
90
91}