• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2024 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@Entry
16@ComponentV2
17struct v1DecoratorInComponentV2 {
18  @State state_value: string = "hello"
19  @Prop prop_value: string = "hello"
20  @Link link_value: string
21  @Provide provide_value: string = "hello"
22  @Consume consumer_value: string
23  @Watch("aa") watch_value: string = "hello"
24  @State @Watch("aa") watch_value1: string = "hello"
25  @StorageLink("b") storageLink_value: string = "hello"
26  @StorageProp("b") storageProp_value: string = "hello"
27  @LocalStorageLink("b") localStorageLink_value: string = "hello"
28  @LocalStorageProp("b") localStorageProp_value: string = "hello"
29  @ObjectLink objectLink_value: AA
30
31  aa() {}
32
33  build() {
34    Column() {}
35  }
36}
37
38@Observed
39class AA {}