SystemCapability (SysCap) is a standalone feature in the OpenHarmony system.
SystemCapability (SysCap) is a standalone feature in the operating system.
Before using an API for development, you are advised to familiarize yourself with [SysCap](syscap.md), and then consult the following tables to see whether the SysCap set required for the API is supported by the target device type.
Before using an API for development, you are advised to familiarize yourself with [SysCap](syscap.md), and then consult the following tables to see whether the SysCap set required for the API is supported by the target device type.
> **NOTE**
> **NOTE**
>
>
> The **default** device type represents an OpenHarmony device with comprehensive functions and most common capabilities. When you are not sure about the capability set of the target device, you can use the **default** type for development.
> The **default** device type represents an OpenHarmony device with comprehensive functions and most common capabilities. If you are not sure about the capability set of the target device, you can use the **default** type for development.
## SystemCapability.ArkUI.ArkUI.Full
## SystemCapability.ArkUI.ArkUI.Full
...
@@ -273,7 +273,7 @@ GNSS hardware capabilities
...
@@ -273,7 +273,7 @@ GNSS hardware capabilities
## SystemCapability.Location.Location.Lite
## SystemCapability.Location.Location.Lite
Lite device capabilities of the location service
Location service for mini-, small- and standard-system devices
#### 1. Restrictions on Using Component Decorators
Component decorators @Component, @Entry, @Preview, and @CustomDialog apply only to structs, not classes.
**Example**
```
@Component
// ERROR:The '@Component' decorator can only be used with 'struct'.
class Index {
build() {
}
}
```
**Change Impact**
If @Component, @Entry, @Preview, or @CustomDialog is used to decorate components other than structs, a compile time error will occur.
**Key API/Component Changes**
N/A
**Adaptation Guide**
Use @Component, @Entry, @Preview, and @CustomDialog to decorate only structs.
#### 2. Restrictions on Using Component Member Variable Decorators
Component member variable decorators @State, @Prop, @Link, @Provide, @Consume, @ObjectLink, @StorageLink, @StorageProp, @LocalStorageLink, @LocalStorageProp, @Watch, and @BuilderParam can decorate only the member variables of structs.
**Example**
```
@Component
class Index {
// ERROR: The '@State' decorator can only be used with 'struct'.
@State message: string = 'Hello world'
build() {
}
}
```
**Change Impact**
If any of the aforementioned component member variable decorators is used to decorate a member variable of components other than structs, a compile time error will occur.
**Key API/Component Changes**
N/A
**Adaptation Guide**
Use the aforementioned component member variable decorators to decorate only the member variables of structs.