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

!7791 升级添加系统接口标识+vod处理

Merge pull request !7791 from LiAn/OpenHarmony-3.1-Release
# 升级 # 升级
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
升级范围:升级整个系统,包括内置的资源、预置应用;第三方的应用不在升级的范围。 升级范围:升级整个系统,包括内置的资源、预置应用;第三方的应用不在升级的范围。
升级依赖:升级分为SD卡升级和在线升级两种。 升级依赖:升级分为SD卡升级和在线升级两种。
...@@ -10,6 +7,12 @@ ...@@ -10,6 +7,12 @@
- SD卡升级依赖升级包和SD卡安装。 - SD卡升级依赖升级包和SD卡安装。
- 在线升级依赖设备厂商部署的用于管理升级包的服务器。服务器由设备厂商部署,IP由调用者传入,请求的request接口是固定的,由设备厂商开发。 - 在线升级依赖设备厂商部署的用于管理升级包的服务器。服务器由设备厂商部署,IP由调用者传入,请求的request接口是固定的,由设备厂商开发。
> **说明:**
>
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> 本模块接口为系统接口。
## 导入模块 ## 导入模块
```js ```js
...@@ -43,7 +46,7 @@ getUpdater(upgradeFile: string, updateType?: UpdateTypes): Updater ...@@ -43,7 +46,7 @@ getUpdater(upgradeFile: string, updateType?: UpdateTypes): Updater
**示例:** **示例:**
``` ```js
try { try {
let updater = update.getUpdater('/data/updater/updater.zip', 'OTA'); let updater = update.getUpdater('/data/updater/updater.zip', 'OTA');
} catch(error) { } catch(error) {
...@@ -75,7 +78,7 @@ getUpdaterForOther(upgradeFile: string, device: string, updateType?: UpdateTypes ...@@ -75,7 +78,7 @@ getUpdaterForOther(upgradeFile: string, device: string, updateType?: UpdateTypes
**示例:** **示例:**
``` ```js
try { try {
let updater = update.getUpdaterForOther('/data/updater/updater.zip', '1234567890', 'OTA'); let updater = update.getUpdaterForOther('/data/updater/updater.zip', '1234567890', 'OTA');
} catch(error) { } catch(error) {
...@@ -107,7 +110,7 @@ getUpdaterFromOther(upgradeFile: string, device: string, updateType?: UpdateType ...@@ -107,7 +110,7 @@ getUpdaterFromOther(upgradeFile: string, device: string, updateType?: UpdateType
**示例:** **示例:**
``` ```js
try { try {
let updater = update.getUpdaterFromOther('/data/updater/updater.zip', '1234567890', 'OTA'); let updater = update.getUpdaterFromOther('/data/updater/updater.zip', '1234567890', 'OTA');
} catch(error) { } catch(error) {
...@@ -133,7 +136,7 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void ...@@ -133,7 +136,7 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void
**示例:** **示例:**
``` ```js
updater.getNewVersionInfo((err, info) => { updater.getNewVersionInfo((err, info) => {
console.log("getNewVersionInfo success " + info.status); console.log("getNewVersionInfo success " + info.status);
console.log(`info versionName = ` + info.checkResults[0].versionName); console.log(`info versionName = ` + info.checkResults[0].versionName);
...@@ -158,7 +161,7 @@ getNewVersionInfo(): Promise\<NewVersionInfo> ...@@ -158,7 +161,7 @@ getNewVersionInfo(): Promise\<NewVersionInfo>
**示例:** **示例:**
``` ```js
updater.getNewVersionInfo().then(value => { updater.getNewVersionInfo().then(value => {
console.log(`info versionName = ` + value.checkResults[0].versionName); console.log(`info versionName = ` + value.checkResults[0].versionName);
console.log(`info versionCode = ` + value.checkResults[0].versionCode); console.log(`info versionCode = ` + value.checkResults[0].versionCode);
...@@ -184,7 +187,7 @@ checkNewVersion(callback: AsyncCallback\<NewVersionInfo>): void ...@@ -184,7 +187,7 @@ checkNewVersion(callback: AsyncCallback\<NewVersionInfo>): void
**示例:** **示例:**
``` ```js
updater.checkNewVersion((err, info) => { updater.checkNewVersion((err, info) => {
console.log("checkNewVersion success " + info.status); console.log("checkNewVersion success " + info.status);
console.log(`info versionName = ` + info.checkResults[0].versionName); console.log(`info versionName = ` + info.checkResults[0].versionName);
...@@ -209,7 +212,7 @@ checkNewVersion(): Promise\<NewVersionInfo> ...@@ -209,7 +212,7 @@ checkNewVersion(): Promise\<NewVersionInfo>
**示例:** **示例:**
``` ```js
updater.checkNewVersion().then(value => { updater.checkNewVersion().then(value => {
console.log(`info versionName = ` + value.checkResults[0].versionName); console.log(`info versionName = ` + value.checkResults[0].versionName);
console.log(`info versionCode = ` + value.checkResults[0].versionCode); console.log(`info versionCode = ` + value.checkResults[0].versionCode);
...@@ -236,7 +239,7 @@ verifyUpdatePackage(upgradeFile: string, certsFile: string): void ...@@ -236,7 +239,7 @@ verifyUpdatePackage(upgradeFile: string, certsFile: string): void
**示例:** **示例:**
``` ```js
updater.on("verifyProgress", callback => { updater.on("verifyProgress", callback => {
console.info('on verifyProgress ' + callback.percent); console.info('on verifyProgress ' + callback.percent);
}); });
...@@ -259,7 +262,7 @@ rebootAndCleanUserData(): Promise\<number> ...@@ -259,7 +262,7 @@ rebootAndCleanUserData(): Promise\<number>
**示例:** **示例:**
``` ```js
updater.rebootAndCleanUserData().then(result => { updater.rebootAndCleanUserData().then(result => {
console.log("rebootAndCleanUserData " + result); console.log("rebootAndCleanUserData " + result);
}).catch(err => { }).catch(err => {
...@@ -283,7 +286,7 @@ rebootAndCleanUserData(callback: AsyncCallback\<number>): void ...@@ -283,7 +286,7 @@ rebootAndCleanUserData(callback: AsyncCallback\<number>): void
**示例:** **示例:**
``` ```js
updater.rebootAndCleanUserData((err, result) => { updater.rebootAndCleanUserData((err, result) => {
console.log("rebootAndCleanUserData ", result) console.log("rebootAndCleanUserData ", result)
}); });
...@@ -305,7 +308,7 @@ applyNewVersion(): Promise\<number> ...@@ -305,7 +308,7 @@ applyNewVersion(): Promise\<number>
**示例:** **示例:**
``` ```js
updater.applyNewVersion().then(result => { updater.applyNewVersion().then(result => {
console.log("appVewVersion ", result) console.log("appVewVersion ", result)
}).catch(err => { }).catch(err => {
...@@ -329,7 +332,7 @@ applyNewVersion(callback: AsyncCallback\<number>): void ...@@ -329,7 +332,7 @@ applyNewVersion(callback: AsyncCallback\<number>): void
**示例:** **示例:**
``` ```js
updater.applyNewVersion((err, result) => { updater.applyNewVersion((err, result) => {
console.log("applyNewVersion ", result) console.log("applyNewVersion ", result)
}); });
...@@ -345,7 +348,7 @@ download(): void ...@@ -345,7 +348,7 @@ download(): void
**示例:** **示例:**
``` ```js
updater.on("downloadProgress", progress => { updater.on("downloadProgress", progress => {
console.log("downloadProgress on" + progress); console.log("downloadProgress on" + progress);
console.log(`downloadProgress status: ` + progress.status); console.log(`downloadProgress status: ` + progress.status);
...@@ -364,7 +367,7 @@ upgrade():void ...@@ -364,7 +367,7 @@ upgrade():void
**示例:** **示例:**
``` ```js
updater.on("upgradeProgress", progress => { updater.on("upgradeProgress", progress => {
console.log("upgradeProgress on" + progress); console.log("upgradeProgress on" + progress);
console.log(`upgradeProgress status: ` + progress.status); console.log(`upgradeProgress status: ` + progress.status);
...@@ -390,7 +393,7 @@ setUpdatePolicy(policy: UpdatePolicy, callback: AsyncCallback\<number>): void ...@@ -390,7 +393,7 @@ setUpdatePolicy(policy: UpdatePolicy, callback: AsyncCallback\<number>): void
**示例:** **示例:**
``` ```js
// 设置策略 // 设置策略
let policy = { let policy = {
autoDownload: false, autoDownload: false,
...@@ -426,7 +429,7 @@ setUpdatePolicy(policy: UpdatePolicy): Promise\<number> ...@@ -426,7 +429,7 @@ setUpdatePolicy(policy: UpdatePolicy): Promise\<number>
**示例:** **示例:**
``` ```js
let policy = { let policy = {
autoDownload: false, autoDownload: false,
autoDownloadNet: true, autoDownloadNet: true,
...@@ -457,7 +460,7 @@ getUpdatePolicy(callback: AsyncCallback\<UpdatePolicy>): void ...@@ -457,7 +460,7 @@ getUpdatePolicy(callback: AsyncCallback\<UpdatePolicy>): void
**示例:** **示例:**
``` ```js
updater.getUpdatePolicy((err, policy) => { updater.getUpdatePolicy((err, policy) => {
console.log("getUpdatePolicy success"); console.log("getUpdatePolicy success");
console.log(`policy autoDownload = ` + policy.autoDownload); console.log(`policy autoDownload = ` + policy.autoDownload);
...@@ -482,7 +485,7 @@ getUpdatePolicy(): Promise\<UpdatePolicy> ...@@ -482,7 +485,7 @@ getUpdatePolicy(): Promise\<UpdatePolicy>
**示例:** **示例:**
``` ```js
updater.getUpdatePolicy().then(value => { updater.getUpdatePolicy().then(value => {
console.log(`info autoDownload = ` + value.autoDownload); console.log(`info autoDownload = ` + value.autoDownload);
console.log(`info autoDownloadNet = ` + value.autoDownloadNet); console.log(`info autoDownloadNet = ` + value.autoDownloadNet);
...@@ -496,7 +499,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -496,7 +499,7 @@ updater.getUpdatePolicy().then(value => {
升级类型。 升级类型。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 说明 | | 参数名 | 说明 |
| ----- | ----- | | ----- | ----- |
...@@ -507,7 +510,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -507,7 +510,7 @@ updater.getUpdatePolicy().then(value => {
升级包类型。 升级包类型。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 | | 参数名 | 默认值 | 说明 |
| -------------------- | ---- | ------- | | -------------------- | ---- | ------- |
...@@ -523,7 +526,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -523,7 +526,7 @@ updater.getUpdatePolicy().then(value => {
安装模式。 安装模式。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 | | 参数名 | 默认值 | 说明 |
| ------------------- | ---- | ---- | | ------------------- | ---- | ---- |
...@@ -535,7 +538,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -535,7 +538,7 @@ updater.getUpdatePolicy().then(value => {
新版本检测状态。 新版本检测状态。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 | | 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- | | ------------------- | ---- | -------- |
...@@ -548,7 +551,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -548,7 +551,7 @@ updater.getUpdatePolicy().then(value => {
升级策略。 升级策略。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 | | 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- | | ------------------- | --------------------------- | ---- | ------- |
...@@ -560,7 +563,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -560,7 +563,7 @@ updater.getUpdatePolicy().then(value => {
新版本信息。 新版本信息。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 | | 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ---------------------------------------- | ---- | ---- | | --------------- | ---------------------------------------- | ---- | ---- |
...@@ -573,7 +576,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -573,7 +576,7 @@ updater.getUpdatePolicy().then(value => {
检测结果。 检测结果。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 | | 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ----------------------------- | ---- | ------ | | ------------- | ----------------------------- | ---- | ------ |
...@@ -588,7 +591,7 @@ updater.getUpdatePolicy().then(value => { ...@@ -588,7 +591,7 @@ updater.getUpdatePolicy().then(value => {
版本描述信息。 版本描述信息。
**系统能力**以下各项对应的系统能力均为:SystemCapability.Update.UpdateService **系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 | | 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ------ | ---- | ------------- | | ------------- | ------ | ---- | ------------- |
......
...@@ -25,31 +25,23 @@ Grid() ...@@ -25,31 +25,23 @@ Grid()
## 属性 ## 属性
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- | | ---------------------------------------- | ------- | ----- | ---------------------------------------- |
| columnsTemplate | string | '1fr' | 用于设置当前网格布局列的数量,不设置时默认1列&nbsp;示例,&nbsp;'1fr&nbsp;1fr&nbsp;2fr'&nbsp;分三列,将父组件允许的宽分为4等份,第一列占1份,第二列占一份,第三列占2份。 | | columnsTemplate | string | '1fr' | 用于设置当前网格布局列的数量,不设置时默认1列&nbsp;示例,&nbsp;'1fr&nbsp;1fr&nbsp;2fr'&nbsp;分三列,将父组件允许的宽分为4等份,第一列占1份,第二列占一份,第三列占2份。 |
| rowsTemplate | string | '1fr' | 用于设置当前网格布局行的数量,不设置时默认1行&nbsp;示例,&nbsp;'1fr&nbsp;1fr&nbsp;2fr'分三行,将父组件允许的高分为4等份,第一行占1份,第二行占一份,第三行占2份。 | | rowsTemplate | string | '1fr' | 用于设置当前网格布局行的数量,不设置时默认1行&nbsp;示例,&nbsp;'1fr&nbsp;1fr&nbsp;2fr'分三行,将父组件允许的高分为4等份,第一行占1份,第二行占一份,第三行占2份。 |
| columnsGap | Length | 0 | 用于设置列与列的间距。 | | columnsGap | Length | 0 | 用于设置列与列的间距。 |
| rowsGap | Length | 0 | 用于设置行与行的间距。 | | rowsGap | Length | 0 | 用于设置行与行的间距。 |
| editMode <font color=ff0000><sup>8+</sup></font> | boolean | flase | 是否进入编辑模式,进入编辑模式可以拖拽Gird组件内部[GridItem](ts-container-griditem.md)。 | | editMode <sup>8+</sup> | boolean | flase | 是否进入编辑模式,进入编辑模式可以拖拽Gird组件内部[GridItem](ts-container-griditem.md)。 |
| layoutDirection<font color=ff0000><sup>8+</sup></font> | number | 0 |设置布局的主轴方向,目前支持的主轴布局方向如下:<br/>- 0:主轴布局方向沿水平方向布局,即先填满一列,再去填下一列。<br/>- 1:主轴布局方向沿垂直方向布局,即先填满一行,再去填下一行。| | layoutDirection<sup>8+</sup> | number | 0 | 设置布局的主轴方向,目前支持的主轴布局方向如下:<br/>- 0:主轴布局方向沿水平方向布局,即先填满一列,再去填下一列。<br/>- 1:主轴布局方向沿垂直方向布局,即先填满一行,再去填下一行。 |
| maxCount <font color=ff0000><sup>8+</sup></font> | number | 1 | 当layoutDirection是0时,表示可显示的最大行数<br/>当layoutDirection是1时,表示可显示的最大列数。 | | maxCount <font color=ff0000><sup>8+</sup></font> | number | 1 | 当layoutDirection是0时,表示可显示的最大行数<br/>当layoutDirection是1时,表示可显示的最大列数。 |
| minCount <font color=ff0000><sup>8+</sup></font> | number | 1 | 当layoutDirection是0时,表示可显示的最小行数。<br/>当layoutDirection是1时,表示可显示的最小列数。 | | minCount <font color=ff0000><sup>8+</sup></font> | number | 1 | 当layoutDirection是0时,表示可显示的最小行数。<br/>当layoutDirection是1时,表示可显示的最小列数。 |
| cellLength <font color=ff0000><sup>8+</sup></font> | number | 0 | 当layoutDirection是0时,表示一行的高度。<br/>当layoutDirection是1时,表示一列的宽度。 | | cellLength <font color=ff0000><sup>8+</sup></font> | number | 0 | 当layoutDirection是0时,表示一行的高度。<br/>当layoutDirection是1时,表示一列的宽度。 |
| multiSelectable<font color=ff0000><sup>8+</sup></font> | boolean | false | 是否开启鼠标框选。<br/>-&nbsp;false:关闭框选。<br/>-&nbsp;true:开启框选。 | | multiSelectable<font color=ff0000><sup>8+</sup></font> | boolean | false | 是否开启鼠标框选。<br/>-&nbsp;false:关闭框选。<br/>-&nbsp;true:开启框选。 |
| dragAnimation<font color=ff0000><sup>8+</sup></font> | boolean | false | 是否开启拖拽GridItem动画。 |
| edgeEffection<font color=ff0000><sup>8+</sup></font> | EdgeEffect | EdgeEffect.Spring | 设置边缘滑动效果,目前支持的滑动效果参见EdgeEffect枚举说明。 |
- EdgeEffect枚举说明
| 名称 | 描述 |
| -------- | -------- |
| Spring | 弹性物理动效,滑动到边缘后可以根据初始速度或通过触摸事件继续滑动一段距离,松手后回弹。 |
| None | 滑动到边缘后无效果。 |
## 事件 ## 事件
| 名称 | 功能描述 | | 名称 | 功能描述 |
| -------- | -------- | | ---------------------------------------- | ----------------------- |
| onScrollIndex(first:&nbsp;number)&nbsp;=&gt;&nbsp;void | 当前列表显示的起始位置item发生变化时触发。 | | onScrollIndex(first:&nbsp;number)&nbsp;=&gt;&nbsp;void | 当前列表显示的起始位置item发生变化时触发。 |
## 示例 ## 示例
......
# Path # Path
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** > **说明:**
>
> 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
路径绘制组件。 路径绘制组件。
## 权限列表 ## 子组件
## 接口
## 子组件 Path(value?: { width?: number | string, height?: number | string, commands?: string })
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | ---------------- | ---- | ---- | ----------- |
| width | number \| string | 否 | 0 | 路径所在矩形的宽度。 |
| height | number \| string | 否 | 0 | 路径所在矩形的高度。 |
| commands | string | 否 | '' | 路径绘制的命令字符串。 |
## 属性 ## 属性
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | ---------------- | ---- | ---- | ----------- |
| width | Length | 0 | 否 | 路径所在矩形的宽度。 | | width | number \| string | 0 | 否 | 路径所在矩形的宽度。 |
| height | Length | 0 | 否 | 路径所在矩形的高度。 | | height | number \| string | 0 | 否 | 路径所在矩形的高度。 |
| commands | string | '' | 是 | 路径绘制的命令字符串。 | | commands | string | '' | 否 | 路径绘制的命令字符串。 |
支持的绘制命令如下: 支持的绘制命令如下:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册