提交 de1cde69 编写于 作者: Z zengyawen

update docs

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 e302da4d
# ArkUI子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,电源服务子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| common | | function getContext(component?: Object): Object; | 新增 |
| sidebar | SideBarContainerAttribute | autoHide(value: boolean): SideBarContainerAttribute; | 新增 |
| state_management | LocalStorage | clear(): boolean; | 新增 |
| state_management | LocalStorage | delete(propName: string): boolean; | 新增 |
| state_management | LocalStorage | setAndProp\<T>(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T; | 新增 |
| state_management | LocalStorage | prop\<T>(propName: string, propUser?: T, subscribersName?: string): T; | 新增 |
| state_management | LocalStorage | setAndLink\<T>(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T; | 新增 |
| state_management | LocalStorage | link\<T>(propName: string, linkUser?: T, subscribersName?: string): T; | 新增 |
| state_management | LocalStorage | setOrCreate\<T>(propName: string, newValue?: T): boolean; | 新增 |
| state_management | LocalStorage | set\<T>(propName: string, newValue: T): boolean; | 新增 |
| state_management | LocalStorage | get\<T>(propName: string): T; | 新增 |
| state_management | LocalStorage | size(): number; | 新增 |
| state_management | LocalStorage | keys(): IterableIterator\<string>; | 新增 |
| state_management | LocalStorage | has(propName: string): boolean; | 新增 |
| state_management | LocalStorage | static GetShared(): LocalStorage; | 新增 |
| state_management | LocalStorage | constructor(initializingProperties?: Object); | 新增 |
# 电源服务子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,电源服务子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_TECHNOLOGY | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_PRESENT | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_CHARGE_COUNTER | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_CHARGE_STATE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_MAX_VOLTAGE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_MAX_CURRENT | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_PLUGGED_TYPE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_HEALTH_STATE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_TEMPERATURE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_VOLTAGE | 新增 |
| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_SOC = 0 | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_CRITICAL | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_LOW | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_NORMAL | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_HIGH | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_FULL | 新增 |
| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_NONE | 新增 |
| ohos.batteryinfo | batteryInfo | const remainingEnergy: number; | 新增 |
| ohos.batteryinfo | batteryInfo | const nowCurrent: number; | 新增 |
| ohos.batteryinfo | batteryInfo | const totalEnergy: number; | 新增 |
| ohos.batteryinfo | batteryInfo | const estimatedRemainingChargeTime: number; | 新增 |
| ohos.batteryinfo | batteryInfo | const batteryCapacityLevel: BatteryCapacityLevel; | 新增 |
| ohos.power | DevicePowerMode | MODE_EXTREME_POWER_SAVE | 新增 |
| ohos.power | DevicePowerMode | MODE_PERFORMANCE | 新增 |
| ohos.power | DevicePowerMode | MODE_POWER_SAVE | 新增 |
| ohos.power | DevicePowerMode | MODE_NORMAL = 600 | 新增 |
| ohos.power | power | setPowerMode(mode: DevicePowerMode, callback: AsyncCallback\<void>): void;<br>setPowerMode(mode: DevicePowerMode): Promise\<void>; | 新增 |
| ohos.power | power | getPowerMode(callback: AsyncCallback\<DevicePowerMode>): void;<br>getPowerMode(): Promise\<DevicePowerMode>; | 新增 |
| ohos.power | power | suspendDevice(): void; | 新增 |
| ohos.power | power | wakeupDevice(detail: string): void; | 新增 |
# 包管理子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,包管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| bundleInfo | BundleInfo | readonly extensionAbilityInfo: Array\<ExtensionAbilityInfo>; | 新增 |
| bundleInfo | ReqPermissionDetail | reasonId: number; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly metadata: Array\<Metadata>; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly extensionAbilityInfo: Array\<ExtensionAbilityInfo>; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly mainElementName: string; | 新增 |
| metadata | Metadata | resource: string; | 新增 |
| metadata | Metadata | value: string; | 新增 |
| metadata | Metadata | name: string; | 新增 |
| ohos.bundle | bundle | isModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback\<boolean>): void;<br>isModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>; | 新增 |
| ohos.bundle | bundle | setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback\<void>):void;<br>setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise\<void>; | 新增 |
| ohos.bundle | bundle | queryExtensionAbilityInfos(want: Want, extensionType: number, extensionFlags: number, userId: number, callback: AsyncCallback\<Array\<ExtensionAbilityInfo>>): void;<br>queryExtensionAbilityInfos(want: Want, extensionType: number, extensionFlags: number, callback: AsyncCallback\<Array\<ExtensionAbilityInfo>>): void;<br>queryExtensionAbilityInfos(want: Want, extensionType: number, extensionFlags: number, userId?: number): Promise\<Array\<ExtensionAbilityInfo>>; | 新增 |
| ohos.bundle | UpgradeFlag | RELATION_UPGRADE = 2 | 新增 |
| ohos.bundle | UpgradeFlag | SINGLE_UPGRADE = 1 | 新增 |
| ohos.bundle | UpgradeFlag | NOT_UPGRADE = 0 | 新增 |
| ohos.bundle | ExtensionAbilityType | UNSPECIFIED = 20 | 新增 |
| ohos.bundle | ExtensionAbilityType | WINDOW = 10 | 新增 |
| ohos.bundle | ExtensionAbilityType | BACKUP = 9 | 新增 |
| ohos.bundle | ExtensionAbilityType | WALLPAPER = 8 | 新增 |
| ohos.bundle | ExtensionAbilityType | STATIC_SUBSCRIBER = 7 | 新增 |
| ohos.bundle | ExtensionAbilityType | FILE_SHARE = 6 | 新增 |
| ohos.bundle | ExtensionAbilityType | DATA_SHARE = 5 | 新增 |
| ohos.bundle | ExtensionAbilityType | ACCESSIBILITY = 4 | 新增 |
| ohos.bundle | ExtensionAbilityType | SERVICE = 3 | 新增 |
| ohos.bundle | ExtensionAbilityType | INPUT_METHOD = 2 | 新增 |
| ohos.bundle | ExtensionAbilityType | WORK_SCHEDULER = 1 | 新增 |
| ohos.bundle | ExtensionAbilityType | FORM = 0 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_METADATA = 0x00000020 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_APPLICATION = 0x00000004 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_PERMISSION = 0x00000002 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_DEFAULT = 0x00000000 | 新增 |
| ohos.bundle | BundleFlag | GET_BUNDLE_WITH_EXTENSION_ABILITY = 0x00000020 | 新增 |
# 基础通信子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,基础通信子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.bluetooth | ProfileId | PROFILE_HID_HOST = 6 | 新增 |
| ohos.bluetooth | HidHostProfile | off(type: "connectionStateChange", callback?: Callback\<StateChangeParam>): void; | 新增 |
| ohos.bluetooth | HidHostProfile | on(type: "connectionStateChange", callback: Callback\<StateChangeParam>): void; | 新增 |
| ohos.bluetooth | HidHostProfile | disconnect(device: string): boolean; | 新增 |
| ohos.bluetooth | HidHostProfile | connect(device: string): boolean; | 新增 |
\ No newline at end of file
# DFX子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,DFX子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.hidebug | hidebug | getServiceDump(serviceid : number) : string; | 新增 |
| ohos.hidebug | hidebug | getCpuUsage() : number; | 新增 |
| ohos.hidebug | hidebug | getPrivateDirty() : bigint; | 新增 |
# 分布式数据管理子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,分布式数据管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.data.preferences | preferences | const MAX_VALUE_LENGTH: 8192; | 新增 |
| ohos.data.preferences | preferences | const MAX_KEY_LENGTH: 80; | 新增 |
| ohos.data.preferences | Preferences | off(type: 'change', callback?: Callback\<{ key: string }>): void; | 新增 |
| ohos.data.preferences | Preferences | on(type: 'change', callback: Callback\<{ key: string }>): void; | 新增 |
| ohos.data.preferences | Preferences | flush(callback: AsyncCallback\<void>): void;<br>flush(): Promise\<void>; | 新增 |
| ohos.data.preferences | Preferences | clear(callback: AsyncCallback\<void>): void;<br>clear(): Promise\<void>; | 新增 |
| ohos.data.preferences | Preferences | delete(key: string, callback: AsyncCallback\<void>): void;<br>delete(key: string): Promise\<void>; | 新增 |
| ohos.data.preferences | Preferences | put(key: string, value: ValueType, callback: AsyncCallback\<void>): void;<br>put(key: string, value: ValueType): Promise\<void>; | 新增 |
| ohos.data.preferences | Preferences | has(key: string, callback: AsyncCallback\<boolean>): void;<br>has(key: string): Promise\<boolean>; | 新增 |
| ohos.data.preferences | Preferences | getAll(callback: AsyncCallback\<Object>): void;<br>getAll(): Promise\<Object>; | 新增 |
| ohos.data.preferences | Preferences | get(key: string, defValue: ValueType, callback: AsyncCallback\<ValueType>): void;<br>get(key: string, defValue: ValueType): Promise\<ValueType>; | 新增 |
| ohos.data.preferences | preferences | removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\<void>): void;<br>removePreferencesFromCache(context: Context, name: string): Promise\<void>; | 新增 |
| ohos.data.preferences | preferences | deletePreferences(context: Context, name: string, callback: AsyncCallback\<void>): void;<br>deletePreferences(context: Context, name: string): Promise\<void>; | 新增 |
| ohos.data.preferences | preferences | getPreferences(context: Context, name: string, callback: AsyncCallback\<Preferences>): void;<br>getPreferences(context: Context, name: string): Promise\<Preferences>; | 新增 |
| ohos.data.storage | storage | const MAX_VALUE_LENGTH: 8192; | 废弃 |
| ohos.data.storage | storage | const MAX_KEY_LENGTH: 80; | 废弃 |
| ohos.data.storage | StorageObserver | key: string; | 废弃 |
| ohos.data.storage | Storage | off(type: 'change', callback: Callback\<StorageObserver>): void; | 废弃 |
| ohos.data.storage | Storage | on(type: 'change', callback: Callback\<StorageObserver>): void; | 废弃 |
| ohos.data.storage | Storage | flush(callback: AsyncCallback\<void>): void;<br>flush(): Promise\<void>; | 废弃 |
| ohos.data.storage | Storage | flushSync(): void; | 废弃 |
| ohos.data.storage | Storage | clear(callback: AsyncCallback\<void>): void;<br>clear(): Promise\<void>; | 废弃 |
| ohos.data.storage | Storage | clearSync(): void; | 废弃 |
| ohos.data.storage | Storage | delete(key: string, callback: AsyncCallback\<void>): void;<br>delete(key: string): Promise\<void>; | 废弃 |
| ohos.data.storage | Storage | deleteSync(key: string): void; | 废弃 |
| ohos.data.storage | Storage | put(key: string, value: ValueType, callback: AsyncCallback\<void>): void;<br>put(key: string, value: ValueType): Promise\<void>; | 废弃 |
| ohos.data.storage | Storage | putSync(key: string, value: ValueType): void; | 废弃 |
| ohos.data.storage | Storage | has(key: string, callback: AsyncCallback\<boolean>): boolean;<br>has(key: string): Promise\<boolean>; | 废弃 |
| ohos.data.storage | Storage | hasSync(key: string): boolean; | 废弃 |
| ohos.data.storage | Storage | get(key: string, defValue: ValueType, callback: AsyncCallback\<ValueType>): void;<br>get(key: string, defValue: ValueType): Promise\<ValueType>; | 废弃 |
| ohos.data.storage | Storage | getSync(key: string, defValue: ValueType): ValueType; | 废弃 |
| ohos.data.storage | storage | removeStorageFromCache(path: string, callback: AsyncCallback\<void>): void;<br>removeStorageFromCache(path: string): Promise\<void>; | 废弃 |
| ohos.data.storage | storage | removeStorageFromCacheSync(path: string): void; | 废弃 |
| ohos.data.storage | storage | deleteStorage(path: string, callback: AsyncCallback\<void>): void;<br>deleteStorage(path: string): Promise\<void>; | 废弃 |
| ohos.data.storage | storage | deleteStorageSync(path: string): void; | 废弃 |
| ohos.data.storage | storage | getStorage(path: string, callback: AsyncCallback\<Storage>): void;<br>getStorage(path: string): Promise\<Storage>; | 废弃 |
| ohos.data.storage | storage | getStorageSync(path: string): Storage; | 废弃 |
# 事件通知子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,事件通知子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| commonEventSubscriber | CommonEventSubscriber | finishCommonEvent(callback: AsyncCallback\<void>): void;<br>finishCommonEvent(): Promise\<void>; | 新增 |
| notificationSlot | NotificationSlot | readonly enabled?: boolean; | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED" | 新增 |
| ohos.notification | notification | isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback\<boolean>): void;<br>isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise\<boolean>; | 新增 |
| ohos.notification | notification | enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean, callback: AsyncCallback\<void>): void;<br>enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean): Promise\<void>; | 新增 |
| ohos.notification | notification | cancelAsBundle(id: number, representativeBundle: string, userId: number, callback: AsyncCallback\<void>): void;<br>cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise\<void>; | 新增 |
| ohos.notification | notification | publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number, callback: AsyncCallback\<void>): void;<br>publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise\<void>; | 新增 |
# 文件管理子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,文件管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.securityLabel | securityLabel | getSecurityLabelSync(path:string): string; | 新增 |
| ohos.securityLabel | securityLabel | getSecurityLabel(path:string, callback: AsyncCallback\<string>): void;<br>getSecurityLabel(path:string): Promise\<string>; | 新增 |
| ohos.securityLabel | securityLabel | setSecurityLabelSync(path:string, type:dataLevel): void; | 新增 |
| ohos.securityLabel | securityLabel | setSecurityLabel(path:string, type:dataLevel, callback: AsyncCallback\<void>): void;<br>setSecurityLabel(path:string, type:dataLevel): Promise\<void>; | 新增 |
| ohos.storageStatistics | storageStatistics | getFreeSize(callback: AsyncCallback\<number>): void;<br>getFreeSize(): Promise\<number>; | 新增 |
| ohos.storageStatistics | storageStatistics | getTotalSize(callback: AsyncCallback\<number>): void;<br>getTotalSize(): Promise\<number>; | 新增 |
| ohos.storageStatistics | storageStatistics | getUserStorageStats(userId?: number): Promise\<StorageStats>;<br>getUserStorageStats(callback: AsyncCallback\<StorageStats>): void;<br>getUserStorageStats(userId: number, callback: AsyncCallback\<StorageStats>): void; | 新增 |
| ohos.storageStatistics | StorageStats | app: number; | 新增 |
| ohos.storageStatistics | StorageStats | file: number; | 新增 |
| ohos.storageStatistics | StorageStats | image: number; | 新增 |
| ohos.storageStatistics | StorageStats | video: number; | 新增 |
| ohos.storageStatistics | StorageStats | audio: number; | 新增 |
| ohos.storageStatistics | StorageStats | total: number; | 新增 |
| ohos.storageStatistics | storageStatistics | getSystemSize(callback: AsyncCallback\<number>): void;<br>getSystemSize(): Promise\<number>; | 新增 |
| ohos.storageStatistics | storageStatistics | getCurrentBundleStats(callback: AsyncCallback\<BundleStats>): void;<br>getCurrentBundleStats(): Promise\<BundleStats>; | 新增 |
| ohos.storageStatistics | storageStatistics | getBundleStats(packageName: string, callback: AsyncCallback\<BundleStats>): void;<br>getBundleStats(packageName: string): Promise\<BundleStats>; | 新增 |
| ohos.storageStatistics | BundleStats | dataSize: number; | 新增 |
| ohos.storageStatistics | BundleStats | cacheSize: number; | 新增 |
| ohos.storageStatistics | BundleStats | appSize: number; | 新增 |
| ohos.volumeManager | volumeManager | partition(volId: string, fstype: string, callback: AsyncCallback\<void>): void;<br>partition(volId: string, fstype: string): Promise\<void>; | 新增 |
| ohos.volumeManager | volumeManager | format(volId: string, callback: AsyncCallback\<void>): void;<br>format(volId: string): Promise\<void>; | 新增 |
| ohos.volumeManager | volumeManager | setVolumeDescription(uuid: string, description: string, callback: AsyncCallback\<void>): void;<br>setVolumeDescription(uuid: string, description: string): Promise\<void>; | 新增 |
| ohos.volumeManager | volumeManager | getVolumeById(id: string, callback: AsyncCallback\<Volume>): void;<br>getVolumeById(id: string): Promise\<Volume>; | 新增 |
| ohos.volumeManager | volumeManager | getVolumeByUuid(uuid: string, callback: AsyncCallback\<Volume>): void;<br>getVolumeByUuid(uuid: string): Promise\<Volume>; | 新增 |
| ohos.volumeManager | volumeManager | unmount(volumeId: string, callback: AsyncCallback\<boolean>): void;<br>unmount(volumeId: string): Promise\<boolean>; | 新增 |
| ohos.volumeManager | volumeManager | mount(volumeId: string, callback: AsyncCallback\<boolean>): void;<br>mount(volumeId: string): Promise\<boolean>; | 新增 |
| ohos.volumeManager | volumeManager | getAllVolumes(callback: AsyncCallback\<Array\<Volume>>): void;<br>getAllVolumes(): Promise\<Array\<Volume>>; | 新增 |
| ohos.volumeManager | Volume | path: string; | 新增 |
| ohos.volumeManager | Volume | state: number; | 新增 |
| ohos.volumeManager | Volume | removable: boolean; | 新增 |
| ohos.volumeManager | Volume | description: string; | 新增 |
| ohos.volumeManager | Volume | uuid: string; | 新增 |
| ohos.volumeManager | Volume | id: string; | 新增 |
# 全球化子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,全球化子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| DeviceSettingsManager | DeviceSettingsManager | setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void;<br>setDateTime(admin: Want, time: number): Promise\<void>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | getDeviceSettingsManager(callback: AsyncCallback\<DeviceSettingsManager>): void;<br>getDeviceSettingsManager(): Promise\<DeviceSettingsManager>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | isSuperAdmin(bundleName: String, callback: AsyncCallback\<boolean>): void;<br>isSuperAdmin(bundleName: String): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback\<boolean>): void;<br>setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | getEnterpriseInfo(admin: Want, callback: AsyncCallback\<EnterpriseInfo>): void;<br>getEnterpriseInfo(admin: Want): Promise\<EnterpriseInfo>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | isAdminAppActive(admin: Want, callback: AsyncCallback\<boolean>): void;<br>isAdminAppActive(admin: Want): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | deactivateSuperAdmin(bundleName: String, callback: AsyncCallback\<boolean>): void;<br>deactivateSuperAdmin(bundleName: String): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | deactivateAdmin(admin: Want, callback: AsyncCallback\<boolean>): void;<br>deactivateAdmin(admin: Want): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | enterpriseDeviceManager | activateAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback\<boolean>): void;<br>activateAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType): Promise\<boolean>; | 新增 |
| ohos.enterpriseDeviceManager | AdminType | ADMIN_TYPE_SUPER = 0x01 | 新增 |
| ohos.enterpriseDeviceManager | AdminType | ADMIN_TYPE_NORMAL = 0x00 | 新增 |
| ohos.enterpriseDeviceManager | EnterpriseInfo | description: string; | 新增 |
| ohos.enterpriseDeviceManager | EnterpriseInfo | name: string; | 新增 |
| ohos.i18n | i18n | getAppPreferredLanguage(): string; | 新增 |
| ohos.resourceManager | ResourceManager | getNumberByName(resName: string): number; | 新增 |
| ohos.resourceManager | ResourceManager | getNumber(resId: number): number; | 新增 |
| ohos.resourceManager | ResourceManager | getBooleanByName(resName: string): boolean; | 新增 |
| ohos.resourceManager | ResourceManager | getBoolean(resId: number): boolean; | 新增 |
| ohos.resourceManager | ResourceManager | getStringByNameSync(resName: string): string; | 新增 |
| ohos.resourceManager | ResourceManager | getStringSync(resId: number): string; | 新增 |
| ohos.resourceManager | ResourceManager | getPluralStringByName(resName: string, num: number, callback: AsyncCallback\<string>): void;<br>getPluralStringByName(resName: string, num: number): Promise\<string>; | 新增 |
| ohos.resourceManager | ResourceManager | getMediaBase64ByName(resName: string, callback: AsyncCallback\<string>): void;<br>getMediaBase64ByName(resName: string): Promise\<string>; | 新增 |
| ohos.resourceManager | ResourceManager | getMediaByName(resName: string, callback: AsyncCallback\<Uint8Array>): void;<br>getMediaByName(resName: string): Promise\<Uint8Array>; | 新增 |
| ohos.resourceManager | ResourceManager | getStringArrayByName(resName: string, callback: AsyncCallback\<Array\<string>>): void;<br>getStringArrayByName(resName: string): Promise\<Array\<string>>; | 新增 |
| ohos.resourceManager | ResourceManager | getStringByName(resName: string, callback: AsyncCallback\<string>): void;<br>getStringByName(resName: string): Promise\<string>; | 新增 |
# 启动恢复子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,启动恢复子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.systemCapability | systemCapability | querySystemCapabilities(callback: AsyncCallback\<string>): void;<br>querySystemCapabilities(): Promise\<string>; | 新增 |
# 杂散软件服务子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,杂散软件服务子系统的API变更如下:
## 接口变更
| 模块名 | 方法/事件名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.screenLock | sendScreenLockEvent | sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\<boolean>): void;<br>sendScreenLockEvent(event: String, parameter: number): Promise\<boolean>; | 新增 |
| ohos.screenLock | off_changeUser | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_endSleep | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_beginSleep | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_screenlockEnabled | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_beginExitAnimation | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_unlockScreen | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_endScreenOff | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_beginScreenOff | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_endScreenOn | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_beginScreenOn | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_endWakeUp | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | off_beginWakeUp | off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_screenlockEnabled | on(type: 'screenlockEnabled', callback: Callback\<boolean>): void; | 新增 |
| ohos.screenLock | on_changeUser | on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<number>): void; | 新增 |
| ohos.screenLock | on_endSleep | on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<number>): void; | 新增 |
| ohos.screenLock | on_beginSleep | on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback\<number>): void; | 新增 |
| ohos.screenLock | on_beginExitAnimation | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_unlockScreen | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_endScreenOff | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_beginScreenOff | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_endScreenOn | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_beginScreenOn | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_endWakeUp | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
| ohos.screenLock | on_beginWakeUp | on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback\<void>): void; | 新增 |
# 资源调度子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,资源调度子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.bundleState | bundleState | getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback\<Array\<BundleActiveModuleInfo>>): void;<br>getRecentlyUsedModules(maxNum?: number): Promise\<Array\<BundleActiveModuleInfo>>; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | formRecords: Array\<BundleActiveFormInfo>; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | lastModuleUsedTime: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | launchedCount: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | abilityIconId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | abilityDescriptionId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | abilityLableId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | descriptionId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | labelId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | appLabelId?: number; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | abilityName?: string; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | moduleName: string; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | bundleName: string; | 新增 |
| ohos.bundleState | BundleActiveModuleInfo | deviceId?: string; | 新增 |
| ohos.bundleState | BundleActiveFormInfo | count: number; | 新增 |
| ohos.bundleState | BundleActiveFormInfo | formLastUsedTime: number; | 新增 |
| ohos.bundleState | BundleActiveFormInfo | formId: number; | 新增 |
| ohos.bundleState | BundleActiveFormInfo | formDimension: number; | 新增 |
| ohos.bundleState | BundleActiveFormInfo | formName: string; | 新增 |
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_LOW_OR_OKAY | 新增 |
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_OKAY | 新增 |
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_LOW = 0 | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_LOW_OR_OKAY | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_OKAY | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_LOW = 0 | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_WIRELESS | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_USB | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_AC | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_ANY = 0 | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_ETHERNET | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_WIFI_P2P | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_BLUETOOTH | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_WIFI | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_MOBILE | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_ANY = 0 | 新增 |
| ohos.workScheduler | workScheduler | isLastWorkTimeOut(workId: number, callback: AsyncCallback\<void>): boolean;<br>isLastWorkTimeOut(workId: number): Promise\<boolean>; | 新增 |
| ohos.workScheduler | workScheduler | stopAndClearWorks(): boolean; | 新增 |
| ohos.workScheduler | workScheduler | obtainAllWorks(callback: AsyncCallback\<void>): Array\<WorkInfo>;<br>obtainAllWorks(): Promise\<Array\<WorkInfo>>; | 新增 |
| ohos.workScheduler | workScheduler | getWorkStatus(workId: number, callback: AsyncCallback\<WorkInfo>): void;<br>getWorkStatus(workId: number): Promise\<WorkInfo>; | 新增 |
| ohos.workScheduler | workScheduler | stopWork(work: WorkInfo, needCancel?: boolean): boolean; | 新增 |
| ohos.workScheduler | workScheduler | startWork(work: WorkInfo): boolean; | 新增 |
| ohos.workScheduler | WorkInfo | idleWaitTime?: number; | 新增 |
| ohos.workScheduler | WorkInfo | isDeepIdle?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | repeatCount?: number; | 新增 |
| ohos.workScheduler | WorkInfo | isRepeat?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | repeatCycleTime?: number; | 新增 |
| ohos.workScheduler | WorkInfo | storageRequest?: StorageRequest; | 新增 |
| ohos.workScheduler | WorkInfo | batteryStatus?: BatteryStatus; | 新增 |
| ohos.workScheduler | WorkInfo | batteryLevel?: number; | 新增 |
| ohos.workScheduler | WorkInfo | chargerType?: ChargingType; | 新增 |
| ohos.workScheduler | WorkInfo | isCharging?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | networkType?: NetworkType; | 新增 |
| ohos.workScheduler | WorkInfo | isPersisted?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | abilityName: string; | 新增 |
| ohos.workScheduler | WorkInfo | bundleName: string; | 新增 |
| ohos.workScheduler | WorkInfo | workId: number; | 新增 |
| ohos.WorkSchedulerExtensionAbility | WorkSchedulerExtensionAbility | onWorkStop(work: workScheduler.WorkInfo): void; | 新增 |
| ohos.WorkSchedulerExtensionAbility | WorkSchedulerExtensionAbility | onWorkStart(work: workScheduler.WorkInfo): void; | 新增 |
# 分布式软总线子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,分布式软总线子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.rpc | Ashmem | readFromAshmem(size: number, offset: number): number[]; | 新增 |
| ohos.rpc | Ashmem | writeToAshmem(buf: number[], size: number, offset: number): boolean; | 新增 |
| ohos.rpc | Ashmem | setProtection(protectionType: number): boolean; | 新增 |
| ohos.rpc | Ashmem | mapReadOnlyAshmem(): boolean; | 新增 |
| ohos.rpc | Ashmem | mapReadAndWriteAshmem(): boolean; | 新增 |
| ohos.rpc | Ashmem | mapAshmem(mapType: number): boolean; | 新增 |
| ohos.rpc | Ashmem | getAshmemSize(): number; | 新增 |
| ohos.rpc | Ashmem | unmapAshmem(): void; | 新增 |
| ohos.rpc | Ashmem | closeAshmem(): void; | 新增 |
| ohos.rpc | Ashmem | static createAshmemFromExisting(ashmem: Ashmem): Ashmem; | 新增 |
| ohos.rpc | Ashmem | static createAshmem(name: string, size: number): Ashmem; | 新增 |
| ohos.rpc | Ashmem | PROT_WRITE = 2; | 新增 |
| ohos.rpc | Ashmem | PROT_READ = 1; | 新增 |
| ohos.rpc | Ashmem | PROT_NONE = 0; | 新增 |
| ohos.rpc | Ashmem | PROT_EXEC = 4; | 新增 |
| ohos.rpc | IPCSkeleton | static getCallingTokenId(): number; | 新增 |
| ohos.rpc | SendRequestResult | reply: MessageParcel; | 新增 |
| ohos.rpc | SendRequestResult | data: MessageParcel; | 新增 |
| ohos.rpc | SendRequestResult | code: number; | 新增 |
| ohos.rpc | SendRequestResult | errCode: number; | 新增 |
| ohos.rpc | MessageParcel | readRawData(size: number): number[]; | 新增 |
| ohos.rpc | MessageParcel | writeRawData(rawData: number[], size: number): boolean; | 新增 |
| ohos.rpc | MessageParcel | getRawDataCapacity(): number; | 新增 |
| ohos.rpc | MessageParcel | readAshmem(): Ashmem; | 新增 |
| ohos.rpc | MessageParcel | writeAshmem(ashmem: Ashmem): boolean; | 新增 |
| ohos.rpc | MessageParcel | readFileDescriptor(): number; | 新增 |
| ohos.rpc | MessageParcel | writeFileDescriptor(fd: number): boolean; | 新增 |
| ohos.rpc | MessageParcel | containFileDescriptors(): boolean; | 新增 |
| ohos.rpc | MessageParcel | static dupFileDescriptor(fd: number) :number; | 新增 |
| ohos.rpc | MessageParcel | static closeFileDescriptor(fd: number): void; | 新增 |
| ohos.rpc | MessageParcel | readRemoteObjectArray(objects: IRemoteObject[]): void;<br>readRemoteObjectArray(): IRemoteObject[]; | 新增 |
| ohos.rpc | MessageParcel | readSequenceableArray(sequenceableArray: Sequenceable[]): void; | 新增 |
| ohos.rpc | MessageParcel | writeRemoteObjectArray(objectArray: IRemoteObject[]): boolean; | 新增 |
| ohos.rpc | MessageParcel | readException(): void; | 新增 |
| ohos.rpc | MessageParcel | writeNoException(): void; | 新增 |
# 测试框架子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,测试框架子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.uitest | UiDriver | drag(startx: number, starty: number, endx: number, endy: number): Promise\<void>; | 新增 |
| ohos.uitest | UiDriver | waitForComponent(by: By, time: number): Promise\<UiComponent>; | 新增 |
| ohos.uitest | UiComponent | dragTo(target: UiComponent): Promise\<void>; | 新增 |
| ohos.uitest | UiComponent | getBounds(): Promise\<Rect>; | 新增 |
| ohos.uitest | UiComponent | scrollToBottom(): Promise\<void>; | 新增 |
| ohos.uitest | UiComponent | scrollToTop(): Promise\<void>; | 新增 |
| ohos.uitest | UiComponent | clearText(): Promise\<void>; | 新增 |
| ohos.uitest | UiComponent | isCheckable(): Promise\<bool>; | 新增 |
| ohos.uitest | UiComponent | isChecked(): Promise\<bool>; | 新增 |
| ohos.uitest | UiComponent | isLongClickable(): Promise\<bool>; | 新增 |
| ohos.uitest | By | checkable(b?: bool): By; | 新增 |
| ohos.uitest | By | checked(b?: bool): By; | 新增 |
| ohos.uitest | By | longClickable(b?: bool): By; | 新增 |
| ohos.uitest | Rect | readonly bottomY: number; | 新增 |
| ohos.uitest | Rect | readonly rightX: number; | 新增 |
| ohos.uitest | Rect | readonly topY: number; | 新增 |
| ohos.uitest | Rect | readonly leftX: number; | 新增 |
# Web子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,Web子系统的API变更如下:
## 接口变更
| 模块名* | 类名 | 函数* | 变更类型 |
|---|---|---|---|
| web | WebAttribute | "onShowFileSelector(callback: (event?: { result: FileSelectorResult, fileSelector: FileSelectorParam }) => boolean): WebAttribute;" | 新增 |
| web | WebAttribute | webDebuggingAccess(webDebuggingAccess: boolean): WebAttribute; | 新增 |
| web | WebAttribute | fileFromUrlAccess(fileFromUrlAccess: boolean): WebAttribute; | 新增 |
| web | WebController | getCookieManager() : WebCookie | 新增 |
| web | WebCookie | deleteExpiredCookie(): void; | 新增 |
| web | WebCookie | deleteSessionCookie(): void; | 新增 |
| web | WebCookie | deleteEntireCookie(): void; | 新增 |
| web | WebCookie | existCookie(): boolean; | 新增 |
| web | WebCookie | getCookie(url: string): string; | 新增 |
| web | WebCookie | saveCookieSync(): boolean; | 新增 |
| web | WebCookie | putAcceptFileURICookieEnabled(accept: boolean): void; | 新增 |
| web | WebCookie | putAcceptThirdPartyCookieEnabled(accept: boolean): void; | 新增 |
| web | WebCookie | putAcceptCookieEnabled(accept: boolean): void; | 新增 |
| web | WebCookie | isFileURICookieAllowed(): boolean; | 新增 |
| web | WebCookie | isThirdPartyCookieAllowed(): boolean; | 新增 |
| web | WebCookie | isCookieAllowed(): boolean; | 新增 |
| web | FileSelectorResult | handleFileList(fileList: Array\<string>): void; | 新增 |
| web | FileSelectorResult | constructor(); | 新增 |
| web | FileSelectorParam | isCapture(): boolean; | 新增 |
| web | FileSelectorParam | getAcceptType(): Array\<string>; | 新增 |
| web | FileSelectorParam | getMode(): FileSelectorMode; | 新增 |
| web | FileSelectorParam | getTitle(): string; | 新增 |
| web | FileSelectorParam | constructor(); | 新增 |
| web | FileSelectorMode | FileSaveMode | 新增 |
| web | FileSelectorMode | FileOpenFolderMode | 新增 |
| web | FileSelectorMode | FileOpenMultipleMode | 新增 |
| web | FileSelectorMode | FileOpenMode | 新增 |
| web | RenderExitReason | ProcessExitUnknown | 新增 |
| web | RenderExitReason | ProcessOom | 新增 |
| web | RenderExitReason | ProcessCrashed | 新增 |
| web | RenderExitReason | ProcessWasKilled | 新增 |
| web | RenderExitReason | ProcessAbnormalTermination | 新增 |
| web | CacheMode | Default | 新增 |
| web | WebAttribute | onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void): WebAttribute; | 废弃 |
| web | WebAttribute | onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void): WebAttribute; | 废弃 |
| web | WebAttribute | onRenderExited(callback: (event?: { detail: object }) => boolean): WebAttribute; | 废弃 |
| web | WebCookie | saveCookie(); | 废弃 |
| web | WebCookie | setCookie(); | 废弃 |
\ No newline at end of file
# 窗口管理子系统JS API变更
OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,窗口管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.screen | ScreenModeInfo | refreshRate: number; | 新增 |
| ohos.screen | ScreenModeInfo | height: number; | 新增 |
| ohos.screen | ScreenModeInfo | width: number; | 新增 |
| ohos.screen | ScreenModeInfo | id: number; | 新增 |
| ohos.screen | Orientation | SENSOR_HORIZONTAL = 7 | 新增 |
| ohos.screen | Orientation | SENSOR_VERTICAL = 6 | 新增 |
| ohos.screen | Orientation | SENSOR = 5 | 新增 |
| ohos.screen | Orientation | REVERSE_HORIZONTAL = 4 | 新增 |
| ohos.screen | Orientation | REVERSE_VERTICAL = 3 | 新增 |
| ohos.screen | Orientation | HORIZONTAL = 2 | 新增 |
| ohos.screen | Orientation | VERTICAL = 1 | 新增 |
| ohos.screen | Orientation | UNSPECIFIED = 0 | 新增 |
| ohos.screen | Screen | setScreenActiveMode(modeIndex: number, callback: AsyncCallback\<void>): void;<br>setScreenActiveMode(modeIndex: number): Promise\<void>; | 新增 |
| ohos.screen | Screen | setOrientation(orientation: Orientation, callback: AsyncCallback\<void>): void;<br>setOrientation(orientation: Orientation): Promise\<void>; | 新增 |
| ohos.screen | Screen | readonly orientation: Orientation; | 新增 |
| ohos.screen | Screen | readonly activeModeIndex: number; | 新增 |
| ohos.screen | Screen | readonly supportedModeInfo: Array\<ScreenModeInfo>; | 新增 |
| ohos.screen | Screen | readonly parent: number; | 新增 |
| ohos.screen | Screen | readonly id: number; | 新增 |
| ohos.screen | ExpandOption | startY: number; | 新增 |
| ohos.screen | ExpandOption | startX: number; | 新增 |
| ohos.screen | ExpandOption | screenId: number; | 新增 |
| ohos.screen | screen | function makeMirror(mainScreen:number, mirrorScreen:Array\<number>, callback: AsyncCallback\<number>): void;<br>function makeMirror(mainScreen:number, mirrorScreen:Array\<number>): Promise\<number>; | 新增 |
| ohos.screen | screen | function makeExpand(options:Array\<ExpandOption>, callback: AsyncCallback\<number>): void;<br>function makeExpand(options:Array\<ExpandOption>): Promise\<number>; | 新增 |
| ohos.screen | screen | function off(eventType: 'connect' \| 'disconnect' \| 'change', callback?: Callback\<number>): void; | 新增 |
| ohos.screen | screen | function getAllScreens(callback: AsyncCallback\<Array\<Screen>>): void;<br>function getAllScreens(): Promise\<Array\<Screen>>; | 新增 |
| ohos.window | WindowStage | loadContent(path: string, storage: LocalStorage, callback: AsyncCallback\<void>): void;<br>loadContent(path: string, storage?: LocalStorage): Promise\<void>;<br>loadContent(path: string, callback: AsyncCallback\<void>): void; | 新增 |
| ohos.window | WindowStage | getSubWindow(): Promise\<Array\<Window>>;<br>getSubWindow(callback: AsyncCallback\<Array\<Window>>): void; | 新增 |
| ohos.window | WindowStage | createSubWindow(name: string): Promise\<Window>;<br>createSubWindow(name: string, callback: AsyncCallback\<Window>): void; | 新增 |
| ohos.window | WindowStage | getMainWindow(): Promise\<Window>;<br>getMainWindow(callback: AsyncCallback\<Window>): void; | 新增 |
| ohos.window | WindowStageEventType | BACKGROUND | 新增 |
| ohos.window | WindowStageEventType | INACTIVE | 新增 |
| ohos.window | WindowStageEventType | ACTIVE | 新增 |
| ohos.window | WindowStageEventType | FOREGROUND = 1 | 新增 |
| ohos.window | window | function setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback\<void>): void;<br>function setWindowLayoutMode(mode: WindowLayoutMode): Promise\<void>; | 新增 |
| ohos.window | window | function toggleShownStateForAllAppWindows(callback: AsyncCallback\<void>): void;<br>function toggleShownStateForAllAppWindows(): Promise\<void>; | 新增 |
| ohos.window | window | function minimizeAll(id: number, callback: AsyncCallback\<void>): void;<br>function minimizeAll(id: number): Promise\<void>; | 新增 |
| ohos.window | WindowLayoutMode | WINDOW_LAYOUT_MODE_TILE | 新增 |
| ohos.window | WindowLayoutMode | WINDOW_LAYOUT_MODE_CASCADE | 新增 |
| ohos.window | Window | setOutsideTouchable(touchable: boolean): Promise\<void>;<br>setOutsideTouchable(touchable: boolean, callback: AsyncCallback\<void>): void; | 废弃 |
| ohos.window | Window | setDimBehind(dimBehindValue: number, callback: AsyncCallback\<void>): void;<br>setDimBehind(dimBehindValue: number): Promise\<void>; | 废弃 |
| ohos.window | WindowProperties | dimBehindValue: number | 废弃 |
# Native API 差异报告
OpenHarmony 3.2 Beta1相较于OpenHarmony 3.1 Release版本的API变更如下:
## 标准系统接口变更
| 模块名称 | 接口名称 | 变更类型 | 变更说明 |
| -------- | ------------------------------------------------------------ | -------- | ----------------------------------------------- |
| ArkUI-xcomponent | int32_t OH_NativeXComponent_GetMouseEvent(<br/> OH_NativeXComponent* component, const void* window, OH_NativeXComponent_MouseEvent* mouseEvent) | 新增 | 通过XComponent获取鼠标事件 |
| ArkUI-xcomponent | int32_t OH_NativeXComponent_RegisterMouseEventCallback(<br/> OH_NativeXComponent* component, OH_NativeXComponent_MouseEvent_Callback* callback) | 新增 | 注册XComponent回调事件 |
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册