未验证 提交 c81d024e 编写于 作者: O openharmony_ci 提交者: Gitee

!21283 翻译完成 20988+21031+20972+20233+20177:syscap文档更新+add 组件成员装饰器规则

Merge pull request !21283 from ester.zhou/TR-20988
...@@ -24,7 +24,7 @@ Obtains the device information. ...@@ -24,7 +24,7 @@ Obtains the device information.
> >
> Do not call **device.getInfo** before the **onShow** event of the home page. > Do not call **device.getInfo** before the **onShow** event of the home page.
**System capability**: SystemCapability.Startup.SystemInfo **System capability**: SystemCapability.Startup.SystemInfo.Lite
**Parameters** **Parameters**
...@@ -36,7 +36,7 @@ Obtains the device information. ...@@ -36,7 +36,7 @@ Obtains the device information.
Defines the parameters for obtaining the device information. Defines the parameters for obtaining the device information.
**System capability**: SystemCapability.Startup.SystemInfo **System capability**: SystemCapability.Startup.SystemInfo.Lite
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -48,7 +48,7 @@ Defines the parameters for obtaining the device information. ...@@ -48,7 +48,7 @@ Defines the parameters for obtaining the device information.
Provides the device information. Provides the device information.
**System capability**: SystemCapability.Startup.SystemInfo **System capability**: SystemCapability.Startup.SystemInfo.Lite
| Name| Type| Description| | Name| Type| Description|
| -------- | -------- | -------- | | -------- | -------- | -------- |
......
...@@ -117,7 +117,7 @@ struct CustomDialogUser { ...@@ -117,7 +117,7 @@ struct CustomDialogUser {
// Delete the dialogController instance and set it to undefined when the custom component is about to be destroyed. // Delete the dialogController instance and set it to undefined when the custom component is about to be destroyed.
aboutToDisappear() { aboutToDisappear() {
delete this.dialogController, // Delete the dialogController instance. delete this.dialogController, // Delete the dialogController instance.
this.dialogController = undefined //Set dialogController to undefined. this.dialogController = undefined // Set dialogController to undefined.
} }
onCancel() { onCancel() {
......
# SystemCapability List # SystemCapability List
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
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router | | Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
...@@ -361,7 +361,7 @@ Power management display ...@@ -361,7 +361,7 @@ Power management display
## SystemCapability.PowerManager.DisplayPowerManager.Lite ## SystemCapability.PowerManager.DisplayPowerManager.Lite
Lite device capabilities of the system power management display Power management display for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router | | Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
...@@ -385,7 +385,7 @@ Core capabilities of the system power management service ...@@ -385,7 +385,7 @@ Core capabilities of the system power management service
## SystemCapability.PowerManager.PowerManager.Lite ## SystemCapability.PowerManager.PowerManager.Lite
Lite device capabilities of the system power management service System power management service for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router | | Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
...@@ -401,7 +401,7 @@ Core capabilities of the battery service ...@@ -401,7 +401,7 @@ Core capabilities of the battery service
## SystemCapability.PowerManager.BatteryManager.Lite ## SystemCapability.PowerManager.BatteryManager.Lite
Lite device capabilities of the battery service Battery service for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router | | Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
...@@ -527,6 +527,14 @@ Media session management capability ...@@ -527,6 +527,14 @@ Media session management capability
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No | | Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.AVSession.AVCast
Casting capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Multimedia.Audio.Core ## SystemCapability.Multimedia.Audio.Core
Basic audio capability Basic audio capability
...@@ -1103,6 +1111,14 @@ Basic file I/O interfaces ...@@ -1103,6 +1111,14 @@ Basic file I/O interfaces
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.FileManagement.File.FileIO.Lite
Basic file I/O interfaces for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.FileManagement.File.Environment ## SystemCapability.FileManagement.File.Environment
Environment-related interfaces Environment-related interfaces
...@@ -1151,6 +1167,14 @@ Sensor service subscription ...@@ -1151,6 +1167,14 @@ Sensor service subscription
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No | | Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Sensors.Sensor.Lite
Sensor service subscription for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | No | No | No | No |
## SystemCapability.Sensors.MiscDevice ## SystemCapability.Sensors.MiscDevice
Miscellaneous devices- sensors Miscellaneous devices- sensors
...@@ -1159,10 +1183,26 @@ Miscellaneous devices- sensors ...@@ -1159,10 +1183,26 @@ Miscellaneous devices- sensors
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No | | Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Sensors.MiscDevice.Lite
Miscellaneous mini-, small- and standard-system devices- sensors
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | No | No | No | No |
## SystemCapability.Startup.SystemInfo ## SystemCapability.Startup.SystemInfo
Basic system information Basic system information
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.Startup.SystemInfo.Lite
Basic system information for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router | | Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
...@@ -1231,6 +1271,14 @@ Core capabilities of preferences data storage ...@@ -1231,6 +1271,14 @@ Core capabilities of preferences data storage
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ | | ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No | | Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.Preferences.Core.Lite
Core device capabilities of preferences data storage for mini-, small- and standard-system devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.DataShare.Core ## SystemCapability.DistributedDataManager.DataShare.Core
Basic capabilities of cross-process data sharing Basic capabilities of cross-process data sharing
......
# ArkUI Subsystem Changelog
### Restrictions on Using Decorators
#### 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.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册