diff --git a/docs/apis/base/arrayBufferToBase64.md b/docs/apis/base/arrayBufferToBase64.md index 58dd07ff7a11..2955d036f784 100644 --- a/docs/apis/base/arrayBufferToBase64.md +++ b/docs/apis/base/arrayBufferToBase64.md @@ -5,7 +5,7 @@ sidebar_label: arrayBufferToBase64 将 ArrayBuffer 数据转成 Base64 字符串。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.arrayBufferToBase64.html) diff --git a/docs/apis/base/base64ToArrayBuffer.md b/docs/apis/base/base64ToArrayBuffer.md index 39e92a9f44f8..fcf1633ffaea 100644 --- a/docs/apis/base/base64ToArrayBuffer.md +++ b/docs/apis/base/base64ToArrayBuffer.md @@ -5,7 +5,7 @@ sidebar_label: base64ToArrayBuffer 将 Base64 字符串转成 ArrayBuffer 数据。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.base64ToArrayBuffer.html) diff --git a/docs/apis/base/canIUse.md b/docs/apis/base/canIUse.md index d83c01d5ae8b..b89e51018998 100644 --- a/docs/apis/base/canIUse.md +++ b/docs/apis/base/canIUse.md @@ -5,7 +5,7 @@ sidebar_label: canIUse 判断小程序的 API,回调,参数,组件等是否在当前版本可用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.canIUse.html) diff --git a/docs/apis/base/canIUseWebp.md b/docs/apis/base/canIUseWebp.md index 58441f957933..b9c40ce6347d 100644 --- a/docs/apis/base/canIUseWebp.md +++ b/docs/apis/base/canIUseWebp.md @@ -7,7 +7,7 @@ sidebar_label: canIUseWebp > 在小程序平台中仅在 android 和 devtools 设备时可用 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/base/debug/console.md b/docs/apis/base/debug/console.md index bfa70032e1d3..92124d77be67 100644 --- a/docs/apis/base/debug/console.md +++ b/docs/apis/base/debug/console.md @@ -9,7 +9,7 @@ sidebar_label: console - 由于 vConsole 功能有限,以及不同客户端对 console 方法的支持情况有差异,建议开发者在小程序中只使用本文档中提供的方法。 - 部分内容展示的限制请参见调试 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.html) @@ -19,7 +19,7 @@ sidebar_label: console 向调试面板中打印 debug 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.debug.html) @@ -35,7 +35,7 @@ sidebar_label: console 向调试面板中打印 error 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.error.html) @@ -54,7 +54,7 @@ sidebar_label: console **注意** 仅在工具中有效,在 vConsole 中为空函数实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.group.html) @@ -73,7 +73,7 @@ sidebar_label: console **注意** 仅在工具中有效,在 vConsole 中为空函数实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.groupEnd.html) @@ -85,7 +85,7 @@ sidebar_label: console 向调试面板中打印 info 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.info.html) @@ -101,7 +101,7 @@ sidebar_label: console 向调试面板中打印 log 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.log.html) @@ -117,7 +117,7 @@ sidebar_label: console 向调试面板中打印 warn 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.warn.html) @@ -131,13 +131,13 @@ sidebar_label: console ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| console | ✔️ | | | | | -| console.debug | ✔️ | | | | | -| console.error | ✔️ | | | | | -| console.group | ✔️ | | | | | -| console.groupEnd | ✔️ | | | | | -| console.info | ✔️ | | | | | -| console.log | ✔️ | ✔️ | | | | -| console.warn | ✔️ | | | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| console | ✔️ | | | | | ✔️ | +| console.debug | ✔️ | | | | | ✔️ | +| console.error | ✔️ | | | | | ✔️ | +| console.group | ✔️ | | | | | ✔️ | +| console.groupEnd | ✔️ | | | | | ✔️ | +| console.info | ✔️ | | | | | ✔️ | +| console.log | ✔️ | ✔️ | | | | ✔️ | +| console.warn | ✔️ | | | | | ✔️ | diff --git a/docs/apis/base/env/env.md b/docs/apis/base/env/env.md index 74c5e61622ab..03d188dc5b06 100644 --- a/docs/apis/base/env/env.md +++ b/docs/apis/base/env/env.md @@ -3,7 +3,7 @@ title: env sidebar_label: env --- -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/env/envObj.html) diff --git a/docs/apis/base/system/getAppAuthorizeSetting.md b/docs/apis/base/system/getAppAuthorizeSetting.md index 959bd67b3f3e..983d82044bea 100644 --- a/docs/apis/base/system/getAppAuthorizeSetting.md +++ b/docs/apis/base/system/getAppAuthorizeSetting.md @@ -9,7 +9,7 @@ sidebar_label: getAppAuthorizeSetting - 'denied' 表示请求授权被拒绝,无法再次请求授权;(此情况需要引导用户[打开系统设置](https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.openAppAuthorizeSetting.html),在设置页中打开权限) - 'non determined' 表示尚未请求授权,会在微信下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) -支持情况: +支持情况: > H5: 暂未支持设置权限 diff --git a/docs/apis/base/system/getAppBaseInfo.md b/docs/apis/base/system/getAppBaseInfo.md index f408f4308af1..43d921a92d09 100644 --- a/docs/apis/base/system/getAppBaseInfo.md +++ b/docs/apis/base/system/getAppBaseInfo.md @@ -5,7 +5,7 @@ sidebar_label: getAppBaseInfo 获取微信APP基础信息 -支持情况: +支持情况: > H5: 不支持 SDKVersion、host、version diff --git a/docs/apis/base/system/getSystemInfo.md b/docs/apis/base/system/getSystemInfo.md index 9f32cef2a79e..8280486b1d19 100644 --- a/docs/apis/base/system/getSystemInfo.md +++ b/docs/apis/base/system/getSystemInfo.md @@ -5,7 +5,7 @@ sidebar_label: getSystemInfo 获取系统信息,支持 `Promise` 化使用。 -支持情况: +支持情况: > 微信小程序: 小程序可以在微信和企业微信中调用此接口,但是在企业微信中调用此接口时,会额外返回一个 environment 字段(微信中不返回),如此字段值为 wxwork,则表示当前小程序运行在企业微信环境中。 > diff --git a/docs/apis/base/system/getSystemInfoSync.md b/docs/apis/base/system/getSystemInfoSync.md index 06250a223a5d..7fa5b114cea5 100644 --- a/docs/apis/base/system/getSystemInfoSync.md +++ b/docs/apis/base/system/getSystemInfoSync.md @@ -5,7 +5,7 @@ sidebar_label: getSystemInfoSync [Taro.getSystemInfo](./getSystemInfo) 的同步版本 -支持情况: +支持情况: > 微信小程序: 小程序可以在微信和企业微信中调用此接口,但是在企业微信中调用此接口时,会额外返回一个 environment 字段(微信中不返回),如此字段值为 wxwork,则表示当前小程序运行在企业微信环境中。 > diff --git a/docs/apis/base/system/getSystemSetting.md b/docs/apis/base/system/getSystemSetting.md index 580f96e60a7b..2e3bf8d15637 100644 --- a/docs/apis/base/system/getSystemSetting.md +++ b/docs/apis/base/system/getSystemSetting.md @@ -5,7 +5,7 @@ sidebar_label: getSystemSetting 获取设备设置 -支持情况: +支持情况: > H5: 不支持 bluetoothEnabled、locationEnabled、wifiEnabled diff --git a/docs/apis/base/system/getWindowInfo.md b/docs/apis/base/system/getWindowInfo.md index 177bcbd81674..687714585e12 100644 --- a/docs/apis/base/system/getWindowInfo.md +++ b/docs/apis/base/system/getWindowInfo.md @@ -5,7 +5,7 @@ sidebar_label: getWindowInfo 获取窗口信息 -支持情况: +支持情况: > H5: 不支持 statusBarHeight、safeArea diff --git a/docs/apis/base/weapp/app-event/offAppHide.md b/docs/apis/base/weapp/app-event/offAppHide.md index 6e9f09c0adae..d26e2e0b08b8 100644 --- a/docs/apis/base/weapp/app-event/offAppHide.md +++ b/docs/apis/base/weapp/app-event/offAppHide.md @@ -5,7 +5,7 @@ sidebar_label: offAppHide 取消监听小程序切后台事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppHide.html) diff --git a/docs/apis/base/weapp/app-event/offAppShow.md b/docs/apis/base/weapp/app-event/offAppShow.md index 949f7e2fcb05..87d33827b8ae 100644 --- a/docs/apis/base/weapp/app-event/offAppShow.md +++ b/docs/apis/base/weapp/app-event/offAppShow.md @@ -5,7 +5,7 @@ sidebar_label: offAppShow 取消监听小程序切前台事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppShow.html) diff --git a/docs/apis/base/weapp/app-event/offError.md b/docs/apis/base/weapp/app-event/offError.md index 0b017cf58487..eac8fc51901d 100644 --- a/docs/apis/base/weapp/app-event/offError.md +++ b/docs/apis/base/weapp/app-event/offError.md @@ -5,7 +5,7 @@ sidebar_label: offError 取消监听音频播放错误事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/InnerAudioContext.offError.html) diff --git a/docs/apis/base/weapp/app-event/offPageNotFound.md b/docs/apis/base/weapp/app-event/offPageNotFound.md index 88eebb301782..317c0ba9ecbb 100644 --- a/docs/apis/base/weapp/app-event/offPageNotFound.md +++ b/docs/apis/base/weapp/app-event/offPageNotFound.md @@ -5,7 +5,7 @@ sidebar_label: offPageNotFound 取消监听小程序要打开的页面不存在事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offPageNotFound.html) diff --git a/docs/apis/base/weapp/app-event/offUnhandledRejection.md b/docs/apis/base/weapp/app-event/offUnhandledRejection.md index 50795908e242..059bbe3af845 100644 --- a/docs/apis/base/weapp/app-event/offUnhandledRejection.md +++ b/docs/apis/base/weapp/app-event/offUnhandledRejection.md @@ -5,7 +5,7 @@ sidebar_label: offUnhandledRejection 取消监听未处理的 Promise 拒绝事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offUnhandledRejection.html) diff --git a/docs/apis/base/weapp/app-event/onAppHide.md b/docs/apis/base/weapp/app-event/onAppHide.md index d260c2979c1c..d096e2b13325 100644 --- a/docs/apis/base/weapp/app-event/onAppHide.md +++ b/docs/apis/base/weapp/app-event/onAppHide.md @@ -5,7 +5,7 @@ sidebar_label: onAppHide 监听小程序切后台事件。该事件与 [`App.onHide`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onhide) 的回调时机一致。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppHide.html) diff --git a/docs/apis/base/weapp/app-event/onAppShow.md b/docs/apis/base/weapp/app-event/onAppShow.md index 2a27b1ed1949..364141c9a230 100644 --- a/docs/apis/base/weapp/app-event/onAppShow.md +++ b/docs/apis/base/weapp/app-event/onAppShow.md @@ -20,7 +20,7 @@ sidebar_label: onAppShow 部分版本在无`referrerInfo`的时候会返回 `undefined`,建议使用 `options.referrerInfo && options.referrerInfo.appId` 进行判断。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppShow.html) diff --git a/docs/apis/base/weapp/app-event/onError.md b/docs/apis/base/weapp/app-event/onError.md index fa287c0a4355..cef630673553 100644 --- a/docs/apis/base/weapp/app-event/onError.md +++ b/docs/apis/base/weapp/app-event/onError.md @@ -5,7 +5,7 @@ sidebar_label: onError 监听小程序错误事件。如脚本错误或 API 调用报错等。该事件与 [`App.onError`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onerrorstring-error) 的回调时机与参数一致。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onError.html) diff --git a/docs/apis/base/weapp/app-event/onPageNotFound.md b/docs/apis/base/weapp/app-event/onPageNotFound.md index d457a1a04cef..c254f29da665 100644 --- a/docs/apis/base/weapp/app-event/onPageNotFound.md +++ b/docs/apis/base/weapp/app-event/onPageNotFound.md @@ -10,7 +10,7 @@ sidebar_label: onPageNotFound - 若开发者没有调用 [Taro.onPageNotFound](/docs/apis/base/weapp/app-event/onPageNotFound) 绑定监听,也没有声明 `App.onPageNotFound`,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。 - 如果回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再第二次回调。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html) diff --git a/docs/apis/base/weapp/app-event/onUnhandledRejection.md b/docs/apis/base/weapp/app-event/onUnhandledRejection.md index 91b6a612e267..8a3bdbd0769c 100644 --- a/docs/apis/base/weapp/app-event/onUnhandledRejection.md +++ b/docs/apis/base/weapp/app-event/onUnhandledRejection.md @@ -8,7 +8,7 @@ sidebar_label: onUnhandledRejection **注意** - 所有的 unhandledRejection 都可以被这一监听捕获,但只有 Error 类型的才会在小程序后台触发报警。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html) diff --git a/docs/apis/base/weapp/life-cycle/getLaunchOptionsSync.md b/docs/apis/base/weapp/life-cycle/getLaunchOptionsSync.md index e08c196a19c4..cd0b39290bcd 100644 --- a/docs/apis/base/weapp/life-cycle/getLaunchOptionsSync.md +++ b/docs/apis/base/weapp/life-cycle/getLaunchOptionsSync.md @@ -8,7 +8,7 @@ sidebar_label: getLaunchOptionsSync **注意** 部分版本在无`referrerInfo`的时候会返回 `undefined`,建议使用 `options.referrerInfo && options.referrerInfo.appId` 进行判断。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) diff --git a/docs/apis/canvas/CanvasContext.md b/docs/apis/canvas/CanvasContext.md index f46b7188ae28..df0fcd88a010 100644 --- a/docs/apis/canvas/CanvasContext.md +++ b/docs/apis/canvas/CanvasContext.md @@ -39,7 +39,7 @@ canvas 组件的绘图上下文 - 红色: 起始弧度 (0) - 蓝色: 终止弧度 (1.5 * Math.PI) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.arc.html) @@ -103,7 +103,7 @@ ctx.draw() 根据控制点和半径绘制圆弧路径。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.arcTo.html) @@ -126,7 +126,7 @@ ctx.draw() - 在最开始的时候相当于调用了一次 `beginPath`。 - 同一个路径内的多次 `setFillStyle`、`setStrokeStyle`、`setLineWidth`等设置,以最后一次设置为准。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.beginPath.html) @@ -165,7 +165,7 @@ ctx.draw() - 蓝色:两个控制点(20, 100) (200, 100) - 绿色:终止点(200, 20) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.bezierCurveTo.html) @@ -225,7 +225,7 @@ ctx.draw() 清除画布上在该矩形区域内的内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.clearRect.html) @@ -260,7 +260,7 @@ ctx.draw() 从原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内(不能访问画布上的其他区域)。可以在使用 `clip` 方法前通过使用 `save` 方法对当前画布区域进行保存,并在以后的任意时间通过`restore`方法对其进行恢复。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.clip.html) @@ -290,7 +290,7 @@ Taro.downloadFile({ 关闭一个路径。会连接起点和终点。如果关闭路径后没有调用 `fill` 或者 `stroke` 并开启了新的路径,那之前的路径将不会被渲染。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.closePath.html) @@ -336,7 +336,7 @@ ctx.draw() 创建一个圆形的渐变颜色。起点在圆心,终点在圆环。返回的`CanvasGradient`对象需要使用 [CanvasGradient.addColorStop()](/docs/apis/canvas/CanvasGradient#addcolorstop) 来指定渐变点,至少要两个。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createCircularGradient.html) @@ -368,7 +368,7 @@ ctx.draw() 创建一个线性的渐变颜色。返回的`CanvasGradient`对象需要使用 [CanvasGradient.addColorStop()](/docs/apis/canvas/CanvasGradient#addcolorstop) 来指定渐变点,至少要两个。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createLinearGradient.html) @@ -401,7 +401,7 @@ ctx.draw() 对指定的图像创建模式的方法,可在指定的方向上重复元图像 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createPattern.html) @@ -418,7 +418,7 @@ ctx.draw() 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。 -支持情况: +支持情况: > H5: 第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。 @@ -468,7 +468,7 @@ ctx.draw(false, () => { 绘制图像到画布 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html) @@ -548,7 +548,7 @@ Taro.chooseImage({ 对当前路径中的内容进行填充。默认的填充色为黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fill.html) @@ -598,7 +598,7 @@ ctx.draw() 填充一个矩形。用 [`setFillStyle`](/docs/apis/canvas/CanvasContext#setfillstyle) 设置矩形的填充色,如果没设置默认是黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fillRect.html) @@ -626,7 +626,7 @@ ctx.draw() 在画布上绘制被填充的文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fillText.html) @@ -655,7 +655,7 @@ ctx.draw() 增加一个新点,然后创建一条从上次指定点到目标点的线。用 `stroke` 方法来画线条 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.lineTo.html) @@ -683,7 +683,7 @@ ctx.draw() 测量文本尺寸信息。目前仅返回文本宽度(width)。同步接口。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.measureText.html) @@ -699,7 +699,7 @@ ctx.draw() 把路径移动到画布中的指定点,不创建线条。用 `stroke` 方法来画线条 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.moveTo.html) @@ -734,7 +734,7 @@ ctx.draw() - 蓝色:控制点(20, 100) - 绿色:终止点(200, 20) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.quadraticCurveTo.html) @@ -788,7 +788,7 @@ ctx.draw() 创建一个矩形路径。需要用 [`fill`](/docs/apis/canvas/CanvasContext#fill) 或者 [`stroke`](/docs/apis/canvas/CanvasContext#stroke) 方法将矩形真正的画到 `canvas` 中 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.rect.html) @@ -817,7 +817,7 @@ ctx.draw() 重置绘图上下文状态 -支持情况: +支持情况: > [参考文档](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/reset) @@ -829,7 +829,7 @@ ctx.draw() 恢复之前保存的绘图上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.restore.html) @@ -855,7 +855,7 @@ ctx.draw() 以原点为中心顺时针旋转当前坐标轴。多次调用旋转的角度会叠加。原点可以用 `translate` 方法修改。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.rotate.html) @@ -883,7 +883,7 @@ ctx.draw() 保存绘图上下文。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.save.html) @@ -909,7 +909,7 @@ ctx.draw() 在调用后,之后创建的路径其横纵坐标会被缩放。多次调用倍数会相乘。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.scale.html) @@ -938,7 +938,7 @@ ctx.draw() 设置填充色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setFillStyle.html) @@ -963,7 +963,7 @@ ctx.draw() 设置字体的字号 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setFontSize.html) @@ -994,7 +994,7 @@ ctx.draw() 设置全局画笔透明度。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setGlobalAlpha.html) @@ -1024,7 +1024,7 @@ ctx.draw() 设置线条的端点样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineCap.html) @@ -1069,7 +1069,7 @@ ctx.draw() 设置虚线样式。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineDash.html) @@ -1098,7 +1098,7 @@ ctx.draw() 设置线条的交点样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineJoin.html) @@ -1147,7 +1147,7 @@ ctx.draw() 设置线条的宽度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineWidth.html) @@ -1189,7 +1189,7 @@ ctx.draw() 设置最大斜接长度。斜接长度指的是在两条线交汇处内角和外角之间的距离。当 [CanvasContext.setLineJoin()](/docs/apis/canvas/CanvasContext#setlinejoin) 为 miter 时才有效。超过最大倾斜长度的,连接处将以 lineJoin 为 bevel 来显示。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setMiterLimit.html) @@ -1244,7 +1244,7 @@ ctx.draw() 设定阴影样式。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setShadow.html) @@ -1273,7 +1273,7 @@ ctx.draw() 设置描边颜色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setStrokeStyle.html) @@ -1298,7 +1298,7 @@ ctx.draw() 设置文字的对齐 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTextAlign.html) @@ -1334,7 +1334,7 @@ await ctx.draw(true) 设置文字的竖直对齐 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTextBaseline.html) @@ -1373,7 +1373,7 @@ await ctx.draw(true) 使用矩阵重新设置(覆盖)当前变换的方法 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTransform.html) @@ -1394,7 +1394,7 @@ await ctx.draw(true) 画出当前路径的边框。默认颜色色为黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.stroke.html) @@ -1442,7 +1442,7 @@ ctx.draw() 画一个矩形(非填充)。 用 [`setStrokeStyle`](/docs/apis/canvas/CanvasContext#setstrokestyle) 设置矩形线条的颜色,如果没设置默认是黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.strokeRect.html) @@ -1470,7 +1470,7 @@ ctx.draw() 给定的 (x, y) 位置绘制文本描边的方法 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.strokeText.html) @@ -1490,7 +1490,7 @@ ctx.draw() 使用矩阵多次叠加当前变换的方法 使用矩阵叠加当前变换。矩阵由方法的参数进行描述,可以缩放、旋转、移动和倾斜上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.transform.html) @@ -1511,7 +1511,7 @@ ctx.draw() 对当前坐标系的原点 (0, 0) 进行变换。默认的坐标系原点为页面左上角。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.translate.html) @@ -1595,48 +1595,48 @@ ctx.draw() ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CanvasContext.arc | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.arcTo | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.beginPath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.bezierCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.clearRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.clip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.closePath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.createCircularGradient | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.createLinearGradient | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.createPattern | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.draw | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。) | | | -| CanvasContext.drawImage | ✔️ | | | | | | ✔️ | | | -| CanvasContext.fill | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.fillRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.fillText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.lineTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.measureText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.moveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.quadraticCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.rect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.reset | | | | | | | ✔️ | | | -| CanvasContext.restore | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.rotate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.save | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setFillStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setFontSize | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setGlobalAlpha | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setLineCap | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setLineDash | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setLineJoin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setLineWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setMiterLimit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setShadow | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setStrokeStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setTextAlign | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setTextBaseline | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.setTransform | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | -| CanvasContext.stroke | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.strokeRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.strokeText | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasContext.transform | ✔️ | | | ✔️ | | ✔️ | ✔️ | | | -| CanvasContext.translate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CanvasContext.arc | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.arcTo | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.beginPath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.bezierCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.clearRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.clip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.closePath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createCircularGradient | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createLinearGradient | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createPattern | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.draw | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。) | | | ✔️ | +| CanvasContext.drawImage | ✔️ | | | | | | ✔️ | | | ✔️ | +| CanvasContext.fill | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.fillRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.fillText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.lineTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.measureText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.moveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.quadraticCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.rect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.reset | | | | | | | ✔️ | | | ✔️ | +| CanvasContext.restore | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.rotate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.save | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setFillStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setFontSize | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setGlobalAlpha | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineCap | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineDash | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineJoin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setMiterLimit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setShadow | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setStrokeStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTextAlign | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTextBaseline | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTransform | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.stroke | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.strokeRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.strokeText | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.transform | ✔️ | | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.translate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/apis/canvas/canvasGetImageData.md b/docs/apis/canvas/canvasGetImageData.md index 3c6b3db1658f..885c643f5bd1 100644 --- a/docs/apis/canvas/canvasGetImageData.md +++ b/docs/apis/canvas/canvasGetImageData.md @@ -5,7 +5,7 @@ sidebar_label: canvasGetImageData 获取 canvas 区域隐含的像素数据。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasGetImageData.html) diff --git a/docs/apis/canvas/canvasPutImageData.md b/docs/apis/canvas/canvasPutImageData.md index 3ff4eac3dc00..b01b65ee23ab 100644 --- a/docs/apis/canvas/canvasPutImageData.md +++ b/docs/apis/canvas/canvasPutImageData.md @@ -5,7 +5,7 @@ sidebar_label: canvasPutImageData 将像素数据绘制到画布。在自定义组件下,第二个参数传入自定义组件实例 this,以操作组件内 `` 组件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasPutImageData.html) diff --git a/docs/apis/canvas/canvasToTempFilePath.md b/docs/apis/canvas/canvasToTempFilePath.md index 8042351ba26c..653a7a8d9970 100644 --- a/docs/apis/canvas/canvasToTempFilePath.md +++ b/docs/apis/canvas/canvasToTempFilePath.md @@ -9,7 +9,7 @@ sidebar_label: canvasToTempFilePath 1. `tip`: 在 `draw` 回调里调用该方法才能保证图片导出成功。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasToTempFilePath.html) diff --git a/docs/apis/canvas/createCanvasContext.md b/docs/apis/canvas/createCanvasContext.md index 47a91885359c..5b7b30b00fca 100644 --- a/docs/apis/canvas/createCanvasContext.md +++ b/docs/apis/canvas/createCanvasContext.md @@ -7,7 +7,7 @@ sidebar_label: createCanvasContext **Tip**: 需要指定 canvasId,该绘图上下文只作用于对应的 ``;另外,Web 端需要在 `useReady` 回调中执行它,否则会因为底层 canvas 渲染出来之前而去获取 CanvasContext,导致其底层的 context 为 `undefined`,从而不能正常绘图。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createCanvasContext.html) diff --git a/docs/apis/device/battery/getBatteryInfo.md b/docs/apis/device/battery/getBatteryInfo.md index f285d96ed474..2af346c6401b 100644 --- a/docs/apis/device/battery/getBatteryInfo.md +++ b/docs/apis/device/battery/getBatteryInfo.md @@ -5,7 +5,7 @@ sidebar_label: getBatteryInfo 获取设备电量。同步 API Taro.getBatteryInfoSync 在 iOS 上不可用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/battery/wx.getBatteryInfo.html) diff --git a/docs/apis/device/clipboard/getClipboardData.md b/docs/apis/device/clipboard/getClipboardData.md index 84e16c218a11..a92302f12f03 100644 --- a/docs/apis/device/clipboard/getClipboardData.md +++ b/docs/apis/device/clipboard/getClipboardData.md @@ -5,7 +5,7 @@ sidebar_label: getClipboardData 获取系统剪贴板内容 -支持情况: +支持情况: > H5: 部分实现 diff --git a/docs/apis/device/clipboard/setClipboardData.md b/docs/apis/device/clipboard/setClipboardData.md index a15ef19e07d1..66107a7505dc 100644 --- a/docs/apis/device/clipboard/setClipboardData.md +++ b/docs/apis/device/clipboard/setClipboardData.md @@ -5,7 +5,7 @@ sidebar_label: setClipboardData 设置系统剪贴板的内容。调用成功后,会弹出 toast 提示"内容已复制",持续 1.5s -支持情况: +支持情况: > H5: 部分实现 diff --git a/docs/apis/device/keyboard/hideKeyboard.md b/docs/apis/device/keyboard/hideKeyboard.md index 26b57a902c2d..a5c1f8293766 100644 --- a/docs/apis/device/keyboard/hideKeyboard.md +++ b/docs/apis/device/keyboard/hideKeyboard.md @@ -5,7 +5,7 @@ sidebar_label: hideKeyboard 在input、textarea等focus拉起键盘之后,手动调用此接口收起键盘 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.hideKeyboard.html) diff --git a/docs/apis/device/network/getNetworkType.md b/docs/apis/device/network/getNetworkType.md index 489ac4b73224..4d41dba95040 100644 --- a/docs/apis/device/network/getNetworkType.md +++ b/docs/apis/device/network/getNetworkType.md @@ -5,7 +5,7 @@ sidebar_label: getNetworkType 获取网络类型。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.getNetworkType.html) diff --git a/docs/apis/device/network/offNetworkStatusChange.md b/docs/apis/device/network/offNetworkStatusChange.md index aef103710a77..bac9bffc9aa8 100644 --- a/docs/apis/device/network/offNetworkStatusChange.md +++ b/docs/apis/device/network/offNetworkStatusChange.md @@ -5,7 +5,7 @@ sidebar_label: offNetworkStatusChange 取消监听网络状态变化事件,参数为空,则取消所有的事件监听。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.offNetworkStatusChange.html) diff --git a/docs/apis/device/network/onNetworkStatusChange.md b/docs/apis/device/network/onNetworkStatusChange.md index 61c26b9383cb..330e7a1a2931 100644 --- a/docs/apis/device/network/onNetworkStatusChange.md +++ b/docs/apis/device/network/onNetworkStatusChange.md @@ -5,7 +5,7 @@ sidebar_label: onNetworkStatusChange 监听网络状态变化。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.onNetworkStatusChange.html) diff --git a/docs/apis/device/phone/makePhoneCall.md b/docs/apis/device/phone/makePhoneCall.md index 936f4d208bf2..4e418dd7ce3d 100644 --- a/docs/apis/device/phone/makePhoneCall.md +++ b/docs/apis/device/phone/makePhoneCall.md @@ -5,7 +5,7 @@ sidebar_label: makePhoneCall 拨打电话 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/phone/wx.makePhoneCall.html) diff --git a/docs/apis/device/screen/onUserCaptureScreen.md b/docs/apis/device/screen/onUserCaptureScreen.md index 42734737f6bd..125191ee4edf 100644 --- a/docs/apis/device/screen/onUserCaptureScreen.md +++ b/docs/apis/device/screen/onUserCaptureScreen.md @@ -5,7 +5,7 @@ sidebar_label: onUserCaptureScreen 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/screen/wx.onUserCaptureScreen.html) diff --git a/docs/apis/device/screen/setKeepScreenOn.md b/docs/apis/device/screen/setKeepScreenOn.md index c2ce451e7fc9..c12172309104 100644 --- a/docs/apis/device/screen/setKeepScreenOn.md +++ b/docs/apis/device/screen/setKeepScreenOn.md @@ -5,7 +5,7 @@ sidebar_label: setKeepScreenOn 设置是否保持常亮状态。仅在当前小程序生效,离开小程序后设置失效。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/screen/wx.setKeepScreenOn.html) diff --git a/docs/apis/files/FileSystemManager.md b/docs/apis/files/FileSystemManager.md index 563caf60532c..ff4382cde86c 100644 --- a/docs/apis/files/FileSystemManager.md +++ b/docs/apis/files/FileSystemManager.md @@ -5,7 +5,7 @@ sidebar_label: FileSystemManager 文件管理器,可通过 [Taro.getFileSystemManager](./getFileSystemManager) 获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.html) @@ -15,7 +15,7 @@ sidebar_label: FileSystemManager 判断文件/目录是否存在 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.access.html) @@ -210,7 +210,7 @@ sidebar_label: FileSystemManager 获取该小程序下的 `本地临时文件` 或 `本地缓存文件` 信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.getFileInfo.html) @@ -387,7 +387,7 @@ sidebar_label: FileSystemManager 读取本地文件内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFile.html) @@ -403,7 +403,7 @@ sidebar_label: FileSystemManager [FileSystemManager.readFile](#readfile) 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFileSync.html) @@ -1390,51 +1390,51 @@ FailCallbackResult | SuccessCallbackResult ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| FileSystemManager | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.access | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.accessSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.appendFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.appendFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.close | ✔️ | | | | | | | | | -| FileSystemManager.closeSync | ✔️ | | | | | | | | | -| FileSystemManager.copyFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.copyFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.fstat | ✔️ | | | | | | | | | -| FileSystemManager.fstatSync | ✔️ | | | | | | | | | -| FileSystemManager.ftruncate | ✔️ | | | | | | | | | -| FileSystemManager.ftruncateSync | ✔️ | | | | | | | | | -| FileSystemManager.getFileInfo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.getSavedFileList | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.mkdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.mkdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.open | ✔️ | | | | | | | | | -| FileSystemManager.openSync | ✔️ | | | | | | | | | -| FileSystemManager.read | ✔️ | | | | | | | | | -| FileSystemManager.readCompressedFile | ✔️ | | | | | | | | | -| FileSystemManager.readCompressedFileSync | ✔️ | | | | | | | | | -| FileSystemManager.readdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readSync | ✔️ | | | | | | | | | -| FileSystemManager.readZipEntry | ✔️ | | | | | | | | | -| FileSystemManager.removeSavedFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.rename | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.renameSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.rmdir | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.rmdirSync | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.saveFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.saveFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.stat | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| FileSystemManager.statSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.truncate | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.truncateSync | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.unlink | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.unlinkSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.unzip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.write | ✔️ | | | | | | | | | -| FileSystemManager.writeFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.writeFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.writeSync | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| FileSystemManager | ✔️ | | | ✔️ | | | | | | ✔️ | +| FileSystemManager.access | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.accessSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.appendFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.appendFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.close | ✔️ | | | | | | | | | | +| FileSystemManager.closeSync | ✔️ | | | | | | | | | | +| FileSystemManager.copyFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.copyFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.fstat | ✔️ | | | | | | | | | | +| FileSystemManager.fstatSync | ✔️ | | | | | | | | | | +| FileSystemManager.ftruncate | ✔️ | | | | | | | | | | +| FileSystemManager.ftruncateSync | ✔️ | | | | | | | | | | +| FileSystemManager.getFileInfo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.getSavedFileList | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.mkdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.mkdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.open | ✔️ | | | | | | | | | | +| FileSystemManager.openSync | ✔️ | | | | | | | | | | +| FileSystemManager.read | ✔️ | | | | | | | | | | +| FileSystemManager.readCompressedFile | ✔️ | | | | | | | | | | +| FileSystemManager.readCompressedFileSync | ✔️ | | | | | | | | | | +| FileSystemManager.readdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.readdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.readFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.readFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.readSync | ✔️ | | | | | | | | | | +| FileSystemManager.readZipEntry | ✔️ | | | | | | | | | | +| FileSystemManager.removeSavedFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.rename | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.renameSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.rmdir | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.rmdirSync | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.saveFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.saveFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.stat | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| FileSystemManager.statSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.truncate | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.truncateSync | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.unlink | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.unlinkSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.unzip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.write | ✔️ | | | | | | | | | | +| FileSystemManager.writeFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.writeFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.writeSync | ✔️ | | | | | | | | | | diff --git a/docs/apis/files/getFileSystemManager.md b/docs/apis/files/getFileSystemManager.md index 08172540cfc4..bf468ca2aee2 100644 --- a/docs/apis/files/getFileSystemManager.md +++ b/docs/apis/files/getFileSystemManager.md @@ -5,7 +5,7 @@ sidebar_label: getFileSystemManager 获取全局唯一的文件管理器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.getFileSystemManager.html) diff --git a/docs/apis/framework/getApp.md b/docs/apis/framework/getApp.md index 9df0e4121ce1..c2e4595d2952 100644 --- a/docs/apis/framework/getApp.md +++ b/docs/apis/framework/getApp.md @@ -5,7 +5,7 @@ sidebar_label: getApp 获取到小程序全局唯一的 App 实例。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/reference/api/getApp.html) diff --git a/docs/apis/framework/getCurrentPages.md b/docs/apis/framework/getCurrentPages.md index a4a567ff076c..3d574bc7c353 100644 --- a/docs/apis/framework/getCurrentPages.md +++ b/docs/apis/framework/getCurrentPages.md @@ -8,7 +8,7 @@ __注意:__ - __不要尝试修改页面栈,会导致路由以及页面状态错误。__ - 不要在 `App.onLaunch` 的时候调用 `getCurrentPages()`,此时 `page` 还没有生成。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/reference/api/getCurrentPages.html) diff --git a/docs/apis/location/chooseLocation.md b/docs/apis/location/chooseLocation.md index 9d2eb3e00e3b..9b04887c6dd4 100644 --- a/docs/apis/location/chooseLocation.md +++ b/docs/apis/location/chooseLocation.md @@ -7,7 +7,7 @@ sidebar_label: chooseLocation `chooseLocation` api功能是依赖于腾讯位置服务,所以需要使用 api 密钥。如果您没有,可以前往腾讯位置服务[开发者控制台](https://lbs.qq.com/console/mykey.html?console=mykey)进行申请。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.chooseLocation.html) diff --git a/docs/apis/location/getFuzzyLocation.md b/docs/apis/location/getFuzzyLocation.md index 62ae6433586c..1ba7fe486b81 100644 --- a/docs/apis/location/getFuzzyLocation.md +++ b/docs/apis/location/getFuzzyLocation.md @@ -5,7 +5,7 @@ sidebar_label: getFuzzyLocation 获取当前的模糊地理位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getFuzzyLocation.html) diff --git a/docs/apis/location/getLocation.md b/docs/apis/location/getLocation.md index 8a42c7980414..e828bf6854e3 100644 --- a/docs/apis/location/getLocation.md +++ b/docs/apis/location/getLocation.md @@ -9,7 +9,7 @@ sidebar_label: getLocation - 工具中定位模拟使用IP定位,可能会有一定误差。且工具目前仅支持 gcj02 坐标。 - 使用第三方服务进行逆地址解析时,请确认第三方服务默认的坐标系,正确进行坐标转换。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getLocation.html) diff --git a/docs/apis/location/openLocation.md b/docs/apis/location/openLocation.md index 8a3c69ecb3ce..0bcf0191f055 100644 --- a/docs/apis/location/openLocation.md +++ b/docs/apis/location/openLocation.md @@ -5,7 +5,7 @@ sidebar_label: openLocation 使用微信内置地图查看位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.openLocation.html) diff --git a/docs/apis/media/audio/AudioContext.md b/docs/apis/media/audio/AudioContext.md index 5982f4609eaf..d0815e25d901 100644 --- a/docs/apis/media/audio/AudioContext.md +++ b/docs/apis/media/audio/AudioContext.md @@ -7,7 +7,7 @@ sidebar_label: AudioContext `AudioContext` 通过 `id` 跟一个 `audio` 组件绑定,操作对应的 audio 组件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.html) @@ -17,7 +17,7 @@ sidebar_label: AudioContext 暂停音频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.pause.html) @@ -29,7 +29,7 @@ sidebar_label: AudioContext 播放音频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.play.html) @@ -71,10 +71,10 @@ sidebar_label: AudioContext ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| AudioContext | ✔️ | | | | -| AudioContext.pause | ✔️ | | | | -| AudioContext.play | ✔️ | | | | -| AudioContext.seek | ✔️ | | | | -| AudioContext.setSrc | ✔️ | | | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| AudioContext | ✔️ | | | | ✔️ | +| AudioContext.pause | ✔️ | | | | ✔️ | +| AudioContext.play | ✔️ | | | | ✔️ | +| AudioContext.seek | ✔️ | | | | | +| AudioContext.setSrc | ✔️ | | | | | diff --git a/docs/apis/media/audio/InnerAudioContext.md b/docs/apis/media/audio/InnerAudioContext.md index 77fb7a40866e..b8b3d3275546 100644 --- a/docs/apis/media/audio/InnerAudioContext.md +++ b/docs/apis/media/audio/InnerAudioContext.md @@ -45,7 +45,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 播放 -支持情况: +支持情况: ```tsx () => void @@ -65,7 +65,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 停止 -支持情况: +支持情况: ```tsx () => void @@ -113,7 +113,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频播放事件 -支持情况: +支持情况: ```tsx (callback?: OnPlayCallback) => void @@ -141,7 +141,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频停止事件 -支持情况: +支持情况: ```tsx (callback?: OnStopCallback) => void @@ -155,7 +155,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频自然播放结束事件 -支持情况: +支持情况: ```tsx (callback?: OnEndedCallback) => void @@ -183,7 +183,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频播放错误事件 -支持情况: +支持情况: ```tsx (callback?: OnErrorCallback) => void @@ -531,30 +531,30 @@ innerAudioContext.onError((res) => { ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| InnerAudioContext.play | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.pause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.stop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.seek | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.destroy | ✔️ | ✔️ | | | -| InnerAudioContext.onCanplay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onPlay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onPause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onStop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onEnded | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onTimeUpdate | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onError | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onWaiting | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onSeeking | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onSeeked | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offCanplay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offPlay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offPause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offStop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offEnded | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offTimeUpdate | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offError | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offWaiting | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offSeeking | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offSeeked | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| InnerAudioContext.play | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.pause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.stop | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.seek | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.destroy | ✔️ | ✔️ | | | | +| InnerAudioContext.onCanplay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onPlay | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onPause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onStop | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onEnded | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onTimeUpdate | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onError | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onWaiting | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onSeeking | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onSeeked | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offCanplay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offPlay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offPause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offStop | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offEnded | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offTimeUpdate | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offError | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offWaiting | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offSeeking | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offSeeked | ✔️ | ✔️ | ✔️ | | | diff --git a/docs/apis/media/audio/createAudioContext.md b/docs/apis/media/audio/createAudioContext.md index 0302c1a5295f..80a7c734f6af 100644 --- a/docs/apis/media/audio/createAudioContext.md +++ b/docs/apis/media/audio/createAudioContext.md @@ -6,7 +6,7 @@ sidebar_label: createAudioContext 创建 audio 上下文 AudioContext 对象。 **注意:1.6.0 版本开始,本接口不再维护。建议使用能力更强的 [Taro.createInnerAudioContext](./createInnerAudioContext) 接口** -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.createAudioContext.html) diff --git a/docs/apis/media/audio/createInnerAudioContext.md b/docs/apis/media/audio/createInnerAudioContext.md index 8af0cd600c65..f06a2019fc89 100644 --- a/docs/apis/media/audio/createInnerAudioContext.md +++ b/docs/apis/media/audio/createInnerAudioContext.md @@ -5,7 +5,7 @@ sidebar_label: createInnerAudioContext 创建内部 audio 上下文 InnerAudioContext 对象。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.createInnerAudioContext.html) diff --git a/docs/apis/media/background-audio/getBackgroundAudioManager.md b/docs/apis/media/background-audio/getBackgroundAudioManager.md index ca9aec9d8c37..42c2b3a1c642 100644 --- a/docs/apis/media/background-audio/getBackgroundAudioManager.md +++ b/docs/apis/media/background-audio/getBackgroundAudioManager.md @@ -8,7 +8,7 @@ sidebar_label: getBackgroundAudioManager 从微信客户端6.7.2版本开始,若需要在小程序切后台后继续播放音频,需要在 [app.json](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html) 中配置 `requiredBackgroundModes` 属性。开发版和体验版上可以直接生效,正式版还需通过审核。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/background-audio/wx.getBackgroundAudioManager.html) diff --git a/docs/apis/media/image/chooseImage.md b/docs/apis/media/image/chooseImage.md index 534025f66730..962dd54e7b87 100644 --- a/docs/apis/media/image/chooseImage.md +++ b/docs/apis/media/image/chooseImage.md @@ -5,7 +5,7 @@ sidebar_label: chooseImage 从本地相册选择图片或使用相机拍照。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html) diff --git a/docs/apis/media/image/cropImage.md b/docs/apis/media/image/cropImage.md index 854c9621b6ec..2f815bc9c13a 100644 --- a/docs/apis/media/image/cropImage.md +++ b/docs/apis/media/image/cropImage.md @@ -47,7 +47,7 @@ sidebar_label: cropImage | 4:5 | 宽高比为4比5 | | 5:4 | 宽高比为5比4 | | 9:16 | 宽高比为9比16 | -| 16:9 | 宽高比为19比6 | +| 16:9 | 宽高比为16比9 | ## 示例代码 diff --git a/docs/apis/media/image/getImageInfo.md b/docs/apis/media/image/getImageInfo.md index ea369bdf6af0..4e24ea700d72 100644 --- a/docs/apis/media/image/getImageInfo.md +++ b/docs/apis/media/image/getImageInfo.md @@ -5,7 +5,7 @@ sidebar_label: getImageInfo 获取图片信息。网络图片需先配置download域名才能生效。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.getImageInfo.html) diff --git a/docs/apis/media/image/previewImage.md b/docs/apis/media/image/previewImage.md index 7f58679fdaf2..0a3e725c1d95 100644 --- a/docs/apis/media/image/previewImage.md +++ b/docs/apis/media/image/previewImage.md @@ -5,7 +5,7 @@ sidebar_label: previewImage 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.previewImage.html) diff --git a/docs/apis/media/image/saveImageToPhotosAlbum.md b/docs/apis/media/image/saveImageToPhotosAlbum.md index 469425053f91..bf82860dbfd3 100644 --- a/docs/apis/media/image/saveImageToPhotosAlbum.md +++ b/docs/apis/media/image/saveImageToPhotosAlbum.md @@ -5,7 +5,7 @@ sidebar_label: saveImageToPhotosAlbum 保存图片到系统相册。需要[用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) scope.writePhotosAlbum -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.saveImageToPhotosAlbum.html) diff --git a/docs/apis/media/video/VideoContext.md b/docs/apis/media/video/VideoContext.md index 017a336f2d3b..6c34b871896c 100644 --- a/docs/apis/media/video/VideoContext.md +++ b/docs/apis/media/video/VideoContext.md @@ -7,7 +7,7 @@ VideoContext 实例,可通过 [Taro.createVideoContext](./createVideoContext) VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.html) @@ -29,7 +29,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 退出全屏 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.exitFullScreen.html) @@ -69,7 +69,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 暂停视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.pause.html) @@ -81,7 +81,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 播放视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.play.html) @@ -93,7 +93,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 设置倍速播放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.playbackRate.html) @@ -121,7 +121,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 进入全屏 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.requestFullScreen.html) @@ -137,7 +137,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 跳转到指定位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.seek.html) @@ -181,7 +181,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 停止视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.stop.html) @@ -216,19 +216,19 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| VideoContext | ✔️ | ✔️ | ✔️ | | -| VideoContext.exitBackgroundPlayback | ✔️ | | | | -| VideoContext.exitFullScreen | ✔️ | ✔️ | ✔️ | | -| VideoContext.exitPictureInPicture | ✔️ | | | | -| VideoContext.hideStatusBar | ✔️ | | | | -| VideoContext.pause | ✔️ | ✔️ | ✔️ | | -| VideoContext.play | ✔️ | ✔️ | ✔️ | | -| VideoContext.playbackRate | ✔️ | ✔️ | ✔️ | | -| VideoContext.requestBackgroundPlayback | ✔️ | | | | -| VideoContext.requestFullScreen | ✔️ | ✔️ | ✔️ | | -| VideoContext.seek | ✔️ | ✔️ | ✔️ | | -| VideoContext.sendDanmu | ✔️ | | | | -| VideoContext.showStatusBar | ✔️ | | | | -| VideoContext.stop | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| VideoContext | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.exitBackgroundPlayback | ✔️ | | | | | +| VideoContext.exitFullScreen | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.exitPictureInPicture | ✔️ | | | | | +| VideoContext.hideStatusBar | ✔️ | | | | | +| VideoContext.pause | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.play | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.playbackRate | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.requestBackgroundPlayback | ✔️ | | | | | +| VideoContext.requestFullScreen | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.seek | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.sendDanmu | ✔️ | | | | | +| VideoContext.showStatusBar | ✔️ | | | | | +| VideoContext.stop | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/docs/apis/media/video/chooseMedia.md b/docs/apis/media/video/chooseMedia.md index 9c762fb99cde..4e57236ee04b 100644 --- a/docs/apis/media/video/chooseMedia.md +++ b/docs/apis/media/video/chooseMedia.md @@ -5,7 +5,7 @@ sidebar_label: chooseMedia 拍摄或从手机相册中选择图片或视频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseMedia.html) diff --git a/docs/apis/media/video/createVideoContext.md b/docs/apis/media/video/createVideoContext.md index 0b3cf25ec562..4f82d2e7ad1f 100644 --- a/docs/apis/media/video/createVideoContext.md +++ b/docs/apis/media/video/createVideoContext.md @@ -5,7 +5,7 @@ sidebar_label: createVideoContext 创建 video 上下文 VideoContext 对象。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.createVideoContext.html) diff --git a/docs/apis/media/video/getVideoInfo.md b/docs/apis/media/video/getVideoInfo.md index 8369c16b601c..87d23dca6ce7 100644 --- a/docs/apis/media/video/getVideoInfo.md +++ b/docs/apis/media/video/getVideoInfo.md @@ -5,7 +5,7 @@ sidebar_label: getVideoInfo 获取视频详细信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.getVideoInfo.html) diff --git a/docs/apis/navigate/navigateToMiniProgram.md b/docs/apis/navigate/navigateToMiniProgram.md index e3c865888841..be3f9045eb42 100644 --- a/docs/apis/navigate/navigateToMiniProgram.md +++ b/docs/apis/navigate/navigateToMiniProgram.md @@ -17,7 +17,7 @@ sidebar_label: navigateToMiniProgram - 在开发者工具上调用此 API 并不会真实的跳转到另外的小程序,但是开发者工具会校验本次调用跳转是否成功。[详情](https://developers.weixin.qq.com/miniprogram/dev/devtools/different.html#跳转小程序调试支持) - 开发者工具上支持被跳转的小程序处理接收参数的调试。[详情](https://developers.weixin.qq.com/miniprogram/dev/devtools/different.html#跳转小程序调试支持) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/miniprogram-navigate/wx.navigateToMiniProgram.html) diff --git a/docs/apis/network/download/DownloadTask.md b/docs/apis/network/download/DownloadTask.md index 859ab11f2635..efe0a195ed03 100644 --- a/docs/apis/network/download/DownloadTask.md +++ b/docs/apis/network/download/DownloadTask.md @@ -5,7 +5,7 @@ sidebar_label: DownloadTask 一个可以监听下载进度变化事件,以及取消下载任务的对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.html) @@ -15,7 +15,7 @@ sidebar_label: DownloadTask 中断下载任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: DownloadTask 监听下载进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.onProgressUpdate.html) @@ -43,7 +43,7 @@ sidebar_label: DownloadTask 取消监听下载进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.offProgressUpdate.html) @@ -152,11 +152,11 @@ downloadTask.abort() // 取消下载任务 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| DownloadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| DownloadTask.abort | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | -| DownloadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| DownloadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| DownloadTask.abort | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | | +| DownloadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | | diff --git a/docs/apis/network/download/downloadFile.md b/docs/apis/network/download/downloadFile.md index 15e357c826c2..954e614ac36d 100644 --- a/docs/apis/network/download/downloadFile.md +++ b/docs/apis/network/download/downloadFile.md @@ -7,7 +7,7 @@ sidebar_label: downloadFile 注意:请在服务端响应的 header 中指定合理的 `Content-Type` 字段,以保证客户端正确处理文件类型。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html) diff --git a/docs/apis/network/request/RequestTask.md b/docs/apis/network/request/RequestTask.md index b42b8b482521..29a17511645a 100644 --- a/docs/apis/network/request/RequestTask.md +++ b/docs/apis/network/request/RequestTask.md @@ -5,7 +5,7 @@ sidebar_label: RequestTask 网络请求任务对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.html) @@ -15,7 +15,7 @@ sidebar_label: RequestTask 中断请求任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: RequestTask 监听 HTTP Response Header 事件。会比请求完成事件更早 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.onHeadersReceived.html) @@ -43,7 +43,7 @@ sidebar_label: RequestTask 取消监听 HTTP Response Header 事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.offHeadersReceived.html) @@ -190,11 +190,11 @@ requestTask.abort() ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RequestTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RequestTask.abort | ✔️ | | | ✔️ | | | | | -| RequestTask.onHeadersReceived | ✔️ | | | | | | | | -| RequestTask.offHeadersReceived | ✔️ | | | | | | | | -| RequestTask.onChunkReceived | ✔️ | | | | | | | | -| RequestTask.offChunkReceived | ✔️ | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RequestTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RequestTask.abort | ✔️ | | | ✔️ | | | | | ✔️ | +| RequestTask.onHeadersReceived | ✔️ | | | | | | | | ✔️ | +| RequestTask.offHeadersReceived | ✔️ | | | | | | | | ✔️ | +| RequestTask.onChunkReceived | ✔️ | | | | | | | | | +| RequestTask.offChunkReceived | ✔️ | | | | | | | | | diff --git a/docs/apis/network/request/request.md b/docs/apis/network/request/request.md index 1cad87616e58..3d169543c479 100644 --- a/docs/apis/network/request/request.md +++ b/docs/apis/network/request/request.md @@ -11,7 +11,7 @@ sidebar_label: request - 对于 `POST` 方法且 `header['content-type']` 为 `application/json` 的数据,会对数据进行 JSON 序列化 - 对于 `POST` 方法且 `header['content-type']` 为 `application/x-www-form-urlencoded` 的数据,会将数据转换成 query string `(encodeURIComponent(k)=encodeURIComponent(v)&encodeURIComponent(k)=encodeURIComponent(v)...)` -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html) diff --git a/docs/apis/network/upload/UploadTask.md b/docs/apis/network/upload/UploadTask.md index 31578ab3a8a6..f0bf3aa2ef30 100644 --- a/docs/apis/network/upload/UploadTask.md +++ b/docs/apis/network/upload/UploadTask.md @@ -5,7 +5,7 @@ sidebar_label: UploadTask 一个可以监听上传进度变化事件,以及取消上传任务的对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.html) @@ -15,7 +15,7 @@ sidebar_label: UploadTask 中断上传任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: UploadTask 监听上传进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.onProgressUpdate.html) @@ -43,7 +43,7 @@ sidebar_label: UploadTask 取消监听上传进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.offProgressUpdate.html) @@ -59,7 +59,7 @@ sidebar_label: UploadTask 监听 HTTP Response Header 事件。会比请求完成事件更早 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.onHeadersReceived.html) @@ -75,7 +75,7 @@ sidebar_label: UploadTask 取消监听 HTTP Response Header 事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.offHeadersReceived.html) @@ -156,11 +156,11 @@ uploadTask.abort() // 取消上传任务 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| UploadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| UploadTask.abort | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | -| UploadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| UploadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| UploadTask.abort | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | ✔️ | +| UploadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | ✔️ | diff --git a/docs/apis/network/upload/uploadFile.md b/docs/apis/network/upload/uploadFile.md index fc4e54b588e5..265675879225 100644 --- a/docs/apis/network/upload/uploadFile.md +++ b/docs/apis/network/upload/uploadFile.md @@ -5,7 +5,7 @@ sidebar_label: uploadFile 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 `content-type` 为 `multipart/form-data`。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html) diff --git a/docs/apis/network/websocket/SocketTask.md b/docs/apis/network/websocket/SocketTask.md index ba2aca522c26..6cfeedb8b020 100644 --- a/docs/apis/network/websocket/SocketTask.md +++ b/docs/apis/network/websocket/SocketTask.md @@ -5,7 +5,7 @@ sidebar_label: SocketTask WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket/SocketTask) 接口创建返回。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.html) @@ -26,7 +26,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 通过 WebSocket 连接发送数据 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.send.html) @@ -42,7 +42,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 关闭 WebSocket 连接 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.close.html) @@ -58,7 +58,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 连接打开事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onOpen.html) @@ -74,7 +74,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 连接关闭事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onClose.html) @@ -90,7 +90,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 错误事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onError.html) @@ -106,7 +106,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 接受到服务器的消息事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onMessage.html) @@ -214,12 +214,12 @@ WebSocket 连接打开事件的回调函数 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SocketTask | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| SocketTask.send | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.close | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onOpen | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onClose | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SocketTask | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| SocketTask.send | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.close | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onOpen | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onClose | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/docs/apis/network/websocket/connectSocket.md b/docs/apis/network/websocket/connectSocket.md index 5920fa9b070c..524531d7fb3b 100644 --- a/docs/apis/network/websocket/connectSocket.md +++ b/docs/apis/network/websocket/connectSocket.md @@ -9,7 +9,7 @@ sidebar_label: connectSocket - 1.7.0 及以上版本,最多可以同时存在 5 个 WebSocket 连接。 - 1.7.0 以下版本,一个小程序同时只能有一个 WebSocket 连接,如果当前已存在一个 WebSocket 连接,会自动关闭该连接,并重新创建一个 WebSocket 连接。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.connectSocket.html) diff --git a/docs/apis/open-api/login/login.md b/docs/apis/open-api/login/login.md index 7ba3893fcbe4..7eac6a8fc0c5 100644 --- a/docs/apis/open-api/login/login.md +++ b/docs/apis/open-api/login/login.md @@ -5,7 +5,7 @@ sidebar_label: login 调用接口获取登录凭证(code)。通过凭证进而换取用户登录态信息,包括用户的唯一标识(openid)及本次登录的会话密钥(session_key)等。用户数据的加解密通讯需要依赖会话密钥完成。更多使用方法详见 [小程序登录](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html) diff --git a/docs/apis/open-api/settings/getSetting.md b/docs/apis/open-api/settings/getSetting.md index 0889057c4518..96bfedf0c682 100644 --- a/docs/apis/open-api/settings/getSetting.md +++ b/docs/apis/open-api/settings/getSetting.md @@ -5,7 +5,7 @@ sidebar_label: getSetting 获取用户的当前设置。**返回值中只会出现小程序已经向用户请求过的[权限](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html)**。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.getSetting.html) diff --git a/docs/apis/open-api/settings/openSetting.md b/docs/apis/open-api/settings/openSetting.md index f81d7973bacb..cebd59044e96 100644 --- a/docs/apis/open-api/settings/openSetting.md +++ b/docs/apis/open-api/settings/openSetting.md @@ -7,7 +7,7 @@ sidebar_label: openSetting 注意:[2.3.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 版本开始,用户发生点击行为后,才可以跳转打开设置页,管理授权信息。[详情](https://developers.weixin.qq.com/community/develop/doc/000cea2305cc5047af5733de751008) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.openSetting.html) diff --git a/docs/apis/open-api/user-info/getUserInfo.md b/docs/apis/open-api/user-info/getUserInfo.md index 45a3e6f08df8..e89c344885eb 100644 --- a/docs/apis/open-api/user-info/getUserInfo.md +++ b/docs/apis/open-api/user-info/getUserInfo.md @@ -8,7 +8,7 @@ sidebar_label: getUserInfo **接口调整说明** 在用户未授权过的情况下调用此接口,将不再出现授权弹窗,会直接进入 fail 回调(详见[《公告》](https://developers.weixin.qq.com/community/develop/doc/0000a26e1aca6012e896a517556c01))。在用户已授权的情况下调用此接口,可成功获取用户信息。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserInfo.html) diff --git a/docs/apis/route/navigateBack.md b/docs/apis/route/navigateBack.md index 60b2780b7423..f36563155c2a 100644 --- a/docs/apis/route/navigateBack.md +++ b/docs/apis/route/navigateBack.md @@ -5,7 +5,7 @@ sidebar_label: navigateBack 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages 获取当前的页面栈,决定需要返回几层。 -支持情况: +支持情况: > H5: 若入参 delta 大于现有页面数时,返回应用打开的第一个页面(如果想要返回首页请使用 reLaunch 方法)。 diff --git a/docs/apis/route/navigateTo.md b/docs/apis/route/navigateTo.md index 7e85f96b5d4f..d68ff18c187b 100644 --- a/docs/apis/route/navigateTo.md +++ b/docs/apis/route/navigateTo.md @@ -5,7 +5,7 @@ sidebar_label: navigateTo 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 Taro.navigateBack 可以返回到原页面。小程序中页面栈最多十层。 -支持情况: +支持情况: > H5: 未针对 tabbar 页面做限制处理 diff --git a/docs/apis/route/reLaunch.md b/docs/apis/route/reLaunch.md index fd7b888bcd82..9336ebbd57cc 100644 --- a/docs/apis/route/reLaunch.md +++ b/docs/apis/route/reLaunch.md @@ -5,7 +5,7 @@ sidebar_label: reLaunch 关闭所有页面,打开到应用内的某个页面 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.reLaunch.html) diff --git a/docs/apis/route/redirectTo.md b/docs/apis/route/redirectTo.md index 4c0611089ff8..c51a3645fb78 100644 --- a/docs/apis/route/redirectTo.md +++ b/docs/apis/route/redirectTo.md @@ -5,7 +5,7 @@ sidebar_label: redirectTo 关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。 -支持情况: +支持情况: > H5: 未针对 tabbar 页面做限制处理 diff --git a/docs/apis/route/switchTab.md b/docs/apis/route/switchTab.md index 7dee8bb82262..50d43c1f9af7 100644 --- a/docs/apis/route/switchTab.md +++ b/docs/apis/route/switchTab.md @@ -5,7 +5,7 @@ sidebar_label: switchTab 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.switchTab.html) diff --git a/docs/apis/storage/clearStorage.md b/docs/apis/storage/clearStorage.md index 7349387fb8be..d29b2ed4a6ac 100644 --- a/docs/apis/storage/clearStorage.md +++ b/docs/apis/storage/clearStorage.md @@ -5,7 +5,7 @@ sidebar_label: clearStorage 清理本地数据缓存 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.clearStorage.html) diff --git a/docs/apis/storage/clearStorageSync.md b/docs/apis/storage/clearStorageSync.md index 9d7ba528c3ed..1aa81a59a97d 100644 --- a/docs/apis/storage/clearStorageSync.md +++ b/docs/apis/storage/clearStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: clearStorageSync Taro.clearStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.clearStorageSync.html) diff --git a/docs/apis/storage/getStorage.md b/docs/apis/storage/getStorage.md index 48c8008d2eb5..df0e9a2943ef 100644 --- a/docs/apis/storage/getStorage.md +++ b/docs/apis/storage/getStorage.md @@ -5,7 +5,7 @@ sidebar_label: getStorage 从本地缓存中异步获取指定 key 的内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorage.html) diff --git a/docs/apis/storage/getStorageInfo.md b/docs/apis/storage/getStorageInfo.md index 61653235c503..a8867b19239c 100644 --- a/docs/apis/storage/getStorageInfo.md +++ b/docs/apis/storage/getStorageInfo.md @@ -5,7 +5,7 @@ sidebar_label: getStorageInfo 异步获取当前storage的相关信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageInfo.html) diff --git a/docs/apis/storage/getStorageInfoSync.md b/docs/apis/storage/getStorageInfoSync.md index 632982f2ac11..dff2f6b56ee8 100644 --- a/docs/apis/storage/getStorageInfoSync.md +++ b/docs/apis/storage/getStorageInfoSync.md @@ -5,7 +5,7 @@ sidebar_label: getStorageInfoSync Taro.getStorageInfo 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageInfoSync.html) diff --git a/docs/apis/storage/getStorageSync.md b/docs/apis/storage/getStorageSync.md index e66f09815ac9..95f62911ad6f 100644 --- a/docs/apis/storage/getStorageSync.md +++ b/docs/apis/storage/getStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: getStorageSync Taro.getStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageSync.html) diff --git a/docs/apis/storage/removeStorage.md b/docs/apis/storage/removeStorage.md index d8b64d19d925..c5c7e515765d 100644 --- a/docs/apis/storage/removeStorage.md +++ b/docs/apis/storage/removeStorage.md @@ -5,7 +5,7 @@ sidebar_label: removeStorage 从本地缓存中移除指定 key -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.removeStorage.html) diff --git a/docs/apis/storage/removeStorageSync.md b/docs/apis/storage/removeStorageSync.md index 351e8d16da3f..556e9ab0d1bb 100644 --- a/docs/apis/storage/removeStorageSync.md +++ b/docs/apis/storage/removeStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: removeStorageSync Taro.removeStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.removeStorageSync.html) diff --git a/docs/apis/storage/setStorage.md b/docs/apis/storage/setStorage.md index 5ebe3734c40c..a1e72f088ba5 100644 --- a/docs/apis/storage/setStorage.md +++ b/docs/apis/storage/setStorage.md @@ -5,7 +5,7 @@ sidebar_label: setStorage 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.setStorage.html) diff --git a/docs/apis/storage/setStorageSync.md b/docs/apis/storage/setStorageSync.md index 8a2562e49203..60af9dc378fd 100644 --- a/docs/apis/storage/setStorageSync.md +++ b/docs/apis/storage/setStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: setStorageSync Taro.setStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.setStorageSync.html) diff --git a/docs/apis/taro.extend/eventCenter.md b/docs/apis/taro.extend/eventCenter.md index 850fd9186fdc..fb4c6d4d2c1a 100644 --- a/docs/apis/taro.extend/eventCenter.md +++ b/docs/apis/taro.extend/eventCenter.md @@ -5,7 +5,7 @@ sidebar_label: eventCenter 事件中心 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/getAppInfo.md b/docs/apis/taro.extend/getAppInfo.md index ce7e9376c00b..f32b2979f945 100644 --- a/docs/apis/taro.extend/getAppInfo.md +++ b/docs/apis/taro.extend/getAppInfo.md @@ -5,7 +5,7 @@ sidebar_label: getAppInfo 小程序获取和 Taro 相关的 App 信息 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/getCurrentInstance.md b/docs/apis/taro.extend/getCurrentInstance.md index 126008e2da0b..9d7d66b9daa5 100644 --- a/docs/apis/taro.extend/getCurrentInstance.md +++ b/docs/apis/taro.extend/getCurrentInstance.md @@ -5,7 +5,7 @@ sidebar_label: getCurrentInstance 获取当前页面实例 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/getEnv.md b/docs/apis/taro.extend/getEnv.md index 9e0525d861cb..de74c1cc18ba 100644 --- a/docs/apis/taro.extend/getEnv.md +++ b/docs/apis/taro.extend/getEnv.md @@ -5,7 +5,7 @@ sidebar_label: getEnv 获取环境变量 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/initPxTransform.md b/docs/apis/taro.extend/initPxTransform.md index 177492090eff..913134e19de7 100644 --- a/docs/apis/taro.extend/initPxTransform.md +++ b/docs/apis/taro.extend/initPxTransform.md @@ -5,7 +5,7 @@ sidebar_label: initPxTransform 尺寸转换初始化 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/interceptorify.md b/docs/apis/taro.extend/interceptorify.md index 34fcf10a32f9..717d230dbf31 100644 --- a/docs/apis/taro.extend/interceptorify.md +++ b/docs/apis/taro.extend/interceptorify.md @@ -5,7 +5,7 @@ sidebar_label: interceptorify 包裹 promiseify api 的洋葱圈模型 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/pxTransform.md b/docs/apis/taro.extend/pxTransform.md index 53445ac8172c..001dfeb307c7 100644 --- a/docs/apis/taro.extend/pxTransform.md +++ b/docs/apis/taro.extend/pxTransform.md @@ -5,7 +5,7 @@ sidebar_label: pxTransform 尺寸转换 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.extend/setGlobalDataPlugin.md b/docs/apis/taro.extend/setGlobalDataPlugin.md index df85c2a742f6..131aecef9beb 100644 --- a/docs/apis/taro.extend/setGlobalDataPlugin.md +++ b/docs/apis/taro.extend/setGlobalDataPlugin.md @@ -5,7 +5,7 @@ sidebar_label: setGlobalDataPlugin Vue3 插件,用于设置 `getApp()` 中的全局变量 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useDidHide.md b/docs/apis/taro.hooks/useDidHide.md index d05724ec904b..ab4a6377b2c7 100644 --- a/docs/apis/taro.hooks/useDidHide.md +++ b/docs/apis/taro.hooks/useDidHide.md @@ -5,7 +5,7 @@ sidebar_label: useDidHide 页面隐藏时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useDidShow.md b/docs/apis/taro.hooks/useDidShow.md index 211fc066814a..f1dc51c15638 100644 --- a/docs/apis/taro.hooks/useDidShow.md +++ b/docs/apis/taro.hooks/useDidShow.md @@ -5,7 +5,7 @@ sidebar_label: useDidShow 页面展示时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useError.md b/docs/apis/taro.hooks/useError.md index 25502aec5576..b4964bca93f6 100644 --- a/docs/apis/taro.hooks/useError.md +++ b/docs/apis/taro.hooks/useError.md @@ -5,7 +5,7 @@ sidebar_label: useError 小程序发生脚本错误或 API 调用报错时触发的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useLaunch.md b/docs/apis/taro.hooks/useLaunch.md index e1fa0dcef1ef..938996ed6826 100644 --- a/docs/apis/taro.hooks/useLaunch.md +++ b/docs/apis/taro.hooks/useLaunch.md @@ -5,7 +5,7 @@ sidebar_label: useLaunch 小程序初始化完成时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useLoad.md b/docs/apis/taro.hooks/useLoad.md index 53831051b44c..1a1cb2b7d70b 100644 --- a/docs/apis/taro.hooks/useLoad.md +++ b/docs/apis/taro.hooks/useLoad.md @@ -5,7 +5,7 @@ sidebar_label: useLoad 页面加载完成时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/usePageNotFound.md b/docs/apis/taro.hooks/usePageNotFound.md index 6495de6909d5..e971b5911f75 100644 --- a/docs/apis/taro.hooks/usePageNotFound.md +++ b/docs/apis/taro.hooks/usePageNotFound.md @@ -5,7 +5,7 @@ sidebar_label: usePageNotFound 小程序要打开的页面不存在时触发的回调。 -支持情况: +支持情况: > H5: 多页面模式不支持该方法 diff --git a/docs/apis/taro.hooks/usePageScroll.md b/docs/apis/taro.hooks/usePageScroll.md index 85f8e918476f..783b87666f65 100644 --- a/docs/apis/taro.hooks/usePageScroll.md +++ b/docs/apis/taro.hooks/usePageScroll.md @@ -5,7 +5,7 @@ sidebar_label: usePageScroll 页面滚动时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/usePullDownRefresh.md b/docs/apis/taro.hooks/usePullDownRefresh.md index 8485b43b4d34..8be0e3c5baee 100644 --- a/docs/apis/taro.hooks/usePullDownRefresh.md +++ b/docs/apis/taro.hooks/usePullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: usePullDownRefresh 下拉刷新时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/usePullIntercept.md b/docs/apis/taro.hooks/usePullIntercept.md index f85c965969f0..60d28f5d22e0 100644 --- a/docs/apis/taro.hooks/usePullIntercept.md +++ b/docs/apis/taro.hooks/usePullIntercept.md @@ -5,7 +5,7 @@ sidebar_label: usePullIntercept 下拉中断时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useReachBottom.md b/docs/apis/taro.hooks/useReachBottom.md index c603995244e7..326d7cb372c8 100644 --- a/docs/apis/taro.hooks/useReachBottom.md +++ b/docs/apis/taro.hooks/useReachBottom.md @@ -5,7 +5,7 @@ sidebar_label: useReachBottom 上拉触底时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useReady.md b/docs/apis/taro.hooks/useReady.md index 4eba419ada5d..cdcb37d660ac 100644 --- a/docs/apis/taro.hooks/useReady.md +++ b/docs/apis/taro.hooks/useReady.md @@ -6,7 +6,7 @@ sidebar_label: useReady 页面初次渲染完成的回调。 此时页面已经准备妥当,可以和视图层进行交互。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useResize.md b/docs/apis/taro.hooks/useResize.md index c0ec05209de3..61360e731449 100644 --- a/docs/apis/taro.hooks/useResize.md +++ b/docs/apis/taro.hooks/useResize.md @@ -5,7 +5,7 @@ sidebar_label: useResize 页面尺寸改变时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useRouter.md b/docs/apis/taro.hooks/useRouter.md index de41f6dbcd58..b2abb07fa575 100644 --- a/docs/apis/taro.hooks/useRouter.md +++ b/docs/apis/taro.hooks/useRouter.md @@ -5,7 +5,7 @@ sidebar_label: useRouter 获取当前路由参数。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useTabItemTap.md b/docs/apis/taro.hooks/useTabItemTap.md index 656d24e1021b..667247945c75 100644 --- a/docs/apis/taro.hooks/useTabItemTap.md +++ b/docs/apis/taro.hooks/useTabItemTap.md @@ -5,7 +5,7 @@ sidebar_label: useTabItemTap 当前是 tab 页时,tab 被点击时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useUnhandledRejection.md b/docs/apis/taro.hooks/useUnhandledRejection.md index 9ec904a41974..b8ce0f2be554 100644 --- a/docs/apis/taro.hooks/useUnhandledRejection.md +++ b/docs/apis/taro.hooks/useUnhandledRejection.md @@ -5,7 +5,7 @@ sidebar_label: useUnhandledRejection 小程序有未处理的 Promise reject 时触发。也可以使用 Taro.onUnhandledRejection 绑定监听。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/taro.hooks/useUnload.md b/docs/apis/taro.hooks/useUnload.md index 5c39d64cd8c2..b3c405a2274e 100644 --- a/docs/apis/taro.hooks/useUnload.md +++ b/docs/apis/taro.hooks/useUnload.md @@ -5,7 +5,7 @@ sidebar_label: useUnload 页面卸载时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/docs/apis/ui/animation/Animation.md b/docs/apis/ui/animation/Animation.md index 4a874956e610..3dc0a54fc7c6 100644 --- a/docs/apis/ui/animation/Animation.md +++ b/docs/apis/ui/animation/Animation.md @@ -5,7 +5,7 @@ sidebar_label: Animation 动画对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.html) @@ -15,7 +15,7 @@ sidebar_label: Animation 导出动画队列。**export 方法每次调用后会清掉之前的动画操作**。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.export.html) @@ -27,7 +27,7 @@ sidebar_label: Animation 表示一组动画完成。可以在一组动画中调用任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.step.html) @@ -43,7 +43,7 @@ sidebar_label: Animation 同 [transform-function matrix](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix.html) @@ -64,7 +64,7 @@ sidebar_label: Animation 同 [transform-function matrix3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix3d.html) @@ -95,7 +95,7 @@ sidebar_label: Animation 从原点顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate.html) @@ -111,7 +111,7 @@ sidebar_label: Animation 从 固定 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate3d.html) @@ -130,7 +130,7 @@ sidebar_label: Animation 从 X 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateX.html) @@ -146,7 +146,7 @@ sidebar_label: Animation 从 Y 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateY.html) @@ -162,7 +162,7 @@ sidebar_label: Animation 从 Z 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateZ.html) @@ -178,7 +178,7 @@ sidebar_label: Animation 缩放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale.html) @@ -195,7 +195,7 @@ sidebar_label: Animation 缩放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale3d.html) @@ -213,7 +213,7 @@ sidebar_label: Animation 缩放 X 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleX.html) @@ -229,7 +229,7 @@ sidebar_label: Animation 缩放 Y 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleY.html) @@ -245,7 +245,7 @@ sidebar_label: Animation 缩放 Z 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleZ.html) @@ -261,7 +261,7 @@ sidebar_label: Animation 对 X、Y 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skew.html) @@ -278,7 +278,7 @@ sidebar_label: Animation 对 X 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewX.html) @@ -294,7 +294,7 @@ sidebar_label: Animation 对 Y 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewY.html) @@ -310,7 +310,7 @@ sidebar_label: Animation 平移变换 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate.html) @@ -327,7 +327,7 @@ sidebar_label: Animation 对 xyz 坐标进行平移变换 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate3d.html) @@ -345,7 +345,7 @@ sidebar_label: Animation 对 X 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateX.html) @@ -361,7 +361,7 @@ sidebar_label: Animation 对 Y 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateY.html) @@ -377,7 +377,7 @@ sidebar_label: Animation 对 Z 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateZ.html) @@ -393,7 +393,7 @@ sidebar_label: Animation 设置透明度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.opacity.html) @@ -409,7 +409,7 @@ sidebar_label: Animation 设置背景色 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.backgroundColor.html) @@ -425,7 +425,7 @@ sidebar_label: Animation 设置宽度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.width.html) @@ -441,7 +441,7 @@ sidebar_label: Animation 设置高度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.height.html) @@ -457,7 +457,7 @@ sidebar_label: Animation 设置 left 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.left.html) @@ -473,7 +473,7 @@ sidebar_label: Animation 设置 right 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.right.html) @@ -489,7 +489,7 @@ sidebar_label: Animation 设置 top 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.top.html) @@ -505,7 +505,7 @@ sidebar_label: Animation 设置 bottom 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.bottom.html) @@ -542,36 +542,36 @@ sidebar_label: Animation ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| Animation | ✔️ | ✔️ | ✔️ | | | -| Animation.export | ✔️ | ✔️ | ✔️ | | | -| Animation.step | ✔️ | ✔️ | ✔️ | | | -| Animation.matrix | ✔️ | ✔️ | ✔️ | | | -| Animation.matrix3d | ✔️ | ✔️ | ✔️ | | | -| Animation.rotate | ✔️ | ✔️ | ✔️ | | | -| Animation.rotate3d | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateX | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateY | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateZ | ✔️ | ✔️ | ✔️ | | | -| Animation.scale | ✔️ | ✔️ | ✔️ | | | -| Animation.scale3d | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleX | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleY | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleZ | ✔️ | ✔️ | ✔️ | | | -| Animation.skew | ✔️ | ✔️ | ✔️ | | | -| Animation.skewX | ✔️ | ✔️ | ✔️ | | | -| Animation.skewY | ✔️ | ✔️ | ✔️ | | | -| Animation.translate | ✔️ | ✔️ | ✔️ | | | -| Animation.translate3d | ✔️ | ✔️ | ✔️ | | | -| Animation.translateX | ✔️ | ✔️ | ✔️ | | | -| Animation.translateY | ✔️ | ✔️ | ✔️ | | | -| Animation.translateZ | ✔️ | ✔️ | ✔️ | | | -| Animation.opacity | ✔️ | ✔️ | ✔️ | | | -| Animation.backgroundColor | ✔️ | ✔️ | ✔️ | | | -| Animation.width | ✔️ | ✔️ | ✔️ | | | -| Animation.height | ✔️ | ✔️ | ✔️ | | | -| Animation.left | ✔️ | ✔️ | ✔️ | | | -| Animation.right | ✔️ | ✔️ | ✔️ | | | -| Animation.top | ✔️ | ✔️ | ✔️ | | | -| Animation.bottom | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| Animation | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.export | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.step | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.matrix | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.matrix3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotate | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotate3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scale | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scale3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skew | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skewX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skewY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translate | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translate3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.opacity | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.backgroundColor | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.width | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.height | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.left | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.right | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.top | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.bottom | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/apis/ui/animation/createAnimation.md b/docs/apis/ui/animation/createAnimation.md index 47ac8dc59aeb..a410f065ff8f 100644 --- a/docs/apis/ui/animation/createAnimation.md +++ b/docs/apis/ui/animation/createAnimation.md @@ -5,7 +5,7 @@ sidebar_label: createAnimation 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/wx.createAnimation.html) diff --git a/docs/apis/ui/custom-component/nextTick.md b/docs/apis/ui/custom-component/nextTick.md index 291145e0f6d9..e9f4b9d9c404 100644 --- a/docs/apis/ui/custom-component/nextTick.md +++ b/docs/apis/ui/custom-component/nextTick.md @@ -9,7 +9,7 @@ sidebar_label: nextTick 因为自定义组件中的 setData 和 triggerEvent 等接口本身是同步的操作,当这几个接口被连续调用时,都是在一个同步流程中执行完的,因此若逻辑不当可能会导致出错。 一个极端的案例:当父组件的 setData 引发了子组件的 triggerEvent,进而使得父组件又进行了一次 setData,期间有通过 wx:if 语句对子组件进行卸载,就有可能引发奇怪的错误,所以对于不需要在一个同步流程内完成的逻辑,可以使用此接口延迟到下一个时间片再执行。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/custom-component/wx.nextTick.html) diff --git a/docs/apis/ui/fonts/loadFontFace.md b/docs/apis/ui/fonts/loadFontFace.md index e9276afea6f8..7ac0233e0fac 100644 --- a/docs/apis/ui/fonts/loadFontFace.md +++ b/docs/apis/ui/fonts/loadFontFace.md @@ -12,7 +12,7 @@ sidebar_label: loadFontFace 4. canvas等原生组件不支持使用接口添加的字体 5. 工具里提示 Failed to load font 可以忽略 -支持情况: +支持情况: > 支付宝小程序: source 地址格式为 `url('https://...')`,而不是单纯 URL 地址 > diff --git a/docs/apis/ui/interaction/hideLoading.md b/docs/apis/ui/interaction/hideLoading.md index 7da00ee445a6..e10b3cac7640 100644 --- a/docs/apis/ui/interaction/hideLoading.md +++ b/docs/apis/ui/interaction/hideLoading.md @@ -5,7 +5,7 @@ sidebar_label: hideLoading 隐藏 loading 提示框 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideLoading.html) diff --git a/docs/apis/ui/interaction/hideToast.md b/docs/apis/ui/interaction/hideToast.md index e2d429fe1e93..ee5a39a17995 100644 --- a/docs/apis/ui/interaction/hideToast.md +++ b/docs/apis/ui/interaction/hideToast.md @@ -5,7 +5,7 @@ sidebar_label: hideToast 隐藏消息提示框 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideToast.html) diff --git a/docs/apis/ui/interaction/showActionSheet.md b/docs/apis/ui/interaction/showActionSheet.md index 7fa1c622be02..50c4762d033f 100644 --- a/docs/apis/ui/interaction/showActionSheet.md +++ b/docs/apis/ui/interaction/showActionSheet.md @@ -9,7 +9,7 @@ sidebar_label: showActionSheet - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel"; - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showActionSheet.html) diff --git a/docs/apis/ui/interaction/showLoading.md b/docs/apis/ui/interaction/showLoading.md index d922d7c055fb..7d2fcc176ea8 100644 --- a/docs/apis/ui/interaction/showLoading.md +++ b/docs/apis/ui/interaction/showLoading.md @@ -9,7 +9,7 @@ sidebar_label: showLoading - Taro.showLoading 和 Taro.showToast 同时只能显示一个 - Taro.showLoading 应与 Taro.hideLoading 配对使用 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showLoading.html) diff --git a/docs/apis/ui/interaction/showModal.md b/docs/apis/ui/interaction/showModal.md index 6ab68517d750..1287bd1f5939 100644 --- a/docs/apis/ui/interaction/showModal.md +++ b/docs/apis/ui/interaction/showModal.md @@ -8,7 +8,7 @@ sidebar_label: showModal - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel"; - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showModal.html) diff --git a/docs/apis/ui/interaction/showToast.md b/docs/apis/ui/interaction/showToast.md index 8e8d9d45bf80..38d31fdce99a 100644 --- a/docs/apis/ui/interaction/showToast.md +++ b/docs/apis/ui/interaction/showToast.md @@ -9,7 +9,7 @@ sidebar_label: showToast - Taro.showLoading 和 Taro.showToast 同时只能显示一个 - Taro.showToast 应与 Taro.hideToast 配对使用 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showToast.html) diff --git a/docs/apis/ui/menu/getMenuButtonBoundingClientRect.md b/docs/apis/ui/menu/getMenuButtonBoundingClientRect.md index 8209d056e184..f52654c2db2d 100644 --- a/docs/apis/ui/menu/getMenuButtonBoundingClientRect.md +++ b/docs/apis/ui/menu/getMenuButtonBoundingClientRect.md @@ -5,7 +5,7 @@ sidebar_label: getMenuButtonBoundingClientRect 获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.getMenuButtonBoundingClientRect.html) diff --git a/docs/apis/ui/navigation-bar/setNavigationBarColor.md b/docs/apis/ui/navigation-bar/setNavigationBarColor.md index bf81b742e56c..de08853a1ebd 100644 --- a/docs/apis/ui/navigation-bar/setNavigationBarColor.md +++ b/docs/apis/ui/navigation-bar/setNavigationBarColor.md @@ -5,7 +5,7 @@ sidebar_label: setNavigationBarColor 设置页面导航条颜色 -支持情况: +支持情况: > H5: 不支持 animation 参数 > diff --git a/docs/apis/ui/navigation-bar/setNavigationBarTitle.md b/docs/apis/ui/navigation-bar/setNavigationBarTitle.md index 772bb9135cac..a9c7c951f3f1 100644 --- a/docs/apis/ui/navigation-bar/setNavigationBarTitle.md +++ b/docs/apis/ui/navigation-bar/setNavigationBarTitle.md @@ -5,7 +5,7 @@ sidebar_label: setNavigationBarTitle 动态设置当前页面的标题 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.setNavigationBarTitle.html) diff --git a/docs/apis/ui/pull-down-refresh/startPullDownRefresh.md b/docs/apis/ui/pull-down-refresh/startPullDownRefresh.md index 1237eb90f16c..147ee2f6648b 100644 --- a/docs/apis/ui/pull-down-refresh/startPullDownRefresh.md +++ b/docs/apis/ui/pull-down-refresh/startPullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: startPullDownRefresh 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。 -支持情况: +支持情况: > React Native: 无动画效果 diff --git a/docs/apis/ui/pull-down-refresh/stopPullDownRefresh.md b/docs/apis/ui/pull-down-refresh/stopPullDownRefresh.md index 643fab836e10..e07a418f059e 100644 --- a/docs/apis/ui/pull-down-refresh/stopPullDownRefresh.md +++ b/docs/apis/ui/pull-down-refresh/stopPullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: stopPullDownRefresh 停止当前页面下拉刷新。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/pull-down-refresh/wx.stopPullDownRefresh.html) diff --git a/docs/apis/ui/scroll/pageScrollTo.md b/docs/apis/ui/scroll/pageScrollTo.md index b65512e4cfb0..2a2d867bd8bd 100644 --- a/docs/apis/ui/scroll/pageScrollTo.md +++ b/docs/apis/ui/scroll/pageScrollTo.md @@ -15,7 +15,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html) diff --git a/docs/apis/ui/tab-bar/hideTabBar.md b/docs/apis/ui/tab-bar/hideTabBar.md index 242f5cc02d04..c4458ca65f1f 100644 --- a/docs/apis/ui/tab-bar/hideTabBar.md +++ b/docs/apis/ui/tab-bar/hideTabBar.md @@ -5,7 +5,7 @@ sidebar_label: hideTabBar 隐藏 tabBar -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBar.html) diff --git a/docs/apis/ui/tab-bar/hideTabBarRedDot.md b/docs/apis/ui/tab-bar/hideTabBarRedDot.md index 490fbb90e41f..2c3da47bc628 100644 --- a/docs/apis/ui/tab-bar/hideTabBarRedDot.md +++ b/docs/apis/ui/tab-bar/hideTabBarRedDot.md @@ -5,7 +5,7 @@ sidebar_label: hideTabBarRedDot 隐藏 tabBar 某一项的右上角的红点 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBarRedDot.html) diff --git a/docs/apis/ui/tab-bar/removeTabBarBadge.md b/docs/apis/ui/tab-bar/removeTabBarBadge.md index b66a1a15ed13..d2b2a511a5ec 100644 --- a/docs/apis/ui/tab-bar/removeTabBarBadge.md +++ b/docs/apis/ui/tab-bar/removeTabBarBadge.md @@ -5,7 +5,7 @@ sidebar_label: removeTabBarBadge 移除 tabBar 某一项右上角的文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.removeTabBarBadge.html) diff --git a/docs/apis/ui/tab-bar/setTabBarBadge.md b/docs/apis/ui/tab-bar/setTabBarBadge.md index 62569d376fdc..42e6a987897d 100644 --- a/docs/apis/ui/tab-bar/setTabBarBadge.md +++ b/docs/apis/ui/tab-bar/setTabBarBadge.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarBadge 为 tabBar 某一项的右上角添加文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarBadge.html) diff --git a/docs/apis/ui/tab-bar/setTabBarItem.md b/docs/apis/ui/tab-bar/setTabBarItem.md index 1f5d62657910..220a6fe129f1 100644 --- a/docs/apis/ui/tab-bar/setTabBarItem.md +++ b/docs/apis/ui/tab-bar/setTabBarItem.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarItem 动态设置 tabBar 某一项的内容,`2.7.0` 起图片支持临时文件和网络文件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarItem.html) diff --git a/docs/apis/ui/tab-bar/setTabBarStyle.md b/docs/apis/ui/tab-bar/setTabBarStyle.md index 6486816bc1bc..954c675397a1 100644 --- a/docs/apis/ui/tab-bar/setTabBarStyle.md +++ b/docs/apis/ui/tab-bar/setTabBarStyle.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarStyle 动态设置 tabBar 的整体样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarStyle.html) diff --git a/docs/apis/ui/tab-bar/showTabBar.md b/docs/apis/ui/tab-bar/showTabBar.md index eab31b10744d..924986a4e527 100644 --- a/docs/apis/ui/tab-bar/showTabBar.md +++ b/docs/apis/ui/tab-bar/showTabBar.md @@ -5,7 +5,7 @@ sidebar_label: showTabBar 显示 tabBar -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html) diff --git a/docs/apis/ui/tab-bar/showTabBarRedDot.md b/docs/apis/ui/tab-bar/showTabBarRedDot.md index d47caaca9008..508dcd472fbb 100644 --- a/docs/apis/ui/tab-bar/showTabBarRedDot.md +++ b/docs/apis/ui/tab-bar/showTabBarRedDot.md @@ -5,7 +5,7 @@ sidebar_label: showTabBarRedDot 显示 tabBar 某一项的右上角的红点 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBarRedDot.html) diff --git a/docs/apis/ui/window/offWindowResize.md b/docs/apis/ui/window/offWindowResize.md index 9de94214dc6f..b4d21f87dd48 100644 --- a/docs/apis/ui/window/offWindowResize.md +++ b/docs/apis/ui/window/offWindowResize.md @@ -5,7 +5,7 @@ sidebar_label: offWindowResize 取消监听窗口尺寸变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.offWindowResize.html) diff --git a/docs/apis/ui/window/onWindowResize.md b/docs/apis/ui/window/onWindowResize.md index 1c1e7a415e33..9fb9cc7dacf6 100644 --- a/docs/apis/ui/window/onWindowResize.md +++ b/docs/apis/ui/window/onWindowResize.md @@ -5,7 +5,7 @@ sidebar_label: onWindowResize 监听窗口尺寸变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.onWindowResize.html) diff --git a/docs/apis/wxml/IntersectionObserver.md b/docs/apis/wxml/IntersectionObserver.md index 701a993a3823..18da2ff9af4b 100644 --- a/docs/apis/wxml/IntersectionObserver.md +++ b/docs/apis/wxml/IntersectionObserver.md @@ -13,7 +13,7 @@ sidebar_label: IntersectionObserver 停止监听。回调函数将不再触发 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.disconnect.html) @@ -25,7 +25,7 @@ sidebar_label: IntersectionObserver 指定目标节点并开始监听相交状态变化情况 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.observe.html) @@ -42,7 +42,7 @@ sidebar_label: IntersectionObserver 使用选择器指定一个节点,作为参照区域之一。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeTo.html) @@ -59,7 +59,7 @@ sidebar_label: IntersectionObserver 指定页面显示区域作为参照区域之一 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeToViewport.html) @@ -171,9 +171,9 @@ Taro.createIntersectionObserver().relativeToViewport({bottom: 100}).observe('.ta ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| IntersectionObserver.disconnect | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.observe | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.relativeTo | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.relativeToViewport | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| IntersectionObserver.disconnect | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.observe | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.relativeTo | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.relativeToViewport | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/apis/wxml/NodesRef.md b/docs/apis/wxml/NodesRef.md index 1bd77dbc1bcf..65ac91f5a6b7 100644 --- a/docs/apis/wxml/NodesRef.md +++ b/docs/apis/wxml/NodesRef.md @@ -13,7 +13,7 @@ sidebar_label: NodesRef 添加节点的布局位置的查询请求。相对于显示区域,以像素为单位。其功能类似于 DOM 的 `getBoundingClientRect`。返回 `NodesRef` 对应的 `SelectorQuery`。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.boundingClientRect.html) @@ -63,7 +63,7 @@ Taro.createSelectorQuery().selectAll('.a-class').boundingClientRect(function(rec 添加节点的 Context 对象查询请求。目前支持 [VideoContext](/docs/apis/media/video/VideoContext)、[CanvasContext](/docs/apis/canvas/CanvasContext)、[LivePlayerContext](/docs/apis/media/live/LivePlayerContext)、[EditorContext](/docs/apis/media/editor/EditorContext)和 [MapContext](/docs/apis/media/map/MapContext) 的获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.context.html) @@ -90,7 +90,7 @@ Taro.createSelectorQuery().select('.the-video-class').context(function (res) { **注意** computedStyle 的优先级高于 size,当同时在 computedStyle 里指定了 width/height 和传入了 size: true,则优先返回 computedStyle 获取到的 width/height。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.fields.html) @@ -132,7 +132,7 @@ Taro.createSelectorQuery().select('#the-id').fields({ 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas) 的获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.node.html) @@ -156,7 +156,7 @@ Taro.createSelectorQuery().select('.canvas').node(function(res){ 添加节点的滚动位置查询请求。以像素为单位。节点必须是 `scroll-view` 或者 `viewport`,返回 `NodesRef` 对应的 `SelectorQuery`。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.scrollOffset.html) @@ -294,10 +294,10 @@ Taro.createSelectorQuery().selectViewport().scrollOffset(function(res){ ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| NodesRef.boundingClientRect | ✔️ | ✔️ | ✔️ | | | -| NodesRef.context | ✔️ | ✔️ | ✔️ | | | -| NodesRef.fields | ✔️ | ✔️ | ✔️ | | | -| NodesRef.node | ✔️ | ✔️ | ✔️ | | | -| NodesRef.scrollOffset | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| NodesRef.boundingClientRect | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.context | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.fields | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.node | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.scrollOffset | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/apis/wxml/SelectorQuery.md b/docs/apis/wxml/SelectorQuery.md index 5d37e91384af..d7c94ea350d8 100644 --- a/docs/apis/wxml/SelectorQuery.md +++ b/docs/apis/wxml/SelectorQuery.md @@ -13,7 +13,7 @@ sidebar_label: SelectorQuery 执行所有的请求。请求结果按请求次序构成数组,在callback的第一个参数中返回。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.exec.html) @@ -29,7 +29,7 @@ sidebar_label: SelectorQuery 将选择器的选取范围更改为自定义组件 `component` 内。(初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.in.html) @@ -70,7 +70,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.select.html) @@ -116,7 +116,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectAll.html) @@ -132,7 +132,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectViewport.html) @@ -153,10 +153,10 @@ Taro.createSelectorQuery().selectViewport().scrollOffset(function (res) { ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| SelectorQuery.exec | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.in | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.select | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.selectAll | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.selectViewport | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SelectorQuery.exec | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.in | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.select | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.selectAll | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.selectViewport | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/apis/wxml/createIntersectionObserver.md b/docs/apis/wxml/createIntersectionObserver.md index 161a2aab75c2..fa34f33cacdd 100644 --- a/docs/apis/wxml/createIntersectionObserver.md +++ b/docs/apis/wxml/createIntersectionObserver.md @@ -5,7 +5,7 @@ sidebar_label: createIntersectionObserver 创建并返回一个 IntersectionObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createIntersectionObserver([options])` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/wx.createIntersectionObserver.html) diff --git a/docs/apis/wxml/createMediaQueryObserver.md b/docs/apis/wxml/createMediaQueryObserver.md index 7a28cd60d33d..a883ddff6ea1 100644 --- a/docs/apis/wxml/createMediaQueryObserver.md +++ b/docs/apis/wxml/createMediaQueryObserver.md @@ -5,7 +5,7 @@ sidebar_label: createMediaQueryObserver 创建并返回一个 MediaQueryObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createMediaQueryObserver()` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html#Media%20Query) diff --git a/docs/apis/wxml/createSelectorQuery.md b/docs/apis/wxml/createSelectorQuery.md index a6bf96787494..10d8e9e143d9 100644 --- a/docs/apis/wxml/createSelectorQuery.md +++ b/docs/apis/wxml/createSelectorQuery.md @@ -5,7 +5,7 @@ sidebar_label: createSelectorQuery 返回一个 SelectorQuery 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createSelectorQuery()` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/wx.createSelectorQuery.html) diff --git a/docs/components/base/icon.md b/docs/components/base/icon.md index c3b9f74cb557..2aca96db67e2 100755 --- a/docs/components/base/icon.md +++ b/docs/components/base/icon.md @@ -5,7 +5,7 @@ sidebar_label: Icon 图标。组件属性的长度单位默认为 px -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/icon.html) @@ -83,12 +83,12 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| IconProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.ariaLabel | | | | | ✔️ | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| IconProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.ariaLabel | | | | | ✔️ | | | | | | ### TIconType diff --git a/docs/components/base/progress.md b/docs/components/base/progress.md index 1cb18a50d0f8..5c3a46eecd3a 100755 --- a/docs/components/base/progress.md +++ b/docs/components/base/progress.md @@ -5,7 +5,7 @@ sidebar_label: Progress 进度条。组件属性的长度单位默认为 px -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/progress.html) @@ -80,18 +80,18 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ProgressProps.percent | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.showInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.borderRadius | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.fontSize | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.strokeWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.color | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.active | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.activeMode | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.duration | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | -| ProgressProps.ariaLabel | | | | | ✔️ | | | | | -| ProgressProps.onActiveEnd | ✔️ | | | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ProgressProps.percent | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.showInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.borderRadius | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.fontSize | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.strokeWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.color | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.active | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.activeMode | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.duration | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.ariaLabel | | | | | ✔️ | | | | | | +| ProgressProps.onActiveEnd | ✔️ | | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/components/base/rich-text.md b/docs/components/base/rich-text.md index 09a3ba44baa3..059b11c96fa3 100755 --- a/docs/components/base/rich-text.md +++ b/docs/components/base/rich-text.md @@ -5,7 +5,7 @@ sidebar_label: RichText 富文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html) @@ -104,20 +104,20 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RichTextProps.userSelect | ✔️ | | | | | ✔️ | | | -| RichTextProps.nodes | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | -| RichTextProps.space | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RichTextProps.selectable | | ✔️ | | | | ✔️ | | | -| RichTextProps.imageMenuPrevent | | ✔️ | | | | | | | -| RichTextProps.preview | | ✔️ | | | | | | | -| RichTextProps.onTap | | | ✔️ | | | | | | -| RichTextProps.onTouchstart | | | ✔️ | | | | | | -| RichTextProps.onTouchmove | | | ✔️ | | | | | | -| RichTextProps.onTouchcancel | | | ✔️ | | | | | | -| RichTextProps.onTouchend | | | ✔️ | | | | | | -| RichTextProps.onLongtap | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RichTextProps.userSelect | ✔️ | | | | | ✔️ | | | ✔️ | +| RichTextProps.nodes | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| RichTextProps.space | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RichTextProps.selectable | | ✔️ | | | | ✔️ | | | ✔️ | +| RichTextProps.imageMenuPrevent | | ✔️ | | | | | | | | +| RichTextProps.preview | | ✔️ | | | | | | | | +| RichTextProps.onTap | | | ✔️ | | | | | | | +| RichTextProps.onTouchstart | | | ✔️ | | | | | | | +| RichTextProps.onTouchmove | | | ✔️ | | | | | | | +| RichTextProps.onTouchcancel | | | ✔️ | | | | | | | +| RichTextProps.onTouchend | | | ✔️ | | | | | | | +| RichTextProps.onLongtap | | | ✔️ | | | | | | | ### TSpace diff --git a/docs/components/base/text.md b/docs/components/base/text.md index aa590a92f0f2..bdeaa7959323 100755 --- a/docs/components/base/text.md +++ b/docs/components/base/text.md @@ -5,7 +5,7 @@ sidebar_label: Text 文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/text.html) @@ -119,18 +119,20 @@ export default { | space | `keyof TSpace` | | 否 | 显示连续空格 | | decode | `boolean` | `false` | 否 | 是否解码 | | numberOfLines | `number` | | 否 | 多行省略,值须大于等于 1,表现同 css 的 -webkit-line-clamp 属性一致。 | +| overflow | `keyof Overflow` | `'visible'` | 否 | 文本溢出处理 | | maxLines | `number` | | 否 | 限制文本最大行数 | ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| TextProps.selectable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextProps.userSelect | ✔️ | | | | | | ✔️ | | | -| TextProps.space | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| TextProps.decode | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | (默认解码,不支持设置) | | | -| TextProps.numberOfLines | | | ✔️ | | | | | | | -| TextProps.maxLines | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| TextProps.selectable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextProps.userSelect | ✔️ | | | | | | ✔️ | | | ✔️ | +| TextProps.space | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| TextProps.decode | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | (默认解码,不支持设置) | | | | +| TextProps.numberOfLines | | | ✔️ | | | | | | | | +| TextProps.overflow | | | | | | | | | | | +| TextProps.maxLines | ✔️ | | | | | | | | | | ### TSpace @@ -141,3 +143,12 @@ space 的合法值 | ensp | 中文字符空格一半大小 | | emsp | 中文字符空格大小 | | nbsp | 根据字体设置的空格大小 | + +### Overflow + +| 参数 | 说明 | +| --- | --- | +| clip | 修剪文本 | +| fade | 淡出 | +| ellipsis | 显示省略号 | +| visible | 文本不截断 | diff --git a/docs/components/canvas/canvas.md b/docs/components/canvas/canvas.md index 29fa218bb86f..1a83d55ced3f 100755 --- a/docs/components/canvas/canvas.md +++ b/docs/components/canvas/canvas.md @@ -7,7 +7,7 @@ sidebar_label: Canvas `` 组件的 RN 版本尚未实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html) @@ -72,23 +72,23 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CanvasProps.type | ✔️ | | ✔️ | ✔️ | | | | | | -| CanvasProps.canvasId | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.disableScroll | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| CanvasProps.id | | | ✔️ | | | | ✔️ | | | -| CanvasProps.width | | | ✔️ | | | | ✔️ | | | -| CanvasProps.height | | | ✔️ | | | | ✔️ | | | -| CanvasProps.nativeProps | | | | | | | ✔️ | | | -| CanvasProps.onTouchStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchCancel | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onLongTap | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onError | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | -| CanvasProps.onTap | | | ✔️ | | | | | | | -| CanvasProps.onReady | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CanvasProps.type | ✔️ | | ✔️ | ✔️ | | | | | | | +| CanvasProps.canvasId | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.disableScroll | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| CanvasProps.id | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.width | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.height | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| CanvasProps.onTouchStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchCancel | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onLongTap | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onError | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | | +| CanvasProps.onTap | | | ✔️ | | | | | | | | +| CanvasProps.onReady | | | ✔️ | | | | | | | | ### onErrorEventDetail diff --git a/docs/components/forms/button.md b/docs/components/forms/button.md index 6789b9e99004..c70f2b41d4a1 100755 --- a/docs/components/forms/button.md +++ b/docs/components/forms/button.md @@ -5,7 +5,7 @@ sidebar_label: Button 按钮 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) @@ -239,62 +239,62 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ButtonProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.plain | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.loading | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.formType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(支持 hoverStyle 属性,但框架未支持 hoverClass) | | -| ButtonProps.hoverStyle | | | | | | | | ✔️ | | -| ButtonProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.lang | ✔️ | | | | ✔️ | ✔️ | | | | -| ButtonProps.sessionFrom | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessageTitle | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessagePath | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessageImg | ✔️ | ✔️ | | | | | | | | -| ButtonProps.appParameter | ✔️ | | | | ✔️ | ✔️ | | | | -| ButtonProps.scope | | | ✔️ | | | | | | | -| ButtonProps.showMessageCard | ✔️ | ✔️ | | | | | | | | -| ButtonProps.publicId | | | ✔️ | | ✔️ | | | | | -| ButtonProps.templateId | | ✔️ | | | | | | | | -| ButtonProps.subscribeId | | ✔️ | | | | | | | | -| ButtonProps.groupId | | | | ✔️(通过创建聊天群、查询群信息获取) | ✔️(打开群资料卡时,传递的群号) | | | | | -| ButtonProps.guildId | | | | | ✔️ | | | | | -| ButtonProps.shareType | | | | | ✔️ | | | | | -| ButtonProps.shareMode | | | | | ✔️ | | | | | -| ButtonProps.ariaLabel | | | | | ✔️ | | | | | -| ButtonProps.openId | | | | | ✔️ | | | | | -| ButtonProps.shareMessageFriendInfo | | | | | ✔️ | | | | | -| ButtonProps.shareMessageTitle | | | | | ✔️ | | | | | -| ButtonProps.shareMessageImg | | | | | ✔️ | | | | | -| ButtonProps.dataAwemeId | | | | ✔️ | | | | | | -| ButtonProps.dataIsHalfPage | | | | ✔️ | | | | | | -| ButtonProps.onGetUserInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| ButtonProps.onGetAuthorize | | | ✔️ | | | | | | | -| ButtonProps.onContact | ✔️ | ✔️ | | | ✔️ | | | | | -| ButtonProps.onGetPhoneNumber | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | | -| ButtonProps.onGetRealTimePhoneNumber | ✔️ | | | | | | | | | -| ButtonProps.onError | ✔️ | | ✔️ | | ✔️ | ✔️ | | | | -| ButtonProps.onOpenSetting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.onLaunchApp | ✔️ | | | | ✔️ | | | | | -| ButtonProps.onChooseAvatar | ✔️ | | | | | | | | | -| ButtonProps.onAgreePrivacyAuthorization | ✔️ | | | | | | | | | -| ButtonProps.onTap | | | ✔️ | | | | | | | -| ButtonProps.onFollowLifestyle | | | ✔️ | | | | | | | -| ButtonProps.onChooseAddress | | ✔️ | | | | | | | | -| ButtonProps.onChooseInvoiceTitle | | ✔️ | | | | | | | | -| ButtonProps.onLogin | | ✔️ | | | | | | | | -| ButtonProps.onSubscribe | | ✔️ | | | | | | | | -| ButtonProps.onAddFriend | | | | | ✔️ | | | | | -| ButtonProps.onAddGroupApp | | | | | ✔️ | | | | | -| ButtonProps.onOpenAwemeUserProfile | | | | ✔️ | | | | | | -| ButtonProps.onJoinGroup | | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ButtonProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.plain | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.loading | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.formType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(支持 hoverStyle 属性,但框架未支持 hoverClass) | | ✔️ | +| ButtonProps.hoverStyle | | | | | | | | ✔️ | | | +| ButtonProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.lang | ✔️ | | | | ✔️ | ✔️ | | | | | +| ButtonProps.sessionFrom | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessageTitle | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessagePath | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessageImg | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.appParameter | ✔️ | | | | ✔️ | ✔️ | | | | | +| ButtonProps.scope | | | ✔️ | | | | | | | | +| ButtonProps.showMessageCard | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.publicId | | | ✔️ | | ✔️ | | | | | | +| ButtonProps.templateId | | ✔️ | | | | | | | | | +| ButtonProps.subscribeId | | ✔️ | | | | | | | | | +| ButtonProps.groupId | | | | ✔️(通过创建聊天群、查询群信息获取) | ✔️(打开群资料卡时,传递的群号) | | | | | | +| ButtonProps.guildId | | | | | ✔️ | | | | | | +| ButtonProps.shareType | | | | | ✔️ | | | | | | +| ButtonProps.shareMode | | | | | ✔️ | | | | | | +| ButtonProps.ariaLabel | | | | | ✔️ | | | | | | +| ButtonProps.openId | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageFriendInfo | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageTitle | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageImg | | | | | ✔️ | | | | | | +| ButtonProps.dataAwemeId | | | | ✔️ | | | | | | | +| ButtonProps.dataIsHalfPage | | | | ✔️ | | | | | | | +| ButtonProps.onGetUserInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| ButtonProps.onGetAuthorize | | | ✔️ | | | | | | | | +| ButtonProps.onContact | ✔️ | ✔️ | | | ✔️ | | | | | | +| ButtonProps.onGetPhoneNumber | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | | | +| ButtonProps.onGetRealTimePhoneNumber | ✔️ | | | | | | | | | | +| ButtonProps.onError | ✔️ | | ✔️ | | ✔️ | ✔️ | | | | | +| ButtonProps.onOpenSetting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.onLaunchApp | ✔️ | | | | ✔️ | | | | | | +| ButtonProps.onChooseAvatar | ✔️ | | | | | | | | | | +| ButtonProps.onAgreePrivacyAuthorization | ✔️ | | | | | | | | | | +| ButtonProps.onTap | | | ✔️ | | | | | | | | +| ButtonProps.onFollowLifestyle | | | ✔️ | | | | | | | | +| ButtonProps.onChooseAddress | | ✔️ | | | | | | | | | +| ButtonProps.onChooseInvoiceTitle | | ✔️ | | | | | | | | | +| ButtonProps.onLogin | | ✔️ | | | | | | | | | +| ButtonProps.onSubscribe | | ✔️ | | | | | | | | | +| ButtonProps.onAddFriend | | | | | ✔️ | | | | | | +| ButtonProps.onAddGroupApp | | | | | ✔️ | | | | | | +| ButtonProps.onOpenAwemeUserProfile | | | | ✔️ | | | | | | | +| ButtonProps.onJoinGroup | | | | ✔️ | | | | | | | ### Size diff --git a/docs/components/forms/checkbox-group.md b/docs/components/forms/checkbox-group.md index d63e6f9bce90..d3c5a27f55f2 100644 --- a/docs/components/forms/checkbox-group.md +++ b/docs/components/forms/checkbox-group.md @@ -5,7 +5,7 @@ sidebar_label: CheckboxGroup 多项选择器,内部由多个checkbox组成 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/checkbox-group.html) @@ -86,7 +86,7 @@ export default class PageCheckbox extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CheckboxGroupProps.name | | | ✔️ | ✔️ | | | ✔️ | | | -| CheckboxGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CheckboxGroupProps.name | | | ✔️ | ✔️ | | | ✔️ | | | ✔️ | +| CheckboxGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/docs/components/forms/checkbox.md b/docs/components/forms/checkbox.md index 2d7014adc70f..4a525b4d334b 100755 --- a/docs/components/forms/checkbox.md +++ b/docs/components/forms/checkbox.md @@ -5,7 +5,7 @@ sidebar_label: Checkbox 多选项目 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html) @@ -164,13 +164,13 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CheckboxProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.name | | | | | | | ✔️ | | ✔️ | -| CheckboxProps.nativeProps | | | | | | | ✔️ | | | -| CheckboxProps.ariaLabel | | | | | ✔️ | | | | | -| CheckboxProps.onChange | | | ✔️ | | | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CheckboxProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.name | | | | | | | ✔️ | | ✔️ | ✔️ | +| CheckboxProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| CheckboxProps.ariaLabel | | | | | ✔️ | | | | | | +| CheckboxProps.onChange | | | ✔️ | | | | ✔️ | ✔️ | | ✔️ | diff --git a/docs/components/forms/form.md b/docs/components/forms/form.md index 4da26219ea6b..f6ee840fda65 100755 --- a/docs/components/forms/form.md +++ b/docs/components/forms/form.md @@ -7,7 +7,7 @@ sidebar_label: Form 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/form.html) @@ -102,17 +102,17 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| FormProps.reportSubmit | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| FormProps.reportSubmitTimeout | ✔️ | | | | | | | | | -| FormProps.reportType | | ✔️ | | | | | | | | -| FormProps.templateId | | ✔️ | | | | | | | | -| FormProps.subscribeId | | ✔️ | | | | | | | | -| FormProps.conversionTarget | | | | ✔️ | | | | | | -| FormProps.clueComponentId | | | | ✔️ | | | | | | -| FormProps.onSubmit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| FormProps.onReset | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| FormProps.reportSubmit | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| FormProps.reportSubmitTimeout | ✔️ | | | | | | | | | | +| FormProps.reportType | | ✔️ | | | | | | | | | +| FormProps.templateId | | ✔️ | | | | | | | | | +| FormProps.subscribeId | | ✔️ | | | | | | | | | +| FormProps.conversionTarget | | | | ✔️ | | | | | | | +| FormProps.clueComponentId | | | | ✔️ | | | | | | | +| FormProps.onSubmit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| FormProps.onReset | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onSubmitEventDetail diff --git a/docs/components/forms/input.md b/docs/components/forms/input.md index c83b6ed1416f..435d2da11a79 100755 --- a/docs/components/forms/input.md +++ b/docs/components/forms/input.md @@ -5,7 +5,7 @@ sidebar_label: Input 输入框。该组件是原生组件,使用时请注意相关限制 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) @@ -123,48 +123,48 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| InputProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.password | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| InputProps.placeholderTextColor | | | | | | | | ✔️ | | -| InputProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| InputProps.autoFocus | ✔️ | | | | ✔️ | ✔️ | ✔️ | | | -| InputProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.confirmType | ✔️ | ✔️ | ✔️(confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system) | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.confirmHold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| InputProps.cursor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.selectionStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.selectionEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| InputProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | -| InputProps.alwaysEmbed | ✔️ | | | | | | | | | -| InputProps.safePasswordCertPath | ✔️ | | | | | | | | | -| InputProps.safePasswordLength | ✔️ | | | | | | | | | -| InputProps.safePasswordTimeStamp | ✔️ | | | | | | | | | -| InputProps.safePasswordNonce | ✔️ | | | | | | | | | -| InputProps.safePasswordSalt | ✔️ | | | | | | | | | -| InputProps.safePasswordCustomHash | ✔️ | | | | | | | | | -| InputProps.randomNumber | | | ✔️ | | | | | | | -| InputProps.controlled | | | ✔️ | | | | | | | -| InputProps.nativeProps | | | | | | | ✔️ | | | -| InputProps.name | | | ✔️ | | | | | | | -| InputProps.alwaysSystem | | | ✔️ | | | | | | | -| InputProps.ariaLabel | | | | | ✔️ | | | | | -| InputProps.clueType | | | | ✔️ | | | | | | -| InputProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onKeyboardHeightChange | ✔️ | | | ✔️ | ✔️ | | | | | -| InputProps.onNickNameReview | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| InputProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.password | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.placeholderTextColor | | | | | | | | ✔️ | | | +| InputProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.autoFocus | ✔️ | | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| InputProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.confirmType | ✔️ | ✔️ | ✔️(confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system) | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.confirmHold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.cursor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.selectionStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.selectionEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | | +| InputProps.alwaysEmbed | ✔️ | | | | | | | | | | +| InputProps.safePasswordCertPath | ✔️ | | | | | | | | | | +| InputProps.safePasswordLength | ✔️ | | | | | | | | | | +| InputProps.safePasswordTimeStamp | ✔️ | | | | | | | | | | +| InputProps.safePasswordNonce | ✔️ | | | | | | | | | | +| InputProps.safePasswordSalt | ✔️ | | | | | | | | | | +| InputProps.safePasswordCustomHash | ✔️ | | | | | | | | | | +| InputProps.randomNumber | | | ✔️ | | | | | | | | +| InputProps.controlled | | | ✔️ | | | | | | | | +| InputProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| InputProps.name | | | ✔️ | | | | | | | | +| InputProps.alwaysSystem | | | ✔️ | | | | | | | | +| InputProps.ariaLabel | | | | | ✔️ | | | | | | +| InputProps.clueType | | | | ✔️ | | | | | | | +| InputProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onKeyboardHeightChange | ✔️ | | | ✔️ | ✔️ | | | | | | +| InputProps.onNickNameReview | ✔️ | | | | | | | | | | ### Type @@ -184,17 +184,17 @@ Input 类型 #### API 支持度 -| API | 微信小程序 | 支付宝小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| Type.text | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.number | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.idcard | ✔️ | ✔️ | | ✔️ | | -| Type.digit | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.safe-password | ✔️ | ✔️ | | | | -| Type.nickname | ✔️ | ✔️ | | | | -| Type.numberpad | | ✔️ | | | | -| Type.digitpad | | ✔️ | | | | -| Type.idcardpad | | ✔️ | | | | +| API | 微信小程序 | 支付宝小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| Type.text | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.number | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.idcard | ✔️ | ✔️ | | ✔️ | | | +| Type.digit | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.safe-password | ✔️ | ✔️ | | | | | +| Type.nickname | ✔️ | ✔️ | | | | | +| Type.numberpad | | ✔️ | | | | | +| Type.digitpad | | ✔️ | | | | | +| Type.idcardpad | | ✔️ | | | | | ### ConfirmType diff --git a/docs/components/forms/label.md b/docs/components/forms/label.md index bd4bdf06921c..12cb47d95d7b 100755 --- a/docs/components/forms/label.md +++ b/docs/components/forms/label.md @@ -7,7 +7,7 @@ sidebar_label: Label 使用for属性找到对应的id,或者将控件放在该标签下,当点击时,就会触发对应的控件。 for优先级高于内部控件,内部有多个控件的时候默认触发第一个控件。 目前可以绑定的控件有:button, checkbox, radio, switch。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/label.html) @@ -75,6 +75,6 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| LabelProps.for | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| LabelProps.for | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/components/forms/picker-view-column.md b/docs/components/forms/picker-view-column.md index 550087023b20..22f5a47cd8f5 100644 --- a/docs/components/forms/picker-view-column.md +++ b/docs/components/forms/picker-view-column.md @@ -6,7 +6,7 @@ sidebar_label: PickerViewColumn 滚动选择器子项 仅可放置于 `` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html) diff --git a/docs/components/forms/picker-view.md b/docs/components/forms/picker-view.md index 930f6467b51d..2351b3e29472 100755 --- a/docs/components/forms/picker-view.md +++ b/docs/components/forms/picker-view.md @@ -6,7 +6,7 @@ sidebar_label: PickerView 嵌入页面的滚动选择器 其中只可放置 picker-view-column 组件,其它节点不会显示 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html) diff --git a/docs/components/forms/picker.md b/docs/components/forms/picker.md index 4bcae29a1188..c58f395b0ea0 100755 --- a/docs/components/forms/picker.md +++ b/docs/components/forms/picker.md @@ -5,7 +5,7 @@ sidebar_label: Picker 从底部弹起的滚动选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker.html) @@ -173,12 +173,12 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerStandardProps.headerText | ✔️ | | | | -| PickerStandardProps.mode | ✔️ | ✔️ | ✔️ | | -| PickerStandardProps.disabled | ✔️ | ✔️ | ✔️ | | -| PickerStandardProps.onCancel | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerStandardProps.headerText | ✔️ | | | | | +| PickerStandardProps.mode | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerStandardProps.disabled | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerStandardProps.onCancel | ✔️ | ✔️ | ✔️ | | ✔️ | ### Mode @@ -217,16 +217,16 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerSelectorProps.range | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.value | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.defaultValue | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.itemStyle | | | ✔️ | | -| PickerSelectorProps.indicatorStyle | | | ✔️ | | -| PickerSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.textProps | | ✔️ | | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerSelectorProps.range | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.defaultValue | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.itemStyle | | | ✔️ | | | +| PickerSelectorProps.indicatorStyle | | | ✔️ | | | +| PickerSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.textProps | | ✔️ | | | ✔️ | ### ChangeEventDetail @@ -251,15 +251,15 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerMultiSelectorProps.range | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.value | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.itemStyle | | | ✔️ | | -| PickerMultiSelectorProps.indicatorStyle | | | ✔️ | | -| PickerMultiSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.onColumnChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerMultiSelectorProps.range | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.itemStyle | | | ✔️ | | | +| PickerMultiSelectorProps.indicatorStyle | | | ✔️ | | | +| PickerMultiSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.onColumnChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail @@ -289,13 +289,13 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerTimeProps.value | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.defaultValue | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.start | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.end | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerTimeProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerTimeProps.start | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.end | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail @@ -319,14 +319,14 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerDateProps.value | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.defaultValue | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.start | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.end | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.fields | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerDateProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerDateProps.start | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.end | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.fields | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### Fields @@ -358,14 +358,14 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerRegionProps.value | ✔️ | ✔️ | ✔️ | | -| PickerRegionProps.defaultValue | ✔️ | ✔️ | ✔️ | | -| PickerRegionProps.customItem | ✔️ | ✔️ | ✔️ | | -| PickerRegionProps.level | ✔️ | | | | -| PickerRegionProps.regionData | | | ✔️ | | -| PickerRegionProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerRegionProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerRegionProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerRegionProps.customItem | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerRegionProps.level | ✔️ | | | | | +| PickerRegionProps.regionData | | | ✔️ | | | +| PickerRegionProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail diff --git a/docs/components/forms/radio-group.md b/docs/components/forms/radio-group.md index 26bd2c1f8756..53f012488896 100644 --- a/docs/components/forms/radio-group.md +++ b/docs/components/forms/radio-group.md @@ -5,7 +5,7 @@ sidebar_label: RadioGroup 单项选择器,内部由多个 Radio 组成。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html) @@ -24,10 +24,10 @@ ComponentType ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RadioGroupProps.name | | | ✔️ | ✔️ | | | | | | -| RadioGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RadioGroupProps.name | | | ✔️ | ✔️ | | | | | | | +| RadioGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | ### onChangeEventDetail diff --git a/docs/components/forms/radio.md b/docs/components/forms/radio.md index bbea30556916..867a478c85a5 100755 --- a/docs/components/forms/radio.md +++ b/docs/components/forms/radio.md @@ -5,7 +5,7 @@ sidebar_label: Radio 单选项目 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/radio.html) @@ -183,13 +183,13 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RadioProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| RadioProps.name | | | | | | | ✔️ | | ✔️ | -| RadioProps.nativeProps | | | | | | | ✔️ | | | -| RadioProps.ariaLabel | | | | | ✔️ | | | | | -| RadioProps.onChange | | | | | | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RadioProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| RadioProps.name | | | | | | | ✔️ | | ✔️ | ✔️ | +| RadioProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| RadioProps.ariaLabel | | | | | ✔️ | | | | | | +| RadioProps.onChange | | | | | | | ✔️ | ✔️ | | ✔️ | diff --git a/docs/components/forms/slider.md b/docs/components/forms/slider.md index 1debfdbd4594..563a89a4144c 100755 --- a/docs/components/forms/slider.md +++ b/docs/components/forms/slider.md @@ -5,7 +5,7 @@ sidebar_label: Slider 滑动选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/slider.html) @@ -91,27 +91,27 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SliderProps.min | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.max | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.step | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.color | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | -| SliderProps.selectedColor | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | -| SliderProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.blockSize | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SliderProps.blockColor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.showValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.name | | | ✔️ | | | | | | | -| SliderProps.trackSize | | | ✔️ | | | | | | | -| SliderProps.handleSize | | | ✔️ | | | | | | | -| SliderProps.handleColor | | | ✔️ | | | | | | | -| SliderProps.ariaLabel | | | | | ✔️ | | | | | -| SliderProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.onChanging | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SliderProps.min | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.max | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.step | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.color | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | | +| SliderProps.selectedColor | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | | +| SliderProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.blockSize | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SliderProps.blockColor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.showValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.name | | | ✔️ | | | | | | | | +| SliderProps.trackSize | | | ✔️ | | | | | | | | +| SliderProps.handleSize | | | ✔️ | | | | | | | | +| SliderProps.handleColor | | | ✔️ | | | | | | | | +| SliderProps.ariaLabel | | | | | ✔️ | | | | | | +| SliderProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.onChanging | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onChangeEventDetail diff --git a/docs/components/forms/switch.md b/docs/components/forms/switch.md index b18ddc54c64c..e2c92947017d 100755 --- a/docs/components/forms/switch.md +++ b/docs/components/forms/switch.md @@ -5,7 +5,7 @@ sidebar_label: Switch 开关选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/switch.html) @@ -81,18 +81,18 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwitchProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.defaultChecked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| SwitchProps.type | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.nativeProps | | | | | | | ✔️ | | | -| SwitchProps.name | | | ✔️ | | | | | | | -| SwitchProps.controlled | | | ✔️ | | | | | | | -| SwitchProps.ariaLabel | | | | | ✔️ | | | | | -| SwitchProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwitchProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.defaultChecked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| SwitchProps.type | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| SwitchProps.name | | | ✔️ | | | | | | | | +| SwitchProps.controlled | | | ✔️ | | | | | | | | +| SwitchProps.ariaLabel | | | | | ✔️ | | | | | | +| SwitchProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onChangeEventDetail diff --git a/docs/components/forms/textarea.md b/docs/components/forms/textarea.md index c7665937576d..e080e2a4b7a7 100755 --- a/docs/components/forms/textarea.md +++ b/docs/components/forms/textarea.md @@ -5,7 +5,7 @@ sidebar_label: Textarea 多行输入框。该组件是原生组件,使用时请注意相关限制 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/textarea.html) @@ -100,41 +100,41 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| TextareaProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.autoFocus | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| TextareaProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.autoHeight | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.fixed | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | -| TextareaProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.cursor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.showConfirmBar | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.selectionStart | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.selectionEnd | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | -| TextareaProps.disableDefaultPadding | ✔️ | | | ✔️ | | | | | | -| TextareaProps.nativeProps | | | | | | | ✔️ | | | -| TextareaProps.confirmType | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | -| TextareaProps.confirmHold | ✔️ | ✔️ | | ✔️ | | | | | | -| TextareaProps.name | | | ✔️ | | | | | | | -| TextareaProps.showCount | | | ✔️ | | | | | | | -| TextareaProps.controlled | | | ✔️ | | | | | | | -| TextareaProps.ariaLabel | | | | | ✔️ | | | | | -| TextareaProps.adjustKeyboardTo | ✔️ | | | | | | | | | -| TextareaProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onLineChange | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onKeyboardHeightChange | ✔️ | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| TextareaProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.autoFocus | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| TextareaProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.autoHeight | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.fixed | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | | +| TextareaProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.cursor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.showConfirmBar | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.selectionStart | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.selectionEnd | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | | +| TextareaProps.disableDefaultPadding | ✔️ | | | ✔️ | | | | | | | +| TextareaProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| TextareaProps.confirmType | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | | +| TextareaProps.confirmHold | ✔️ | ✔️ | | ✔️ | | | | | | | +| TextareaProps.name | | | ✔️ | | | | | | | | +| TextareaProps.showCount | | | ✔️ | | | | | | | | +| TextareaProps.controlled | | | ✔️ | | | | | | | | +| TextareaProps.ariaLabel | | | | | ✔️ | | | | | | +| TextareaProps.adjustKeyboardTo | ✔️ | | | | | | | | | | +| TextareaProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onLineChange | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onKeyboardHeightChange | ✔️ | | | ✔️ | | | | | | | ### onFocusEventDetail diff --git a/docs/components/media/audio.md b/docs/components/media/audio.md index 986a368b79a6..016c39337a62 100755 --- a/docs/components/media/audio.md +++ b/docs/components/media/audio.md @@ -5,7 +5,7 @@ sidebar_label: Audio 音频。1.6.0版本开始,该组件不再维护。建议使用能力更强的 Taro.createInnerAudioContext 接口 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/audio.html) @@ -90,22 +90,22 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| AudioProps.id | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.src | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.muted | | | | ✔️ | | | -| AudioProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.poster | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.name | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.author | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.nativeProps | | | | ✔️ | | | -| AudioProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| AudioProps.id | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.src | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.muted | | | | ✔️ | | | ✔️ | +| AudioProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.poster | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.name | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.author | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.nativeProps | | | | ✔️ | | | ✔️ | +| AudioProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | ### onErrorEventDetail diff --git a/docs/components/media/image.md b/docs/components/media/image.md index 1749fe19fc86..b3295f6d0154 100755 --- a/docs/components/media/image.md +++ b/docs/components/media/image.md @@ -7,7 +7,7 @@ sidebar_label: Image **Note:** 为实现小程序的 `mode` 特性,在 H5 组件中使用一个 `div` 容器来对内部的 `img` 进行展示区域的裁剪,因此请勿使用元素选择器来重置 `img` 的样式! -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/image.html) @@ -95,26 +95,26 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.mode | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(部分支持 scaleToFill, aspectFit, aspectFill, widthFix) | | -| ImageProps.webp | ✔️ | ✔️ | | | | | | | | -| ImageProps.svg | | | | | | | | ✔️ | | -| ImageProps.lazyLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| ImageProps.showMenuByLongpress | ✔️ | | | | | | | | | -| ImageProps.imgProps | | | | | | | ✔️ | | | -| ImageProps.nativeProps | | | | | | | ✔️ | | | -| ImageProps.defaultSource | | | ✔️ | | | | | | | -| ImageProps.imageMenuPrevent | | ✔️ | | | | | | | | -| ImageProps.preview | | ✔️ | | | | | | | | -| ImageProps.originalSrc | | ✔️ | | | | | | | | -| ImageProps.ariaLabel | | | | | ✔️ | | | | | -| ImageProps.fadeIn | ✔️ | | | | | | | | | -| ImageProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.onLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.onTap | | | ✔️ | | | | | | | -| ImageProps.catchTap | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.mode | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(部分支持 scaleToFill, aspectFit, aspectFill, widthFix) | | ✔️ | +| ImageProps.webp | ✔️ | ✔️ | | | | | | | | | +| ImageProps.svg | | | | | | | | ✔️ | | | +| ImageProps.lazyLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| ImageProps.showMenuByLongpress | ✔️ | | | | | | | | | | +| ImageProps.imgProps | | | | | | | ✔️ | | | ✔️ | +| ImageProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| ImageProps.defaultSource | | | ✔️ | | | | | | | | +| ImageProps.imageMenuPrevent | | ✔️ | | | | | | | | | +| ImageProps.preview | | ✔️ | | | | | | | | | +| ImageProps.originalSrc | | ✔️ | | | | | | | | | +| ImageProps.ariaLabel | | | | | ✔️ | | | | | | +| ImageProps.fadeIn | ✔️ | | | | | | | | | | +| ImageProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.onLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.onTap | | | ✔️ | | | | | | | | +| ImageProps.catchTap | | | ✔️ | | | | | | | | ### Mode diff --git a/docs/components/media/video.md b/docs/components/media/video.md index d52b65f7fe49..18eb5077e7ac 100755 --- a/docs/components/media/video.md +++ b/docs/components/media/video.md @@ -5,7 +5,7 @@ sidebar_label: Video 视频。相关api:Taro.createVideoContext -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/video.html) @@ -175,106 +175,106 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| VideoProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.duration | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | | -| VideoProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.danmuList | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.danmuBtn | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.enableDanmu | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.muted | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.initialTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.pageGesture | ✔️ | ✔️ | | | ✔️ | | | | | -| VideoProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | -| VideoProps.showProgress | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.showFullscreenBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.showPlayBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.showCenterPlayBtn | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | -| VideoProps.enableProgressGesture | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.objectFit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| VideoProps.poster | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.showMuteBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.title | ✔️ | ✔️ | | | ✔️ | | | | | -| VideoProps.playBtnPosition | ✔️ | | | ✔️ | ✔️ | | | | | -| VideoProps.enablePlayGesture | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.autoPauseIfNavigate | ✔️ | | | | ✔️ | | | | | -| VideoProps.autoPauseIfOpenNative | ✔️ | | | | ✔️ | | | | | -| VideoProps.vslideGesture | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | -| VideoProps.vslideGestureInFullscreen | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | -| VideoProps.adUnitId | ✔️ | | | | | | | | | -| VideoProps.posterForCrawler | ✔️ | | | | | | | | | -| VideoProps.showCastingButton | ✔️ | | | | | | | | | -| VideoProps.pictureInPictureMode | ✔️ | | | | | | | | | -| VideoProps.enableAutoRotation | ✔️ | | | | | | | | | -| VideoProps.showScreenLockButton | ✔️ | | | ✔️ | | | | | | -| VideoProps.showSnapshotButton | ✔️ | | | | | | | | | -| VideoProps.showBackgroundPlaybackButton | ✔️ | | | | | | | | | -| VideoProps.backgroundPoster | ✔️ | | | | | | | | | -| VideoProps.nativeProps | | | | | | | ✔️ | | | -| VideoProps.showBottomProgress | ✔️ | | | | | | | | | -| VideoProps.pictureInPictureShowProgress | ✔️ | | | | | | | | | -| VideoProps.referrerPolicy | ✔️ | | | | | | | | | -| VideoProps.isDrm | ✔️ | | | | | | | | | -| VideoProps.provisionUrl | ✔️ | | | | | | | | | -| VideoProps.certificateUrl | ✔️ | | | | | | | | | -| VideoProps.licenseUrl | ✔️ | | | | | | | | | -| VideoProps.posterSize | | | ✔️ | | | | | | | -| VideoProps.showThinProgressBar | | | ✔️ | | | | | | | -| VideoProps.mobilenetHintType | | | ✔️ | | | ✔️ | | | | -| VideoProps.floatingMode | | | ✔️ | | | | | | | -| VideoProps.showNoWifiTip | | ✔️ | | | | | | | | -| VideoProps.showLockBtn | | ✔️ | | | | | | | | -| VideoProps.showRateBtn | | ✔️ | | | | | | | | -| VideoProps.showVslideBtnInFullscreen | | ✔️ | | | | | | | | -| VideoProps.silentPlay | | ✔️ | | | | | | | | -| VideoProps.preRollUnitId | | | | ✔️ | | | | | | -| VideoProps.postRollUnitId | | | | ✔️ | | | | | | -| VideoProps.showPlaybackRateBtn | | | | ✔️ | | | | | | -| VideoProps.enablePlayInBackground | | | | ✔️ | | | | | | -| VideoProps.signature | | | | ✔️ | | | | | | -| VideoProps.preferredPeakBitRate | ✔️ | | | | | | | | | -| VideoProps.isLive | ✔️ | | | | | | | | | -| VideoProps.definition | | | | ✔️ | | | | | | -| VideoProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onFullscreenChange | | | ✔️ | | | | ✔️ | ✔️ | | -| VideoProps.onWaiting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| VideoProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onProgress | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.onLoadedMetaData | ✔️ | ✔️ | | ✔️ | | ✔️ | | ✔️ | | -| VideoProps.onEnterPictureInPicture | ✔️ | | | | | | | | | -| VideoProps.onLeavePictureInPicture | ✔️ | | | | | | | | | -| VideoProps.onSeekComplete | ✔️ | | | ✔️ | | | | | | -| VideoProps.onFullScreenChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| VideoProps.onControlsToggle | ✔️ | ✔️ | | | | | | | | -| VideoProps.onLoading | | | ✔️ | | | | | | | -| VideoProps.onTap | | | ✔️ | | | | | | | -| VideoProps.onUserAction | | | ✔️ | | | | | | | -| VideoProps.onStop | | | ✔️ | | | | | | | -| VideoProps.onRenderStart | | | ✔️ | | | | | | | -| VideoProps.onAdStart | | | | ✔️ | | | | | | -| VideoProps.onAdEnded | | | | ✔️ | | | | | | -| VideoProps.onAdClose | | | | ✔️ | | | | | | -| VideoProps.onAdError | | | | ✔️ | | | | | | -| VideoProps.onPlayBackRateChange | | | | ✔️ | | | | | | -| VideoProps.onMuteChange | | | | ✔️ | | | | | | -| VideoProps.onControlTap | | | | ✔️ | | | | | | -| VideoProps.onEnterBackground | | | | ✔️ | | | | | | -| VideoProps.onCloseBackground | | | | ✔️ | | | | | | -| VideoProps.onLeaveBackground | | | | ✔️ | | | | | | -| VideoProps.onLoadedData | | | | | | ✔️ | | | | -| VideoProps.onLoadStart | | | | | | ✔️ | | | | -| VideoProps.onSeeked | | | | | | ✔️ | | | | -| VideoProps.onSeeking | | | | | | ✔️ | | | | -| VideoProps.onAdLoad | | | | ✔️ | | | | | | -| VideoProps.onCastingUserSelect | ✔️ | | | | | | | | | -| VideoProps.onCastingStateChange | ✔️ | | | | | | | | | -| VideoProps.onCastingInterrupt | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| VideoProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.duration | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | | ✔️ | +| VideoProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.danmuList | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.danmuBtn | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.enableDanmu | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.muted | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.initialTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.pageGesture | ✔️ | ✔️ | | | ✔️ | | | | | | +| VideoProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | +| VideoProps.showProgress | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showFullscreenBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showPlayBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showCenterPlayBtn | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | ✔️ | +| VideoProps.enableProgressGesture | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.objectFit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| VideoProps.poster | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.showMuteBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.title | ✔️ | ✔️ | | | ✔️ | | | | | | +| VideoProps.playBtnPosition | ✔️ | | | ✔️ | ✔️ | | | | | | +| VideoProps.enablePlayGesture | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.autoPauseIfNavigate | ✔️ | | | | ✔️ | | | | | | +| VideoProps.autoPauseIfOpenNative | ✔️ | | | | ✔️ | | | | | | +| VideoProps.vslideGesture | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | ✔️ | +| VideoProps.vslideGestureInFullscreen | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | ✔️ | +| VideoProps.adUnitId | ✔️ | | | | | | | | | | +| VideoProps.posterForCrawler | ✔️ | | | | | | | | | | +| VideoProps.showCastingButton | ✔️ | | | | | | | | | | +| VideoProps.pictureInPictureMode | ✔️ | | | | | | | | | | +| VideoProps.enableAutoRotation | ✔️ | | | | | | | | | | +| VideoProps.showScreenLockButton | ✔️ | | | ✔️ | | | | | | | +| VideoProps.showSnapshotButton | ✔️ | | | | | | | | | | +| VideoProps.showBackgroundPlaybackButton | ✔️ | | | | | | | | | | +| VideoProps.backgroundPoster | ✔️ | | | | | | | | | | +| VideoProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| VideoProps.showBottomProgress | ✔️ | | | | | | | | | | +| VideoProps.pictureInPictureShowProgress | ✔️ | | | | | | | | | | +| VideoProps.referrerPolicy | ✔️ | | | | | | | | | | +| VideoProps.isDrm | ✔️ | | | | | | | | | | +| VideoProps.provisionUrl | ✔️ | | | | | | | | | | +| VideoProps.certificateUrl | ✔️ | | | | | | | | | | +| VideoProps.licenseUrl | ✔️ | | | | | | | | | | +| VideoProps.posterSize | | | ✔️ | | | | | | | | +| VideoProps.showThinProgressBar | | | ✔️ | | | | | | | | +| VideoProps.mobilenetHintType | | | ✔️ | | | ✔️ | | | | | +| VideoProps.floatingMode | | | ✔️ | | | | | | | | +| VideoProps.showNoWifiTip | | ✔️ | | | | | | | | | +| VideoProps.showLockBtn | | ✔️ | | | | | | | | | +| VideoProps.showRateBtn | | ✔️ | | | | | | | | | +| VideoProps.showVslideBtnInFullscreen | | ✔️ | | | | | | | | | +| VideoProps.silentPlay | | ✔️ | | | | | | | | | +| VideoProps.preRollUnitId | | | | ✔️ | | | | | | | +| VideoProps.postRollUnitId | | | | ✔️ | | | | | | | +| VideoProps.showPlaybackRateBtn | | | | ✔️ | | | | | | | +| VideoProps.enablePlayInBackground | | | | ✔️ | | | | | | | +| VideoProps.signature | | | | ✔️ | | | | | | | +| VideoProps.preferredPeakBitRate | ✔️ | | | | | | | | | | +| VideoProps.isLive | ✔️ | | | | | | | | | | +| VideoProps.definition | | | | ✔️ | | | | | | | +| VideoProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onFullscreenChange | | | ✔️ | | | | ✔️ | ✔️ | | ✔️ | +| VideoProps.onWaiting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| VideoProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onProgress | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.onLoadedMetaData | ✔️ | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | +| VideoProps.onEnterPictureInPicture | ✔️ | | | | | | | | | | +| VideoProps.onLeavePictureInPicture | ✔️ | | | | | | | | | | +| VideoProps.onSeekComplete | ✔️ | | | ✔️ | | | | | | | +| VideoProps.onFullScreenChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| VideoProps.onControlsToggle | ✔️ | ✔️ | | | | | | | | | +| VideoProps.onLoading | | | ✔️ | | | | | | | | +| VideoProps.onTap | | | ✔️ | | | | | | | | +| VideoProps.onUserAction | | | ✔️ | | | | | | | | +| VideoProps.onStop | | | ✔️ | | | | | | | | +| VideoProps.onRenderStart | | | ✔️ | | | | | | | | +| VideoProps.onAdStart | | | | ✔️ | | | | | | | +| VideoProps.onAdEnded | | | | ✔️ | | | | | | | +| VideoProps.onAdClose | | | | ✔️ | | | | | | | +| VideoProps.onAdError | | | | ✔️ | | | | | | | +| VideoProps.onPlayBackRateChange | | | | ✔️ | | | | | | | +| VideoProps.onMuteChange | | | | ✔️ | | | | | | | +| VideoProps.onControlTap | | | | ✔️ | | | | | | | +| VideoProps.onEnterBackground | | | | ✔️ | | | | | | | +| VideoProps.onCloseBackground | | | | ✔️ | | | | | | | +| VideoProps.onLeaveBackground | | | | ✔️ | | | | | | | +| VideoProps.onLoadedData | | | | | | ✔️ | | | | | +| VideoProps.onLoadStart | | | | | | ✔️ | | | | | +| VideoProps.onSeeked | | | | | | ✔️ | | | | | +| VideoProps.onSeeking | | | | | | ✔️ | | | | | +| VideoProps.onAdLoad | | | | ✔️ | | | | | | | +| VideoProps.onCastingUserSelect | ✔️ | | | | | | | | | | +| VideoProps.onCastingStateChange | ✔️ | | | | | | | | | | +| VideoProps.onCastingInterrupt | ✔️ | | | | | | | | | | ### direction diff --git a/docs/components/navig/navigator.md b/docs/components/navig/navigator.md index d8556155d79e..067d31853ff2 100755 --- a/docs/components/navig/navigator.md +++ b/docs/components/navig/navigator.md @@ -5,7 +5,7 @@ sidebar_label: Navigator 页面链接 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html) @@ -39,25 +39,25 @@ ComponentType ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| NavigatorProps.target | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.url | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.delta | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.appId | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.path | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.extraData | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.version | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.hoverStopPropagation | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.shortLink | ✔️ | | | | | | | | | -| NavigatorProps.ariaLabel | | | | | ✔️ | | | | | -| NavigatorProps.onSuccess | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| NavigatorProps.onFail | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| NavigatorProps.onComplete | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| NavigatorProps.target | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.url | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.delta | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.appId | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.path | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.extraData | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.version | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.hoverStopPropagation | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.shortLink | ✔️ | | | | | | | | | | +| NavigatorProps.ariaLabel | | | | | ✔️ | | | | | | +| NavigatorProps.onSuccess | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| NavigatorProps.onFail | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| NavigatorProps.onComplete | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | ### Target diff --git a/docs/components/open/web-view.md b/docs/components/open/web-view.md index 16a4a89d7d87..18a4e44f8ef2 100755 --- a/docs/components/open/web-view.md +++ b/docs/components/open/web-view.md @@ -5,7 +5,7 @@ sidebar_label: WebView web-view 组件是一个可以用来承载网页的容器,会自动铺满整个小程序页面。个人类型与海外类型的小程序暂不支持使用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html) @@ -61,14 +61,14 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| WebViewProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| WebViewProps.progressbarColor | | | | ✔️ | | | | | | -| WebViewProps.type | | | | ✔️ | | | | | | -| WebViewProps.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| WebViewProps.onLoad | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| WebViewProps.onError | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| WebViewProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| WebViewProps.progressbarColor | | | | ✔️ | | | | | | | +| WebViewProps.type | | | | ✔️ | | | | | | | +| WebViewProps.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| WebViewProps.onLoad | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| WebViewProps.onError | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | ### onMessageEventDetail diff --git a/docs/components/skyline/draggable-sheet.md b/docs/components/skyline/draggable-sheet.md new file mode 100644 index 000000000000..9f507ed21ba6 --- /dev/null +++ b/docs/components/skyline/draggable-sheet.md @@ -0,0 +1,39 @@ +--- +title: DraggableSheet +sidebar_label: DraggableSheet +--- + +半屏可拖拽组件 +该组件需配合 DraggableSheetContext 接口使用。 目前仅在 Skyline 渲染引擎下支持。 +页面内拖拽是一种常见的交互效果,开发者可通过手势系统灵活实现。draggable-sheet 组件封装了常见的交互逻辑,实现起来更加简单。 +该组件需结合 scroll-view 使用。scroll-view 组件声明 associative-container 属性后,可与 draggable-sheet 关联起来。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/draggable-sheet.html) + +## 类型 + +```tsx +ComponentType +``` + +## DraggableSheetProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| initialChildSize | `number` | `0.5` | 否 | 初始时占父容器的比例 | +| minChildSize | `number` | `0.25` | 否 | 最小时占父容器的比例 | +| maxChildSize | `number` | `1.0` | 否 | 最大时占父容器的比例 | +| snap | `boolean` | `false` | 否 | 拖拽后是否自动对齐关键点 | +| snapSizes | `any[]` | `[]` | 否 | 拖拽后对齐的关键点,无需包含最小和最大值 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| DraggableSheetProps.initialChildSize | ✔️ | | | | +| DraggableSheetProps.minChildSize | ✔️ | | | | +| DraggableSheetProps.maxChildSize | ✔️ | | | | +| DraggableSheetProps.snap | ✔️ | | | | +| DraggableSheetProps.snapSizes | ✔️ | | | | diff --git a/docs/components/skyline/grid-builder.md b/docs/components/skyline/grid-builder.md new file mode 100644 index 000000000000..e1cf4ece4482 --- /dev/null +++ b/docs/components/skyline/grid-builder.md @@ -0,0 +1,46 @@ +--- +title: GridBuilder +sidebar_label: GridBuilder +--- + +网格构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/grid-builder.html) + +## 类型 + +```tsx +ComponentType +``` + +## GridBuilderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| type | "aligned" or "masonry" | `"aligned"

可选值:
- aligned: 每行高度由同一行中最大高度子节点决定
- masonry: 瀑布流,根据子元素高度自动布局` | 是 | 布局方式 | +| list | `any[]` | `[]` | 是 | 需要用于渲染的列表 | +| childCount | `number` | | 否 | 完整列表的长度,如果不传则取 list 的长度作为其值 | +| crossAxisCount | `number` | `2` | 否 | 交叉轴元素数量 | +| maxCrossAxisExtent | `number` | `0` | 否 | 交叉轴元素最大范围 | +| mainAxisGap | `number` | `0` | 否 | 主轴方向间隔 | +| crossAxisGap | `number` | `0` | 否 | 交叉轴方向间隔 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | +| onItemBuild | `CommonEventFunction` | | 否 | 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 | +| onItemDispose | `CommonEventFunction` | | 否 | 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| GridBuilderProps.type | ✔️ | | | | +| GridBuilderProps.list | ✔️ | | | | +| GridBuilderProps.childCount | ✔️ | | | | +| GridBuilderProps.crossAxisCount | ✔️ | | | | +| GridBuilderProps.maxCrossAxisExtent | ✔️ | | | | +| GridBuilderProps.mainAxisGap | ✔️ | | | | +| GridBuilderProps.crossAxisGap | ✔️ | | | | +| GridBuilderProps.padding | ✔️ | | | | +| GridBuilderProps.onItemBuild | ✔️ | | | | +| GridBuilderProps.onItemDispose | ✔️ | | | | diff --git a/docs/components/skyline/grid-view.md b/docs/components/skyline/grid-view.md index c7bd828e55a8..f79298d74f42 100644 --- a/docs/components/skyline/grid-view.md +++ b/docs/components/skyline/grid-view.md @@ -19,11 +19,12 @@ ComponentType | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | -| type | `string` | `"aligned"` | 是 | 布局方式。masonry - 瀑布流,根据子元素高度自动布局。 aligned - 每行高度由同一行中最大高度子节点决定。 | +| type | "aligned" or "masonry" | `"aligned"

可选值:
- aligned: 每行高度由同一行中最大高度子节点决定
- masonry: 瀑布流,根据子元素高度自动布局` | 是 | 布局方式 | | crossAxisCount | `number` | `2` | 否 | 交叉轴元素数量 | | mainAxisGap | `number` | `0` | 否 | 主轴方向间隔 | | crossAxisGap | `number` | `0` | 否 | 交叉轴方向间隔 | | maxCrossAxisExtent | `number` | `0` | 否 | 交叉轴元素最大范围 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | ### API 支持度 @@ -34,3 +35,4 @@ ComponentType | GridViewProps.mainAxisGap | ✔️ | | | | | GridViewProps.crossAxisGap | ✔️ | | | | | GridViewProps.maxCrossAxisExtent | ✔️ | | | | +| GridViewProps.padding | ✔️ | | | | diff --git a/docs/components/skyline/list-builder.md b/docs/components/skyline/list-builder.md new file mode 100644 index 000000000000..9de2903b2bc1 --- /dev/null +++ b/docs/components/skyline/list-builder.md @@ -0,0 +1,40 @@ +--- +title: ListBuilder +sidebar_label: ListBuilder +--- + +列表构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/list-builder.html) + +## 类型 + +```tsx +ComponentType +``` + +## ListBuilderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| type | "static" or "dynamic" | `"aligned"

可选值:
- static: 定高模式,所有列表项等高,需要传入 child-height
- dynamic: 不定高模式` | 是 | 布局方式 | +| list | `any[]` | `[]` | 是 | 需要用于渲染的列表 | +| childCount | `number` | | 否 | 完整列表的长度,如果不传则取 list 的长度作为其值 | +| childHeight | `number` | | 否 | 列表项的高度,当 type 为 static 时必须传入 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | +| onItemBuild | `CommonEventFunction` | | 否 | 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 | +| onItemDispose | `CommonEventFunction` | | 否 | 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| ListBuilderProps.type | ✔️ | | | | +| ListBuilderProps.list | ✔️ | | | | +| ListBuilderProps.childCount | ✔️ | | | | +| ListBuilderProps.childHeight | ✔️ | | | | +| ListBuilderProps.padding | ✔️ | | | | +| ListBuilderProps.onItemBuild | ✔️ | | | | +| ListBuilderProps.onItemDispose | ✔️ | | | | diff --git a/docs/components/skyline/list-view.md b/docs/components/skyline/list-view.md index 372eb444c69a..0f724dae8a3e 100644 --- a/docs/components/skyline/list-view.md +++ b/docs/components/skyline/list-view.md @@ -16,3 +16,13 @@ ComponentType ``` ## ListViewProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| ListViewProps.padding | ✔️ | | | | diff --git a/docs/components/skyline/nested-scroll-body.md b/docs/components/skyline/nested-scroll-body.md new file mode 100644 index 000000000000..1f20c147d479 --- /dev/null +++ b/docs/components/skyline/nested-scroll-body.md @@ -0,0 +1,20 @@ +--- +title: NestedScrollBody +sidebar_label: NestedScrollBody +--- + +嵌套 scroll-view 场景中属于里层 scroll-view 的节点, +仅支持作为 模式的直接子节点。 +不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-body.html) + +## 类型 + +```tsx +ComponentType +``` + +## NestedScrollBodyProps diff --git a/docs/components/skyline/nested-scroll-header.md b/docs/components/skyline/nested-scroll-header.md new file mode 100644 index 000000000000..8ad0e1c64221 --- /dev/null +++ b/docs/components/skyline/nested-scroll-header.md @@ -0,0 +1,20 @@ +--- +title: NestedScrollHeader +sidebar_label: NestedScrollHeader +--- + +嵌套 scroll-view 场景中属于外层 scroll-view 的节点, +仅支持作为 模式的直接子节点。 +不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-header.html) + +## 类型 + +```tsx +ComponentType +``` + +## NestedScrollHeaderProps diff --git a/docs/components/skyline/open-container.md b/docs/components/skyline/open-container.md new file mode 100644 index 000000000000..7c56cfe182f3 --- /dev/null +++ b/docs/components/skyline/open-container.md @@ -0,0 +1,47 @@ +--- +title: OpenContainer +sidebar_label: OpenContainer +--- + +容器转场动画组件 +点击 组件,当使用 wx.navigateTo 跳转下一页面时,对其子节点和下一个页面进行过渡。 +下个页面从 所在位置大小渐显放大,同时 内容渐隐,过渡效果包含背景色、圆角和阴影。 +源页面 为 closed 状态,转场动画后为 open 状态。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/open-container.html) + +## 类型 + +```tsx +ComponentType +``` + +## OpenContainerProps + +| 参数 | 类型 | 默认值 | 说明 | +| --- | --- | :---: | --- | +| transitionType | "fade" or "fadeThrough" | `"fade"

可选值:
- fade: 将传入元素淡入传出元素之上
- fadeThrough: 首先淡出传出元素,并在传出元素完全淡出后开始淡入传入元素` | 动画类型 | +| transitionDuration | `number` | `300` | 动画时长 | +| closedColor | `string` | `"white"` | 初始容器背景色 | +| closedElevation | `number` | `0` | 初始容器影深大小 | +| closeBorderRadius | `number` | `0` | 初始容器圆角大小 | +| middleColor | `string` | `""` | fadeThrough 模式下的过渡背景色 | +| openColor | `string` | `"white"` | 打开状态下容器背景色 | +| openElevation | `number` | `0` | 打开状态下容器影深大小 | +| openBorderRadius | `number` | `0` | 打开状态下容器圆角大小 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| OpenContainerProps.transitionType | ✔️ | | | | +| OpenContainerProps.transitionDuration | ✔️ | | | | +| OpenContainerProps.closedColor | ✔️ | | | | +| OpenContainerProps.closedElevation | ✔️ | | | | +| OpenContainerProps.closeBorderRadius | ✔️ | | | | +| OpenContainerProps.middleColor | ✔️ | | | | +| OpenContainerProps.openColor | ✔️ | | | | +| OpenContainerProps.openElevation | ✔️ | | | | +| OpenContainerProps.openBorderRadius | ✔️ | | | | diff --git a/docs/components/skyline/snapshot.md b/docs/components/skyline/snapshot.md index 282efa0e0423..2103e8dc0c4e 100644 --- a/docs/components/skyline/snapshot.md +++ b/docs/components/skyline/snapshot.md @@ -3,7 +3,7 @@ title: Snapshot sidebar_label: Snapshot --- -截图组件。 +截图组件 支持将其子节点的渲染结果导出成图片,该组件需配合 snapshot 接口使用。 目前仅在 Skyline 渲染引擎 下支持。 支持情况: @@ -18,6 +18,12 @@ ComponentType ## SnapshotProps -| 参数 | 类型 | -| --- | --- | -| id | `string` | +| 参数 | 类型 | 默认值 | 说明 | +| --- | --- | :---: | --- | +| mode | "view" or "picture" | `'view'

可选值:
- view: 以真实节点渲染
- picture: 对子节点生成的内容截图渲染` | 渲染模式 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| SnapshotProps.mode | ✔️ | | | | diff --git a/docs/components/skyline/span.md b/docs/components/skyline/span.md new file mode 100644 index 000000000000..33dec36761ca --- /dev/null +++ b/docs/components/skyline/span.md @@ -0,0 +1,18 @@ +--- +title: Span +sidebar_label: Span +--- + +用于支持内联文本和 image / navigator 的混排 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/span.html) + +## 类型 + +```tsx +ComponentType +``` + +## SpanProps diff --git a/docs/components/skyline/sticky-header.md b/docs/components/skyline/sticky-header.md index 574096078600..352ae5ef161e 100644 --- a/docs/components/skyline/sticky-header.md +++ b/docs/components/skyline/sticky-header.md @@ -16,3 +16,15 @@ ComponentType ``` ## StickyHeaderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| offsetTop | `number` | `0` | 否 | 吸顶时与顶部的距(px) | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| StickyHeaderProps.offsetTop | ✔️ | | | | +| StickyHeaderProps.padding | ✔️ | | | | diff --git a/docs/components/skyline/sticky-section.md b/docs/components/skyline/sticky-section.md index 952115cf4eef..e516acbd2012 100644 --- a/docs/components/skyline/sticky-section.md +++ b/docs/components/skyline/sticky-section.md @@ -20,9 +20,11 @@ ComponentType | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | pushPinnedHeader | `boolean` | `true` | 否 | 吸顶元素重叠时是否继续上推 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | ### API 支持度 | API | 微信小程序 | H5 | React Native | Harmony | | :---: | :---: | :---: | :---: | :---: | | StickySectionProps.pushPinnedHeader | ✔️ | | | | +| StickySectionProps.padding | ✔️ | | | | diff --git a/docs/components/viewContainer/cover-image.md b/docs/components/viewContainer/cover-image.md index f5f31dbe0bbb..58afbc97f4e6 100644 --- a/docs/components/viewContainer/cover-image.md +++ b/docs/components/viewContainer/cover-image.md @@ -5,7 +5,7 @@ sidebar_label: CoverImage 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/cover-image.html) @@ -106,16 +106,16 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CoverImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.referrerPolicy | ✔️ | | | | | | | | -| CoverImageProps.fixedTop | | ✔️ | | | | | | | -| CoverImageProps.fixedRight | | ✔️ | | | | | | | -| CoverImageProps.fixedBottom | | ✔️ | | | | | | | -| CoverImageProps.fixedLeft | | ✔️ | | | | | | | -| CoverImageProps.ariaRole | | | | ✔️ | | | | | -| CoverImageProps.ariaLabel | | | | ✔️ | | | | | -| CoverImageProps.onLoad | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.onError | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.onTap | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CoverImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.referrerPolicy | ✔️ | | | | | | | | | +| CoverImageProps.fixedTop | | ✔️ | | | | | | | | +| CoverImageProps.fixedRight | | ✔️ | | | | | | | | +| CoverImageProps.fixedBottom | | ✔️ | | | | | | | | +| CoverImageProps.fixedLeft | | ✔️ | | | | | | | | +| CoverImageProps.ariaRole | | | | ✔️ | | | | | | +| CoverImageProps.ariaLabel | | | | ✔️ | | | | | | +| CoverImageProps.onLoad | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.onError | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.onTap | | | ✔️ | | | | | | | diff --git a/docs/components/viewContainer/cover-view.md b/docs/components/viewContainer/cover-view.md index 6cf1f2fd9b23..fb83d8ddbfab 100755 --- a/docs/components/viewContainer/cover-view.md +++ b/docs/components/viewContainer/cover-view.md @@ -5,7 +5,7 @@ sidebar_label: CoverView 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/cover-view.html) diff --git a/docs/components/viewContainer/custom-wrapper.md b/docs/components/viewContainer/custom-wrapper.md index 5c69e0c633b1..8577b840c0c7 100644 --- a/docs/components/viewContainer/custom-wrapper.md +++ b/docs/components/viewContainer/custom-wrapper.md @@ -6,7 +6,7 @@ sidebar_label: CustomWrapper custom-wrapper 自定义组件包裹器 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少 -支持情况: +支持情况: ## 类型 diff --git a/docs/components/viewContainer/movable-area.md b/docs/components/viewContainer/movable-area.md index 2ebceebead33..5a7ca67a28e8 100644 --- a/docs/components/viewContainer/movable-area.md +++ b/docs/components/viewContainer/movable-area.md @@ -5,7 +5,7 @@ sidebar_label: MovableArea movable-view 的可移动区域 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/movable-area.html) @@ -56,6 +56,6 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| MovableAreaProps.scaleArea | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| MovableAreaProps.scaleArea | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/docs/components/viewContainer/movable-view.md b/docs/components/viewContainer/movable-view.md index f0575b4f595f..c9a124852499 100755 --- a/docs/components/viewContainer/movable-view.md +++ b/docs/components/viewContainer/movable-view.md @@ -5,7 +5,7 @@ sidebar_label: MovableView 可移动的视图容器,在页面中可以拖拽滑动。movable-view 必须在 movable-area 组件中,并且必须是直接子节点,否则不能移动。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/movable-view.html) @@ -82,35 +82,35 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| MovableViewProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.inertia | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.outOfBounds | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.y | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.damping | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.friction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleMin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleMax | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.animation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| MovableViewProps.onChangeEnd | | | ✔️ | | | | | | -| MovableViewProps.onDragStart | | | | | | | ✔️ | | -| MovableViewProps.onDragEnd | | | | | | | ✔️ | | -| MovableViewProps.onScale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.onTouchStart | | | ✔️ | | | | | | -| MovableViewProps.onTouchMove | | | ✔️ | | | | | | -| MovableViewProps.onTouchEnd | | | ✔️ | | | ✔️(此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理) | | | -| MovableViewProps.onTouchCancel | | | ✔️ | | | | | | -| MovableViewProps.onHTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | -| MovableViewProps.onVTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | -| MovableViewProps.catchTouchStart | | | ✔️ | | | | | | -| MovableViewProps.catchTouchMove | | | ✔️ | | | | | | -| MovableViewProps.catchTouchEnd | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| MovableViewProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.inertia | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.outOfBounds | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.y | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.damping | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.friction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleMin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleMax | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.animation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| MovableViewProps.onChangeEnd | | | ✔️ | | | | | | | +| MovableViewProps.onDragStart | | | | | | | ✔️ | | | +| MovableViewProps.onDragEnd | | | | | | | ✔️ | | | +| MovableViewProps.onScale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.onTouchStart | | | ✔️ | | | | | | | +| MovableViewProps.onTouchMove | | | ✔️ | | | | | | | +| MovableViewProps.onTouchEnd | | | ✔️ | | | ✔️(此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理) | | | ✔️ | +| MovableViewProps.onTouchCancel | | | ✔️ | | | | | | | +| MovableViewProps.onHTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | ✔️ | +| MovableViewProps.onVTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | ✔️ | +| MovableViewProps.catchTouchStart | | | ✔️ | | | | | | | +| MovableViewProps.catchTouchMove | | | ✔️ | | | | | | | +| MovableViewProps.catchTouchEnd | | | ✔️ | | | | | | | ### TChangeSource diff --git a/docs/components/viewContainer/native-slot.md b/docs/components/viewContainer/native-slot.md index 0c68436497b5..77b253daeb03 100644 --- a/docs/components/viewContainer/native-slot.md +++ b/docs/components/viewContainer/native-slot.md @@ -5,7 +5,7 @@ sidebar_label: NativeSlot 编译的原生组件支持使用 slot 插槽 -支持情况: +支持情况: > [参考文档](https://github.com/NervJS/taro/pull/12627) diff --git a/docs/components/viewContainer/script.md b/docs/components/viewContainer/script.md new file mode 100644 index 000000000000..8d3980be6d73 --- /dev/null +++ b/docs/components/viewContainer/script.md @@ -0,0 +1,56 @@ +--- +title: Script +sidebar_label: Script +--- + +script 类似微信小程序的 wxs 标签,支持引用各种小程序的 xs 文件 +只能在 CompileMode 中使用 + +支持情况: + +## 类型 + +```tsx +ComponentType +``` + +## 示例代码 + +import { ReactIcon, VueIcon } from '@site/static/icons' +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' + +, value: "React" }]}> + + +```tsx +import { Component } from 'react' +import { View, Script } from '@tarojs/components' + +export function Index () { + return ( + + + Hello, {logic.name}! + + ) +} +``` + + + +## ScriptProps + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| src | `string` | xs 文件的相对路径 | +| module | `string` | xs 模块名 | + +### API 支持度 + +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ScriptProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | +| ScriptProps.module | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | diff --git a/docs/components/viewContainer/scroll-view.md b/docs/components/viewContainer/scroll-view.md index ada3f0c12340..cf23ddbec1ba 100755 --- a/docs/components/viewContainer/scroll-view.md +++ b/docs/components/viewContainer/scroll-view.md @@ -9,7 +9,7 @@ Tips: H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html) @@ -197,6 +197,7 @@ typeof ScrollViewProps | refresherBackground | `string` | `'#FFF'` | 否 | 设置自定义下拉刷新区域背景颜色 | | refresherTriggered | `boolean` | `false` | 否 | 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发 | | enhanced | `boolean` | `false` | 否 | 启用 scroll-view 增强特性 | +| usingSticky | `boolean` | `false` | 否 | 使 scroll-view 下的 position sticky 特性生效,否则滚动一屏后 sticky 元素会被隐藏 | | bounces | `boolean` | `true` | 否 | iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效) | | showScrollbar | `boolean` | `true` | 否 | 滚动条显隐控制 (同时开启 enhanced 属性后生效) | | pagingEnabled | `boolean` | `false` | 否 | 分页滑动效果 (同时开启 enhanced 属性后生效) | @@ -207,7 +208,7 @@ typeof ScrollViewProps | disableUpperScroll | `string` | | 否 | 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。 | | ariaLabel | `string` | | 否 | 无障碍访问,(属性)元素的额外描述 | | enablePassive | `boolean` | `false` | 否 | 开启 passive 特性,能优化一定的滚动性能 | -| type | "list" or "custom" | `'list'` | 否 | 渲染模式
list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件 | +| type | "list" or "custom" or "nested" | `'list'` | 否 | 渲染模式
list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件
nested - 嵌套模式。用于处理父子 scroll-view 间的嵌套滚动,子节点可以是 nested-scroll-header nested-scroll-body 组件或自定义 refresher | | reverse | `boolean` | `false` | 否 | 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。 | | clip | `boolean` | `true` | 否 | 是否对溢出进行裁剪,默认开启 | | cacheExtent | `number` | | 否 | 指定视口外渲染区域的距离,默认情况下视口外节点不渲染。指定 cache-extent 可优化滚动体验和加载速度,但会提高内存占用且影响首屏速度,可按需启用。 | @@ -243,68 +244,69 @@ typeof ScrollViewProps ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ScrollViewProps.scrollX | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | -| ScrollViewProps.scrollY | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | -| ScrollViewProps.upperThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.lowerThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollTop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollLeft | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollIntoView | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| ScrollViewProps.scrollWithAnimation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.enableBackToTop | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | -| ScrollViewProps.enableFlex | ✔️ | | | | | ✔️ | | | | -| ScrollViewProps.scrollAnchoring | ✔️ | | | | | | | | | -| ScrollViewProps.refresherEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherDefaultStyle | ✔️ | | | | | | | | | -| ScrollViewProps.refresherBackground | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTriggered | ✔️ | | | | | | | | | -| ScrollViewProps.enhanced | ✔️ | ✔️ | | | | | | | | -| ScrollViewProps.bounces | ✔️ | ✔️ | | | | | | | | -| ScrollViewProps.showScrollbar | ✔️ | | | | | | | | | -| ScrollViewProps.pagingEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.fastDeceleration | ✔️ | | | | | | | | | -| ScrollViewProps.scrollAnimationDuration | | | ✔️ | | | | | | | -| ScrollViewProps.trapScroll | | | ✔️ | | | | | | | -| ScrollViewProps.disableLowerScroll | | | ✔️ | | | | | | | -| ScrollViewProps.disableUpperScroll | | | ✔️ | | | | | | | -| ScrollViewProps.ariaLabel | | | | | ✔️ | | | | | -| ScrollViewProps.enablePassive | ✔️ | | | | | | | | | -| ScrollViewProps.type | ✔️ | | | | | | | | | -| ScrollViewProps.reverse | ✔️ | | | | | | | | | -| ScrollViewProps.clip | ✔️ | | | | | | | | | -| ScrollViewProps.cacheExtent | ✔️ | | | | | | | | | -| ScrollViewProps.minDragDistance | ✔️ | | | | | | | | | -| ScrollViewProps.padding | ✔️ | | | | | | | | | -| ScrollViewProps.scrollIntoViewWithinExtent | ✔️ | | | | | | | | | -| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | ✔️ | | | -| ScrollViewProps.refresherTwoLevelEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelTriggered | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelCloseThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelScrollEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherBallisticRefreshEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelPinned | ✔️ | | | | | | | | | -| ScrollViewProps.onScrollToUpper | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScrollToLower | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScroll | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScrollStart | ✔️ | | | | | | | | | -| ScrollViewProps.onScrollEnd | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherPulling | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherRefresh | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherRestore | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherAbort | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherWillRefresh | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherStatusChange | ✔️ | | | | | | | | | -| ScrollViewProps.onDragStart | ✔️ | | | | | | | | | -| ScrollViewProps.onDragging | ✔️ | | | | | | | | | -| ScrollViewProps.onDragEnd | ✔️ | | | | | | | | | -| ScrollViewProps.onTouchStart | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchMove | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchEnd | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchCancel | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ScrollViewProps.scrollX | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | ✔️ | +| ScrollViewProps.scrollY | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | ✔️ | +| ScrollViewProps.upperThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.lowerThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollTop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollLeft | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollIntoView | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ScrollViewProps.scrollWithAnimation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.enableBackToTop | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | +| ScrollViewProps.enableFlex | ✔️ | | | | | ✔️ | | | | | +| ScrollViewProps.scrollAnchoring | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherDefaultStyle | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherBackground | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTriggered | ✔️ | | | | | | | | | | +| ScrollViewProps.enhanced | ✔️ | ✔️ | | | | | | | | | +| ScrollViewProps.usingSticky | ✔️ | | | | | | | | | | +| ScrollViewProps.bounces | ✔️ | ✔️ | | | | | | | | | +| ScrollViewProps.showScrollbar | ✔️ | | | | | | | | | | +| ScrollViewProps.pagingEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.fastDeceleration | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollAnimationDuration | | | ✔️ | | | | | | | | +| ScrollViewProps.trapScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.disableLowerScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.disableUpperScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.ariaLabel | | | | | ✔️ | | | | | | +| ScrollViewProps.enablePassive | ✔️ | | | | | | | | | | +| ScrollViewProps.type | ✔️ | | | | | | | | | | +| ScrollViewProps.reverse | ✔️ | | | | | | | | | | +| ScrollViewProps.clip | ✔️ | | | | | | | | | | +| ScrollViewProps.cacheExtent | ✔️ | | | | | | | | | | +| ScrollViewProps.minDragDistance | ✔️ | | | | | | | | | | +| ScrollViewProps.padding | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollIntoViewWithinExtent | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | ✔️ | | | ✔️ | +| ScrollViewProps.refresherTwoLevelEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelTriggered | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelCloseThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelScrollEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherBallisticRefreshEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelPinned | ✔️ | | | | | | | | | | +| ScrollViewProps.onScrollToUpper | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScrollToLower | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScroll | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScrollStart | ✔️ | | | | | | | | | | +| ScrollViewProps.onScrollEnd | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherPulling | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherRefresh | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherRestore | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherAbort | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherWillRefresh | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherStatusChange | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragStart | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragging | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragEnd | ✔️ | | | | | | | | | | +| ScrollViewProps.onTouchStart | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchMove | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchEnd | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchCancel | | | ✔️ | | | | | | | | | 参数 | 类型 | | --- | --- | diff --git a/docs/components/viewContainer/slot.md b/docs/components/viewContainer/slot.md index 6c3b041fae66..dcc8de7292e1 100644 --- a/docs/components/viewContainer/slot.md +++ b/docs/components/viewContainer/slot.md @@ -5,7 +5,7 @@ sidebar_label: Slot slot 插槽 -支持情况: +支持情况: ## 类型 diff --git a/docs/components/viewContainer/swiper-item.md b/docs/components/viewContainer/swiper-item.md index eed2f1dc6e97..34e2745654fd 100644 --- a/docs/components/viewContainer/swiper-item.md +++ b/docs/components/viewContainer/swiper-item.md @@ -6,7 +6,7 @@ sidebar_label: SwiperItem 仅可放置在 swiper 组件中,宽高自动设置为100% > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/swiper-item.html) @@ -92,8 +92,8 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 抖音小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwiperItemProps.itemId | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperItemProps.skipHiddenItemLayout | ✔️ | | | | | | | -| SwiperItemProps.deep | | | | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 抖音小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwiperItemProps.itemId | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperItemProps.skipHiddenItemLayout | ✔️ | | | | | | | | +| SwiperItemProps.deep | | | | | ✔️ | | | | diff --git a/docs/components/viewContainer/swiper.md b/docs/components/viewContainer/swiper.md index fbfdd2066356..47f27044fd83 100755 --- a/docs/components/viewContainer/swiper.md +++ b/docs/components/viewContainer/swiper.md @@ -6,7 +6,7 @@ sidebar_label: Swiper 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。 > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html) @@ -124,43 +124,43 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwiperProps.indicatorDots | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.indicatorColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.indicatorActiveColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.current | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.currentItemId | (deprecated) | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.interval | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.duration | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.circular | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.vertical | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.previousMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.nextMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.snapToEdge | ✔️ | | ✔️ | | | | | | | -| SwiperProps.displayMultipleItems | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.skipHiddenItemLayout | | | | | ✔️ | ✔️ | | | | -| SwiperProps.easingFunction | ✔️ | | ✔️ | ✔️ | | ✔️ | | | | -| SwiperProps.disableTouch | | | ✔️ | | | | | | | -| SwiperProps.zoom | | | | | | | ✔️ | | | -| SwiperProps.full | | | | | | | ✔️ | | | -| SwiperProps.activeClass | | | ✔️ | | | | | | | -| SwiperProps.changingClass | | | ✔️ | | | | | | | -| SwiperProps.acceleration | | | ✔️ | | | | | | | -| SwiperProps.disableProgrammaticAnimation | | | ✔️ | | | | | | | -| SwiperProps.swipeRatio | | | ✔️ | | | | | | | -| SwiperProps.swipeSpeed | | | ✔️ | | | | | | | -| SwiperProps.touchAngle | | | ✔️ | | | | | | | -| SwiperProps.adjustHeight | | | ✔️ | | | | | | | -| SwiperProps.adjustVerticalHeight | | | ✔️ | | | | | | | -| SwiperProps.disableTouchmove | | ✔️ | | | | | | | | -| SwiperProps.scrollWithAnimation | ✔️ | | | | | | | | | -| SwiperProps.cacheExtent | ✔️ | | | | | | | | | -| SwiperProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.onTransition | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | -| SwiperProps.onAnimationFinish | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.onAnimationEnd | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwiperProps.indicatorDots | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.indicatorColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.indicatorActiveColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.current | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.currentItemId | (deprecated) | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.interval | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.duration | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.circular | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.vertical | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.previousMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.nextMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.snapToEdge | ✔️ | | ✔️ | | | | | | | | +| SwiperProps.displayMultipleItems | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.skipHiddenItemLayout | | | | | ✔️ | ✔️ | | | | | +| SwiperProps.easingFunction | ✔️ | | ✔️ | ✔️ | | ✔️ | | | | | +| SwiperProps.disableTouch | | | ✔️ | | | | | | | | +| SwiperProps.zoom | | | | | | | ✔️ | | | ✔️ | +| SwiperProps.full | | | | | | | ✔️ | | | ✔️ | +| SwiperProps.activeClass | | | ✔️ | | | | | | | | +| SwiperProps.changingClass | | | ✔️ | | | | | | | | +| SwiperProps.acceleration | | | ✔️ | | | | | | | | +| SwiperProps.disableProgrammaticAnimation | | | ✔️ | | | | | | | | +| SwiperProps.swipeRatio | | | ✔️ | | | | | | | | +| SwiperProps.swipeSpeed | | | ✔️ | | | | | | | | +| SwiperProps.touchAngle | | | ✔️ | | | | | | | | +| SwiperProps.adjustHeight | | | ✔️ | | | | | | | | +| SwiperProps.adjustVerticalHeight | | | ✔️ | | | | | | | | +| SwiperProps.disableTouchmove | | ✔️ | | | | | | | | | +| SwiperProps.scrollWithAnimation | ✔️ | | | | | | | | | | +| SwiperProps.cacheExtent | ✔️ | | | | | | | | | | +| SwiperProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.onTransition | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | | +| SwiperProps.onAnimationFinish | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.onAnimationEnd | | | ✔️ | | | | | | | | ### TChangeSource diff --git a/docs/components/viewContainer/view.md b/docs/components/viewContainer/view.md index 1a10cd929466..388dada8a494 100755 --- a/docs/components/viewContainer/view.md +++ b/docs/components/viewContainer/view.md @@ -5,7 +5,7 @@ sidebar_label: View 视图容器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/view.html) @@ -121,30 +121,30 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ViewProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。) | | -| ViewProps.hoverStyle | | | | | | | | ✔️ | | -| ViewProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ViewProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ViewProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ViewProps.disableScroll | | | ✔️ | | | | | | | -| ViewProps.hidden | | | ✔️ | | | | | | | -| ViewProps.animation | | | ✔️ | | | | | | | -| ViewProps.role | | | ✔️ | | | | | | | -| ViewProps.ariaRole | | | | | ✔️ | | | | | -| ViewProps.ariaLabel | | | | | ✔️ | | | | | -| ViewProps.onTap | | | ✔️ | | | | | | | -| ViewProps.onTouchStart | | | ✔️ | | | | | | | -| ViewProps.onTouchMove | | | ✔️ | | | | | | | -| ViewProps.onTouchEnd | | | ✔️ | | | | | | | -| ViewProps.onTouchCancel | | | ✔️ | | | | | | | -| ViewProps.onLongTap | | | ✔️ | | | | | | | -| ViewProps.onTransitionEnd | | | ✔️ | | | | | | | -| ViewProps.onAnimationIteration | | | ✔️ | | | | | | | -| ViewProps.onAnimationStart | | | ✔️ | | | | | | | -| ViewProps.onAnimationEnd | | | ✔️ | | | | | | | -| ViewProps.onAppear | | | ✔️ | | | | | | | -| ViewProps.onDisappear | | | ✔️ | | | | | | | -| ViewProps.onFirstAppear | | | ✔️ | | | | | | | -| ViewProps.catchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ViewProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。) | | ✔️ | +| ViewProps.hoverStyle | | | | | | | | ✔️ | | | +| ViewProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ViewProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ViewProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ViewProps.disableScroll | | | ✔️ | | | | | | | | +| ViewProps.hidden | | | ✔️ | | | | | | | | +| ViewProps.animation | | | ✔️ | | | | | | | | +| ViewProps.role | | | ✔️ | | | | | | | | +| ViewProps.ariaRole | | | | | ✔️ | | | | | | +| ViewProps.ariaLabel | | | | | ✔️ | | | | | | +| ViewProps.onTap | | | ✔️ | | | | | | | | +| ViewProps.onTouchStart | | | ✔️ | | | | | | | | +| ViewProps.onTouchMove | | | ✔️ | | | | | | | | +| ViewProps.onTouchEnd | | | ✔️ | | | | | | | | +| ViewProps.onTouchCancel | | | ✔️ | | | | | | | | +| ViewProps.onLongTap | | | ✔️ | | | | | | | | +| ViewProps.onTransitionEnd | | | ✔️ | | | | | | | | +| ViewProps.onAnimationIteration | | | ✔️ | | | | | | | | +| ViewProps.onAnimationStart | | | ✔️ | | | | | | | | +| ViewProps.onAnimationEnd | | | ✔️ | | | | | | | | +| ViewProps.onAppear | | | ✔️ | | | | | | | | +| ViewProps.onDisappear | | | ✔️ | | | | | | | | +| ViewProps.onFirstAppear | | | ✔️ | | | | | | | | +| ViewProps.catchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | diff --git a/docs/env-mode-config.md b/docs/env-mode-config.md index 188561e90070..d237ac972007 100644 --- a/docs/env-mode-config.md +++ b/docs/env-mode-config.md @@ -14,7 +14,7 @@ Taro v3.5.10 开始支持,之前的版本可参考 [taro-plugin-environment](h 默认情况下, `模式` `Taro cli` 有 2 个模式: - `development` 模式用于开发时 `taro build --type weapp --watch`,它等价于 `taro build --type weapp --watch --mode development` -- `production` 模式用于生产时 `taro build --type weapp`, ,它等价于 `taro build --type weapp --mode production` +- `production` 模式用于生产时 `taro build --type weapp`, 它等价于 `taro build --type weapp --mode production` 可以发现,默认情况下 `模式` 的值,取决于 `NODE_ENV` 的值(但是反过来说模式的值无法改变 `NODE_ENV` 的值)。 diff --git a/packages/taro-components/types/DraggableSheet.d.ts b/packages/taro-components/types/DraggableSheet.d.ts new file mode 100644 index 000000000000..be16f7c4d42c --- /dev/null +++ b/packages/taro-components/types/DraggableSheet.d.ts @@ -0,0 +1,47 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' + +interface DraggableSheetProps extends StandardProps { + /** + * 初始时占父容器的比例 + * @supported weapp + * @default 0.5 + */ + initialChildSize?: number + /** + * 最小时占父容器的比例 + * @supported weapp + * @default 0.25 + */ + minChildSize?: number + /** + * 最大时占父容器的比例 + * @supported weapp + * @default 1.0 + */ + maxChildSize?: number + /** + * 拖拽后是否自动对齐关键点 + * @supported weapp + * @default false + */ + snap?: boolean + /** + * 拖拽后对齐的关键点,无需包含最小和最大值 + * @supported weapp + * @default [] + */ + snapSizes?: any[] +} + +/** + * 半屏可拖拽组件 + * 该组件需配合 DraggableSheetContext 接口使用。 目前仅在 Skyline 渲染引擎下支持。 + * 页面内拖拽是一种常见的交互效果,开发者可通过手势系统灵活实现。draggable-sheet 组件封装了常见的交互逻辑,实现起来更加简单。 + * 该组件需结合 scroll-view 使用。scroll-view 组件声明 associative-container 属性后,可与 draggable-sheet 关联起来。 + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/draggable-sheet.html + */ +declare const DraggableSheet: ComponentType +export { DraggableSheet, DraggableSheetProps } diff --git a/packages/taro-components/types/GridBuilder.d.ts b/packages/taro-components/types/GridBuilder.d.ts new file mode 100644 index 000000000000..541f5765899e --- /dev/null +++ b/packages/taro-components/types/GridBuilder.d.ts @@ -0,0 +1,72 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' +interface GridBuilderProps extends StandardProps { + /** + * 布局方式 + * @supported weapp + * @default "aligned" + * + * 可选值: + * - aligned: 每行高度由同一行中最大高度子节点决定 + * - masonry: 瀑布流,根据子元素高度自动布局 + */ + type: 'aligned' | 'masonry' + /** + * 需要用于渲染的列表 + * @supported weapp + * @default [] + */ + list: any[] + /** + * 完整列表的长度,如果不传则取 list 的长度作为其值 + * @supported weapp + */ + childCount?: number + /** + * 交叉轴元素数量 + * @supported weapp + * @default 2 + */ + crossAxisCount?: number + /** 交叉轴元素最大范围 + * @supported weapp + * @default 0 + */ + maxCrossAxisExtent?: number + /** + * 主轴方向间隔 + * @supported weapp + * @default 0 + */ + mainAxisGap?: number + /** 交叉轴方向间隔 + * @supported weapp + * @default 0 + */ + crossAxisGap?: number + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] + /** + * 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 + * @supported weapp + */ + onItemBuild?: CommonEventFunction + /** + * 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 + * @supported weapp + */ + onItemDispose?: CommonEventFunction +} + +/** + * 网格构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/grid-builder.html + */ +declare const GridBuilder: ComponentType +export { GridBuilder, GridBuilderProps } diff --git a/packages/taro-components/types/GridView.d.ts b/packages/taro-components/types/GridView.d.ts index 25aae495f5c7..bfcb06be1038 100644 --- a/packages/taro-components/types/GridView.d.ts +++ b/packages/taro-components/types/GridView.d.ts @@ -1,17 +1,24 @@ import { ComponentType } from 'react' import { StandardProps } from './common' interface GridViewProps extends StandardProps { - /** 布局方式。masonry - 瀑布流,根据子元素高度自动布局。 aligned - 每行高度由同一行中最大高度子节点决定。 + /** + * 布局方式 * @supported weapp * @default "aligned" + * + * 可选值: + * - aligned: 每行高度由同一行中最大高度子节点决定 + * - masonry: 瀑布流,根据子元素高度自动布局 */ - type: string - /** 交叉轴元素数量 + type: 'aligned' | 'masonry' + /** + * 交叉轴元素数量 * @supported weapp * @default 2 */ crossAxisCount?: number - /** 主轴方向间隔 + /** + * 主轴方向间隔 * @supported weapp * @default 0 */ @@ -26,7 +33,14 @@ interface GridViewProps extends StandardProps { * @default 0 */ maxCrossAxisExtent?: number + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] } + /** * 网格布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。 * @classification skyline diff --git a/packages/taro-components/types/ListBuilder.d.ts b/packages/taro-components/types/ListBuilder.d.ts new file mode 100644 index 000000000000..b35da5e270c8 --- /dev/null +++ b/packages/taro-components/types/ListBuilder.d.ts @@ -0,0 +1,55 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' +interface ListBuilderProps extends StandardProps { + /** + * 布局方式 + * @supported weapp + * @default "aligned" + * + * 可选值: + * - static: 定高模式,所有列表项等高,需要传入 child-height + * - dynamic: 不定高模式 + */ + type: 'static' | 'dynamic' + /** + * 需要用于渲染的列表 + * @supported weapp + * @default [] + */ + list: any[] + /** + * 完整列表的长度,如果不传则取 list 的长度作为其值 + * @supported weapp + */ + childCount?: number + /** + * 列表项的高度,当 type 为 static 时必须传入 + * @supported weapp + */ + childHeight?: number + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] + /** + * 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 + * @supported weapp + */ + onItemBuild?: CommonEventFunction + /** + * 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 + * @supported weapp + */ + onItemDispose?: CommonEventFunction +} + +/** + * 列表构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/list-builder.html + */ +declare const ListBuilder: ComponentType +export { ListBuilder, ListBuilderProps } diff --git a/packages/taro-components/types/ListView.d.ts b/packages/taro-components/types/ListView.d.ts index 3d24eb846b6b..cb1234947e01 100644 --- a/packages/taro-components/types/ListView.d.ts +++ b/packages/taro-components/types/ListView.d.ts @@ -1,6 +1,13 @@ import { ComponentType } from 'react' import { StandardProps } from './common' -interface ListViewProps extends StandardProps {} +interface ListViewProps extends StandardProps { + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] +} /** * 列表布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。 diff --git a/packages/taro-components/types/NestedScrollBody.d.ts b/packages/taro-components/types/NestedScrollBody.d.ts new file mode 100644 index 000000000000..fbc17b1b8c27 --- /dev/null +++ b/packages/taro-components/types/NestedScrollBody.d.ts @@ -0,0 +1,15 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' + +interface NestedScrollBodyProps extends StandardProps {} + +/** + * 嵌套 scroll-view 场景中属于里层 scroll-view 的节点, + * 仅支持作为 模式的直接子节点。 + * 不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-body.html + */ +declare const NestedScrollBody: ComponentType +export { NestedScrollBody, NestedScrollBodyProps } diff --git a/packages/taro-components/types/NestedScrollHeader.d.ts b/packages/taro-components/types/NestedScrollHeader.d.ts new file mode 100644 index 000000000000..68cbaa17b7eb --- /dev/null +++ b/packages/taro-components/types/NestedScrollHeader.d.ts @@ -0,0 +1,15 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' + +interface NestedScrollHeaderProps extends StandardProps {} + +/** + * 嵌套 scroll-view 场景中属于外层 scroll-view 的节点, + * 仅支持作为 模式的直接子节点。 + * 不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-header.html + */ +declare const NestedScrollHeader: ComponentType +export { NestedScrollHeader, NestedScrollHeaderProps } diff --git a/packages/taro-components/types/OpenContainer.d.ts b/packages/taro-components/types/OpenContainer.d.ts new file mode 100644 index 000000000000..4967ee3a27cb --- /dev/null +++ b/packages/taro-components/types/OpenContainer.d.ts @@ -0,0 +1,74 @@ +import { ComponentType } from 'react' +import { StandardProps, CommonEventFunction } from './common' +interface OpenContainerProps extends StandardProps { + /** + * 动画类型 + * @supported weapp + * @default "fade" + * + * 可选值: + * - fade: 将传入元素淡入传出元素之上 + * - fadeThrough: 首先淡出传出元素,并在传出元素完全淡出后开始淡入传入元素 + */ + transitionType: 'fade' | 'fadeThrough' + /** + * 动画时长 + * @supported weapp + * @default 300 + */ + transitionDuration: number + /** + * 初始容器背景色 + * @supported weapp + * @default "white" + */ + closedColor: string + /** + * 初始容器影深大小 + * @supported weapp + * @default 0 + */ + closedElevation: number + /** + * 初始容器圆角大小 + * @supported weapp + * @default 0 + */ + closeBorderRadius: number + /** + * fadeThrough 模式下的过渡背景色 + * @supported weapp + * @default "" + */ + middleColor: string + /** + * 打开状态下容器背景色 + * @supported weapp + * @default "white" + */ + openColor: string + /** + * 打开状态下容器影深大小 + * @supported weapp + * @default 0 + */ + openElevation: number + /** + * 打开状态下容器圆角大小 + * @supported weapp + * @default 0 + */ + openBorderRadius: number +} + +/** + * 容器转场动画组件 + * 点击 组件,当使用 wx.navigateTo 跳转下一页面时,对其子节点和下一个页面进行过渡。 + * 下个页面从 所在位置大小渐显放大,同时 内容渐隐,过渡效果包含背景色、圆角和阴影。 + * 源页面 为 closed 状态,转场动画后为 open 状态。 + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/open-container.html + */ +declare const OpenContainer: ComponentType +export { OpenContainer, OpenContainerProps } diff --git a/packages/taro-components/types/Script.d.ts b/packages/taro-components/types/Script.d.ts new file mode 100644 index 000000000000..d3b1468ce7a7 --- /dev/null +++ b/packages/taro-components/types/Script.d.ts @@ -0,0 +1,37 @@ +import { ComponentType } from 'react' + +import { StandardProps } from './common' + +interface ScriptProps extends StandardProps { + /** xs 文件的相对路径 + * @supported weapp, alipay, swan, tt, qq, jd + */ + src: string + /** xs 模块名 + * @supported weapp, alipay, swan, tt, qq, jd + */ + module: string +} + +/** script 类似微信小程序的 wxs 标签,支持引用各种小程序的 xs 文件 + * 只能在 CompileMode 中使用 + * @classification viewContainer + * @supported weapp, swan, alipay, tt, jd, qq + * @example_react + * ```tsx + * import { Component } from 'react' + * import { View, Script } from '@tarojs/components' + * + * export function Index () { + * return ( + * + * + * Hello, {logic.name}! + * + * ) + * } + * ``` + */ +declare const Script: ComponentType + +export { Script, ScriptProps } diff --git a/packages/taro-components/types/ScrollView.d.ts b/packages/taro-components/types/ScrollView.d.ts index 1a69c18ac906..0e1124ca3885 100644 --- a/packages/taro-components/types/ScrollView.d.ts +++ b/packages/taro-components/types/ScrollView.d.ts @@ -85,6 +85,11 @@ interface ScrollViewProps extends StandardProps { * @default false */ enhanced?: boolean + /** 使 scroll-view 下的 position sticky 特性生效,否则滚动一屏后 sticky 元素会被隐藏 + * @supported weapp + * @default false + */ + usingSticky?: boolean /** iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效) * @supported weapp, swan * @default true @@ -134,10 +139,11 @@ interface ScrollViewProps extends StandardProps { /** 渲染模式 * list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化 * custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件 + * nested - 嵌套模式。用于处理父子 scroll-view 间的嵌套滚动,子节点可以是 nested-scroll-header nested-scroll-body 组件或自定义 refresher * @supported weapp * @default 'list' */ - type?: 'list' | 'custom' + type?: 'list' | 'custom' | 'nested' /** 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。 * @supported weapp * @default false diff --git a/packages/taro-components/types/Snapshot.d.ts b/packages/taro-components/types/Snapshot.d.ts index a0c720c1ab32..c74b50585e4f 100644 --- a/packages/taro-components/types/Snapshot.d.ts +++ b/packages/taro-components/types/Snapshot.d.ts @@ -1,12 +1,21 @@ import { ComponentType } from 'react' - import { StandardProps } from './common' interface SnapshotProps extends StandardProps { - id: string + /** + * 渲染模式 + * @supported weapp + * @default 'view' + * + * 可选值: + * - view: 以真实节点渲染 + * - picture: 对子节点生成的内容截图渲染 + */ + mode: 'view' | 'picture' } -/** 截图组件。 +/** + * 截图组件 * 支持将其子节点的渲染结果导出成图片,该组件需配合 snapshot 接口使用。 目前仅在 Skyline 渲染引擎 下支持。 * @classification skyline * @supported weapp diff --git a/packages/taro-components/types/Span.d.ts b/packages/taro-components/types/Span.d.ts new file mode 100644 index 000000000000..0aefbef36ebe --- /dev/null +++ b/packages/taro-components/types/Span.d.ts @@ -0,0 +1,14 @@ +import { ComponentType } from 'react' + +import { StandardProps } from './common' + +interface SpanProps extends StandardProps { } + +/** + * 用于支持内联文本和 image / navigator 的混排 + * @classification skyline + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/span.html + */ +declare const Span: ComponentType +export { Span, SpanProps } diff --git a/packages/taro-components/types/StickyHeader.d.ts b/packages/taro-components/types/StickyHeader.d.ts index 5250527ed882..87cc3c6f0860 100644 --- a/packages/taro-components/types/StickyHeader.d.ts +++ b/packages/taro-components/types/StickyHeader.d.ts @@ -1,6 +1,19 @@ import { ComponentType } from 'react' import { StandardProps } from './common' -interface StickyHeaderProps extends StandardProps {} +interface StickyHeaderProps extends StandardProps { + /** + * 吸顶时与顶部的距(px) + * @supported weapp + * @default 0 + */ + offsetTop?: number + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] +} /** * 吸顶布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。 diff --git a/packages/taro-components/types/StickySection.d.ts b/packages/taro-components/types/StickySection.d.ts index cbb2e51c50eb..8c1e7e2d6a16 100644 --- a/packages/taro-components/types/StickySection.d.ts +++ b/packages/taro-components/types/StickySection.d.ts @@ -6,6 +6,12 @@ interface StickySectionProps extends StandardProps { * @default true */ pushPinnedHeader?: boolean + /** + * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 + * @supported weapp + * @default [0, 0, 0, 0] + */ + padding?: [number, number, number, number] } /** * 吸顶布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点。仅 Skyline 支持。 diff --git a/packages/taro-components/types/Text.d.ts b/packages/taro-components/types/Text.d.ts index d7b2af34fcbc..eb8fa9b4be12 100644 --- a/packages/taro-components/types/Text.d.ts +++ b/packages/taro-components/types/Text.d.ts @@ -25,6 +25,12 @@ interface TextProps extends StandardProps { * @supported alipay */ numberOfLines?: number + /** + * 文本溢出处理 + * @supported weapp-skyline + * @default 'visible' + */ + overflow?: keyof TextProps.Overflow /** 限制文本最大行数 * @supported weapp */ @@ -40,6 +46,16 @@ declare namespace TextProps { /** 根据字体设置的空格大小 */ nbsp } + interface Overflow { + /** 修剪文本 */ + clip + /** 淡出 */ + fade + /** 显示省略号 */ + ellipsis + /** 文本不截断 */ + visible + } } /** 文本 * @classification base diff --git a/packages/taro-components/types/index.d.ts b/packages/taro-components/types/index.d.ts index 3d96208bf8a1..ac618d98119a 100644 --- a/packages/taro-components/types/index.d.ts +++ b/packages/taro-components/types/index.d.ts @@ -42,11 +42,18 @@ export { Textarea } from './Textarea' /** Skyline */ export { GridView } from './GridView' +export { GridBuilder } from './GridBuilder' export { ListView } from './ListView' +export { ListBuilder } from './ListBuilder' export { ShareElement } from './ShareElement' export { Snapshot } from './SnapShot' +export { Span } from './Span' export { StickyHeader } from './StickyHeader' export { StickySection } from './StickySection' +export { OpenContainer } from './OpenContainer' +export { DraggableSheet } from './DraggableSheet' +export { NestedScrollHeader } from './NestedScrollHeader' +export { NestedScrollBody } from './NestedScrollBody' /** 导航 */ export { FunctionalPageNavigator } from './FunctionalPageNavigator' @@ -86,3 +93,4 @@ export { PageMeta } from './PageMeta' export { CustomWrapper } from './CustomWrapper' export { Slot } from './Slot' export { NativeSlot } from './NativeSlot' +export { Script } from './Script' diff --git a/packages/taro-components/types/index.vue3.d.ts b/packages/taro-components/types/index.vue3.d.ts index d7cef457187e..5e90eeca0288 100644 --- a/packages/taro-components/types/index.vue3.d.ts +++ b/packages/taro-components/types/index.vue3.d.ts @@ -66,6 +66,7 @@ import { ShareElementProps } from './ShareElement' import { SliderProps } from './Slider' import { SlotProps } from './Slot' import { SnapshotProps } from './SnapShot' +import { SpanProps } from './Span' import { StickyHeaderProps } from './StickyHeader' import { StickySectionProps } from './StickySection' import { SwiperProps } from './Swiper' @@ -144,6 +145,7 @@ export declare const Textarea: VueComponentType export declare const GridView: VueComponentType export declare const ListView: VueComponentType export declare const Snapshot: VueComponentType +export declare const Span: VueComponentType export declare const ShareElement: VueComponentType export declare const StickyHeader: VueComponentType export declare const StickySection: VueComponentType @@ -266,6 +268,8 @@ declare global { 'taro-share-element-core': ElementAttrs> 'snapshot': ElementAttrs> 'taro-snapshot-core': ElementAttrs> + 'span': ElementAttrs> + 'taro-span-core': ElementAttrs> 'sticky-header': ElementAttrs> 'taro-sticky-header-core': ElementAttrs> 'sticky-section': ElementAttrs> diff --git a/packages/taro/types/api/storage/index.d.ts b/packages/taro/types/api/storage/index.d.ts index d6e8e563ed42..7d7389b46fa6 100644 --- a/packages/taro/types/api/storage/index.d.ts +++ b/packages/taro/types/api/storage/index.d.ts @@ -256,7 +256,7 @@ declare module '../../index' { ): T /** Taro.getStorageInfo 的同步版本 - * @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony_hybrid + * @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid * @example * ```tsx * try { diff --git a/packages/taro/types/compile/config/project.d.ts b/packages/taro/types/compile/config/project.d.ts index 3d7fad750e74..12ef67dd465f 100644 --- a/packages/taro/types/compile/config/project.d.ts +++ b/packages/taro/types/compile/config/project.d.ts @@ -7,6 +7,7 @@ import type { ICopyOptions, IOption, ISassOptions, TogglableOptions } from './ut import type { IH5Config } from './h5' import type { IMiniAppConfig } from './mini' import { IRNConfig } from './rn' +import { AppConfig } from '../..' export type PluginItem = string | [string, T] | [string, () => T | Promise] @@ -176,6 +177,8 @@ export interface IProjectBaseConfig { onWebpackChainReady?: (webpackChain: Chain) => Promise + modifyAppConfig?: (appConfig: AppConfig) => Promise + /** * 编译中修改 webpack 配置,在这个钩子中,你可以对 webpackChain 作出想要的调整,等同于配置 [`webpackChain`](./config-detail#miniwebpackchain) */ diff --git a/packages/taro/types/taro.component.d.ts b/packages/taro/types/taro.component.d.ts index 2de199d1e2d5..0d0a4c502728 100644 --- a/packages/taro/types/taro.component.d.ts +++ b/packages/taro/types/taro.component.d.ts @@ -139,5 +139,7 @@ declare module './index' { path?: string /** 页面的组件选项 */ options?: Record + /** 获得一个 EventChannel 对象,用于页面间通讯 */ + getOpenerEventChannel?(): Record } } diff --git a/packages/taro/types/taro.config.d.ts b/packages/taro/types/taro.config.d.ts index b9f3821ce16d..d5681eb0c0ba 100644 --- a/packages/taro/types/taro.config.d.ts +++ b/packages/taro/types/taro.config.d.ts @@ -424,7 +424,7 @@ declare module './index' { decodeQuery?: 'disable' } - interface AppConfig { + export interface AppConfig { /** 小程序默认启动首页,未指定 entryPagePath 时,数组的第一项代表小程序的初始页面(首页)。 */ entryPagePath?: string /** 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面 */ @@ -561,7 +561,7 @@ declare module './index' { */ themeLocation?: string /** 配置自定义组件代码按需注入 */ - lazyCodeLoading?: string + lazyCodeLoading?: 'requiredComponents' | string /** 单页模式相关配置 */ singlePage?: SinglePage /** 聊天素材小程序打开相关配置 diff --git a/sidebars.js b/sidebars.js index d7705515c0f9..ed54d30302a3 100644 --- a/sidebars.js +++ b/sidebars.js @@ -201,6 +201,7 @@ module.exports = { 'components/viewContainer/native-slot', 'components/viewContainer/page-container', 'components/viewContainer/root-portal', + 'components/viewContainer/script', 'components/viewContainer/scroll-view', 'components/viewContainer/slot', 'components/viewContainer/swiper', @@ -232,10 +233,17 @@ module.exports = { 'components/forms/textarea' ], 'Skyline': [ + 'components/skyline/draggable-sheet', + 'components/skyline/grid-builder', 'components/skyline/grid-view', + 'components/skyline/list-builder', 'components/skyline/list-view', + 'components/skyline/nested-scroll-body', + 'components/skyline/nested-scroll-header', + 'components/skyline/open-container', 'components/skyline/share-element', 'components/skyline/snapshot', + 'components/skyline/span', 'components/skyline/sticky-header', 'components/skyline/sticky-section', ], diff --git a/versioned_docs/version-3.x/GETTING-STARTED.md b/versioned_docs/version-3.x/GETTING-STARTED.md index 9628a0edf9ff..20bb37a7d63e 100644 --- a/versioned_docs/version-3.x/GETTING-STARTED.md +++ b/versioned_docs/version-3.x/GETTING-STARTED.md @@ -2,6 +2,9 @@ title: 安装及使用 --- +import TabItem from '@theme/TabItem' +import Tabs from '@theme/Tabs' + ## 安装 Taro 项目基于 node,请确保已具备较新的 node 环境(>=16.20.0),推荐使用 node 版本管理工具 [nvm](https://github.com/creationix/nvm) 来管理 node,这样不仅可以很方便地切换 node 版本,而且全局安装时候也不用加 sudo 了。 @@ -10,24 +13,44 @@ Taro 项目基于 node,请确保已具备较新的 node 环境(>=16.20.0) 首先,你需要使用 npm 或者 yarn 全局安装 `@tarojs/cli`,或者直接使用 [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b): + + + ```bash # 使用 npm 安装 CLI $ npm install -g @tarojs/cli +``` -# OR 使用 yarn 安装 CLI -$ yarn global add @tarojs/cli + -# OR 安装了 cnpm,使用 cnpm 安装 CLI -$ cnpm install -g @tarojs/cli + + +```bash +# 使用 yarn 安装 CLI +$ yarn global add @tarojs/cli ``` -:::caution 请注意 -值得一提的是,如果安装过程出现`sass`相关的安装错误,请在安装 [mirror-config-china](https://www.npmjs.com/package/mirror-config-china) 后重试。 + + + ```bash -$ npm install -g mirror-config-china +# 使用 pnpm 安装 CLI +$ pnpm install -g @tarojs/cli ``` + + + +:::caution 请注意 +由于 Taro 部分能力使用 Rust 开发,在 Windows 上,请确保安装了 Microsoft Visual C++ Redistributable。请查看:https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist + ::: #### 查看 Taro 全部版本信息 @@ -60,23 +83,50 @@ $ npx @tarojs/cli init myApp 在创建完项目之后,Taro 会默认开始安装项目所需要的依赖,安装使用的工具按照 yarn > cnpm > npm 顺序进行检测。一般来说,依赖安装会比较顺利,但某些情况下可能会安装失败,这时候你可以在项目目录下自己使用安装命令进行安装: + + + +```bash +# 进入项目根目录 +$ cd myApp + +# 使用 npm 安装依赖 +$ npm install +``` + + + + + ```bash # 进入项目根目录 $ cd myApp # 使用 yarn 安装依赖 $ yarn +``` -# OR 使用 npm 安装依赖 -$ npm install + -# OR 使用 pnpm 安装依赖 -$ pnpm install + + +```bash +# 进入项目根目录 +$ cd myApp -# OR 使用 cnpm 安装依赖 -$ cnpm install +# 使用 pnpm 安装依赖 +$ pnpm install ``` + + + ## 编译运行 使用 Taro 的 `build` 命令可以把 Taro 代码编译成不同端的代码,然后在对应的开发工具中查看效果。 diff --git a/versioned_docs/version-3.x/apis/base/arrayBufferToBase64.md b/versioned_docs/version-3.x/apis/base/arrayBufferToBase64.md index 58dd07ff7a11..2955d036f784 100644 --- a/versioned_docs/version-3.x/apis/base/arrayBufferToBase64.md +++ b/versioned_docs/version-3.x/apis/base/arrayBufferToBase64.md @@ -5,7 +5,7 @@ sidebar_label: arrayBufferToBase64 将 ArrayBuffer 数据转成 Base64 字符串。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.arrayBufferToBase64.html) diff --git a/versioned_docs/version-3.x/apis/base/base64ToArrayBuffer.md b/versioned_docs/version-3.x/apis/base/base64ToArrayBuffer.md index 39e92a9f44f8..fcf1633ffaea 100644 --- a/versioned_docs/version-3.x/apis/base/base64ToArrayBuffer.md +++ b/versioned_docs/version-3.x/apis/base/base64ToArrayBuffer.md @@ -5,7 +5,7 @@ sidebar_label: base64ToArrayBuffer 将 Base64 字符串转成 ArrayBuffer 数据。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.base64ToArrayBuffer.html) diff --git a/versioned_docs/version-3.x/apis/base/canIUse.md b/versioned_docs/version-3.x/apis/base/canIUse.md index d83c01d5ae8b..b89e51018998 100644 --- a/versioned_docs/version-3.x/apis/base/canIUse.md +++ b/versioned_docs/version-3.x/apis/base/canIUse.md @@ -5,7 +5,7 @@ sidebar_label: canIUse 判断小程序的 API,回调,参数,组件等是否在当前版本可用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.canIUse.html) diff --git a/versioned_docs/version-3.x/apis/base/canIUseWebp.md b/versioned_docs/version-3.x/apis/base/canIUseWebp.md index 58441f957933..b9c40ce6347d 100644 --- a/versioned_docs/version-3.x/apis/base/canIUseWebp.md +++ b/versioned_docs/version-3.x/apis/base/canIUseWebp.md @@ -7,7 +7,7 @@ sidebar_label: canIUseWebp > 在小程序平台中仅在 android 和 devtools 设备时可用 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/base/debug/console.md b/versioned_docs/version-3.x/apis/base/debug/console.md index bfa70032e1d3..92124d77be67 100644 --- a/versioned_docs/version-3.x/apis/base/debug/console.md +++ b/versioned_docs/version-3.x/apis/base/debug/console.md @@ -9,7 +9,7 @@ sidebar_label: console - 由于 vConsole 功能有限,以及不同客户端对 console 方法的支持情况有差异,建议开发者在小程序中只使用本文档中提供的方法。 - 部分内容展示的限制请参见调试 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.html) @@ -19,7 +19,7 @@ sidebar_label: console 向调试面板中打印 debug 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.debug.html) @@ -35,7 +35,7 @@ sidebar_label: console 向调试面板中打印 error 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.error.html) @@ -54,7 +54,7 @@ sidebar_label: console **注意** 仅在工具中有效,在 vConsole 中为空函数实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.group.html) @@ -73,7 +73,7 @@ sidebar_label: console **注意** 仅在工具中有效,在 vConsole 中为空函数实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.groupEnd.html) @@ -85,7 +85,7 @@ sidebar_label: console 向调试面板中打印 info 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.info.html) @@ -101,7 +101,7 @@ sidebar_label: console 向调试面板中打印 log 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.log.html) @@ -117,7 +117,7 @@ sidebar_label: console 向调试面板中打印 warn 日志 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/console.warn.html) @@ -131,13 +131,13 @@ sidebar_label: console ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| console | ✔️ | | | | | -| console.debug | ✔️ | | | | | -| console.error | ✔️ | | | | | -| console.group | ✔️ | | | | | -| console.groupEnd | ✔️ | | | | | -| console.info | ✔️ | | | | | -| console.log | ✔️ | ✔️ | | | | -| console.warn | ✔️ | | | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| console | ✔️ | | | | | ✔️ | +| console.debug | ✔️ | | | | | ✔️ | +| console.error | ✔️ | | | | | ✔️ | +| console.group | ✔️ | | | | | ✔️ | +| console.groupEnd | ✔️ | | | | | ✔️ | +| console.info | ✔️ | | | | | ✔️ | +| console.log | ✔️ | ✔️ | | | | ✔️ | +| console.warn | ✔️ | | | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/base/env/env.md b/versioned_docs/version-3.x/apis/base/env/env.md index 74c5e61622ab..03d188dc5b06 100644 --- a/versioned_docs/version-3.x/apis/base/env/env.md +++ b/versioned_docs/version-3.x/apis/base/env/env.md @@ -3,7 +3,7 @@ title: env sidebar_label: env --- -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/env/envObj.html) diff --git a/versioned_docs/version-3.x/apis/base/performance/preloadAssets.md b/versioned_docs/version-3.x/apis/base/performance/preloadAssets.md index d90380f1d75e..d5055fb15c66 100644 --- a/versioned_docs/version-3.x/apis/base/performance/preloadAssets.md +++ b/versioned_docs/version-3.x/apis/base/performance/preloadAssets.md @@ -39,7 +39,7 @@ sidebar_label: preloadAssets | 参数 | 类型 | 必填 | 说明 | | --- | --- | :---: | --- | -| data | `AssetsObjectType[]` | 是 | | +| data | `AssetsObject[]` | 是 | | | complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | | fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | | success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | diff --git a/versioned_docs/version-3.x/apis/base/system/getAppAuthorizeSetting.md b/versioned_docs/version-3.x/apis/base/system/getAppAuthorizeSetting.md index 959bd67b3f3e..983d82044bea 100644 --- a/versioned_docs/version-3.x/apis/base/system/getAppAuthorizeSetting.md +++ b/versioned_docs/version-3.x/apis/base/system/getAppAuthorizeSetting.md @@ -9,7 +9,7 @@ sidebar_label: getAppAuthorizeSetting - 'denied' 表示请求授权被拒绝,无法再次请求授权;(此情况需要引导用户[打开系统设置](https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.openAppAuthorizeSetting.html),在设置页中打开权限) - 'non determined' 表示尚未请求授权,会在微信下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) -支持情况: +支持情况: > H5: 暂未支持设置权限 diff --git a/versioned_docs/version-3.x/apis/base/system/getAppBaseInfo.md b/versioned_docs/version-3.x/apis/base/system/getAppBaseInfo.md index f408f4308af1..43d921a92d09 100644 --- a/versioned_docs/version-3.x/apis/base/system/getAppBaseInfo.md +++ b/versioned_docs/version-3.x/apis/base/system/getAppBaseInfo.md @@ -5,7 +5,7 @@ sidebar_label: getAppBaseInfo 获取微信APP基础信息 -支持情况: +支持情况: > H5: 不支持 SDKVersion、host、version diff --git a/versioned_docs/version-3.x/apis/base/system/getSystemInfo.md b/versioned_docs/version-3.x/apis/base/system/getSystemInfo.md index 9f32cef2a79e..8280486b1d19 100644 --- a/versioned_docs/version-3.x/apis/base/system/getSystemInfo.md +++ b/versioned_docs/version-3.x/apis/base/system/getSystemInfo.md @@ -5,7 +5,7 @@ sidebar_label: getSystemInfo 获取系统信息,支持 `Promise` 化使用。 -支持情况: +支持情况: > 微信小程序: 小程序可以在微信和企业微信中调用此接口,但是在企业微信中调用此接口时,会额外返回一个 environment 字段(微信中不返回),如此字段值为 wxwork,则表示当前小程序运行在企业微信环境中。 > diff --git a/versioned_docs/version-3.x/apis/base/system/getSystemInfoSync.md b/versioned_docs/version-3.x/apis/base/system/getSystemInfoSync.md index 06250a223a5d..7fa5b114cea5 100644 --- a/versioned_docs/version-3.x/apis/base/system/getSystemInfoSync.md +++ b/versioned_docs/version-3.x/apis/base/system/getSystemInfoSync.md @@ -5,7 +5,7 @@ sidebar_label: getSystemInfoSync [Taro.getSystemInfo](./getSystemInfo) 的同步版本 -支持情况: +支持情况: > 微信小程序: 小程序可以在微信和企业微信中调用此接口,但是在企业微信中调用此接口时,会额外返回一个 environment 字段(微信中不返回),如此字段值为 wxwork,则表示当前小程序运行在企业微信环境中。 > diff --git a/versioned_docs/version-3.x/apis/base/system/getSystemSetting.md b/versioned_docs/version-3.x/apis/base/system/getSystemSetting.md index 580f96e60a7b..2e3bf8d15637 100644 --- a/versioned_docs/version-3.x/apis/base/system/getSystemSetting.md +++ b/versioned_docs/version-3.x/apis/base/system/getSystemSetting.md @@ -5,7 +5,7 @@ sidebar_label: getSystemSetting 获取设备设置 -支持情况: +支持情况: > H5: 不支持 bluetoothEnabled、locationEnabled、wifiEnabled diff --git a/versioned_docs/version-3.x/apis/base/system/getWindowInfo.md b/versioned_docs/version-3.x/apis/base/system/getWindowInfo.md index 177bcbd81674..687714585e12 100644 --- a/versioned_docs/version-3.x/apis/base/system/getWindowInfo.md +++ b/versioned_docs/version-3.x/apis/base/system/getWindowInfo.md @@ -5,7 +5,7 @@ sidebar_label: getWindowInfo 获取窗口信息 -支持情况: +支持情况: > H5: 不支持 statusBarHeight、safeArea diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppHide.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppHide.md index 6e9f09c0adae..d26e2e0b08b8 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppHide.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppHide.md @@ -5,7 +5,7 @@ sidebar_label: offAppHide 取消监听小程序切后台事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppHide.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppShow.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppShow.md index 949f7e2fcb05..87d33827b8ae 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppShow.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/offAppShow.md @@ -5,7 +5,7 @@ sidebar_label: offAppShow 取消监听小程序切前台事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppShow.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/offError.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/offError.md index 0b017cf58487..eac8fc51901d 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/offError.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/offError.md @@ -5,7 +5,7 @@ sidebar_label: offError 取消监听音频播放错误事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/InnerAudioContext.offError.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/offPageNotFound.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/offPageNotFound.md index 88eebb301782..317c0ba9ecbb 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/offPageNotFound.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/offPageNotFound.md @@ -5,7 +5,7 @@ sidebar_label: offPageNotFound 取消监听小程序要打开的页面不存在事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offPageNotFound.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/offUnhandledRejection.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/offUnhandledRejection.md index 50795908e242..059bbe3af845 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/offUnhandledRejection.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/offUnhandledRejection.md @@ -5,7 +5,7 @@ sidebar_label: offUnhandledRejection 取消监听未处理的 Promise 拒绝事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offUnhandledRejection.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppHide.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppHide.md index d260c2979c1c..d096e2b13325 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppHide.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppHide.md @@ -5,7 +5,7 @@ sidebar_label: onAppHide 监听小程序切后台事件。该事件与 [`App.onHide`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onhide) 的回调时机一致。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppHide.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppShow.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppShow.md index 2a27b1ed1949..364141c9a230 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppShow.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/onAppShow.md @@ -20,7 +20,7 @@ sidebar_label: onAppShow 部分版本在无`referrerInfo`的时候会返回 `undefined`,建议使用 `options.referrerInfo && options.referrerInfo.appId` 进行判断。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppShow.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/onError.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/onError.md index fa287c0a4355..cef630673553 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/onError.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/onError.md @@ -5,7 +5,7 @@ sidebar_label: onError 监听小程序错误事件。如脚本错误或 API 调用报错等。该事件与 [`App.onError`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onerrorstring-error) 的回调时机与参数一致。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onError.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/onPageNotFound.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/onPageNotFound.md index d457a1a04cef..c254f29da665 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/onPageNotFound.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/onPageNotFound.md @@ -10,7 +10,7 @@ sidebar_label: onPageNotFound - 若开发者没有调用 [Taro.onPageNotFound](/docs/apis/base/weapp/app-event/onPageNotFound) 绑定监听,也没有声明 `App.onPageNotFound`,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。 - 如果回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再第二次回调。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/app-event/onUnhandledRejection.md b/versioned_docs/version-3.x/apis/base/weapp/app-event/onUnhandledRejection.md index 91b6a612e267..8a3bdbd0769c 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/app-event/onUnhandledRejection.md +++ b/versioned_docs/version-3.x/apis/base/weapp/app-event/onUnhandledRejection.md @@ -8,7 +8,7 @@ sidebar_label: onUnhandledRejection **注意** - 所有的 unhandledRejection 都可以被这一监听捕获,但只有 Error 类型的才会在小程序后台触发报警。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html) diff --git a/versioned_docs/version-3.x/apis/base/weapp/life-cycle/getLaunchOptionsSync.md b/versioned_docs/version-3.x/apis/base/weapp/life-cycle/getLaunchOptionsSync.md index e08c196a19c4..cd0b39290bcd 100644 --- a/versioned_docs/version-3.x/apis/base/weapp/life-cycle/getLaunchOptionsSync.md +++ b/versioned_docs/version-3.x/apis/base/weapp/life-cycle/getLaunchOptionsSync.md @@ -8,7 +8,7 @@ sidebar_label: getLaunchOptionsSync **注意** 部分版本在无`referrerInfo`的时候会返回 `undefined`,建议使用 `options.referrerInfo && options.referrerInfo.appId` 进行判断。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) diff --git a/versioned_docs/version-3.x/apis/canvas/Canvas.md b/versioned_docs/version-3.x/apis/canvas/Canvas.md index e3ca90861782..e958966800d4 100644 --- a/versioned_docs/version-3.x/apis/canvas/Canvas.md +++ b/versioned_docs/version-3.x/apis/canvas/Canvas.md @@ -18,7 +18,7 @@ Canvas 实例,可通过 SelectorQuery 获取。 取消由 requestAnimationFrame 添加到计划中的动画帧请求。支持在 2D Canvas 和 WebGL Canvas 下使用, 但不支持混用 2D 和 WebGL 的方法。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Canvas.cancelAnimationFrame.html) @@ -46,7 +46,7 @@ Canvas 实例,可通过 SelectorQuery 获取。 创建一个图片对象。 支持在 2D Canvas 和 WebGL Canvas 下使用, 但不支持混用 2D 和 WebGL 的方法。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Canvas.createImage.html) @@ -74,7 +74,7 @@ Canvas 实例,可通过 SelectorQuery 获取。 支持获取 2D 和 WebGL 绘图上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Canvas.getContext.html) @@ -119,14 +119,31 @@ Canvas 实例,可通过 SelectorQuery 获取。 | type | `string` | 图片格式,默认为 image/png | | encoderOptions | `number` | 在指定图片格式为 image/jpeg 或 image/webp的情况下,可以从 0 到 1 的区间内选择图片的质量。如果超出取值范围,将会使用默认值 0.92。其他参数会被忽略。 | +### toTempFilePath + +把当前画布指定区域保存为图片 + +支持情况: + +> [参考文档](https://opendocs.alipay.com/mini/api/toTempFilePath?pathHash=e79fe218) + +```tsx +(oprion: Option) => void +``` + +| 参数 | 类型 | +| --- | --- | +| oprion | `Option` | + ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| Canvas.cancelAnimationFrame | ✔️ | | | | -| Canvas.createImageData | ✔️ | | | | -| Canvas.createImage | ✔️ | | | | -| Canvas.createPath2D | ✔️ | | | | -| Canvas.getContext | ✔️ | | | | -| Canvas.requestAnimationFrame | ✔️ | | | | -| Canvas.toDataURL | ✔️ | | | | +| API | 微信小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| Canvas.cancelAnimationFrame | ✔️ | ✔️ | ✔️ | | | | +| Canvas.createImageData | ✔️ | | | | | | +| Canvas.createImage | ✔️ | ✔️ | ✔️ | | | | +| Canvas.createPath2D | ✔️ | | | | | | +| Canvas.getContext | ✔️ | ✔️ | ✔️ | | | | +| Canvas.requestAnimationFrame | ✔️ | | | | | | +| Canvas.toDataURL | ✔️ | | | | | | +| Canvas.toTempFilePath | | ✔️ | | | | | diff --git a/versioned_docs/version-3.x/apis/canvas/CanvasContext.md b/versioned_docs/version-3.x/apis/canvas/CanvasContext.md index 184063ef9479..df0fcd88a010 100644 --- a/versioned_docs/version-3.x/apis/canvas/CanvasContext.md +++ b/versioned_docs/version-3.x/apis/canvas/CanvasContext.md @@ -39,12 +39,12 @@ canvas 组件的绘图上下文 - 红色: 起始弧度 (0) - 蓝色: 终止弧度 (1.5 * Math.PI) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.arc.html) ```tsx -(x: number, y: number, r: number, sAngle: number, eAngle: number, counterclockwise?: boolean) => void +(x: number, y: number, r: number, sAngle: number, eAngle: number, counterclockwise?: boolean, anticlockwise?: boolean) => void ``` | 参数 | 类型 | 说明 | @@ -55,6 +55,7 @@ canvas 组件的绘图上下文 | sAngle | `number` | 起始弧度,单位弧度(在3点钟方向) | | eAngle | `number` | 终止弧度 | | counterclockwise | `boolean` | 弧度的方向是否是逆时针 | +| anticlockwise | `boolean` | 弧度的方向是否是逆时针
API 支持度: tt | #### 示例代码 @@ -102,7 +103,7 @@ ctx.draw() 根据控制点和半径绘制圆弧路径。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.arcTo.html) @@ -125,7 +126,7 @@ ctx.draw() - 在最开始的时候相当于调用了一次 `beginPath`。 - 同一个路径内的多次 `setFillStyle`、`setStrokeStyle`、`setLineWidth`等设置,以最后一次设置为准。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.beginPath.html) @@ -164,7 +165,7 @@ ctx.draw() - 蓝色:两个控制点(20, 100) (200, 100) - 绿色:终止点(200, 20) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.bezierCurveTo.html) @@ -224,7 +225,7 @@ ctx.draw() 清除画布上在该矩形区域内的内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.clearRect.html) @@ -259,7 +260,7 @@ ctx.draw() 从原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内(不能访问画布上的其他区域)。可以在使用 `clip` 方法前通过使用 `save` 方法对当前画布区域进行保存,并在以后的任意时间通过`restore`方法对其进行恢复。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.clip.html) @@ -289,7 +290,7 @@ Taro.downloadFile({ 关闭一个路径。会连接起点和终点。如果关闭路径后没有调用 `fill` 或者 `stroke` 并开启了新的路径,那之前的路径将不会被渲染。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.closePath.html) @@ -335,7 +336,7 @@ ctx.draw() 创建一个圆形的渐变颜色。起点在圆心,终点在圆环。返回的`CanvasGradient`对象需要使用 [CanvasGradient.addColorStop()](/docs/apis/canvas/CanvasGradient#addcolorstop) 来指定渐变点,至少要两个。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createCircularGradient.html) @@ -367,7 +368,7 @@ ctx.draw() 创建一个线性的渐变颜色。返回的`CanvasGradient`对象需要使用 [CanvasGradient.addColorStop()](/docs/apis/canvas/CanvasGradient#addcolorstop) 来指定渐变点,至少要两个。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createLinearGradient.html) @@ -400,7 +401,7 @@ ctx.draw() 对指定的图像创建模式的方法,可在指定的方向上重复元图像 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.createPattern.html) @@ -417,20 +418,21 @@ ctx.draw() 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。 -支持情况: +支持情况: > H5: 第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。 > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.draw.html) ```tsx -(reserve?: boolean, callback?: (...args: any[]) => any) => void | Promise +(reserve?: boolean, callback?: (...args: any[]) => any, useHardwareAccelerate?: boolean) => void | Promise ``` | 参数 | 类型 | 说明 | | --- | --- | --- | | reserve | `boolean` | 本次绘制是否接着上一次绘制。即 reserve 参数为 false,则在本次调用绘制之前 native 层会先清空画布再继续绘制;若 reserve 参数为 true,则保留当前画布上的内容,本次调用 drawCanvas 绘制的内容覆盖在上面,默认 false。 | | callback | `(...args: any[]) => any` | 绘制完成后执行的回调函数 | +| useHardwareAccelerate | `boolean` | 是否使用硬件加速
API 支持度: jd | #### 示例代码 @@ -466,7 +468,7 @@ ctx.draw(false, () => { 绘制图像到画布 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html) @@ -546,7 +548,7 @@ Taro.chooseImage({ 对当前路径中的内容进行填充。默认的填充色为黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fill.html) @@ -596,7 +598,7 @@ ctx.draw() 填充一个矩形。用 [`setFillStyle`](/docs/apis/canvas/CanvasContext#setfillstyle) 设置矩形的填充色,如果没设置默认是黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fillRect.html) @@ -624,7 +626,7 @@ ctx.draw() 在画布上绘制被填充的文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.fillText.html) @@ -653,7 +655,7 @@ ctx.draw() 增加一个新点,然后创建一条从上次指定点到目标点的线。用 `stroke` 方法来画线条 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.lineTo.html) @@ -679,9 +681,9 @@ ctx.draw() ### measureText -测量文本尺寸信息。目前仅返回文本宽度。同步接口。 +测量文本尺寸信息。目前仅返回文本宽度(width)。同步接口。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.measureText.html) @@ -697,7 +699,7 @@ ctx.draw() 把路径移动到画布中的指定点,不创建线条。用 `stroke` 方法来画线条 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.moveTo.html) @@ -732,7 +734,7 @@ ctx.draw() - 蓝色:控制点(20, 100) - 绿色:终止点(200, 20) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.quadraticCurveTo.html) @@ -786,7 +788,7 @@ ctx.draw() 创建一个矩形路径。需要用 [`fill`](/docs/apis/canvas/CanvasContext#fill) 或者 [`stroke`](/docs/apis/canvas/CanvasContext#stroke) 方法将矩形真正的画到 `canvas` 中 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.rect.html) @@ -815,7 +817,7 @@ ctx.draw() 重置绘图上下文状态 -支持情况: +支持情况: > [参考文档](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/reset) @@ -827,7 +829,7 @@ ctx.draw() 恢复之前保存的绘图上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.restore.html) @@ -853,7 +855,7 @@ ctx.draw() 以原点为中心顺时针旋转当前坐标轴。多次调用旋转的角度会叠加。原点可以用 `translate` 方法修改。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.rotate.html) @@ -881,7 +883,7 @@ ctx.draw() 保存绘图上下文。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.save.html) @@ -907,7 +909,7 @@ ctx.draw() 在调用后,之后创建的路径其横纵坐标会被缩放。多次调用倍数会相乘。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.scale.html) @@ -936,7 +938,7 @@ ctx.draw() 设置填充色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setFillStyle.html) @@ -961,7 +963,7 @@ ctx.draw() 设置字体的字号 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setFontSize.html) @@ -992,7 +994,7 @@ ctx.draw() 设置全局画笔透明度。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setGlobalAlpha.html) @@ -1022,7 +1024,7 @@ ctx.draw() 设置线条的端点样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineCap.html) @@ -1067,7 +1069,7 @@ ctx.draw() 设置虚线样式。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineDash.html) @@ -1096,7 +1098,7 @@ ctx.draw() 设置线条的交点样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineJoin.html) @@ -1145,7 +1147,7 @@ ctx.draw() 设置线条的宽度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setLineWidth.html) @@ -1187,7 +1189,7 @@ ctx.draw() 设置最大斜接长度。斜接长度指的是在两条线交汇处内角和外角之间的距离。当 [CanvasContext.setLineJoin()](/docs/apis/canvas/CanvasContext#setlinejoin) 为 miter 时才有效。超过最大倾斜长度的,连接处将以 lineJoin 为 bevel 来显示。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setMiterLimit.html) @@ -1242,7 +1244,7 @@ ctx.draw() 设定阴影样式。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setShadow.html) @@ -1271,7 +1273,7 @@ ctx.draw() 设置描边颜色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setStrokeStyle.html) @@ -1296,7 +1298,7 @@ ctx.draw() 设置文字的对齐 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTextAlign.html) @@ -1332,7 +1334,7 @@ await ctx.draw(true) 设置文字的竖直对齐 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTextBaseline.html) @@ -1371,20 +1373,20 @@ await ctx.draw(true) 使用矩阵重新设置(覆盖)当前变换的方法 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.setTransform.html) ```tsx -(scaleX: number, scaleY: number, skewX: number, skewY: number, translateX: number, translateY: number) => void +{ (scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; (scaleX: number, skewY: number, skewX: number, scaleY: number, translateX: number, translateY: number): void; (scaleX: number, scaleY: number, skewX: number, skewY: number, translateX: number, translateY: ... ``` | 参数 | 类型 | 说明 | | --- | --- | --- | | scaleX | `number` | 水平缩放 | -| scaleY | `number` | 垂直缩放 | | skewX | `number` | 水平倾斜 | | skewY | `number` | 垂直倾斜 | +| scaleY | `number` | 垂直缩放 | | translateX | `number` | 水平移动 | | translateY | `number` | 垂直移动 | @@ -1392,7 +1394,7 @@ await ctx.draw(true) 画出当前路径的边框。默认颜色色为黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.stroke.html) @@ -1440,7 +1442,7 @@ ctx.draw() 画一个矩形(非填充)。 用 [`setStrokeStyle`](/docs/apis/canvas/CanvasContext#setstrokestyle) 设置矩形线条的颜色,如果没设置默认是黑色。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.strokeRect.html) @@ -1468,7 +1470,7 @@ ctx.draw() 给定的 (x, y) 位置绘制文本描边的方法 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.strokeText.html) @@ -1486,21 +1488,22 @@ ctx.draw() ### transform 使用矩阵多次叠加当前变换的方法 +使用矩阵叠加当前变换。矩阵由方法的参数进行描述,可以缩放、旋转、移动和倾斜上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.transform.html) ```tsx -(scaleX: number, scaleY: number, skewX: number, skewY: number, translateX: number, translateY: number) => void +{ (scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; (scaleX: number, skewY: number, skewX: number, scaleY: number, translateX: number, translateY: number): void; (scaleX: number, scaleY: number, skewX: number, skewY: number, translateX: number, translateY: ... ``` | 参数 | 类型 | 说明 | | --- | --- | --- | | scaleX | `number` | 水平缩放 | -| scaleY | `number` | 垂直缩放 | | skewX | `number` | 水平倾斜 | | skewY | `number` | 垂直倾斜 | +| scaleY | `number` | 垂直缩放 | | translateX | `number` | 水平移动 | | translateY | `number` | 垂直移动 | @@ -1508,7 +1511,7 @@ ctx.draw() 对当前坐标系的原点 (0, 0) 进行变换。默认的坐标系原点为页面左上角。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.translate.html) @@ -1582,55 +1585,58 @@ ctx.draw() | 参数 | 说明 | | --- | --- | -| top | 顶部对齐 | -| bottom | 底部对齐 | -| middle | 居中对齐 | -| normal | | +| top | 顶部对齐
API 支持度: weapp, alipay, swan, jd, qq, tt, h5 | +| bottom | 底部对齐
API 支持度: weapp, alipay, swan, jd, qq, tt, h5 | +| middle | 居中对齐
API 支持度: weapp, alipay, swan, jd, qq, tt, h5 | +| normal |
API 支持度: weapp, alipay, swan, jd, qq, tt, h5 | +| hanging | 文本基线为悬挂基线。
API 支持度: alipay, tt, h5 | +| alphabetic | 文本基线是标准的字母基线
API 支持度: alipay, tt, h5 | +| ideographic | 文字基线是表意字基线。如果字符本身超出了alphabetic 基线,那么ideograhpic基线位置在字符本身的底部。
API 支持度: alipay, tt, h5 | ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| CanvasContext.arc | ✔️ | ✔️ | | | -| CanvasContext.arcTo | ✔️ | ✔️ | | | -| CanvasContext.beginPath | ✔️ | ✔️ | | | -| CanvasContext.bezierCurveTo | ✔️ | ✔️ | | | -| CanvasContext.clearRect | ✔️ | ✔️ | | | -| CanvasContext.clip | ✔️ | ✔️ | | | -| CanvasContext.closePath | ✔️ | ✔️ | | | -| CanvasContext.createCircularGradient | ✔️ | ✔️ | | | -| CanvasContext.createLinearGradient | ✔️ | ✔️ | | | -| CanvasContext.createPattern | ✔️ | ✔️ | | | -| CanvasContext.draw | ✔️ | ✔️(第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。) | | | -| CanvasContext.drawImage | ✔️ | ✔️ | | | -| CanvasContext.fill | ✔️ | ✔️ | | | -| CanvasContext.fillRect | ✔️ | ✔️ | | | -| CanvasContext.fillText | ✔️ | ✔️ | | | -| CanvasContext.lineTo | ✔️ | ✔️ | | | -| CanvasContext.measureText | ✔️ | ✔️ | | | -| CanvasContext.moveTo | ✔️ | ✔️ | | | -| CanvasContext.quadraticCurveTo | ✔️ | ✔️ | | | -| CanvasContext.rect | ✔️ | ✔️ | | | -| CanvasContext.reset | | ✔️ | | | -| CanvasContext.restore | ✔️ | ✔️ | | | -| CanvasContext.rotate | ✔️ | ✔️ | | | -| CanvasContext.save | ✔️ | ✔️ | | | -| CanvasContext.scale | ✔️ | ✔️ | | | -| CanvasContext.setFillStyle | ✔️ | ✔️ | | | -| CanvasContext.setFontSize | ✔️ | ✔️ | | | -| CanvasContext.setGlobalAlpha | ✔️ | ✔️ | | | -| CanvasContext.setLineCap | ✔️ | ✔️ | | | -| CanvasContext.setLineDash | ✔️ | ✔️ | | | -| CanvasContext.setLineJoin | ✔️ | ✔️ | | | -| CanvasContext.setLineWidth | ✔️ | ✔️ | | | -| CanvasContext.setMiterLimit | ✔️ | ✔️ | | | -| CanvasContext.setShadow | ✔️ | ✔️ | | | -| CanvasContext.setStrokeStyle | ✔️ | ✔️ | | | -| CanvasContext.setTextAlign | ✔️ | ✔️ | | | -| CanvasContext.setTextBaseline | ✔️ | ✔️ | | | -| CanvasContext.setTransform | ✔️ | ✔️ | | | -| CanvasContext.stroke | ✔️ | ✔️ | | | -| CanvasContext.strokeRect | ✔️ | ✔️ | | | -| CanvasContext.strokeText | ✔️ | ✔️ | | | -| CanvasContext.transform | ✔️ | ✔️ | | | -| CanvasContext.translate | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CanvasContext.arc | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.arcTo | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.beginPath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.bezierCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.clearRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.clip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.closePath | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createCircularGradient | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createLinearGradient | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.createPattern | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.draw | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(第二次调用 draw 前需要等待上一次 draw 调用结束后再调用,否则新的一次 draw 调用栈不会清空而导致结果异常。) | | | ✔️ | +| CanvasContext.drawImage | ✔️ | | | | | | ✔️ | | | ✔️ | +| CanvasContext.fill | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.fillRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.fillText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.lineTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.measureText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.moveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.quadraticCurveTo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.rect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.reset | | | | | | | ✔️ | | | ✔️ | +| CanvasContext.restore | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.rotate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.save | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setFillStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setFontSize | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setGlobalAlpha | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineCap | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineDash | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineJoin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setLineWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setMiterLimit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setShadow | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setStrokeStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTextAlign | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTextBaseline | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.setTransform | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.stroke | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.strokeRect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.strokeText | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.transform | ✔️ | | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| CanvasContext.translate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/canvas/CanvasGradient.md b/versioned_docs/version-3.x/apis/canvas/CanvasGradient.md index 74617c8ed14f..d195f96d4b7b 100644 --- a/versioned_docs/version-3.x/apis/canvas/CanvasGradient.md +++ b/versioned_docs/version-3.x/apis/canvas/CanvasGradient.md @@ -15,7 +15,7 @@ sidebar_label: CanvasGradient 添加颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasGradient.addColorStop.html) @@ -49,7 +49,7 @@ ctx.draw() ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| CanvasGradient | ✔️ | | | | -| CanvasGradient.addColorStop | ✔️ | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CanvasGradient | ✔️ | | | | | | | | | +| CanvasGradient.addColorStop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | diff --git a/versioned_docs/version-3.x/apis/canvas/Image.md b/versioned_docs/version-3.x/apis/canvas/Image.md index 9fa93b98c31e..a0c37fe15455 100644 --- a/versioned_docs/version-3.x/apis/canvas/Image.md +++ b/versioned_docs/version-3.x/apis/canvas/Image.md @@ -16,7 +16,7 @@ sidebar_label: Image | src | `string` | 图片的 URL | | height | `number` | 图片的真实高度 | | width | `number` | 图片的真实宽度 | -| referrerPolicy | `string` | origin: 发送完整的referrer; no-referrer: 不发送。

格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本 | +| referrerPolicy | `string` | origin: 发送完整的referrer; no-referrer: 不发送。

格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本
API 支持度: weapp | | onerror | `(...args: any[]) => any` | 图片加载发生错误后触发的回调函数 | | onload | `(...args: any[]) => any` | 图片加载完成后触发的回调函数 | @@ -25,3 +25,4 @@ sidebar_label: Image | API | 微信小程序 | H5 | React Native | Harmony | | :---: | :---: | :---: | :---: | :---: | | Image | ✔️ | | | | +| Image.referrerPolicy | ✔️ | | | | diff --git a/versioned_docs/version-3.x/apis/canvas/OffscreenCanvas.md b/versioned_docs/version-3.x/apis/canvas/OffscreenCanvas.md index 8bb6d441d590..ffb742763558 100644 --- a/versioned_docs/version-3.x/apis/canvas/OffscreenCanvas.md +++ b/versioned_docs/version-3.x/apis/canvas/OffscreenCanvas.md @@ -11,6 +11,11 @@ sidebar_label: OffscreenCanvas ## 方法 +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| width | `number` | 画布宽度 | +| height | `number` | 画布高度 | + ### createImage 创建一个图片对象。支持在 2D Canvas 和 WebGL Canvas 下使用, 但不支持混用 2D 和 WebGL 的方法 @@ -31,22 +36,22 @@ sidebar_label: OffscreenCanvas > 当前仅支持获取 WebGL 绘图上下文 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/OffscreenCanvas.getContext.html) ```tsx -(contextType: string) => RenderingContext +(contextType: "webgl" | "2d") => RenderingContext ``` | 参数 | 类型 | | --- | --- | -| contextType | `string` | +| contextType | "webgl" or "2d" | ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| OffscreenCanvas | ✔️ | | | | -| OffscreenCanvas.createImage | ✔️ | | | | -| OffscreenCanvas.getContext | ✔️ | | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | :---: | +| OffscreenCanvas | ✔️ | | | | | +| OffscreenCanvas.createImage | ✔️ | | | | | +| OffscreenCanvas.getContext | ✔️ | ✔️ | | | | diff --git a/versioned_docs/version-3.x/apis/canvas/Path2D.md b/versioned_docs/version-3.x/apis/canvas/Path2D.md index 3762887b6f9e..80cad7ef185f 100644 --- a/versioned_docs/version-3.x/apis/canvas/Path2D.md +++ b/versioned_docs/version-3.x/apis/canvas/Path2D.md @@ -8,3 +8,186 @@ Canvas 2D API 的接口 Path2D 用来声明路径,此路径稍后会被CanvasR 支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Path2D.html) + +## 方法 + +### addPath + +添加路径到当前路径。 + +支持情况: + +```tsx +(path: Path2D) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| path | `Path2D` | 添加的 Path2D 路径 | + +### arc + +添加一段圆弧路径 + +支持情况: + +```tsx +(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise: boolean) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x | `number` | 圆心横坐标 | +| y | `number` | 圆心纵坐标 | +| radius | `number` | 圆形半径,必须为正数 | +| startAngle | `number` | 圆弧开始角度 | +| endAngle | `number` | 圆弧结束角度 | +| counterclockwise | `boolean` | 是否逆时针绘制。如果传 true, 则会从 endAngle 开始绘制到 startAngle | + +### arcTo + +通过给定控制点添加一段圆弧路径 + +支持情况: + +```tsx +(x1: number, y1: number, x2: number, y2: number, radius: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x1 | `number` | 第一个控制点横坐标 | +| y1 | `number` | 第一个控制点纵坐标 | +| x2 | `number` | 第二个控制点横坐标 | +| y2 | `number` | 第二个控制点纵坐标 | +| radius | `number` | 圆形半径,必须为非负数 | + +### bezierCurveTo + +添加三次贝塞尔曲线路径 + +支持情况: + +```tsx +(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| cp1x | `number` | 第一个控制点横坐标 | +| cp1y | `number` | 第一个控制点纵坐标 | +| cp2x | `number` | 第二个控制点横坐标 | +| cp2y | `number` | 第二个控制点纵坐标 | +| x | `number` | 结束点横坐标 | +| y | `number` | 结束点纵坐标 | + +### closePath + +闭合路径到起点 + +支持情况: + +```tsx +() => void +``` + +### ellipse + +添加椭圆弧路径 + +支持情况: + +```tsx +(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise: boolean) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x | `number` | 椭圆圆心横坐标 | +| y | `number` | 椭圆圆心纵坐标 | +| radiusX | `number` | 椭圆长轴半径,必须为非负数 | +| radiusY | `number` | 椭圆短轴半径,必须为非负数 | +| rotation | `number` | 椭圆旋转角度 | +| startAngle | `number` | 圆弧开始角度 | +| endAngle | `number` | 圆弧结束角度 | +| counterclockwise | `boolean` | 是否逆时针绘制。如果传 true, 则会从 endAngle 开始绘制到 startAngle | + +### lineTo + +添加直线路径 + +支持情况: + +```tsx +(x: number, y: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x | `number` | 结束点横坐标 | +| y | `number` | 结束点纵坐标 | + +### moveTo + +移动路径开始点 + +支持情况: + +```tsx +(x: number, y: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x | `number` | 横坐标 | +| y | `number` | 纵坐标 | + +### quadraticCurveTo + +添加二次贝塞尔曲线路径 + +支持情况: + +```tsx +(cpx: number, cpy: number, x: number, y: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| cpx | `number` | 控制点横坐标 | +| cpy | `number` | 控制点纵坐标 | +| x | `number` | 结束点横坐标 | +| y | `number` | 结束点纵坐标 | + +### rect + +添加方形路径 + +支持情况: + +```tsx +(x: number, y: number, width: number, height: number) => void +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| x | `number` | 开始点横坐标 | +| y | `number` | 开始点纵坐标 | +| width | `number` | 方形宽度,正数向右,负数向左 | +| height | `number` | 方形高度,正数向下,负数向上 | + +## API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| Path2D | ✔️ | | | | +| Path2D.addPath | ✔️ | | | | +| Path2D.arc | ✔️ | | | | +| Path2D.arcTo | ✔️ | | | | +| Path2D.bezierCurveTo | ✔️ | | | | +| Path2D.closePath | ✔️ | | | | +| Path2D.ellipse | ✔️ | | | | +| Path2D.lineTo | ✔️ | | | | +| Path2D.moveTo | ✔️ | | | | +| Path2D.quadraticCurveTo | ✔️ | | | | +| Path2D.rect | ✔️ | | | | diff --git a/versioned_docs/version-3.x/apis/canvas/RenderingContext.md b/versioned_docs/version-3.x/apis/canvas/RenderingContext.md index b8d9eba1547c..844e5db63540 100644 --- a/versioned_docs/version-3.x/apis/canvas/RenderingContext.md +++ b/versioned_docs/version-3.x/apis/canvas/RenderingContext.md @@ -9,7 +9,8 @@ Canvas 绘图上下文。 - 通过 Canvas.getContext('2d') 接口可以获取 CanvasRenderingContext2D 对象,实现了 [HTML Canvas 2D Context](https://www.w3.org/TR/2dcontext/) 定义的属性、方法。 - 通过 Canvas.getContext('webgl') 或 OffscreenCanvas.getContext('webgl') 接口可以获取 WebGLRenderingContext 对象,实现了 [WebGL 1.0](https://www.khronos.org/registry/webgl/specs/latest/1.0/) 定义的所有属性、方法、常量。 +- CanvasRenderingContext2D 的 drawImage 方法 2.10.0 起支持传入通过 SelectorQuery 获取的 video 对象,2.29.0 起支持传入开启了自定义渲染的 LivePusherContext 对象。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/RenderingContext.html) diff --git a/versioned_docs/version-3.x/apis/canvas/canvasGetImageData.md b/versioned_docs/version-3.x/apis/canvas/canvasGetImageData.md index 803373779699..885c643f5bd1 100644 --- a/versioned_docs/version-3.x/apis/canvas/canvasGetImageData.md +++ b/versioned_docs/version-3.x/apis/canvas/canvasGetImageData.md @@ -5,7 +5,7 @@ sidebar_label: canvasGetImageData 获取 canvas 区域隐含的像素数据。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasGetImageData.html) diff --git a/versioned_docs/version-3.x/apis/canvas/canvasPutImageData.md b/versioned_docs/version-3.x/apis/canvas/canvasPutImageData.md index 8d99e3290f2b..b01b65ee23ab 100644 --- a/versioned_docs/version-3.x/apis/canvas/canvasPutImageData.md +++ b/versioned_docs/version-3.x/apis/canvas/canvasPutImageData.md @@ -5,7 +5,7 @@ sidebar_label: canvasPutImageData 将像素数据绘制到画布。在自定义组件下,第二个参数传入自定义组件实例 this,以操作组件内 `` 组件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasPutImageData.html) diff --git a/versioned_docs/version-3.x/apis/canvas/canvasToTempFilePath.md b/versioned_docs/version-3.x/apis/canvas/canvasToTempFilePath.md index af4e33eeff0a..653a7a8d9970 100644 --- a/versioned_docs/version-3.x/apis/canvas/canvasToTempFilePath.md +++ b/versioned_docs/version-3.x/apis/canvas/canvasToTempFilePath.md @@ -9,7 +9,7 @@ sidebar_label: canvasToTempFilePath 1. `tip`: 在 `draw` 回调里调用该方法才能保证图片导出成功。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.canvasToTempFilePath.html) @@ -46,10 +46,11 @@ sidebar_label: canvasToTempFilePath ### SuccessCallbackResult -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| tempFilePath | `string` | 生成文件的临时路径 | -| errMsg | `string` | 调用结果 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| tempFilePath | `string` | 是 | 生成文件的临时路径 | +| apFilePath | `string` | 否 | 图片路径(本地临时文件)。
API 支持度: alipay | +| errMsg | `string` | 是 | 调用结果 | ### FileType diff --git a/versioned_docs/version-3.x/apis/canvas/createCanvasContext.md b/versioned_docs/version-3.x/apis/canvas/createCanvasContext.md index db341dbfc505..5b7b30b00fca 100644 --- a/versioned_docs/version-3.x/apis/canvas/createCanvasContext.md +++ b/versioned_docs/version-3.x/apis/canvas/createCanvasContext.md @@ -7,7 +7,7 @@ sidebar_label: createCanvasContext **Tip**: 需要指定 canvasId,该绘图上下文只作用于对应的 ``;另外,Web 端需要在 `useReady` 回调中执行它,否则会因为底层 canvas 渲染出来之前而去获取 CanvasContext,导致其底层的 context 为 `undefined`,从而不能正常绘图。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createCanvasContext.html) diff --git a/versioned_docs/version-3.x/apis/canvas/createOffscreenCanvas.md b/versioned_docs/version-3.x/apis/canvas/createOffscreenCanvas.md index cb2043677a96..ad0ff698d165 100644 --- a/versioned_docs/version-3.x/apis/canvas/createOffscreenCanvas.md +++ b/versioned_docs/version-3.x/apis/canvas/createOffscreenCanvas.md @@ -5,7 +5,7 @@ sidebar_label: createOffscreenCanvas 创建离屏 canvas 实例 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createOffscreenCanvas.html @@ -33,4 +33,28 @@ sidebar_label: createOffscreenCanvas | type | "webgl" or "2d" | `: 'webgl'` | 否 | 创建的离屏 canvas 类型 | | height | `number` | | 否 | 画布高度 | | width | `number` | | 否 | 画布宽度 | -| component | `TaroGeneral.IAnyObject` | | 否 | 在自定义组件下,当前组件实例的 this,以操作组件内 [canvas](/docs/components/canvas) 组件 | +| compInst | `TaroGeneral.IAnyObject` | | 否 | 在自定义组件下,当前组件实例的 this,以操作组件内 [canvas](/docs/components/canvas) 组件 | + +## 示例代码 + +```tsx +// 创建离屏 2D canvas 实例 +const canvas = Taro.createOffscreenCanvas({type: '2d', width: 300, height: 150}) +// 获取 context。注意这里必须要与创建时的 type 一致 +const context = canvas.getContext('2d') + +// 创建一个图片 +const image = canvas.createImage() +// 等待图片加载 +await new Promise(resolve => { + image.onload = resolve + image.src = IMAGE_URL // 要加载的图片 url +}) + +// 把图片画到离屏 canvas 上 +context.clearRect(0, 0, 300, 150) +context.drawImage(image, 0, 0, 300, 150) + +// 获取画完后的数据 +const imgData = context.getImageData(0, 0, 300, 150) +``` diff --git a/versioned_docs/version-3.x/apis/canvas/toTempFilePath.md b/versioned_docs/version-3.x/apis/canvas/toTempFilePath.md new file mode 100644 index 000000000000..e356a5bb39d4 --- /dev/null +++ b/versioned_docs/version-3.x/apis/canvas/toTempFilePath.md @@ -0,0 +1,35 @@ +--- +title: toTempFilePath +sidebar_label: toTempFilePath +--- + +## 参数 + +### Option + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| x | `number` | | 否 | 指定的画布区域的左上角横坐标 | +| y | `number` | | 否 | 指定的画布区域的左上角纵坐标 | +| width | `number` | | 否 | 指定的画布区域的宽度 | +| height | `number` | | 否 | 指定的画布区域的高度 | +| destHeight | `number` | | 否 | 输出的图片的高度 | +| destWidth | `number` | | 否 | 输出的图片的宽度 | +| fileType | `keyof FileType` | `"png"` | 否 | 目标文件的类型 | +| quality | `number` | | 否 | 图片的质量,目前仅对 jpg 有效。取值范围为 (0, 1],不在范围内时当作 1.0 处理。 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用失败的回调函数 | +| success | `(result: SuccessCallbackResult) => void` | | 否 | 接口调用成功的回调函数 | + +### FileType + +| 参数 | 说明 | +| --- | --- | +| jpg | jpg 图片 | +| png | png 图片 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| tempFilePath | `string` | 生成文件的临时路径 | diff --git a/versioned_docs/version-3.x/apis/device/battery/getBatteryInfo.md b/versioned_docs/version-3.x/apis/device/battery/getBatteryInfo.md index f285d96ed474..2af346c6401b 100644 --- a/versioned_docs/version-3.x/apis/device/battery/getBatteryInfo.md +++ b/versioned_docs/version-3.x/apis/device/battery/getBatteryInfo.md @@ -5,7 +5,7 @@ sidebar_label: getBatteryInfo 获取设备电量。同步 API Taro.getBatteryInfoSync 在 iOS 上不可用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/battery/wx.getBatteryInfo.html) diff --git a/versioned_docs/version-3.x/apis/device/clipboard/getClipboardData.md b/versioned_docs/version-3.x/apis/device/clipboard/getClipboardData.md index 84e16c218a11..a92302f12f03 100644 --- a/versioned_docs/version-3.x/apis/device/clipboard/getClipboardData.md +++ b/versioned_docs/version-3.x/apis/device/clipboard/getClipboardData.md @@ -5,7 +5,7 @@ sidebar_label: getClipboardData 获取系统剪贴板内容 -支持情况: +支持情况: > H5: 部分实现 diff --git a/versioned_docs/version-3.x/apis/device/clipboard/setClipboardData.md b/versioned_docs/version-3.x/apis/device/clipboard/setClipboardData.md index a15ef19e07d1..66107a7505dc 100644 --- a/versioned_docs/version-3.x/apis/device/clipboard/setClipboardData.md +++ b/versioned_docs/version-3.x/apis/device/clipboard/setClipboardData.md @@ -5,7 +5,7 @@ sidebar_label: setClipboardData 设置系统剪贴板的内容。调用成功后,会弹出 toast 提示"内容已复制",持续 1.5s -支持情况: +支持情况: > H5: 部分实现 diff --git a/versioned_docs/version-3.x/apis/device/keyboard/hideKeyboard.md b/versioned_docs/version-3.x/apis/device/keyboard/hideKeyboard.md index 26b57a902c2d..a5c1f8293766 100644 --- a/versioned_docs/version-3.x/apis/device/keyboard/hideKeyboard.md +++ b/versioned_docs/version-3.x/apis/device/keyboard/hideKeyboard.md @@ -5,7 +5,7 @@ sidebar_label: hideKeyboard 在input、textarea等focus拉起键盘之后,手动调用此接口收起键盘 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.hideKeyboard.html) diff --git a/versioned_docs/version-3.x/apis/device/network/getNetworkType.md b/versioned_docs/version-3.x/apis/device/network/getNetworkType.md index 489ac4b73224..4d41dba95040 100644 --- a/versioned_docs/version-3.x/apis/device/network/getNetworkType.md +++ b/versioned_docs/version-3.x/apis/device/network/getNetworkType.md @@ -5,7 +5,7 @@ sidebar_label: getNetworkType 获取网络类型。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.getNetworkType.html) diff --git a/versioned_docs/version-3.x/apis/device/network/offNetworkStatusChange.md b/versioned_docs/version-3.x/apis/device/network/offNetworkStatusChange.md index aef103710a77..bac9bffc9aa8 100644 --- a/versioned_docs/version-3.x/apis/device/network/offNetworkStatusChange.md +++ b/versioned_docs/version-3.x/apis/device/network/offNetworkStatusChange.md @@ -5,7 +5,7 @@ sidebar_label: offNetworkStatusChange 取消监听网络状态变化事件,参数为空,则取消所有的事件监听。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.offNetworkStatusChange.html) diff --git a/versioned_docs/version-3.x/apis/device/network/onNetworkStatusChange.md b/versioned_docs/version-3.x/apis/device/network/onNetworkStatusChange.md index 61c26b9383cb..330e7a1a2931 100644 --- a/versioned_docs/version-3.x/apis/device/network/onNetworkStatusChange.md +++ b/versioned_docs/version-3.x/apis/device/network/onNetworkStatusChange.md @@ -5,7 +5,7 @@ sidebar_label: onNetworkStatusChange 监听网络状态变化。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.onNetworkStatusChange.html) diff --git a/versioned_docs/version-3.x/apis/device/phone/makePhoneCall.md b/versioned_docs/version-3.x/apis/device/phone/makePhoneCall.md index 936f4d208bf2..4e418dd7ce3d 100644 --- a/versioned_docs/version-3.x/apis/device/phone/makePhoneCall.md +++ b/versioned_docs/version-3.x/apis/device/phone/makePhoneCall.md @@ -5,7 +5,7 @@ sidebar_label: makePhoneCall 拨打电话 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/phone/wx.makePhoneCall.html) diff --git a/versioned_docs/version-3.x/apis/device/screen/onUserCaptureScreen.md b/versioned_docs/version-3.x/apis/device/screen/onUserCaptureScreen.md index 42734737f6bd..125191ee4edf 100644 --- a/versioned_docs/version-3.x/apis/device/screen/onUserCaptureScreen.md +++ b/versioned_docs/version-3.x/apis/device/screen/onUserCaptureScreen.md @@ -5,7 +5,7 @@ sidebar_label: onUserCaptureScreen 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/screen/wx.onUserCaptureScreen.html) diff --git a/versioned_docs/version-3.x/apis/device/screen/setKeepScreenOn.md b/versioned_docs/version-3.x/apis/device/screen/setKeepScreenOn.md index c2ce451e7fc9..c12172309104 100644 --- a/versioned_docs/version-3.x/apis/device/screen/setKeepScreenOn.md +++ b/versioned_docs/version-3.x/apis/device/screen/setKeepScreenOn.md @@ -5,7 +5,7 @@ sidebar_label: setKeepScreenOn 设置是否保持常亮状态。仅在当前小程序生效,离开小程序后设置失效。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/device/screen/wx.setKeepScreenOn.html) diff --git a/versioned_docs/version-3.x/apis/files/FileSystemManager.md b/versioned_docs/version-3.x/apis/files/FileSystemManager.md index 563caf60532c..ff4382cde86c 100644 --- a/versioned_docs/version-3.x/apis/files/FileSystemManager.md +++ b/versioned_docs/version-3.x/apis/files/FileSystemManager.md @@ -5,7 +5,7 @@ sidebar_label: FileSystemManager 文件管理器,可通过 [Taro.getFileSystemManager](./getFileSystemManager) 获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.html) @@ -15,7 +15,7 @@ sidebar_label: FileSystemManager 判断文件/目录是否存在 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.access.html) @@ -210,7 +210,7 @@ sidebar_label: FileSystemManager 获取该小程序下的 `本地临时文件` 或 `本地缓存文件` 信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.getFileInfo.html) @@ -387,7 +387,7 @@ sidebar_label: FileSystemManager 读取本地文件内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFile.html) @@ -403,7 +403,7 @@ sidebar_label: FileSystemManager [FileSystemManager.readFile](#readfile) 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFileSync.html) @@ -1390,51 +1390,51 @@ FailCallbackResult | SuccessCallbackResult ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| FileSystemManager | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.access | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.accessSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.appendFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.appendFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.close | ✔️ | | | | | | | | | -| FileSystemManager.closeSync | ✔️ | | | | | | | | | -| FileSystemManager.copyFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.copyFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.fstat | ✔️ | | | | | | | | | -| FileSystemManager.fstatSync | ✔️ | | | | | | | | | -| FileSystemManager.ftruncate | ✔️ | | | | | | | | | -| FileSystemManager.ftruncateSync | ✔️ | | | | | | | | | -| FileSystemManager.getFileInfo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.getSavedFileList | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.mkdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.mkdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.open | ✔️ | | | | | | | | | -| FileSystemManager.openSync | ✔️ | | | | | | | | | -| FileSystemManager.read | ✔️ | | | | | | | | | -| FileSystemManager.readCompressedFile | ✔️ | | | | | | | | | -| FileSystemManager.readCompressedFileSync | ✔️ | | | | | | | | | -| FileSystemManager.readdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.readSync | ✔️ | | | | | | | | | -| FileSystemManager.readZipEntry | ✔️ | | | | | | | | | -| FileSystemManager.removeSavedFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.rename | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.renameSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.rmdir | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.rmdirSync | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.saveFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.saveFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.stat | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| FileSystemManager.statSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.truncate | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.truncateSync | ✔️ | | | ✔️ | | | | | | -| FileSystemManager.unlink | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.unlinkSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.unzip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.write | ✔️ | | | | | | | | | -| FileSystemManager.writeFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.writeFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| FileSystemManager.writeSync | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| FileSystemManager | ✔️ | | | ✔️ | | | | | | ✔️ | +| FileSystemManager.access | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.accessSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.appendFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.appendFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.close | ✔️ | | | | | | | | | | +| FileSystemManager.closeSync | ✔️ | | | | | | | | | | +| FileSystemManager.copyFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.copyFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.fstat | ✔️ | | | | | | | | | | +| FileSystemManager.fstatSync | ✔️ | | | | | | | | | | +| FileSystemManager.ftruncate | ✔️ | | | | | | | | | | +| FileSystemManager.ftruncateSync | ✔️ | | | | | | | | | | +| FileSystemManager.getFileInfo | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.getSavedFileList | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.mkdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.mkdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.open | ✔️ | | | | | | | | | | +| FileSystemManager.openSync | ✔️ | | | | | | | | | | +| FileSystemManager.read | ✔️ | | | | | | | | | | +| FileSystemManager.readCompressedFile | ✔️ | | | | | | | | | | +| FileSystemManager.readCompressedFileSync | ✔️ | | | | | | | | | | +| FileSystemManager.readdir | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.readdirSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.readFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.readFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | ✔️ | +| FileSystemManager.readSync | ✔️ | | | | | | | | | | +| FileSystemManager.readZipEntry | ✔️ | | | | | | | | | | +| FileSystemManager.removeSavedFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.rename | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.renameSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.rmdir | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.rmdirSync | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.saveFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.saveFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.stat | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| FileSystemManager.statSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.truncate | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.truncateSync | ✔️ | | | ✔️ | | | | | | | +| FileSystemManager.unlink | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.unlinkSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.unzip | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.write | ✔️ | | | | | | | | | | +| FileSystemManager.writeFile | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.writeFileSync | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| FileSystemManager.writeSync | ✔️ | | | | | | | | | | diff --git a/versioned_docs/version-3.x/apis/files/getFileSystemManager.md b/versioned_docs/version-3.x/apis/files/getFileSystemManager.md index 08172540cfc4..bf468ca2aee2 100644 --- a/versioned_docs/version-3.x/apis/files/getFileSystemManager.md +++ b/versioned_docs/version-3.x/apis/files/getFileSystemManager.md @@ -5,7 +5,7 @@ sidebar_label: getFileSystemManager 获取全局唯一的文件管理器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.getFileSystemManager.html) diff --git a/versioned_docs/version-3.x/apis/framework/getApp.md b/versioned_docs/version-3.x/apis/framework/getApp.md index 9df0e4121ce1..c2e4595d2952 100644 --- a/versioned_docs/version-3.x/apis/framework/getApp.md +++ b/versioned_docs/version-3.x/apis/framework/getApp.md @@ -5,7 +5,7 @@ sidebar_label: getApp 获取到小程序全局唯一的 App 实例。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/reference/api/getApp.html) diff --git a/versioned_docs/version-3.x/apis/framework/getCurrentPages.md b/versioned_docs/version-3.x/apis/framework/getCurrentPages.md index a4a567ff076c..3d574bc7c353 100644 --- a/versioned_docs/version-3.x/apis/framework/getCurrentPages.md +++ b/versioned_docs/version-3.x/apis/framework/getCurrentPages.md @@ -8,7 +8,7 @@ __注意:__ - __不要尝试修改页面栈,会导致路由以及页面状态错误。__ - 不要在 `App.onLaunch` 的时候调用 `getCurrentPages()`,此时 `page` 还没有生成。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/reference/api/getCurrentPages.html) diff --git a/versioned_docs/version-3.x/apis/location/chooseLocation.md b/versioned_docs/version-3.x/apis/location/chooseLocation.md index 9d2eb3e00e3b..9b04887c6dd4 100644 --- a/versioned_docs/version-3.x/apis/location/chooseLocation.md +++ b/versioned_docs/version-3.x/apis/location/chooseLocation.md @@ -7,7 +7,7 @@ sidebar_label: chooseLocation `chooseLocation` api功能是依赖于腾讯位置服务,所以需要使用 api 密钥。如果您没有,可以前往腾讯位置服务[开发者控制台](https://lbs.qq.com/console/mykey.html?console=mykey)进行申请。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.chooseLocation.html) diff --git a/versioned_docs/version-3.x/apis/location/getFuzzyLocation.md b/versioned_docs/version-3.x/apis/location/getFuzzyLocation.md index 62ae6433586c..1ba7fe486b81 100644 --- a/versioned_docs/version-3.x/apis/location/getFuzzyLocation.md +++ b/versioned_docs/version-3.x/apis/location/getFuzzyLocation.md @@ -5,7 +5,7 @@ sidebar_label: getFuzzyLocation 获取当前的模糊地理位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getFuzzyLocation.html) diff --git a/versioned_docs/version-3.x/apis/location/getLocation.md b/versioned_docs/version-3.x/apis/location/getLocation.md index 8a42c7980414..e828bf6854e3 100644 --- a/versioned_docs/version-3.x/apis/location/getLocation.md +++ b/versioned_docs/version-3.x/apis/location/getLocation.md @@ -9,7 +9,7 @@ sidebar_label: getLocation - 工具中定位模拟使用IP定位,可能会有一定误差。且工具目前仅支持 gcj02 坐标。 - 使用第三方服务进行逆地址解析时,请确认第三方服务默认的坐标系,正确进行坐标转换。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getLocation.html) diff --git a/versioned_docs/version-3.x/apis/location/openLocation.md b/versioned_docs/version-3.x/apis/location/openLocation.md index 8a3c69ecb3ce..0bcf0191f055 100644 --- a/versioned_docs/version-3.x/apis/location/openLocation.md +++ b/versioned_docs/version-3.x/apis/location/openLocation.md @@ -5,7 +5,7 @@ sidebar_label: openLocation 使用微信内置地图查看位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.openLocation.html) diff --git a/versioned_docs/version-3.x/apis/media/audio/AudioContext.md b/versioned_docs/version-3.x/apis/media/audio/AudioContext.md index 5982f4609eaf..d0815e25d901 100644 --- a/versioned_docs/version-3.x/apis/media/audio/AudioContext.md +++ b/versioned_docs/version-3.x/apis/media/audio/AudioContext.md @@ -7,7 +7,7 @@ sidebar_label: AudioContext `AudioContext` 通过 `id` 跟一个 `audio` 组件绑定,操作对应的 audio 组件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.html) @@ -17,7 +17,7 @@ sidebar_label: AudioContext 暂停音频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.pause.html) @@ -29,7 +29,7 @@ sidebar_label: AudioContext 播放音频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/AudioContext.play.html) @@ -71,10 +71,10 @@ sidebar_label: AudioContext ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| AudioContext | ✔️ | | | | -| AudioContext.pause | ✔️ | | | | -| AudioContext.play | ✔️ | | | | -| AudioContext.seek | ✔️ | | | | -| AudioContext.setSrc | ✔️ | | | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| AudioContext | ✔️ | | | | ✔️ | +| AudioContext.pause | ✔️ | | | | ✔️ | +| AudioContext.play | ✔️ | | | | ✔️ | +| AudioContext.seek | ✔️ | | | | | +| AudioContext.setSrc | ✔️ | | | | | diff --git a/versioned_docs/version-3.x/apis/media/audio/InnerAudioContext.md b/versioned_docs/version-3.x/apis/media/audio/InnerAudioContext.md index 77fb7a40866e..b8b3d3275546 100644 --- a/versioned_docs/version-3.x/apis/media/audio/InnerAudioContext.md +++ b/versioned_docs/version-3.x/apis/media/audio/InnerAudioContext.md @@ -45,7 +45,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 播放 -支持情况: +支持情况: ```tsx () => void @@ -65,7 +65,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 停止 -支持情况: +支持情况: ```tsx () => void @@ -113,7 +113,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频播放事件 -支持情况: +支持情况: ```tsx (callback?: OnPlayCallback) => void @@ -141,7 +141,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频停止事件 -支持情况: +支持情况: ```tsx (callback?: OnStopCallback) => void @@ -155,7 +155,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频自然播放结束事件 -支持情况: +支持情况: ```tsx (callback?: OnEndedCallback) => void @@ -183,7 +183,7 @@ InnerAudioContext 实例,可通过 [Taro.createInnerAudioContext](./createInne 音频播放错误事件 -支持情况: +支持情况: ```tsx (callback?: OnErrorCallback) => void @@ -531,30 +531,30 @@ innerAudioContext.onError((res) => { ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| InnerAudioContext.play | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.pause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.stop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.seek | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.destroy | ✔️ | ✔️ | | | -| InnerAudioContext.onCanplay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onPlay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onPause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onStop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onEnded | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onTimeUpdate | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onError | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onWaiting | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onSeeking | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.onSeeked | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offCanplay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offPlay | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offPause | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offStop | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offEnded | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offTimeUpdate | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offError | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offWaiting | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offSeeking | ✔️ | ✔️ | ✔️ | | -| InnerAudioContext.offSeeked | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| InnerAudioContext.play | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.pause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.stop | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.seek | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.destroy | ✔️ | ✔️ | | | | +| InnerAudioContext.onCanplay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onPlay | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onPause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onStop | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onEnded | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onTimeUpdate | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onError | ✔️ | ✔️ | ✔️ | | ✔️ | +| InnerAudioContext.onWaiting | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onSeeking | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.onSeeked | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offCanplay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offPlay | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offPause | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offStop | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offEnded | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offTimeUpdate | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offError | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offWaiting | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offSeeking | ✔️ | ✔️ | ✔️ | | | +| InnerAudioContext.offSeeked | ✔️ | ✔️ | ✔️ | | | diff --git a/versioned_docs/version-3.x/apis/media/audio/createAudioContext.md b/versioned_docs/version-3.x/apis/media/audio/createAudioContext.md index 0302c1a5295f..80a7c734f6af 100644 --- a/versioned_docs/version-3.x/apis/media/audio/createAudioContext.md +++ b/versioned_docs/version-3.x/apis/media/audio/createAudioContext.md @@ -6,7 +6,7 @@ sidebar_label: createAudioContext 创建 audio 上下文 AudioContext 对象。 **注意:1.6.0 版本开始,本接口不再维护。建议使用能力更强的 [Taro.createInnerAudioContext](./createInnerAudioContext) 接口** -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.createAudioContext.html) diff --git a/versioned_docs/version-3.x/apis/media/audio/createInnerAudioContext.md b/versioned_docs/version-3.x/apis/media/audio/createInnerAudioContext.md index 6366a8161301..f06a2019fc89 100644 --- a/versioned_docs/version-3.x/apis/media/audio/createInnerAudioContext.md +++ b/versioned_docs/version-3.x/apis/media/audio/createInnerAudioContext.md @@ -1,20 +1,32 @@ --- -title: Taro.createInnerAudioContext() +title: Taro.createInnerAudioContext(option) sidebar_label: createInnerAudioContext --- 创建内部 audio 上下文 InnerAudioContext 对象。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.createInnerAudioContext.html) ## 类型 ```tsx -() => InnerAudioContext +(option?: Option) => InnerAudioContext ``` +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| useWebAudioImplement | `boolean` | 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项。
API 支持度: weapp | + ## 示例代码 ```tsx diff --git a/versioned_docs/version-3.x/apis/media/background-audio/getBackgroundAudioManager.md b/versioned_docs/version-3.x/apis/media/background-audio/getBackgroundAudioManager.md index ca9aec9d8c37..42c2b3a1c642 100644 --- a/versioned_docs/version-3.x/apis/media/background-audio/getBackgroundAudioManager.md +++ b/versioned_docs/version-3.x/apis/media/background-audio/getBackgroundAudioManager.md @@ -8,7 +8,7 @@ sidebar_label: getBackgroundAudioManager 从微信客户端6.7.2版本开始,若需要在小程序切后台后继续播放音频,需要在 [app.json](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html) 中配置 `requiredBackgroundModes` 属性。开发版和体验版上可以直接生效,正式版还需通过审核。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/background-audio/wx.getBackgroundAudioManager.html) diff --git a/versioned_docs/version-3.x/apis/media/image/chooseImage.md b/versioned_docs/version-3.x/apis/media/image/chooseImage.md index 534025f66730..962dd54e7b87 100644 --- a/versioned_docs/version-3.x/apis/media/image/chooseImage.md +++ b/versioned_docs/version-3.x/apis/media/image/chooseImage.md @@ -5,7 +5,7 @@ sidebar_label: chooseImage 从本地相册选择图片或使用相机拍照。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html) diff --git a/versioned_docs/version-3.x/apis/media/image/cropImage.md b/versioned_docs/version-3.x/apis/media/image/cropImage.md index 854c9621b6ec..2f815bc9c13a 100644 --- a/versioned_docs/version-3.x/apis/media/image/cropImage.md +++ b/versioned_docs/version-3.x/apis/media/image/cropImage.md @@ -47,7 +47,7 @@ sidebar_label: cropImage | 4:5 | 宽高比为4比5 | | 5:4 | 宽高比为5比4 | | 9:16 | 宽高比为9比16 | -| 16:9 | 宽高比为19比6 | +| 16:9 | 宽高比为16比9 | ## 示例代码 diff --git a/versioned_docs/version-3.x/apis/media/image/getImageInfo.md b/versioned_docs/version-3.x/apis/media/image/getImageInfo.md index ea369bdf6af0..4e24ea700d72 100644 --- a/versioned_docs/version-3.x/apis/media/image/getImageInfo.md +++ b/versioned_docs/version-3.x/apis/media/image/getImageInfo.md @@ -5,7 +5,7 @@ sidebar_label: getImageInfo 获取图片信息。网络图片需先配置download域名才能生效。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.getImageInfo.html) diff --git a/versioned_docs/version-3.x/apis/media/image/previewImage.md b/versioned_docs/version-3.x/apis/media/image/previewImage.md index 7f58679fdaf2..0a3e725c1d95 100644 --- a/versioned_docs/version-3.x/apis/media/image/previewImage.md +++ b/versioned_docs/version-3.x/apis/media/image/previewImage.md @@ -5,7 +5,7 @@ sidebar_label: previewImage 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.previewImage.html) diff --git a/versioned_docs/version-3.x/apis/media/image/saveImageToPhotosAlbum.md b/versioned_docs/version-3.x/apis/media/image/saveImageToPhotosAlbum.md index 469425053f91..bf82860dbfd3 100644 --- a/versioned_docs/version-3.x/apis/media/image/saveImageToPhotosAlbum.md +++ b/versioned_docs/version-3.x/apis/media/image/saveImageToPhotosAlbum.md @@ -5,7 +5,7 @@ sidebar_label: saveImageToPhotosAlbum 保存图片到系统相册。需要[用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) scope.writePhotosAlbum -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.saveImageToPhotosAlbum.html) diff --git a/versioned_docs/version-3.x/apis/media/video/VideoContext.md b/versioned_docs/version-3.x/apis/media/video/VideoContext.md index 017a336f2d3b..6c34b871896c 100644 --- a/versioned_docs/version-3.x/apis/media/video/VideoContext.md +++ b/versioned_docs/version-3.x/apis/media/video/VideoContext.md @@ -7,7 +7,7 @@ VideoContext 实例,可通过 [Taro.createVideoContext](./createVideoContext) VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.html) @@ -29,7 +29,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 退出全屏 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.exitFullScreen.html) @@ -69,7 +69,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 暂停视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.pause.html) @@ -81,7 +81,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 播放视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.play.html) @@ -93,7 +93,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 设置倍速播放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.playbackRate.html) @@ -121,7 +121,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 进入全屏 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.requestFullScreen.html) @@ -137,7 +137,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 跳转到指定位置 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.seek.html) @@ -181,7 +181,7 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 停止视频 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.stop.html) @@ -216,19 +216,19 @@ VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组 ## API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| VideoContext | ✔️ | ✔️ | ✔️ | | -| VideoContext.exitBackgroundPlayback | ✔️ | | | | -| VideoContext.exitFullScreen | ✔️ | ✔️ | ✔️ | | -| VideoContext.exitPictureInPicture | ✔️ | | | | -| VideoContext.hideStatusBar | ✔️ | | | | -| VideoContext.pause | ✔️ | ✔️ | ✔️ | | -| VideoContext.play | ✔️ | ✔️ | ✔️ | | -| VideoContext.playbackRate | ✔️ | ✔️ | ✔️ | | -| VideoContext.requestBackgroundPlayback | ✔️ | | | | -| VideoContext.requestFullScreen | ✔️ | ✔️ | ✔️ | | -| VideoContext.seek | ✔️ | ✔️ | ✔️ | | -| VideoContext.sendDanmu | ✔️ | | | | -| VideoContext.showStatusBar | ✔️ | | | | -| VideoContext.stop | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| VideoContext | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.exitBackgroundPlayback | ✔️ | | | | | +| VideoContext.exitFullScreen | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.exitPictureInPicture | ✔️ | | | | | +| VideoContext.hideStatusBar | ✔️ | | | | | +| VideoContext.pause | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.play | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.playbackRate | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.requestBackgroundPlayback | ✔️ | | | | | +| VideoContext.requestFullScreen | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.seek | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoContext.sendDanmu | ✔️ | | | | | +| VideoContext.showStatusBar | ✔️ | | | | | +| VideoContext.stop | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/media/video/chooseMedia.md b/versioned_docs/version-3.x/apis/media/video/chooseMedia.md index 9c762fb99cde..4e57236ee04b 100644 --- a/versioned_docs/version-3.x/apis/media/video/chooseMedia.md +++ b/versioned_docs/version-3.x/apis/media/video/chooseMedia.md @@ -5,7 +5,7 @@ sidebar_label: chooseMedia 拍摄或从手机相册中选择图片或视频。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseMedia.html) diff --git a/versioned_docs/version-3.x/apis/media/video/createVideoContext.md b/versioned_docs/version-3.x/apis/media/video/createVideoContext.md index 0b3cf25ec562..4f82d2e7ad1f 100644 --- a/versioned_docs/version-3.x/apis/media/video/createVideoContext.md +++ b/versioned_docs/version-3.x/apis/media/video/createVideoContext.md @@ -5,7 +5,7 @@ sidebar_label: createVideoContext 创建 video 上下文 VideoContext 对象。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.createVideoContext.html) diff --git a/versioned_docs/version-3.x/apis/media/video/getVideoInfo.md b/versioned_docs/version-3.x/apis/media/video/getVideoInfo.md index 8369c16b601c..87d23dca6ce7 100644 --- a/versioned_docs/version-3.x/apis/media/video/getVideoInfo.md +++ b/versioned_docs/version-3.x/apis/media/video/getVideoInfo.md @@ -5,7 +5,7 @@ sidebar_label: getVideoInfo 获取视频详细信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.getVideoInfo.html) diff --git a/versioned_docs/version-3.x/apis/navigate/navigateToMiniProgram.md b/versioned_docs/version-3.x/apis/navigate/navigateToMiniProgram.md index e3c865888841..be3f9045eb42 100644 --- a/versioned_docs/version-3.x/apis/navigate/navigateToMiniProgram.md +++ b/versioned_docs/version-3.x/apis/navigate/navigateToMiniProgram.md @@ -17,7 +17,7 @@ sidebar_label: navigateToMiniProgram - 在开发者工具上调用此 API 并不会真实的跳转到另外的小程序,但是开发者工具会校验本次调用跳转是否成功。[详情](https://developers.weixin.qq.com/miniprogram/dev/devtools/different.html#跳转小程序调试支持) - 开发者工具上支持被跳转的小程序处理接收参数的调试。[详情](https://developers.weixin.qq.com/miniprogram/dev/devtools/different.html#跳转小程序调试支持) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/miniprogram-navigate/wx.navigateToMiniProgram.html) diff --git a/versioned_docs/version-3.x/apis/network/download/DownloadTask.md b/versioned_docs/version-3.x/apis/network/download/DownloadTask.md index 859ab11f2635..efe0a195ed03 100644 --- a/versioned_docs/version-3.x/apis/network/download/DownloadTask.md +++ b/versioned_docs/version-3.x/apis/network/download/DownloadTask.md @@ -5,7 +5,7 @@ sidebar_label: DownloadTask 一个可以监听下载进度变化事件,以及取消下载任务的对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.html) @@ -15,7 +15,7 @@ sidebar_label: DownloadTask 中断下载任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: DownloadTask 监听下载进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.onProgressUpdate.html) @@ -43,7 +43,7 @@ sidebar_label: DownloadTask 取消监听下载进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.offProgressUpdate.html) @@ -152,11 +152,11 @@ downloadTask.abort() // 取消下载任务 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| DownloadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| DownloadTask.abort | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| DownloadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | -| DownloadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| DownloadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| DownloadTask.abort | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| DownloadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | | +| DownloadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | | diff --git a/versioned_docs/version-3.x/apis/network/download/downloadFile.md b/versioned_docs/version-3.x/apis/network/download/downloadFile.md index 15e357c826c2..954e614ac36d 100644 --- a/versioned_docs/version-3.x/apis/network/download/downloadFile.md +++ b/versioned_docs/version-3.x/apis/network/download/downloadFile.md @@ -7,7 +7,7 @@ sidebar_label: downloadFile 注意:请在服务端响应的 header 中指定合理的 `Content-Type` 字段,以保证客户端正确处理文件类型。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html) diff --git a/versioned_docs/version-3.x/apis/network/request/RequestTask.md b/versioned_docs/version-3.x/apis/network/request/RequestTask.md index b42b8b482521..29a17511645a 100644 --- a/versioned_docs/version-3.x/apis/network/request/RequestTask.md +++ b/versioned_docs/version-3.x/apis/network/request/RequestTask.md @@ -5,7 +5,7 @@ sidebar_label: RequestTask 网络请求任务对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.html) @@ -15,7 +15,7 @@ sidebar_label: RequestTask 中断请求任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: RequestTask 监听 HTTP Response Header 事件。会比请求完成事件更早 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.onHeadersReceived.html) @@ -43,7 +43,7 @@ sidebar_label: RequestTask 取消监听 HTTP Response Header 事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/RequestTask.offHeadersReceived.html) @@ -190,11 +190,11 @@ requestTask.abort() ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RequestTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RequestTask.abort | ✔️ | | | ✔️ | | | | | -| RequestTask.onHeadersReceived | ✔️ | | | | | | | | -| RequestTask.offHeadersReceived | ✔️ | | | | | | | | -| RequestTask.onChunkReceived | ✔️ | | | | | | | | -| RequestTask.offChunkReceived | ✔️ | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RequestTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RequestTask.abort | ✔️ | | | ✔️ | | | | | ✔️ | +| RequestTask.onHeadersReceived | ✔️ | | | | | | | | ✔️ | +| RequestTask.offHeadersReceived | ✔️ | | | | | | | | ✔️ | +| RequestTask.onChunkReceived | ✔️ | | | | | | | | | +| RequestTask.offChunkReceived | ✔️ | | | | | | | | | diff --git a/versioned_docs/version-3.x/apis/network/request/request.md b/versioned_docs/version-3.x/apis/network/request/request.md index 03decb0d5bec..3d169543c479 100644 --- a/versioned_docs/version-3.x/apis/network/request/request.md +++ b/versioned_docs/version-3.x/apis/network/request/request.md @@ -11,7 +11,7 @@ sidebar_label: request - 对于 `POST` 方法且 `header['content-type']` 为 `application/json` 的数据,会对数据进行 JSON 序列化 - 对于 `POST` 方法且 `header['content-type']` 为 `application/x-www-form-urlencoded` 的数据,会将数据转换成 query string `(encodeURIComponent(k)=encodeURIComponent(v)&encodeURIComponent(k)=encodeURIComponent(v)...)` -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html) @@ -34,7 +34,7 @@ sidebar_label: request | url | `string` | | 是 | 开发者服务器接口地址 | | data | `U` | | 否 | 请求的参数 | | header | `TaroGeneral.IAnyObject` | | 否 | 设置请求的 header,header 中不能设置 Referer。

`content-type` 默认为 `application/json` | -| timeout | `number` | `2000` | 否 | 超时时间,单位为毫秒
API 支持度: weapp, h5, tt, alipay | +| timeout | `number` | `60000` | 否 | 超时时间,单位为毫秒
API 支持度: weapp, h5, tt, alipay, rn | | method | `keyof Method` | `"GET"` | 否 | HTTP 请求方法 | | dataType | `string` | | 否 | 返回的数据格式 | | responseType | `keyof ResponseType` | | 否 | 响应的数据类型 | diff --git a/versioned_docs/version-3.x/apis/network/upload/UploadTask.md b/versioned_docs/version-3.x/apis/network/upload/UploadTask.md index 31578ab3a8a6..f0bf3aa2ef30 100644 --- a/versioned_docs/version-3.x/apis/network/upload/UploadTask.md +++ b/versioned_docs/version-3.x/apis/network/upload/UploadTask.md @@ -5,7 +5,7 @@ sidebar_label: UploadTask 一个可以监听上传进度变化事件,以及取消上传任务的对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.html) @@ -15,7 +15,7 @@ sidebar_label: UploadTask 中断上传任务 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.abort.html) @@ -27,7 +27,7 @@ sidebar_label: UploadTask 监听上传进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.onProgressUpdate.html) @@ -43,7 +43,7 @@ sidebar_label: UploadTask 取消监听上传进度变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.offProgressUpdate.html) @@ -59,7 +59,7 @@ sidebar_label: UploadTask 监听 HTTP Response Header 事件。会比请求完成事件更早 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.onHeadersReceived.html) @@ -75,7 +75,7 @@ sidebar_label: UploadTask 取消监听 HTTP Response Header 事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/UploadTask.offHeadersReceived.html) @@ -156,11 +156,11 @@ uploadTask.abort() // 取消上传任务 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| UploadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| UploadTask.abort | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | -| UploadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | -| UploadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| UploadTask | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| UploadTask.abort | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.onProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.offProgressUpdate | ✔️ | | | ✔️ | ✔️ | | | ✔️ | +| UploadTask.onHeadersReceived | ✔️ | | | | ✔️ | | | ✔️ | +| UploadTask.offHeadersReceived | ✔️ | | | | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/network/upload/uploadFile.md b/versioned_docs/version-3.x/apis/network/upload/uploadFile.md index fc4e54b588e5..265675879225 100644 --- a/versioned_docs/version-3.x/apis/network/upload/uploadFile.md +++ b/versioned_docs/version-3.x/apis/network/upload/uploadFile.md @@ -5,7 +5,7 @@ sidebar_label: uploadFile 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 `content-type` 为 `multipart/form-data`。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html) diff --git a/versioned_docs/version-3.x/apis/network/websocket/SocketTask.md b/versioned_docs/version-3.x/apis/network/websocket/SocketTask.md index ba2aca522c26..6cfeedb8b020 100644 --- a/versioned_docs/version-3.x/apis/network/websocket/SocketTask.md +++ b/versioned_docs/version-3.x/apis/network/websocket/SocketTask.md @@ -5,7 +5,7 @@ sidebar_label: SocketTask WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket/SocketTask) 接口创建返回。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.html) @@ -26,7 +26,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 通过 WebSocket 连接发送数据 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.send.html) @@ -42,7 +42,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 关闭 WebSocket 连接 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.close.html) @@ -58,7 +58,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 连接打开事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onOpen.html) @@ -74,7 +74,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 连接关闭事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onClose.html) @@ -90,7 +90,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 错误事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onError.html) @@ -106,7 +106,7 @@ WebSocket 任务,可通过 [Taro.connectSocket()](/docs/apis/network/websocket 监听 WebSocket 接受到服务器的消息事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/SocketTask.onMessage.html) @@ -214,12 +214,12 @@ WebSocket 连接打开事件的回调函数 ## API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SocketTask | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| SocketTask.send | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.close | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onOpen | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onClose | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SocketTask.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SocketTask | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| SocketTask.send | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.close | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onOpen | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onClose | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SocketTask.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/network/websocket/connectSocket.md b/versioned_docs/version-3.x/apis/network/websocket/connectSocket.md index 5920fa9b070c..524531d7fb3b 100644 --- a/versioned_docs/version-3.x/apis/network/websocket/connectSocket.md +++ b/versioned_docs/version-3.x/apis/network/websocket/connectSocket.md @@ -9,7 +9,7 @@ sidebar_label: connectSocket - 1.7.0 及以上版本,最多可以同时存在 5 个 WebSocket 连接。 - 1.7.0 以下版本,一个小程序同时只能有一个 WebSocket 连接,如果当前已存在一个 WebSocket 连接,会自动关闭该连接,并重新创建一个 WebSocket 连接。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.connectSocket.html) diff --git a/versioned_docs/version-3.x/apis/open-api/account/getAccountInfoSync.md b/versioned_docs/version-3.x/apis/open-api/account/getAccountInfoSync.md index 7f503ddf673f..14b60253f5d4 100644 --- a/versioned_docs/version-3.x/apis/open-api/account/getAccountInfoSync.md +++ b/versioned_docs/version-3.x/apis/open-api/account/getAccountInfoSync.md @@ -5,7 +5,7 @@ sidebar_label: getAccountInfoSync 获取当前帐号信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/account-info/wx.getAccountInfoSync.html) diff --git a/versioned_docs/version-3.x/apis/open-api/address/chooseAddress.md b/versioned_docs/version-3.x/apis/open-api/address/chooseAddress.md index 5921c3c3447a..0d314e498ee2 100644 --- a/versioned_docs/version-3.x/apis/open-api/address/chooseAddress.md +++ b/versioned_docs/version-3.x/apis/open-api/address/chooseAddress.md @@ -5,7 +5,7 @@ sidebar_label: chooseAddress 获取用户收货地址。调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/address/wx.chooseAddress.html) @@ -34,14 +34,14 @@ sidebar_label: chooseAddress | 参数 | 类型 | 说明 | | --- | --- | --- | | userName | `string` | 收货人姓名 | -| postalCode | `string` | 邮编 | +| postalCode | `string` | 邮编
API 支持度: weapp, qq | | provinceName | `string` | 国标收货地址第一级地址 | | cityName | `string` | 国标收货地址第二级地址 | | countyName | `string` | 国标收货地址第三级地址 | -| streetName | `string` | 国标收货地址第四级地址 | +| streetName | `string` | 国标收货地址第四级地址
API 支持度: weapp, qq | | detailInfo | `string` | 详细收货地址信息 | -| detailInfoNew | `string` | 新选择器详细收货地址信息 | -| nationalCode | `string` | 收货地址国家码 | +| detailInfoNew | `string` | 新选择器详细收货地址信息
API 支持度: weapp, qq | +| nationalCode | `string` | 收货地址国家码
API 支持度: weapp, qq | | telNumber | `string` | 收货人手机号码 | ## 示例代码 diff --git a/versioned_docs/version-3.x/apis/open-api/authorize/authorize.md b/versioned_docs/version-3.x/apis/open-api/authorize/authorize.md index f613117b84d3..940e43adf2b1 100644 --- a/versioned_docs/version-3.x/apis/open-api/authorize/authorize.md +++ b/versioned_docs/version-3.x/apis/open-api/authorize/authorize.md @@ -5,7 +5,7 @@ sidebar_label: authorize 提前向用户发起授权请求。调用后会立刻弹窗询问用户是否同意授权小程序使用某项功能或获取用户的某些数据,但不会实际调用对应接口。如果用户之前已经同意授权,则不会出现弹窗,直接返回成功。更多用法详见 [用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/authorize/wx.authorize.html) diff --git a/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveInfo.md b/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveInfo.md index efb6f3ab4d23..d94d48e1393e 100644 --- a/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveInfo.md +++ b/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveInfo.md @@ -32,14 +32,16 @@ sidebar_label: getChannelsLiveInfo ### SuccessCallbackResult -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| feedId | `string` | 直播 feedId | -| nonceId | `string` | 直播 nonceId | -| description | `string` | 直播主题 | -| status | `number` | 直播状态,2直播中,3直播结束 | -| headUrl | `string` | 视频号头像 | -| nickname | `string` | 视频号昵称 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| feedId | `string` | 是 | 直播 feedId | +| nonceId | `string` | 是 | 直播 nonceId | +| description | `string` | 是 | 直播主题 | +| status | `number` | 是 | 直播状态,2直播中,3直播结束 | +| headUrl | `string` | 是 | 视频号头像 | +| nickname | `string` | 是 | 视频号昵称 | +| replayStatus | `number` | 是 | 直播回放状态 | +| otherInfos | `string[]` | 否 | 除最近的一条直播外,其他的直播列表(注意:每次最多返回按时间戳增序排列的15个直播信息,其中时间最近的那个直播会在接口其他的返回参数中展示,其余的直播会在该字段中展示)。 | ### Status @@ -47,3 +49,12 @@ sidebar_label: getChannelsLiveInfo | --- | --- | | 2 | 直播中 | | 3 | 直播结束 | + +### ReplayStatus + +| 参数 | 说明 | +| --- | --- | +| 0 | 未生成 | +| 1 | 已生成 | +| 3 | 生成中 | +| 6 | 已过期 | diff --git a/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveNoticeInfo.md b/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveNoticeInfo.md index f79d40aef610..54121b6ec92c 100644 --- a/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveNoticeInfo.md +++ b/versioned_docs/version-3.x/apis/open-api/channels/getChannelsLiveNoticeInfo.md @@ -32,14 +32,15 @@ sidebar_label: getChannelsLiveNoticeInfo ### SuccessCallbackResult -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| nonceId | `string` | 预告 nonceId | -| status | `number` | 预告状态:0可用 1取消 2已用 | -| startTime | `string` | 开始时间 | -| headUrl | `string` | 直播封面 | -| nickname | `string` | 视频号昵称 | -| reservable | `boolean` | 是否可预约 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| nonceId | `string` | 是 | 预告 nonceId | +| status | `number` | 是 | 预告状态:0可用 1取消 2已用 | +| startTime | `string` | 是 | 开始时间 | +| headUrl | `string` | 是 | 直播封面 | +| nickname | `string` | 是 | 视频号昵称 | +| reservable | `boolean` | 是 | 是否可预约 | +| otherInfos | `string[]` | 否 | 除最近的一条预告信息外,其他的预告信息列表(注意:每次最多返回按时间戳增序排列的15个预告信息,其中时间最近的那个预告信息会在接口其他的返回参数中展示,其余的预告信息会在该字段中展示)。 | ### Status diff --git a/versioned_docs/version-3.x/apis/open-api/device-voip/getDeviceVoIPList.md b/versioned_docs/version-3.x/apis/open-api/device-voip/getDeviceVoIPList.md index 7850d6974185..8273297c522c 100644 --- a/versioned_docs/version-3.x/apis/open-api/device-voip/getDeviceVoIPList.md +++ b/versioned_docs/version-3.x/apis/open-api/device-voip/getDeviceVoIPList.md @@ -43,3 +43,16 @@ sidebar_label: getDeviceVoIPList | model_id | `string` | 设备型号 id。通过微信公众平台注册设备获得。(仅单台设备时) | | group_id | `string` | 设备组的唯一标识 id(仅设备组时) | | status | `number` | 设备(组)授权状态。0:未授权;1:已授权 | + +## 示例代码 + +```tsx +Taro.getDeviceVoIPList({ + success(res) { + console.log(res) + }, + fail(res) { + console.log(res) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/device-voip/requestDeviceVoIP.md b/versioned_docs/version-3.x/apis/open-api/device-voip/requestDeviceVoIP.md index fd291494f904..505b70a45b0f 100644 --- a/versioned_docs/version-3.x/apis/open-api/device-voip/requestDeviceVoIP.md +++ b/versioned_docs/version-3.x/apis/open-api/device-voip/requestDeviceVoIP.md @@ -34,3 +34,33 @@ sidebar_label: requestDeviceVoIP | complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | | fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | | success | `(result: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +// 授权单台设备 +Taro.requestDeviceVoIP({ + sn: 'xxxx', + snTicket: 'xxxxx', + modelId: 'xxx', + deviceName: 'xxx', + success(res) { + console.log(res) + }, + fail(res) { + console.log(res) + } +}) + +// 批量授权(授权设备组) +Taro.requestDeviceVoIP({ + isGroup: true, + groupId: '设备组 ID', + success(res) { + console.log(res) + }, + fail(res) { + console.log(res) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/login/checkSession.md b/versioned_docs/version-3.x/apis/open-api/login/checkSession.md index cbb833cc79f2..97727b28216c 100644 --- a/versioned_docs/version-3.x/apis/open-api/login/checkSession.md +++ b/versioned_docs/version-3.x/apis/open-api/login/checkSession.md @@ -9,7 +9,7 @@ sidebar_label: checkSession 登录态过期后开发者可以再调用 Taro.login 获取新的用户登录态。调用 Taro.checkSession 成功说明当前 session_key 未过期,调用失败说明 session_key 已过期。更多使用方法详见 [小程序登录](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.checkSession.html) diff --git a/versioned_docs/version-3.x/apis/open-api/login/login.md b/versioned_docs/version-3.x/apis/open-api/login/login.md index 4c909a9e1de0..7eac6a8fc0c5 100644 --- a/versioned_docs/version-3.x/apis/open-api/login/login.md +++ b/versioned_docs/version-3.x/apis/open-api/login/login.md @@ -5,7 +5,7 @@ sidebar_label: login 调用接口获取登录凭证(code)。通过凭证进而换取用户登录态信息,包括用户的唯一标识(openid)及本次登录的会话密钥(session_key)等。用户数据的加解密通讯需要依赖会话密钥完成。更多使用方法详见 [小程序登录](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html) @@ -23,19 +23,22 @@ sidebar_label: login ### Option -| 参数 | 类型 | 必填 | 说明 | -| --- | --- | :---: | --- | -| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | -| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | -| success | `(result: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | -| timeout | `number` | 否 | 超时时间,单位ms | +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| complete | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用失败的回调函数 | +| success | `(result: SuccessCallbackResult) => void` | | 否 | 接口调用成功的回调函数 | +| timeout | `number` | | 否 | 超时时间,单位ms | +| force | `boolean` | `true` | 否 | 未登录时, 是否强制调起登录框
API 支持度: tt | ### SuccessCallbackResult -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| code | `string` | 用户登录凭证(有效期五分钟)。开发者需要在开发者服务器后台调用 [auth.code2Session](https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html),使用 code 换取 openid 和 session_key 等信息 | -| errMsg | `string` | 调用结果 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| code | `string` | 是 | 用户登录凭证(有效期五分钟)。开发者需要在开发者服务器后台调用 [auth.code2Session](https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html),使用 code 换取 openid 和 session_key 等信息 | +| errMsg | `string` | 是 | 调用结果 | +| anonymousCode | `string` | 否 | 用于标识当前设备, 无论登录与否都会返回, 有效期 5 分钟。
API 支持度: tt | +| isLogin | `boolean` | 否 | 判断在当前 APP(头条、抖音等)是否处于登录状态。
API 支持度: tt | ## 示例代码 diff --git a/versioned_docs/version-3.x/apis/open-api/privacy/openPrivacyContract.md b/versioned_docs/version-3.x/apis/open-api/privacy/openPrivacyContract.md index 1d49ade79b35..15255c6f0230 100644 --- a/versioned_docs/version-3.x/apis/open-api/privacy/openPrivacyContract.md +++ b/versioned_docs/version-3.x/apis/open-api/privacy/openPrivacyContract.md @@ -28,3 +28,13 @@ sidebar_label: openPrivacyContract | complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | | fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | | success | `(result: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.openPrivacyContract({ + success: () => {}, // 打开成功 + fail: () => {}, // 打开失败 + complete: () => {} +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/settings/getSetting.md b/versioned_docs/version-3.x/apis/open-api/settings/getSetting.md index 2d859ca56fbc..96bfedf0c682 100644 --- a/versioned_docs/version-3.x/apis/open-api/settings/getSetting.md +++ b/versioned_docs/version-3.x/apis/open-api/settings/getSetting.md @@ -5,7 +5,7 @@ sidebar_label: getSetting 获取用户的当前设置。**返回值中只会出现小程序已经向用户请求过的[权限](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html)**。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.getSetting.html) diff --git a/versioned_docs/version-3.x/apis/open-api/settings/openSetting.md b/versioned_docs/version-3.x/apis/open-api/settings/openSetting.md index 3e75818fd15c..cebd59044e96 100644 --- a/versioned_docs/version-3.x/apis/open-api/settings/openSetting.md +++ b/versioned_docs/version-3.x/apis/open-api/settings/openSetting.md @@ -7,7 +7,7 @@ sidebar_label: openSetting 注意:[2.3.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 版本开始,用户发生点击行为后,才可以跳转打开设置页,管理授权信息。[详情](https://developers.weixin.qq.com/community/develop/doc/000cea2305cc5047af5733de751008) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.openSetting.html) @@ -25,12 +25,12 @@ sidebar_label: openSetting ### Option -| 参数 | 类型 | 必填 | 说明 | -| --- | --- | :---: | --- | -| withSubscriptions | `boolean` | 否 | 是否同时获取用户订阅消息的订阅状态,默认不获取。注意:withSubscriptions 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。 | -| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | -| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | -| success | `(result: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| withSubscriptions | `boolean` | `false` | 否 | 是否同时获取用户订阅消息的订阅状态,默认不获取。注意:withSubscriptions 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用失败的回调函数 | +| success | `(result: SuccessCallbackResult) => void` | | 否 | 接口调用成功的回调函数 | ### SuccessCallbackResult diff --git a/versioned_docs/version-3.x/apis/open-api/sticker/openSingleStickerView.md b/versioned_docs/version-3.x/apis/open-api/sticker/openSingleStickerView.md new file mode 100644 index 000000000000..dff6ee7f2ca6 --- /dev/null +++ b/versioned_docs/version-3.x/apis/open-api/sticker/openSingleStickerView.md @@ -0,0 +1,40 @@ +--- +title: Taro.openSingleStickerView(option) +sidebar_label: openSingleStickerView +--- + +打开单个表情 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/sticker/wx.openSingleStickerView.html) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| url | `Object` | 是 | 表情链接,可前往(表情开放平台)[https://sticker.weixin.qq.com/cgi-bin/mmemoticonwebnode-bin/pages/home],在详情页中的「小程序跳转链接」入口复制 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.openSingleStickerView({ + url: '', + success(res) {} +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/sticker/openStickerIPView.md b/versioned_docs/version-3.x/apis/open-api/sticker/openStickerIPView.md new file mode 100644 index 000000000000..6edb55e0e4f0 --- /dev/null +++ b/versioned_docs/version-3.x/apis/open-api/sticker/openStickerIPView.md @@ -0,0 +1,40 @@ +--- +title: Taro.openStickerIPView(option) +sidebar_label: openStickerIPView +--- + +打开表情IP合辑 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/sticker/wx.openStickerIPView.html) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| url | `Object` | 是 | 表情IP合辑链接,可前往[表情开放平台](https://sticker.weixin.qq.com/cgi-bin/mmemoticonwebnode-bin/pages/home),在详情页中的「小程序跳转链接」入口复制 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.openStickerIPView({ + url: '', + success(res) {} +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/sticker/openStickerSetView.md b/versioned_docs/version-3.x/apis/open-api/sticker/openStickerSetView.md new file mode 100644 index 000000000000..35d83dc092ad --- /dev/null +++ b/versioned_docs/version-3.x/apis/open-api/sticker/openStickerSetView.md @@ -0,0 +1,40 @@ +--- +title: Taro.openStickerSetView(option) +sidebar_label: openStickerSetView +--- + +打开表情专辑 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/sticker/wx.openStickerSetView.html) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| url | `Object` | 是 | 表情专辑链接,可前往[表情开放平台](https://sticker.weixin.qq.com/cgi-bin/mmemoticonwebnode-bin/pages/home),在详情页中的「小程序跳转链接」入口复制 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.openStickerSetView({ + url: '', + success(res) {} +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeDeviceMessage.md b/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeDeviceMessage.md index cd78b24cde78..55394c215ed0 100644 --- a/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeDeviceMessage.md +++ b/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeDeviceMessage.md @@ -5,7 +5,7 @@ sidebar_label: requestSubscribeDeviceMessage 订阅设备消息接口,调用后弹出授权框,用户同意后会允许开发者给用户发送订阅模版消息。当用户点击“允许”按钮时,模板消息会被添加到用户的小程序设置页,通过 wx.getSetting 接口可获取用户对相关模板消息的订阅状态。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/subscribe-message/wx.requestSubscribeDeviceMessage.html) diff --git a/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeMessage.md b/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeMessage.md index da243b392b87..20c2f41e9dcb 100644 --- a/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeMessage.md +++ b/versioned_docs/version-3.x/apis/open-api/subscribe-message/requestSubscribeMessage.md @@ -27,7 +27,9 @@ sidebar_label: requestSubscribeMessage | 参数 | 类型 | 必填 | 说明 | | --- | --- | :---: | --- | -| tmplIds | `string[]` | 是 | 需要订阅的消息模板的id的集合(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置 | +| tmplIds | `string[]` | 是 | 需要订阅的消息模板的id的集合(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置
API 支持度: weapp, tt | +| entityIds | `string[]` | 是 | 需要订阅的消息模板 id 集合(注意:1、一次性模板 id 和长期性模板 id 不可同时使用,2、一次最多传入三个模板 id
API 支持度: alipay | +| thirdTypeAppId | `string` | 否 | 模板小程序 appId,仅在服务商代调用场景下需要传入
API 支持度: alipay | | complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | | fail | `(result: FailCallbackResult) => void` | 否 | 接口调用失败的回调函数 | | success | `(result: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | @@ -41,10 +43,15 @@ sidebar_label: requestSubscribeMessage ### SuccessCallbackResult -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| [TEMPLATE_ID] | "accept" or "reject" or "ban" | 动态的键,即模板id | -| errMsg | `string` | 接口调用成功时errMsg值为'requestSubscribeMessage:ok' | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| [TEMPLATE_ID] | "accept" or "reject" or "ban" | 是 | 动态的键,即模板id | +| behavior | `string` | 否 | 用户订阅操作结果。

or 枚举值 or 描述 or
or --- or ---- or
or subscribe or 订阅成功 or
API 支持度: alipay | +| keep | `boolean` | 否 | 一次性订阅,是否勾选 总是保持以上选择,不再询问。

or 枚举值 or 描述 or
or --- or ---- or
or true or 勾选 or
or false or 未勾选 or
API 支持度: alipay | +| refuse | `boolean` | 否 | 长期性订阅,是否点击 拒绝,不再询问。

or 枚举值 or 描述 or
or --- or ---- or
or true or 点击 or
or false or 未点击 or
API 支持度: alipay | +| result | `ISubscribeResult` | 否 | 订阅数据
API 支持度: alipay | +| show | `boolean` | 否 | 本次订阅过程是否弹出了订阅面板。

or 枚举值 or 描述 or
or --- or ---- or
or true or 弹出 or
or false or 未弹出 or
API 支持度: alipay | +| errMsg | `string` | 是 | 接口调用成功时errMsg值为'requestSubscribeMessage:ok' | #### 示例代码 @@ -57,16 +64,26 @@ sidebar_label: requestSubscribeMessage } ``` +### ISubscribeResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| subscribeEntityIds | `string[]` | 订阅成功的模板列表 | +| subscribedEntityIds | `string[]` | 最终订阅成功的模板列表 | +| unsubscribedEntityIds | `string[]` | 未订阅的模板列表 | +| currentSubscribedEntityIds | `string[]` | 本次新增订阅成功的模板列表 | + ### TemplateReflex 模版消息订阅类型 | 参数 | 说明 | | --- | --- | -| accept | 表示用户同意订阅该条id对应的模板消息 | -| reject | 表示用户拒绝订阅该条id对应的模板消息 | -| ban | 表示已被后台封禁 | -| filter | 表示该模板因为模板标题同名被后台过滤 | +| accept | 表示用户同意订阅该条id对应的模板消息
API 支持度: weapp, alipay, tt | +| reject | 表示用户拒绝订阅该条id对应的模板消息
API 支持度: weapp, alipay, tt | +| ban | 表示已被后台封禁
API 支持度: weapp, tt | +| filter | 表示该模板因为模板标题同名被后台过滤
API 支持度: weapp | +| fail | 表示该条 id 对应的模版消息授权失败
API 支持度: tt | ## 示例代码 diff --git a/versioned_docs/version-3.x/apis/open-api/subscribe-message/subscribeService.md b/versioned_docs/version-3.x/apis/open-api/subscribe-message/subscribeService.md new file mode 100644 index 000000000000..26993502d34d --- /dev/null +++ b/versioned_docs/version-3.x/apis/open-api/subscribe-message/subscribeService.md @@ -0,0 +1,44 @@ +--- +title: Taro.subscribeService(option) +sidebar_label: subscribeService +--- + +小程序消息订阅服务,包括取消订阅和查询订阅;订阅操作详见 [form 表单](https://smartprogram.baidu.com/docs/develop/component/formlist_form/)。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-subscribeService/) + +## 类型 + +```tsx +(option: subscribeService.Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `subscribeService.Option` | + +## 示例代码 + +```tsx +Taro.subscribeService({ + templateId: 'BD0003', + subscribeId: '8026', + type: 'query', + success(res) { + Taro.showModal({ + title: 'success', + content: JSON.stringify(res) + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/subscribe-message/unsubscribeMessage.md b/versioned_docs/version-3.x/apis/open-api/subscribe-message/unsubscribeMessage.md new file mode 100644 index 000000000000..b54636f3d710 --- /dev/null +++ b/versioned_docs/version-3.x/apis/open-api/subscribe-message/unsubscribeMessage.md @@ -0,0 +1,48 @@ +--- +title: Taro.unsubscribeMessage(option) +sidebar_label: unsubscribeMessage +--- + +取消当前用户已订阅的消息 + +支持情况: + +> [参考文档](https://opendocs.alipay.com/mini/07vg26?pathHash=8c9630ac) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| entityIds | `string[]` | 是 | 需要取消订阅的消息模板 id 集合(注意:1、一次性模板 id 和长期性模板 id 不可同时使用,2、一次最多传入三个模板 id)。 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.unsubscribeMessage({ + entityIds: [ + 'ac768fca1ce245ccae9404bb5243c49b', + '9aa357acb7c6434aba294aded1cdfb7c', + ], + success(res) { + console.log(res); + }, + fail(err) { + console.log(err); + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/open-api/user-info/getUserInfo.md b/versioned_docs/version-3.x/apis/open-api/user-info/getUserInfo.md index 8fc67d679df2..e89c344885eb 100644 --- a/versioned_docs/version-3.x/apis/open-api/user-info/getUserInfo.md +++ b/versioned_docs/version-3.x/apis/open-api/user-info/getUserInfo.md @@ -8,7 +8,7 @@ sidebar_label: getUserInfo **接口调整说明** 在用户未授权过的情况下调用此接口,将不再出现授权弹窗,会直接进入 fail 回调(详见[《公告》](https://developers.weixin.qq.com/community/develop/doc/0000a26e1aca6012e896a517556c01))。在用户已授权的情况下调用此接口,可成功获取用户信息。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserInfo.html) diff --git a/versioned_docs/version-3.x/apis/open-api/user-info/getUserProfile.md b/versioned_docs/version-3.x/apis/open-api/user-info/getUserProfile.md index ef13f1f60219..6ac569095afe 100644 --- a/versioned_docs/version-3.x/apis/open-api/user-info/getUserProfile.md +++ b/versioned_docs/version-3.x/apis/open-api/user-info/getUserProfile.md @@ -33,13 +33,14 @@ sidebar_label: getUserProfile ### Option -| 参数 | 类型 | 必填 | 说明 | -| --- | --- | :---: | --- | -| lang | `keyof Language` | 否 | 显示用户信息的语言 | -| desc | `string` | 是 | 声明获取用户个人信息后的用途,不超过30个字符 | -| success | `(result: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | -| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | -| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| lang | `keyof Language` | | 否 | 显示用户信息的语言 | +| desc | `string` | | 是 | 声明获取用户个人信息后的用途,不超过30个字符 | +| force | `boolean` | `false` | 否 | 当宿主未登录时,是否强制拉起登录框
API 支持度: tt | +| success | `(result: SuccessCallbackResult) => void` | | 否 | 接口调用成功的回调函数 | +| fail | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用失败的回调函数 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | ### SuccessCallbackResult diff --git a/versioned_docs/version-3.x/apis/qq/addRecentColorSign.md b/versioned_docs/version-3.x/apis/qq/addRecentColorSign.md new file mode 100644 index 000000000000..59a3e7ba1bbe --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/addRecentColorSign.md @@ -0,0 +1,51 @@ +--- +title: Taro.addRecentColorSign(option) +sidebar_label: addRecentColorSign +--- + +添加当前小程序页面到最近浏览彩签,需要授权基础库 1.20.0 开始支持。 +提示:在手 Q 8.9.0 前的版本,当系统未授予手 Q 悬浮穿权限时,每次调用该接口都会弹出系统授权窗口。自手 Q 8.9.0 起交互调整如下: + 1. 系统没有授予手 Q 悬浮窗权限时,接口执行 fail 回调函数并附带 ”No floating window permission“的错误信息,开发者可针对此信息在业务代码里弹窗提示用户手动授予手 Q 悬浮窗权限。 + 2. 安卓系统部分机型存在获取悬浮窗权限不准确情况。 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addColorSign.html#qq-addrecentcolorsign) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| query | `string` | 否 | 做为点击最近彩签打开的小程序页面的启动参数,如 a=1&b=2
默认值:当前页面的查询参数 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.addRecentColorSign({ + query: 'a=1&b=2', + success(res) { + console.log('addRecentColorSign success: ', res) + }, + fail(err) { + console.log('addRecentColorSign fail: ', err) + }, + complete(res) { + console.log('addRecentColorSign complete: ', res) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/applyAddToMyApps.md b/versioned_docs/version-3.x/apis/qq/applyAddToMyApps.md new file mode 100644 index 000000000000..92c980561800 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/applyAddToMyApps.md @@ -0,0 +1,53 @@ +--- +title: Taro.applyAddToMyApps(option) +sidebar_label: applyAddToMyApps +--- + +申请用户将本小程序添加到下拉页面中“我的小程序”当中,手Q8.9.13及以上版本支持 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addToMyApps.html#qq-applyaddtomyapps) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| confirm | `boolean` | true 代表用户选择了同意 | +| cancel | `boolean` | true 代表用户选择了不同意 | + +## 示例代码 + +```tsx +Taro.applyAddToMyApps({ + success(res) { + if (res.confirm) { + // 用户同意添加 + } + if (res.cancel) { + // 用户不同意添加 + } + // 原则上,confirm和cancel是互斥的 + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/getGuildInfo.md b/versioned_docs/version-3.x/apis/qq/getGuildInfo.md new file mode 100644 index 000000000000..763c33379b17 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/getGuildInfo.md @@ -0,0 +1,40 @@ +--- +title: Taro.getGuildInfo(option) +sidebar_label: getGuildInfo +--- + +获取频道信息与当前人身份(FOR 机器人服务入口) + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_guild.html) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| open_guild_id | `string` | 是 | 频道id | +| channel_id | `string` | 否 | 子频道Id | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| encryptedData | `string` | 加密之后的数据,需要解密 | +| iv | `string` | 对称解密算法初始向量(base64) | +| signature | `string` | 签名(base64) | diff --git a/versioned_docs/version-3.x/apis/qq/getQQRunData.md b/versioned_docs/version-3.x/apis/qq/getQQRunData.md new file mode 100644 index 000000000000..d9656a3b3eb8 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/getQQRunData.md @@ -0,0 +1,72 @@ +--- +title: Taro.getQQRunData(option) +sidebar_label: getQQRunData +--- + +获取用户过去三十天QQ运动步数。需要先调用 qq.login 接口。步数信息会在用户主动进入小程序时更新。 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_sport.html) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(result: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| encryptedData | `string` | 包括敏感数据在内的完整用户信息的加密数据,详细见加密数据解密算法。 | +| iv | `string` | 加密算法的初始向量,详细见加密数据解密算法 | + +## 示例代码 + +```tsx +Taro.getQQRunData({ + success(res) { + // 拿 encryptedData 到开发者后台解密开放数据 + const encryptedData = res.encryptedData + } +}) +``` + +**开放数据 JSON 结构** +敏感数据有两种获取方式,一是使用 加密数据解密算法 。 获取得到的开放数据为以下 json 结构: + +```json +{ + "stepInfoList": [ + { + "timestamp": 1445866601, + "step": 100 + }, + { + "timestamp": 1445876601, + "step": 120 + } + ] +} +``` +* stepInfoList 中,每一项结构如下: + +| 属性 | 类型 | 说明 | +| --- | ---- | --- | +| timestamp | number | 时间戳,表示数据对应的时间 | +| step | number | QQ运动步数 | diff --git a/versioned_docs/version-3.x/apis/qq/isAddedToMyApps.md b/versioned_docs/version-3.x/apis/qq/isAddedToMyApps.md new file mode 100644 index 000000000000..c9ffc22f145b --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/isAddedToMyApps.md @@ -0,0 +1,50 @@ +--- +title: Taro.isAddedToMyApps(option) +sidebar_label: isAddedToMyApps +--- + +查询用户是否已经将本小程序添加到下拉页面中“我的小程序”当中,手Q8.9.13及以上版本支持,建议使用qq.applyAddToMyApps之前先调用qq.isAddedToMyApps来作前置判断 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addToMyApps.html#qq-isaddedtomyapps) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| isAdded | `boolean` | true 代表用户已经添加,false 则还没添加 | + +## 示例代码 + +```tsx +Taro.isAddedToMyApps({ + success(res) { + if (res.isAdded) { + // 用户已经添加 + } else { + // 用户还未添加 + } + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/openQzonePublish.md b/versioned_docs/version-3.x/apis/qq/openQzonePublish.md index 61a3b510c666..6293d471c7a8 100644 --- a/versioned_docs/version-3.x/apis/qq/openQzonePublish.md +++ b/versioned_docs/version-3.x/apis/qq/openQzonePublish.md @@ -4,23 +4,6 @@ sidebar_label: openQzonePublish --- 此接口可打开手Q说说发表界面,并将文字内容和图片/视频内容传递到手Q说说发表界面。 -```tsx -Taro.openQzonePublish({ - footnote: '使用同款滤镜', - path: 'pages/index/index', - text: '我爱中国', - media: [ - { - type: 'photo', - path: 'qqfile://1.png' - }, - { - type: 'video', - path: 'qqfile://2.mp4' - } - ] -}) -``` 支持情况: @@ -59,3 +42,23 @@ Taro.openQzonePublish({ ```tsx "photo" | "video" ``` + +## 示例代码 + +```tsx +Taro.openQzonePublish({ + footnote: '使用同款滤镜', + path: 'pages/index/index', + text: '我爱中国', + media: [ + { + type: 'photo', + path: 'qqfile://1.png' + }, + { + type: 'video', + path: 'qqfile://2.mp4' + } + ] +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/setCustomDress.md b/versioned_docs/version-3.x/apis/qq/setCustomDress.md new file mode 100644 index 000000000000..8ecad0fd75c0 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/setCustomDress.md @@ -0,0 +1,47 @@ +--- +title: Taro.setCustomDress(option) +sidebar_label: setCustomDress +--- + +QQ美化平台内测阶段,仅被邀请的商户可使用此接口。 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/personalize.html#qq-setcustomdress) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| action | `string` | 是 | 方法名,设置头像填"uploadAvatar",其他方法后续开放 | +| path | `string` | 是 | 素材路径,必须为本地文件,路径为 wxfile:// 的形式 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.setCustomDress({ + action: "uploadAvatar", + path:"wxfile://images/1.png" + success(res) { + console.log("success"+res); + }, + fail(res) { + console.log("fail"+res); + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/setOfficialDress.md b/versioned_docs/version-3.x/apis/qq/setOfficialDress.md new file mode 100644 index 000000000000..1cec8d3271a5 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/setOfficialDress.md @@ -0,0 +1,50 @@ +--- +title: Taro.setOfficialDress(option) +sidebar_label: setOfficialDress +--- + +QQ美化平台内测阶段,仅被邀请的商户可使用此接口。 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/personalize.html#qq-setofficialdress) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| action | `string` | 是 | 方法名,设置头像填"setAvatar",其他方法后续开放 | +| uin | `string` | 是 | openid,给自己设置头像填"self" | +| item_id | `string` | 否 | 物品id | +| busi_info | `string` | 否 | 设置头像"setAvatar"此处不用填 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.setOfficialDress({ + action: "setAvatar", + uin: "self", + item_id: "2740", + success(res) { + console.log("success"+res); + }, + fail(res) { + console.log("fail"+res); + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/qq/updateQQApp.md b/versioned_docs/version-3.x/apis/qq/updateQQApp.md new file mode 100644 index 000000000000..3da9dd2e9d94 --- /dev/null +++ b/versioned_docs/version-3.x/apis/qq/updateQQApp.md @@ -0,0 +1,46 @@ +--- +title: Taro.updateQQApp(option) +sidebar_label: updateQQApp +--- + +更新 QQ 版本 + +支持情况: + +> [参考文档](https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_updateQQ.html#qq-updateqqapp) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +## 示例代码 + +```tsx +Taro.updateQQApp({ + success: function(res) { + console.log('updateQQApp success',res) + }, + fail: function(err) { + console.log('updateQQApp fail',err) + }, + complete: function(res) { + console.log('updateQQApp info',res) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/route/navigateBack.md b/versioned_docs/version-3.x/apis/route/navigateBack.md index 60b2780b7423..f36563155c2a 100644 --- a/versioned_docs/version-3.x/apis/route/navigateBack.md +++ b/versioned_docs/version-3.x/apis/route/navigateBack.md @@ -5,7 +5,7 @@ sidebar_label: navigateBack 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages 获取当前的页面栈,决定需要返回几层。 -支持情况: +支持情况: > H5: 若入参 delta 大于现有页面数时,返回应用打开的第一个页面(如果想要返回首页请使用 reLaunch 方法)。 diff --git a/versioned_docs/version-3.x/apis/route/navigateTo.md b/versioned_docs/version-3.x/apis/route/navigateTo.md index 7e85f96b5d4f..d68ff18c187b 100644 --- a/versioned_docs/version-3.x/apis/route/navigateTo.md +++ b/versioned_docs/version-3.x/apis/route/navigateTo.md @@ -5,7 +5,7 @@ sidebar_label: navigateTo 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 Taro.navigateBack 可以返回到原页面。小程序中页面栈最多十层。 -支持情况: +支持情况: > H5: 未针对 tabbar 页面做限制处理 diff --git a/versioned_docs/version-3.x/apis/route/reLaunch.md b/versioned_docs/version-3.x/apis/route/reLaunch.md index fd7b888bcd82..9336ebbd57cc 100644 --- a/versioned_docs/version-3.x/apis/route/reLaunch.md +++ b/versioned_docs/version-3.x/apis/route/reLaunch.md @@ -5,7 +5,7 @@ sidebar_label: reLaunch 关闭所有页面,打开到应用内的某个页面 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.reLaunch.html) diff --git a/versioned_docs/version-3.x/apis/route/redirectTo.md b/versioned_docs/version-3.x/apis/route/redirectTo.md index 4c0611089ff8..c51a3645fb78 100644 --- a/versioned_docs/version-3.x/apis/route/redirectTo.md +++ b/versioned_docs/version-3.x/apis/route/redirectTo.md @@ -5,7 +5,7 @@ sidebar_label: redirectTo 关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。 -支持情况: +支持情况: > H5: 未针对 tabbar 页面做限制处理 diff --git a/versioned_docs/version-3.x/apis/route/switchTab.md b/versioned_docs/version-3.x/apis/route/switchTab.md index 7dee8bb82262..50d43c1f9af7 100644 --- a/versioned_docs/version-3.x/apis/route/switchTab.md +++ b/versioned_docs/version-3.x/apis/route/switchTab.md @@ -5,7 +5,7 @@ sidebar_label: switchTab 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.switchTab.html) diff --git a/versioned_docs/version-3.x/apis/storage/clearStorage.md b/versioned_docs/version-3.x/apis/storage/clearStorage.md index 7349387fb8be..d29b2ed4a6ac 100644 --- a/versioned_docs/version-3.x/apis/storage/clearStorage.md +++ b/versioned_docs/version-3.x/apis/storage/clearStorage.md @@ -5,7 +5,7 @@ sidebar_label: clearStorage 清理本地数据缓存 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.clearStorage.html) diff --git a/versioned_docs/version-3.x/apis/storage/clearStorageSync.md b/versioned_docs/version-3.x/apis/storage/clearStorageSync.md index 9d7ba528c3ed..1aa81a59a97d 100644 --- a/versioned_docs/version-3.x/apis/storage/clearStorageSync.md +++ b/versioned_docs/version-3.x/apis/storage/clearStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: clearStorageSync Taro.clearStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.clearStorageSync.html) diff --git a/versioned_docs/version-3.x/apis/storage/getStorage.md b/versioned_docs/version-3.x/apis/storage/getStorage.md index 48c8008d2eb5..df0e9a2943ef 100644 --- a/versioned_docs/version-3.x/apis/storage/getStorage.md +++ b/versioned_docs/version-3.x/apis/storage/getStorage.md @@ -5,7 +5,7 @@ sidebar_label: getStorage 从本地缓存中异步获取指定 key 的内容 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorage.html) diff --git a/versioned_docs/version-3.x/apis/storage/getStorageInfo.md b/versioned_docs/version-3.x/apis/storage/getStorageInfo.md index 61653235c503..a8867b19239c 100644 --- a/versioned_docs/version-3.x/apis/storage/getStorageInfo.md +++ b/versioned_docs/version-3.x/apis/storage/getStorageInfo.md @@ -5,7 +5,7 @@ sidebar_label: getStorageInfo 异步获取当前storage的相关信息 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageInfo.html) diff --git a/versioned_docs/version-3.x/apis/storage/getStorageInfoSync.md b/versioned_docs/version-3.x/apis/storage/getStorageInfoSync.md index 632982f2ac11..dff2f6b56ee8 100644 --- a/versioned_docs/version-3.x/apis/storage/getStorageInfoSync.md +++ b/versioned_docs/version-3.x/apis/storage/getStorageInfoSync.md @@ -5,7 +5,7 @@ sidebar_label: getStorageInfoSync Taro.getStorageInfo 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageInfoSync.html) diff --git a/versioned_docs/version-3.x/apis/storage/getStorageSync.md b/versioned_docs/version-3.x/apis/storage/getStorageSync.md index e66f09815ac9..95f62911ad6f 100644 --- a/versioned_docs/version-3.x/apis/storage/getStorageSync.md +++ b/versioned_docs/version-3.x/apis/storage/getStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: getStorageSync Taro.getStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.getStorageSync.html) diff --git a/versioned_docs/version-3.x/apis/storage/removeStorage.md b/versioned_docs/version-3.x/apis/storage/removeStorage.md index d8b64d19d925..c5c7e515765d 100644 --- a/versioned_docs/version-3.x/apis/storage/removeStorage.md +++ b/versioned_docs/version-3.x/apis/storage/removeStorage.md @@ -5,7 +5,7 @@ sidebar_label: removeStorage 从本地缓存中移除指定 key -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.removeStorage.html) diff --git a/versioned_docs/version-3.x/apis/storage/removeStorageSync.md b/versioned_docs/version-3.x/apis/storage/removeStorageSync.md index 351e8d16da3f..556e9ab0d1bb 100644 --- a/versioned_docs/version-3.x/apis/storage/removeStorageSync.md +++ b/versioned_docs/version-3.x/apis/storage/removeStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: removeStorageSync Taro.removeStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.removeStorageSync.html) diff --git a/versioned_docs/version-3.x/apis/storage/setStorage.md b/versioned_docs/version-3.x/apis/storage/setStorage.md index 5ebe3734c40c..a1e72f088ba5 100644 --- a/versioned_docs/version-3.x/apis/storage/setStorage.md +++ b/versioned_docs/version-3.x/apis/storage/setStorage.md @@ -5,7 +5,7 @@ sidebar_label: setStorage 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.setStorage.html) diff --git a/versioned_docs/version-3.x/apis/storage/setStorageSync.md b/versioned_docs/version-3.x/apis/storage/setStorageSync.md index 8a2562e49203..60af9dc378fd 100644 --- a/versioned_docs/version-3.x/apis/storage/setStorageSync.md +++ b/versioned_docs/version-3.x/apis/storage/setStorageSync.md @@ -5,7 +5,7 @@ sidebar_label: setStorageSync Taro.setStorage 的同步版本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.setStorageSync.html) diff --git a/versioned_docs/version-3.x/apis/swan/bookshelf/deleteBookshelf.md b/versioned_docs/version-3.x/apis/swan/bookshelf/deleteBookshelf.md new file mode 100644 index 000000000000..5946d4d8361c --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/bookshelf/deleteBookshelf.md @@ -0,0 +1,83 @@ +--- +title: Taro.deleteBookshelf(option) +sidebar_label: deleteBookshelf +--- + +删除书架中的内容(需宿主支持书架入口) + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-deleteBookshelf/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| category | `string` | 是 | 要删除的内容分类 | +| contentIds | `string[]` | 是 | 要删除书架内容的 id,支持传多个,最多 100 条;注释:contentId 为内容 id,内容的唯一标识,自定义,最长 22 字符(不能含有空格、中文字符)。支持批量删除的同一个 category 下的多个 id,不同 category 下的 id 请分别调用该接口删除 | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### Category + +| 参数 | 说明 | +| --- | --- | +| article | 专栏模板 | +| doc | 文档模板 | +| cartoon | 动漫模板 | +| av | 影音模板 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| list | `IListItem[]` | 添加到书架的结果列表 | + +### IListItem + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| contentId | `string` | 内容的唯一标识 | +| status | `keyof Status` | 删除状态:值为 0 时是失败,为 1 时是成功 | +| msg | `string` | 删除信息 | + +### Status + +| 参数 | 说明 | +| --- | --- | +| 0 | 失败 | +| 1 | 成功 | + +## 示例代码 + +```tsx +Taro.deleteBookshelf({ + category: 'doc', + contentIds: ['test1', 'test2'], + success(res) { + Taro.showModal({ + title: 'success', + content: JSON.stringify(res) + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/swan/bookshelf/insertBookshelf.md b/versioned_docs/version-3.x/apis/swan/bookshelf/insertBookshelf.md new file mode 100644 index 000000000000..8138c7fb3251 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/bookshelf/insertBookshelf.md @@ -0,0 +1,84 @@ +--- +title: Taro.insertBookshelf(option) +sidebar_label: insertBookshelf +--- + +添加内容到宿主书架 + +支持情况: + +> 百度小程序: (需宿主支持书架入口) + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-insertBookshelf/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| category | `string` | 是 | 添加的内容分类 | +| contentIds | `string[]` | 是 | 要添加到书架内容的 id,支持传多个,最多 100 条;注释:contentId 为内容 id,内容的唯一标识,自定义,最长 22 字符(不能含有空格、中文字符) | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### Category + +| 参数 | 说明 | +| --- | --- | +| article | 专栏模板 | +| doc | 文档模板 | +| cartoon | 动漫模板 | +| av | 影音模板 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| list | `IListItem[]` | 添加到书架的结果列表 | + +### IListItem + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| contentId | `string` | 内容的唯一标识 | +| status | `keyof Status` | 添加状态:值为 0 时是失败,为 1 时是成功 | +| msg | `string` | 添加信息 | + +### Status + +| 参数 | 说明 | +| --- | --- | +| 0 | 失败 | +| 1 | 成功 | + +## 示例代码 + +```tsx +Taro.insertBookshelf({ + category: 'doc', + contentIds: ['test1', 'test2'], + success(res) { + Taro.showModal({ + title: 'success', + content: JSON.stringify(res) + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) diff --git a/versioned_docs/version-3.x/apis/swan/bookshelf/navigateToBookshelf.md b/versioned_docs/version-3.x/apis/swan/bookshelf/navigateToBookshelf.md new file mode 100644 index 000000000000..4b99517c76eb --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/bookshelf/navigateToBookshelf.md @@ -0,0 +1,62 @@ +--- +title: Taro.navigateToBookshelf(option) +sidebar_label: navigateToBookshelf +--- + +跳转到宿主书架 + +支持情况: + +> 百度小程序: (需宿主支持书架入口) + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-navigateToBookshelf/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| category | `string` | 是 | 跳转到指定的内容分类
API 支持度: swan | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### Category + +| 参数 | 说明 | +| --- | --- | +| article | 专栏模板 | +| doc | 文档模板 | +| cartoon | 动漫模板 | +| av | 影音模板 | + +## 示例代码 + +```tsx +Taro.navigateToBookshelf({ + category: 'article', + contentIds: 'test1', + success(res) { + Taro.showModal({ + title: 'navigateToBookshelf', + content: 'success' + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) diff --git a/versioned_docs/version-3.x/apis/swan/bookshelf/queryBookshelf.md b/versioned_docs/version-3.x/apis/swan/bookshelf/queryBookshelf.md new file mode 100644 index 000000000000..4058b18684a4 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/bookshelf/queryBookshelf.md @@ -0,0 +1,73 @@ +--- +title: Taro.queryBookshelf(option) +sidebar_label: queryBookshelf +--- + +查询宿主书架的相关内容 + +支持情况: + +> 百度小程序: (需宿主支持书架入口) + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-queryBookshelf/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| contentIds | `string[]` | 是 | 要查询内容的 id,支持传多个,最多 100 条;注释:contentId 为内容 id,内容的唯一标识,自定义,最长 22 字符(不能含有空格、中文字符) | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| list | `IListItem[]` | 查询的内容结果列表 | + +### IListItem + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| contentId | `string` | 内容的唯一标识 | +| status | `keyof Status` | 状态 | + +### Status + +| 参数 | 说明 | +| --- | --- | +| 0 | 不存在 | +| 1 | 存在 | + +## 示例代码 + +```tsx +Taro.queryBookshelf({ + contentIds: ['test1', 'test2'], + success(res) { + Taro.showModal({ + title: 'success', + content: JSON.stringify(res) + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) +``` diff --git a/versioned_docs/version-3.x/apis/swan/bookshelf/updateBookshelfReadTime.md b/versioned_docs/version-3.x/apis/swan/bookshelf/updateBookshelfReadTime.md new file mode 100644 index 000000000000..53f9a7f7283c --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/bookshelf/updateBookshelfReadTime.md @@ -0,0 +1,77 @@ +--- +title: Taro.updateBookshelfReadTime(option) +sidebar_label: updateBookshelfReadTime +--- + +更新已加入宿主书架的内容的阅读时间 + +支持情况: + +> 百度小程序: (需宿主支持书架入口) + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-queryBookshelf/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| category | `string` | 是 | 添加的内容分类 | +| contentIds | `string[]` | 是 | 要更新内容的 id;注释:contentId 为内容 id,内容的唯一标识,自定义,最长 22 字符(不能含有空格、中文字符) | +| complete | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | +| fail | `(res: TaroGeneral.CallbackResult) => void` | 否 | 接口调用失败的回调函数 | +| success | `(res: SuccessCallbackResult) => void` | 否 | 接口调用成功的回调函数 | + +### Category + +| 参数 | 说明 | +| --- | --- | +| article | 专栏模板 | +| doc | 文档模板 | +| cartoon | 动漫模板 | +| av | 影音模板 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| status | `keyof Status` | 更新状态 | +| msg | `string` | 更新的结果信息 | + +### Status + +| 参数 | 说明 | +| --- | --- | +| 0 | 失败 | +| 1 | 成功 | + +## 示例代码 + +```tsx +Taro.updateBookshelfReadTime({ + category: 'doc', + contentIds: 'test1', + success(res) { + Taro.showModal({ + title: 'success', + content: JSON.stringify(res) + }) + }, + fail(err) { + Taro.showModal({ + title: 'fail', + content: JSON.stringify(err) + }) + } +}) diff --git a/versioned_docs/version-3.x/apis/swan/download-package/downloadPackage.md b/versioned_docs/version-3.x/apis/swan/download-package/downloadPackage.md new file mode 100644 index 000000000000..c2fbb8ac5ee2 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/download-package/downloadPackage.md @@ -0,0 +1,33 @@ +--- +title: Taro.downloadPackage(option) +sidebar_label: downloadPackage +--- + +针对在小程序中调用其他小程序的场景,预下载其他小程序的包内容。 +Web 态说明:Web 态不支持预下载的能力。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-downloadPackage/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| appKey | `string` | 是 | 预下载的小程序的 appKey | +| pageUrl | `string` | 否 | 预下载的小程序的 pageUrl ,默认值为小程序的首页页面 | +| success | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: TaroGeneral.CallbackResult) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/swan/download-package/downloadPackages.md b/versioned_docs/version-3.x/apis/swan/download-package/downloadPackages.md new file mode 100644 index 000000000000..710e11a3433f --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/download-package/downloadPackages.md @@ -0,0 +1,53 @@ +--- +title: Taro.downloadPackages(option) +sidebar_label: downloadPackages +--- + +针对在小程序中调用其他小程序的场景,预下载其他小程序的包内容。 +Web 态说明:Web 态不支持预下载的能力。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-downloadPackages/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| pageList | `IPageItem[]` | 是 | 预下载的小程序的列表。 | +| success | `(res: SuccessCallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: TaroGeneral.CallbackResult) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | + +### IPageItem + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| appKey | `string` | 预下载的小程序的 appKey | +| pages | `string[]` | 页面路径 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| __index | `__index` | 小程序包预下载结果回调 | + +### IAppKeyResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| pageUrl | `string` | 页面路径 | +| status | `string` | 预下载能力调用结果。值为 "0" 时是成功,非 "0" 时是失败 | +| message | `string` | 预下载结果信息 | diff --git a/versioned_docs/version-3.x/apis/swan/download-package/loadSubPackage.md b/versioned_docs/version-3.x/apis/swan/download-package/loadSubPackage.md new file mode 100644 index 000000000000..dc6c460e0e43 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/download-package/loadSubPackage.md @@ -0,0 +1,30 @@ +--- +title: Taro.loadSubPackage(option) +sidebar_label: loadSubPackage +--- + +提前下载好子包的资源,目录结构配置参考[分包加载](https://smartprogram.baidu.com/docs/develop/framework/subpackages/)。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-loadSubPackage/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| success | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: TaroGeneral.CallbackResult) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/swan/getFavorStatus.md b/versioned_docs/version-3.x/apis/swan/getFavorStatus.md new file mode 100644 index 000000000000..015efa3fe5d5 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/getFavorStatus.md @@ -0,0 +1,37 @@ +--- +title: Taro.getFavorStatus(option) +sidebar_label: getFavorStatus +--- + +获取小程序用户关注状态。 +Web 态说明:Web 态小程序暂不支持关注小程序。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-getFavorStatus/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| success | `(res: SuccessCallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| isFavor | `string` | 用户关注关注状态,1表示已关注,0表示未关注 | diff --git a/versioned_docs/version-3.x/apis/swan/getSystemRiskInfo.md b/versioned_docs/version-3.x/apis/swan/getSystemRiskInfo.md new file mode 100644 index 000000000000..ac13cea2045d --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/getSystemRiskInfo.md @@ -0,0 +1,44 @@ +--- +title: Taro.getSystemRiskInfo(option) +sidebar_label: getSystemRiskInfo +--- + +获取用于得到风控信息的加密信息对象。更多小程序风控能力参见[风控服务](https://smartprogram.baidu.com/docs/develop/serverapi/open_risk_power/)。 +Web 态说明:Web 态小程序暂不支持获取用于得到风控信息的加密信息对象。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-getSystemRiskInfo/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| success | `(res: SuccessCallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| content | `Object` | 用于获取风控信息的加密信息对象。
要获取风控信息,需要和[风控检测](https://smartprogram.baidu.com/docs/develop/serverapi/open_risk_power/#detectrisk/)接口联合使用,并作为风控检测接口的 xtoken 参数传入。 | + +### IContent + +| 参数 | 类型 | +| --- | --- | +| key | `string` | +| value | `string` | diff --git a/versioned_docs/version-3.x/apis/swan/getTopStatus.md b/versioned_docs/version-3.x/apis/swan/getTopStatus.md new file mode 100644 index 000000000000..a87a96627b96 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/getTopStatus.md @@ -0,0 +1,37 @@ +--- +title: Taro.getTopStatus(option) +sidebar_label: getTopStatus +--- + +获取小程序用户置顶状态。 +Web 态说明:Web 态小程序暂不支持获取置顶状态,降级调起百度 App。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-getTopStatus/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| success | `(res: SuccessCallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| isTop | `boolean` | 置顶状态 | diff --git a/versioned_docs/version-3.x/apis/swan/openBdboxWebview.md b/versioned_docs/version-3.x/apis/swan/openBdboxWebview.md new file mode 100644 index 000000000000..d5cafbbaf7e1 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/openBdboxWebview.md @@ -0,0 +1,38 @@ +--- +title: Taro.openBdboxWebview(option) +sidebar_label: openBdboxWebview +--- + +小程序跳转百度 App 内特定页面。接入本 API 的开发者,需要了解跳转页面的 scheme,并根据文档调用 API 完成跳转。可在百度 App 中,通过将跳转页面 scheme 生成对应二维码,并使用百度 APP 相机扫描二维码调起的方式,来确保 scheme 是否正确。 +Web 态说明: + 1.由于浏览器的限制,Web 态暂时无法准确获取跳转百度 App 成功 / 失败状态,会执行失败回调; + 2.在用户未安装手百、部分第三方浏览器封禁百度 App 的情况下,Web 态会尝试降级调起应用商店。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-openBdboxWebview/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| module | `string` | 否 | 跳转百度 App 特定页面的 scheme 的 module | +| action | `string` | 否 | 跳转百度 App 特定页面的 scheme 的 action | +| path | `string` | 否 | 跳转百度 App 特定页面的 scheme 的 path | +| authority | `string` | 否 | 跳转百度 App 特定页面的 scheme 的 authority | +| parameters | `Object` | 否 | 跳转百度 App 特定页面的 scheme 的参数 | +| success | `(res: any) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/swan/pay/getOptimalPriceInfo.md b/versioned_docs/version-3.x/apis/swan/pay/getOptimalPriceInfo.md new file mode 100644 index 000000000000..9a2d73b4facc --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/pay/getOptimalPriceInfo.md @@ -0,0 +1,70 @@ +--- +title: Taro.getOptimalPriceInfo(option) +sidebar_label: getOptimalPriceInfo +--- + +获取商品使用百度平台券后的价格 +通过百度收银台支付的商品,用户在支付时可以享受百度平台券提供的优惠。 +使用 API swan.getOptimalPriceInfo 可以提前获知用户在支付时享受的优惠价格。(当用户有多张平台券时,按照平台最优优惠价格计算,与支付时默认选中的优惠券对应的优惠一致) + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/payment_swan-getOptimalPriceInfo/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| productsInfo | `ProductInfo[]` | 是 | 商品信息 | +| success | `(res: SuccessCallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: TaroGeneral.CallbackResult) => any` | 否 | 接口调用失败的回调函数 | + +### ProductInfo + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| appKey | `string` | 支付的 appKey | +| products | `Product[]` | 商品信息 | + +### Product + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| amount | `number` | 是 | 商品单价(原价) | +| promotionTag | `string` | 否 | 商品标识 | +| productId | `string` | 是 | 开发者自定义商品 ID,在success回调中,会与减免信息一起返回。 | + +### SuccessCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| productsInfo | `ProductInfoSuccess[]` | 商品信息 | + +### ProductInfoSuccess + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| appKey | `string` | 支付的 appKey | +| products | `ProductSuccess[]` | 减免后的商品信息 | + +### ProductSuccess + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| amount | `number` | 商品单价(原价) | +| productId | `string` | 开发者自定义商品 ID | +| promotionTag | `string` | 商品标识 | +| reduceAmount | `number` | 百度平台券减免金额 | +| afterPayAmount | `number` | 百度平台券减免后金额 | diff --git a/versioned_docs/version-3.x/apis/swan/pay/requestPolymerPayment.md b/versioned_docs/version-3.x/apis/swan/pay/requestPolymerPayment.md new file mode 100644 index 000000000000..6d01dfbff280 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/pay/requestPolymerPayment.md @@ -0,0 +1,67 @@ +--- +title: Taro.requestPolymerPayment(option) +sidebar_label: requestPolymerPayment +--- + +1)百度收银台,聚合了主流的百度钱包、微信、支付宝、网银等多种支付渠道,方便开发者一站式快速接入多种支付渠道,让百度用户能在智能小程序场景下,直接完成支付、交易闭环,提升用户支付体验的同时,提高智能小程序的订单转化率。 +2)上述支付渠道在 C 端收银台有两种展示方式,开发者可以选择其中一种实现。 +方式一:将支付渠道内嵌在小程序提单页面中,实现方式参考文档[inline-payment-panel内嵌支付组件](https://smartprogram.baidu.com/docs/develop/component/inline_payment_panel/)。 +方式二:在用户确认订单后,调起收银台半屏面板承载支付渠道,实现方式参考文档调起[百度收银台](https://smartprogram.baidu.com/docs/develop/function/tune_up_2.0/#%E7%99%BE%E5%BA%A6%E6%94%B6%E9%93%B6%E5%8F%B0%E6%8E%A5%E5%8F%A32-0-%E8%AF%B4%E6%98%8E)。 + +Web 态说明:为了保证用户交易行为全流程闭环体验,在 Web 态下调用该方法会做打开百度 App 对应小程序页面的降级处理。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/payment_swan-requestPolymerPayment/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| orderInfo | `OrderInfo` | 是 | 订单信息 | +| success | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: FailCallbackResult) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: TaroGeneral.CallbackResult) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | + +### OrderInfo + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| dealId | `string` | 是 | 跳转百度收银台支付必带参数之一,是百度收银台的财务结算凭证,与账号绑定的结算协议一一对应,每笔交易将结算到 dealId 对应的协议主体。
详见[核心参数获取与组装](https://smartprogram.baidu.com/docs/develop/function/parameter/)。 | +| appKey | `string` | 是 | 支付能力开通后分配的支付 appKey,用以表示应用身份的唯一 ID ,在应用审核通过后进行分配,一经分配后不会发生更改,来唯一确定一个应用。
详见[核心参数获取与组装](https://smartprogram.baidu.com/docs/develop/function/parameter/)。 | +| totalAmount | `string` | 是 | 订单金额(单位:人民币分)。注:小程序测试包测试金额不可超过 1000 分 | +| tpOrderId | `string` | 是 | 小程序开发者系统创建的唯一订单 ID ,当支付状态发生变化时,会通过此订单 ID 通知开发者。 | +| notifyUrl | `string` | 否 | 通知开发者支付状态的回调地址,必须是合法的 URL ,与开发者平台填写的支付回调地址作用一致,未填写的以平台回调地址为准 | +| dealTitle | `string` | 是 | 订单的名称。 | +| signFieldsRange | `string` | 是 | 用于区分验签字段范围,signFieldsRange 的值:0:原验签字段 appKey+dealId+tpOrderId;1:包含 totalAmount 的验签,验签字段包括appKey+dealId+tpOrderId+totalAmount。固定值为 1 。 | +| rsaSign | `string` | 是 | 对appKey+dealId+totalAmount+tpOrderId进行 RSA 加密后的签名,防止订单被伪造。
签名过程见[签名与验签](https://smartprogram.baidu.com/docs/develop/function/sign_v2/)。 | +| bizInfo | `string` | 否 | 订单详细信息,需要是一个可解析为 JSON Object 的字符串。
字段内容见: [bizInfo 组装](https://smartprogram.baidu.com/docs/develop/function/parameter/#%E9%80%9A%E7%94%A8%E5%8F%82%E6%95%B0%E7%BB%84%E8%A3%85)。 | +| payResultUrl | `string` | 否 | 当前页面 path。Web 态小程序支付成功后跳回的页面路径,例如:'/pages/payResult/payResult' | +| inlinePaySign | `string` | 否 | 内嵌支付组件返回的支付信息加密 key,与[内嵌支付组件](https://smartprogram.baidu.com/docs/develop/component/inline_payment_panel)配套使用,此值不传或者传空时默认调起支付面板。 | +| promotionTag | `string` | 否 | 平台营销信息,此处传可使用平台券的 spuid,支持通过英文逗号分割传入多个 spuid 值,仅与百度合作平台类目券的开发者需要填写 | + +### FailCallbackResult + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| errCode | `number` | 错误码 | +| data | `DetailFailData` | 详细错误信息。
注: 目前仅在内嵌支付组件调起 swan.requestPolymerPayment 时,选择数字人民币 APP 渠道支付且用户未下载数字人民币 APP 时,返回具体错误信息 data。 | + +### DetailFailData + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| subErrCode | `number` | 详细错误码。20014 表示【未下载数字人民币 APP】 | +| subErrMsg | `string` | 详细错误信息 | diff --git a/versioned_docs/version-3.x/apis/swan/setDocumentTitle.md b/versioned_docs/version-3.x/apis/swan/setDocumentTitle.md new file mode 100644 index 000000000000..eec2613301d4 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/setDocumentTitle.md @@ -0,0 +1,31 @@ +--- +title: Taro.setDocumentTitle(option) +sidebar_label: setDocumentTitle +--- + +动态设置当前页面的标题。此方法为 web 版小程序专用方法,使用前需判断方法是否存在。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-setDocumentTitle/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| title | `string` | 是 | 页面中 title 标签中的内容 | +| success | `(res: any) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/swan/setMetaDescription.md b/versioned_docs/version-3.x/apis/swan/setMetaDescription.md new file mode 100644 index 000000000000..cf7d524ab057 --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/setMetaDescription.md @@ -0,0 +1,31 @@ +--- +title: Taro.setMetaDescription(option) +sidebar_label: setMetaDescription +--- + +设置 web 版小程序 description meta 信息。此方法为 web 版小程序专用方法,使用前需判断方法是否存在。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-setMetaDescription/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| content | `string` | 是 | 需要设置的 description 内容 | +| success | `(res: any) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/swan/setMetaKeywords.md b/versioned_docs/version-3.x/apis/swan/setMetaKeywords.md new file mode 100644 index 000000000000..b233811f5f3c --- /dev/null +++ b/versioned_docs/version-3.x/apis/swan/setMetaKeywords.md @@ -0,0 +1,31 @@ +--- +title: Taro.setMetaKeywords(option) +sidebar_label: setMetaKeywords +--- + +设置 web 版小程序 keywords meta 信息。此方法为 web 版小程序专用方法,使用前需判断方法是否存在。 + +支持情况: + +> [参考文档](https://smartprogram.baidu.com/docs/develop/api/open/swan-setMetaKeywords/) + +## 类型 + +```tsx +(option: Option) => void +``` + +## 参数 + +| 参数 | 类型 | +| --- | --- | +| option | `Option` | + +### Option + +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| content | `string` | 是 | 需要设置的 keywords 内容 | +| success | `(res: any) => any` | 否 | 接口调用成功的回调函数 | +| fail | `(err: any) => any` | 否 | 接口调用失败的回调函数 | +| complete | `(res: any) => any` | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | diff --git a/versioned_docs/version-3.x/apis/taro.extend/eventCenter.md b/versioned_docs/version-3.x/apis/taro.extend/eventCenter.md index 850fd9186fdc..fb4c6d4d2c1a 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/eventCenter.md +++ b/versioned_docs/version-3.x/apis/taro.extend/eventCenter.md @@ -5,7 +5,7 @@ sidebar_label: eventCenter 事件中心 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/getAppInfo.md b/versioned_docs/version-3.x/apis/taro.extend/getAppInfo.md index ce7e9376c00b..f32b2979f945 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/getAppInfo.md +++ b/versioned_docs/version-3.x/apis/taro.extend/getAppInfo.md @@ -5,7 +5,7 @@ sidebar_label: getAppInfo 小程序获取和 Taro 相关的 App 信息 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/getCurrentInstance.md b/versioned_docs/version-3.x/apis/taro.extend/getCurrentInstance.md index 126008e2da0b..9d7d66b9daa5 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/getCurrentInstance.md +++ b/versioned_docs/version-3.x/apis/taro.extend/getCurrentInstance.md @@ -5,7 +5,7 @@ sidebar_label: getCurrentInstance 获取当前页面实例 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/getEnv.md b/versioned_docs/version-3.x/apis/taro.extend/getEnv.md index 9e0525d861cb..de74c1cc18ba 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/getEnv.md +++ b/versioned_docs/version-3.x/apis/taro.extend/getEnv.md @@ -5,7 +5,7 @@ sidebar_label: getEnv 获取环境变量 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/initPxTransform.md b/versioned_docs/version-3.x/apis/taro.extend/initPxTransform.md index 177492090eff..913134e19de7 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/initPxTransform.md +++ b/versioned_docs/version-3.x/apis/taro.extend/initPxTransform.md @@ -5,7 +5,7 @@ sidebar_label: initPxTransform 尺寸转换初始化 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/interceptorify.md b/versioned_docs/version-3.x/apis/taro.extend/interceptorify.md index 34fcf10a32f9..717d230dbf31 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/interceptorify.md +++ b/versioned_docs/version-3.x/apis/taro.extend/interceptorify.md @@ -5,7 +5,7 @@ sidebar_label: interceptorify 包裹 promiseify api 的洋葱圈模型 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/pxTransform.md b/versioned_docs/version-3.x/apis/taro.extend/pxTransform.md index 53445ac8172c..001dfeb307c7 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/pxTransform.md +++ b/versioned_docs/version-3.x/apis/taro.extend/pxTransform.md @@ -5,7 +5,7 @@ sidebar_label: pxTransform 尺寸转换 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.extend/requirePlugin.md b/versioned_docs/version-3.x/apis/taro.extend/requirePlugin.md index 36a0c0e4d3a8..d36853a391a3 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/requirePlugin.md +++ b/versioned_docs/version-3.x/apis/taro.extend/requirePlugin.md @@ -1,5 +1,5 @@ --- -title: Taro.requirePlugin(pluginName) +title: requirePlugin sidebar_label: requirePlugin --- @@ -10,7 +10,7 @@ sidebar_label: requirePlugin ## 类型 ```tsx -(pluginName: string) => any +{ (pluginName: string): any; (pluginName: string, success?: (mod: any) => any, error?: (e: { mod: any; errMsg: string; }) => any): any; async?: (pluginName: string) => Promise; } ``` ## 参数 diff --git a/versioned_docs/version-3.x/apis/taro.extend/setGlobalDataPlugin.md b/versioned_docs/version-3.x/apis/taro.extend/setGlobalDataPlugin.md index df85c2a742f6..131aecef9beb 100644 --- a/versioned_docs/version-3.x/apis/taro.extend/setGlobalDataPlugin.md +++ b/versioned_docs/version-3.x/apis/taro.extend/setGlobalDataPlugin.md @@ -5,7 +5,7 @@ sidebar_label: setGlobalDataPlugin Vue3 插件,用于设置 `getApp()` 中的全局变量 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useDidHide.md b/versioned_docs/version-3.x/apis/taro.hooks/useDidHide.md index d05724ec904b..ab4a6377b2c7 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useDidHide.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useDidHide.md @@ -5,7 +5,7 @@ sidebar_label: useDidHide 页面隐藏时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useDidShow.md b/versioned_docs/version-3.x/apis/taro.hooks/useDidShow.md index 211fc066814a..f1dc51c15638 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useDidShow.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useDidShow.md @@ -5,7 +5,7 @@ sidebar_label: useDidShow 页面展示时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useError.md b/versioned_docs/version-3.x/apis/taro.hooks/useError.md index 25502aec5576..b4964bca93f6 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useError.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useError.md @@ -5,7 +5,7 @@ sidebar_label: useError 小程序发生脚本错误或 API 调用报错时触发的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useLaunch.md b/versioned_docs/version-3.x/apis/taro.hooks/useLaunch.md index e1fa0dcef1ef..938996ed6826 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useLaunch.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useLaunch.md @@ -5,7 +5,7 @@ sidebar_label: useLaunch 小程序初始化完成时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useLoad.md b/versioned_docs/version-3.x/apis/taro.hooks/useLoad.md index 53831051b44c..1a1cb2b7d70b 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useLoad.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useLoad.md @@ -5,7 +5,7 @@ sidebar_label: useLoad 页面加载完成时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/usePageNotFound.md b/versioned_docs/version-3.x/apis/taro.hooks/usePageNotFound.md index 6495de6909d5..e971b5911f75 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/usePageNotFound.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/usePageNotFound.md @@ -5,7 +5,7 @@ sidebar_label: usePageNotFound 小程序要打开的页面不存在时触发的回调。 -支持情况: +支持情况: > H5: 多页面模式不支持该方法 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/usePageScroll.md b/versioned_docs/version-3.x/apis/taro.hooks/usePageScroll.md index 85f8e918476f..783b87666f65 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/usePageScroll.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/usePageScroll.md @@ -5,7 +5,7 @@ sidebar_label: usePageScroll 页面滚动时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/usePullDownRefresh.md b/versioned_docs/version-3.x/apis/taro.hooks/usePullDownRefresh.md index 8485b43b4d34..8be0e3c5baee 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/usePullDownRefresh.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/usePullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: usePullDownRefresh 下拉刷新时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/usePullIntercept.md b/versioned_docs/version-3.x/apis/taro.hooks/usePullIntercept.md index f85c965969f0..60d28f5d22e0 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/usePullIntercept.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/usePullIntercept.md @@ -5,7 +5,7 @@ sidebar_label: usePullIntercept 下拉中断时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useReachBottom.md b/versioned_docs/version-3.x/apis/taro.hooks/useReachBottom.md index c603995244e7..326d7cb372c8 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useReachBottom.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useReachBottom.md @@ -5,7 +5,7 @@ sidebar_label: useReachBottom 上拉触底时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useReady.md b/versioned_docs/version-3.x/apis/taro.hooks/useReady.md index 4eba419ada5d..cdcb37d660ac 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useReady.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useReady.md @@ -6,7 +6,7 @@ sidebar_label: useReady 页面初次渲染完成的回调。 此时页面已经准备妥当,可以和视图层进行交互。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useResize.md b/versioned_docs/version-3.x/apis/taro.hooks/useResize.md index c0ec05209de3..61360e731449 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useResize.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useResize.md @@ -5,7 +5,7 @@ sidebar_label: useResize 页面尺寸改变时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useRouter.md b/versioned_docs/version-3.x/apis/taro.hooks/useRouter.md index de41f6dbcd58..b2abb07fa575 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useRouter.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useRouter.md @@ -5,7 +5,7 @@ sidebar_label: useRouter 获取当前路由参数。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useTabItemTap.md b/versioned_docs/version-3.x/apis/taro.hooks/useTabItemTap.md index 656d24e1021b..667247945c75 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useTabItemTap.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useTabItemTap.md @@ -5,7 +5,7 @@ sidebar_label: useTabItemTap 当前是 tab 页时,tab 被点击时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useUnhandledRejection.md b/versioned_docs/version-3.x/apis/taro.hooks/useUnhandledRejection.md index 9ec904a41974..b8ce0f2be554 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useUnhandledRejection.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useUnhandledRejection.md @@ -5,7 +5,7 @@ sidebar_label: useUnhandledRejection 小程序有未处理的 Promise reject 时触发。也可以使用 Taro.onUnhandledRejection 绑定监听。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/taro.hooks/useUnload.md b/versioned_docs/version-3.x/apis/taro.hooks/useUnload.md index 5c39d64cd8c2..b3c405a2274e 100644 --- a/versioned_docs/version-3.x/apis/taro.hooks/useUnload.md +++ b/versioned_docs/version-3.x/apis/taro.hooks/useUnload.md @@ -5,7 +5,7 @@ sidebar_label: useUnload 页面卸载时的回调。 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/apis/ui/animation/Animation.md b/versioned_docs/version-3.x/apis/ui/animation/Animation.md index 4a874956e610..3dc0a54fc7c6 100644 --- a/versioned_docs/version-3.x/apis/ui/animation/Animation.md +++ b/versioned_docs/version-3.x/apis/ui/animation/Animation.md @@ -5,7 +5,7 @@ sidebar_label: Animation 动画对象 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.html) @@ -15,7 +15,7 @@ sidebar_label: Animation 导出动画队列。**export 方法每次调用后会清掉之前的动画操作**。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.export.html) @@ -27,7 +27,7 @@ sidebar_label: Animation 表示一组动画完成。可以在一组动画中调用任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.step.html) @@ -43,7 +43,7 @@ sidebar_label: Animation 同 [transform-function matrix](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix.html) @@ -64,7 +64,7 @@ sidebar_label: Animation 同 [transform-function matrix3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix3d.html) @@ -95,7 +95,7 @@ sidebar_label: Animation 从原点顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate.html) @@ -111,7 +111,7 @@ sidebar_label: Animation 从 固定 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate3d.html) @@ -130,7 +130,7 @@ sidebar_label: Animation 从 X 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateX.html) @@ -146,7 +146,7 @@ sidebar_label: Animation 从 Y 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateY.html) @@ -162,7 +162,7 @@ sidebar_label: Animation 从 Z 轴顺时针旋转一个角度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateZ.html) @@ -178,7 +178,7 @@ sidebar_label: Animation 缩放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale.html) @@ -195,7 +195,7 @@ sidebar_label: Animation 缩放 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale3d.html) @@ -213,7 +213,7 @@ sidebar_label: Animation 缩放 X 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleX.html) @@ -229,7 +229,7 @@ sidebar_label: Animation 缩放 Y 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleY.html) @@ -245,7 +245,7 @@ sidebar_label: Animation 缩放 Z 轴 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleZ.html) @@ -261,7 +261,7 @@ sidebar_label: Animation 对 X、Y 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skew.html) @@ -278,7 +278,7 @@ sidebar_label: Animation 对 X 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewX.html) @@ -294,7 +294,7 @@ sidebar_label: Animation 对 Y 轴坐标进行倾斜 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewY.html) @@ -310,7 +310,7 @@ sidebar_label: Animation 平移变换 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate.html) @@ -327,7 +327,7 @@ sidebar_label: Animation 对 xyz 坐标进行平移变换 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate3d.html) @@ -345,7 +345,7 @@ sidebar_label: Animation 对 X 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateX.html) @@ -361,7 +361,7 @@ sidebar_label: Animation 对 Y 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateY.html) @@ -377,7 +377,7 @@ sidebar_label: Animation 对 Z 轴平移 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateZ.html) @@ -393,7 +393,7 @@ sidebar_label: Animation 设置透明度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.opacity.html) @@ -409,7 +409,7 @@ sidebar_label: Animation 设置背景色 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.backgroundColor.html) @@ -425,7 +425,7 @@ sidebar_label: Animation 设置宽度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.width.html) @@ -441,7 +441,7 @@ sidebar_label: Animation 设置高度 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.height.html) @@ -457,7 +457,7 @@ sidebar_label: Animation 设置 left 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.left.html) @@ -473,7 +473,7 @@ sidebar_label: Animation 设置 right 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.right.html) @@ -489,7 +489,7 @@ sidebar_label: Animation 设置 top 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.top.html) @@ -505,7 +505,7 @@ sidebar_label: Animation 设置 bottom 值 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.bottom.html) @@ -542,36 +542,36 @@ sidebar_label: Animation ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| Animation | ✔️ | ✔️ | ✔️ | | | -| Animation.export | ✔️ | ✔️ | ✔️ | | | -| Animation.step | ✔️ | ✔️ | ✔️ | | | -| Animation.matrix | ✔️ | ✔️ | ✔️ | | | -| Animation.matrix3d | ✔️ | ✔️ | ✔️ | | | -| Animation.rotate | ✔️ | ✔️ | ✔️ | | | -| Animation.rotate3d | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateX | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateY | ✔️ | ✔️ | ✔️ | | | -| Animation.rotateZ | ✔️ | ✔️ | ✔️ | | | -| Animation.scale | ✔️ | ✔️ | ✔️ | | | -| Animation.scale3d | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleX | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleY | ✔️ | ✔️ | ✔️ | | | -| Animation.scaleZ | ✔️ | ✔️ | ✔️ | | | -| Animation.skew | ✔️ | ✔️ | ✔️ | | | -| Animation.skewX | ✔️ | ✔️ | ✔️ | | | -| Animation.skewY | ✔️ | ✔️ | ✔️ | | | -| Animation.translate | ✔️ | ✔️ | ✔️ | | | -| Animation.translate3d | ✔️ | ✔️ | ✔️ | | | -| Animation.translateX | ✔️ | ✔️ | ✔️ | | | -| Animation.translateY | ✔️ | ✔️ | ✔️ | | | -| Animation.translateZ | ✔️ | ✔️ | ✔️ | | | -| Animation.opacity | ✔️ | ✔️ | ✔️ | | | -| Animation.backgroundColor | ✔️ | ✔️ | ✔️ | | | -| Animation.width | ✔️ | ✔️ | ✔️ | | | -| Animation.height | ✔️ | ✔️ | ✔️ | | | -| Animation.left | ✔️ | ✔️ | ✔️ | | | -| Animation.right | ✔️ | ✔️ | ✔️ | | | -| Animation.top | ✔️ | ✔️ | ✔️ | | | -| Animation.bottom | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| Animation | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.export | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.step | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.matrix | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.matrix3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotate | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotate3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.rotateZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scale | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scale3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.scaleZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skew | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skewX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.skewY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translate | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translate3d | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateX | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateY | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.translateZ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.opacity | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.backgroundColor | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.width | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.height | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.left | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.right | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.top | ✔️ | ✔️ | ✔️ | | | ✔️ | +| Animation.bottom | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/ui/animation/createAnimation.md b/versioned_docs/version-3.x/apis/ui/animation/createAnimation.md index 47ac8dc59aeb..a410f065ff8f 100644 --- a/versioned_docs/version-3.x/apis/ui/animation/createAnimation.md +++ b/versioned_docs/version-3.x/apis/ui/animation/createAnimation.md @@ -5,7 +5,7 @@ sidebar_label: createAnimation 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/wx.createAnimation.html) diff --git a/versioned_docs/version-3.x/apis/ui/custom-component/nextTick.md b/versioned_docs/version-3.x/apis/ui/custom-component/nextTick.md index 291145e0f6d9..e9f4b9d9c404 100644 --- a/versioned_docs/version-3.x/apis/ui/custom-component/nextTick.md +++ b/versioned_docs/version-3.x/apis/ui/custom-component/nextTick.md @@ -9,7 +9,7 @@ sidebar_label: nextTick 因为自定义组件中的 setData 和 triggerEvent 等接口本身是同步的操作,当这几个接口被连续调用时,都是在一个同步流程中执行完的,因此若逻辑不当可能会导致出错。 一个极端的案例:当父组件的 setData 引发了子组件的 triggerEvent,进而使得父组件又进行了一次 setData,期间有通过 wx:if 语句对子组件进行卸载,就有可能引发奇怪的错误,所以对于不需要在一个同步流程内完成的逻辑,可以使用此接口延迟到下一个时间片再执行。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/custom-component/wx.nextTick.html) diff --git a/versioned_docs/version-3.x/apis/ui/fonts/loadFontFace.md b/versioned_docs/version-3.x/apis/ui/fonts/loadFontFace.md index e9276afea6f8..7ac0233e0fac 100644 --- a/versioned_docs/version-3.x/apis/ui/fonts/loadFontFace.md +++ b/versioned_docs/version-3.x/apis/ui/fonts/loadFontFace.md @@ -12,7 +12,7 @@ sidebar_label: loadFontFace 4. canvas等原生组件不支持使用接口添加的字体 5. 工具里提示 Failed to load font 可以忽略 -支持情况: +支持情况: > 支付宝小程序: source 地址格式为 `url('https://...')`,而不是单纯 URL 地址 > diff --git a/versioned_docs/version-3.x/apis/ui/interaction/hideLoading.md b/versioned_docs/version-3.x/apis/ui/interaction/hideLoading.md index 7da00ee445a6..e10b3cac7640 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/hideLoading.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/hideLoading.md @@ -5,7 +5,7 @@ sidebar_label: hideLoading 隐藏 loading 提示框 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideLoading.html) diff --git a/versioned_docs/version-3.x/apis/ui/interaction/hideToast.md b/versioned_docs/version-3.x/apis/ui/interaction/hideToast.md index e2d429fe1e93..ee5a39a17995 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/hideToast.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/hideToast.md @@ -5,7 +5,7 @@ sidebar_label: hideToast 隐藏消息提示框 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideToast.html) diff --git a/versioned_docs/version-3.x/apis/ui/interaction/showActionSheet.md b/versioned_docs/version-3.x/apis/ui/interaction/showActionSheet.md index 7fa1c622be02..50c4762d033f 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/showActionSheet.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/showActionSheet.md @@ -9,7 +9,7 @@ sidebar_label: showActionSheet - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel"; - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showActionSheet.html) diff --git a/versioned_docs/version-3.x/apis/ui/interaction/showLoading.md b/versioned_docs/version-3.x/apis/ui/interaction/showLoading.md index d922d7c055fb..7d2fcc176ea8 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/showLoading.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/showLoading.md @@ -9,7 +9,7 @@ sidebar_label: showLoading - Taro.showLoading 和 Taro.showToast 同时只能显示一个 - Taro.showLoading 应与 Taro.hideLoading 配对使用 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showLoading.html) diff --git a/versioned_docs/version-3.x/apis/ui/interaction/showModal.md b/versioned_docs/version-3.x/apis/ui/interaction/showModal.md index add1611b78a0..1287bd1f5939 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/showModal.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/showModal.md @@ -8,7 +8,7 @@ sidebar_label: showModal - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel"; - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showModal.html) diff --git a/versioned_docs/version-3.x/apis/ui/interaction/showToast.md b/versioned_docs/version-3.x/apis/ui/interaction/showToast.md index 8e8d9d45bf80..38d31fdce99a 100644 --- a/versioned_docs/version-3.x/apis/ui/interaction/showToast.md +++ b/versioned_docs/version-3.x/apis/ui/interaction/showToast.md @@ -9,7 +9,7 @@ sidebar_label: showToast - Taro.showLoading 和 Taro.showToast 同时只能显示一个 - Taro.showToast 应与 Taro.hideToast 配对使用 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showToast.html) diff --git a/versioned_docs/version-3.x/apis/ui/menu/getMenuButtonBoundingClientRect.md b/versioned_docs/version-3.x/apis/ui/menu/getMenuButtonBoundingClientRect.md index 8209d056e184..f52654c2db2d 100644 --- a/versioned_docs/version-3.x/apis/ui/menu/getMenuButtonBoundingClientRect.md +++ b/versioned_docs/version-3.x/apis/ui/menu/getMenuButtonBoundingClientRect.md @@ -5,7 +5,7 @@ sidebar_label: getMenuButtonBoundingClientRect 获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.getMenuButtonBoundingClientRect.html) diff --git a/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarColor.md b/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarColor.md index bf81b742e56c..de08853a1ebd 100644 --- a/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarColor.md +++ b/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarColor.md @@ -5,7 +5,7 @@ sidebar_label: setNavigationBarColor 设置页面导航条颜色 -支持情况: +支持情况: > H5: 不支持 animation 参数 > diff --git a/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarTitle.md b/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarTitle.md index 772bb9135cac..a9c7c951f3f1 100644 --- a/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarTitle.md +++ b/versioned_docs/version-3.x/apis/ui/navigation-bar/setNavigationBarTitle.md @@ -5,7 +5,7 @@ sidebar_label: setNavigationBarTitle 动态设置当前页面的标题 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.setNavigationBarTitle.html) diff --git a/versioned_docs/version-3.x/apis/ui/pull-down-refresh/startPullDownRefresh.md b/versioned_docs/version-3.x/apis/ui/pull-down-refresh/startPullDownRefresh.md index 1237eb90f16c..147ee2f6648b 100644 --- a/versioned_docs/version-3.x/apis/ui/pull-down-refresh/startPullDownRefresh.md +++ b/versioned_docs/version-3.x/apis/ui/pull-down-refresh/startPullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: startPullDownRefresh 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。 -支持情况: +支持情况: > React Native: 无动画效果 diff --git a/versioned_docs/version-3.x/apis/ui/pull-down-refresh/stopPullDownRefresh.md b/versioned_docs/version-3.x/apis/ui/pull-down-refresh/stopPullDownRefresh.md index 643fab836e10..e07a418f059e 100644 --- a/versioned_docs/version-3.x/apis/ui/pull-down-refresh/stopPullDownRefresh.md +++ b/versioned_docs/version-3.x/apis/ui/pull-down-refresh/stopPullDownRefresh.md @@ -5,7 +5,7 @@ sidebar_label: stopPullDownRefresh 停止当前页面下拉刷新。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/pull-down-refresh/wx.stopPullDownRefresh.html) diff --git a/versioned_docs/version-3.x/apis/ui/scroll/pageScrollTo.md b/versioned_docs/version-3.x/apis/ui/scroll/pageScrollTo.md index b65512e4cfb0..2a2d867bd8bd 100644 --- a/versioned_docs/version-3.x/apis/ui/scroll/pageScrollTo.md +++ b/versioned_docs/version-3.x/apis/ui/scroll/pageScrollTo.md @@ -15,7 +15,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBar.md b/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBar.md index 242f5cc02d04..c4458ca65f1f 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBar.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBar.md @@ -5,7 +5,7 @@ sidebar_label: hideTabBar 隐藏 tabBar -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBar.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBarRedDot.md b/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBarRedDot.md index 490fbb90e41f..2c3da47bc628 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBarRedDot.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/hideTabBarRedDot.md @@ -5,7 +5,7 @@ sidebar_label: hideTabBarRedDot 隐藏 tabBar 某一项的右上角的红点 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBarRedDot.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/removeTabBarBadge.md b/versioned_docs/version-3.x/apis/ui/tab-bar/removeTabBarBadge.md index b66a1a15ed13..d2b2a511a5ec 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/removeTabBarBadge.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/removeTabBarBadge.md @@ -5,7 +5,7 @@ sidebar_label: removeTabBarBadge 移除 tabBar 某一项右上角的文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.removeTabBarBadge.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarBadge.md b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarBadge.md index 62569d376fdc..42e6a987897d 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarBadge.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarBadge.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarBadge 为 tabBar 某一项的右上角添加文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarBadge.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarItem.md b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarItem.md index 1f5d62657910..220a6fe129f1 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarItem.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarItem.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarItem 动态设置 tabBar 某一项的内容,`2.7.0` 起图片支持临时文件和网络文件。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarItem.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarStyle.md b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarStyle.md index 6486816bc1bc..954c675397a1 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarStyle.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/setTabBarStyle.md @@ -5,7 +5,7 @@ sidebar_label: setTabBarStyle 动态设置 tabBar 的整体样式 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarStyle.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBar.md b/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBar.md index eab31b10744d..924986a4e527 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBar.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBar.md @@ -5,7 +5,7 @@ sidebar_label: showTabBar 显示 tabBar -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html) diff --git a/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBarRedDot.md b/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBarRedDot.md index d47caaca9008..508dcd472fbb 100644 --- a/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBarRedDot.md +++ b/versioned_docs/version-3.x/apis/ui/tab-bar/showTabBarRedDot.md @@ -5,7 +5,7 @@ sidebar_label: showTabBarRedDot 显示 tabBar 某一项的右上角的红点 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBarRedDot.html) diff --git a/versioned_docs/version-3.x/apis/ui/window/offWindowResize.md b/versioned_docs/version-3.x/apis/ui/window/offWindowResize.md index 9de94214dc6f..b4d21f87dd48 100644 --- a/versioned_docs/version-3.x/apis/ui/window/offWindowResize.md +++ b/versioned_docs/version-3.x/apis/ui/window/offWindowResize.md @@ -5,7 +5,7 @@ sidebar_label: offWindowResize 取消监听窗口尺寸变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.offWindowResize.html) diff --git a/versioned_docs/version-3.x/apis/ui/window/onWindowResize.md b/versioned_docs/version-3.x/apis/ui/window/onWindowResize.md index 1c1e7a415e33..9fb9cc7dacf6 100644 --- a/versioned_docs/version-3.x/apis/ui/window/onWindowResize.md +++ b/versioned_docs/version-3.x/apis/ui/window/onWindowResize.md @@ -5,7 +5,7 @@ sidebar_label: onWindowResize 监听窗口尺寸变化事件 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.onWindowResize.html) diff --git a/versioned_docs/version-3.x/apis/wxml/IntersectionObserver.md b/versioned_docs/version-3.x/apis/wxml/IntersectionObserver.md index 701a993a3823..18da2ff9af4b 100644 --- a/versioned_docs/version-3.x/apis/wxml/IntersectionObserver.md +++ b/versioned_docs/version-3.x/apis/wxml/IntersectionObserver.md @@ -13,7 +13,7 @@ sidebar_label: IntersectionObserver 停止监听。回调函数将不再触发 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.disconnect.html) @@ -25,7 +25,7 @@ sidebar_label: IntersectionObserver 指定目标节点并开始监听相交状态变化情况 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.observe.html) @@ -42,7 +42,7 @@ sidebar_label: IntersectionObserver 使用选择器指定一个节点,作为参照区域之一。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeTo.html) @@ -59,7 +59,7 @@ sidebar_label: IntersectionObserver 指定页面显示区域作为参照区域之一 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeToViewport.html) @@ -171,9 +171,9 @@ Taro.createIntersectionObserver().relativeToViewport({bottom: 100}).observe('.ta ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| IntersectionObserver.disconnect | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.observe | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.relativeTo | ✔️ | ✔️ | ✔️ | | | -| IntersectionObserver.relativeToViewport | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| IntersectionObserver.disconnect | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.observe | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.relativeTo | ✔️ | ✔️ | ✔️ | | | ✔️ | +| IntersectionObserver.relativeToViewport | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/wxml/NodesRef.md b/versioned_docs/version-3.x/apis/wxml/NodesRef.md index 1bd77dbc1bcf..65ac91f5a6b7 100644 --- a/versioned_docs/version-3.x/apis/wxml/NodesRef.md +++ b/versioned_docs/version-3.x/apis/wxml/NodesRef.md @@ -13,7 +13,7 @@ sidebar_label: NodesRef 添加节点的布局位置的查询请求。相对于显示区域,以像素为单位。其功能类似于 DOM 的 `getBoundingClientRect`。返回 `NodesRef` 对应的 `SelectorQuery`。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.boundingClientRect.html) @@ -63,7 +63,7 @@ Taro.createSelectorQuery().selectAll('.a-class').boundingClientRect(function(rec 添加节点的 Context 对象查询请求。目前支持 [VideoContext](/docs/apis/media/video/VideoContext)、[CanvasContext](/docs/apis/canvas/CanvasContext)、[LivePlayerContext](/docs/apis/media/live/LivePlayerContext)、[EditorContext](/docs/apis/media/editor/EditorContext)和 [MapContext](/docs/apis/media/map/MapContext) 的获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.context.html) @@ -90,7 +90,7 @@ Taro.createSelectorQuery().select('.the-video-class').context(function (res) { **注意** computedStyle 的优先级高于 size,当同时在 computedStyle 里指定了 width/height 和传入了 size: true,则优先返回 computedStyle 获取到的 width/height。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.fields.html) @@ -132,7 +132,7 @@ Taro.createSelectorQuery().select('#the-id').fields({ 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas) 的获取。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.node.html) @@ -156,7 +156,7 @@ Taro.createSelectorQuery().select('.canvas').node(function(res){ 添加节点的滚动位置查询请求。以像素为单位。节点必须是 `scroll-view` 或者 `viewport`,返回 `NodesRef` 对应的 `SelectorQuery`。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.scrollOffset.html) @@ -294,10 +294,10 @@ Taro.createSelectorQuery().selectViewport().scrollOffset(function(res){ ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| NodesRef.boundingClientRect | ✔️ | ✔️ | ✔️ | | | -| NodesRef.context | ✔️ | ✔️ | ✔️ | | | -| NodesRef.fields | ✔️ | ✔️ | ✔️ | | | -| NodesRef.node | ✔️ | ✔️ | ✔️ | | | -| NodesRef.scrollOffset | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| NodesRef.boundingClientRect | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.context | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.fields | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.node | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NodesRef.scrollOffset | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/wxml/SelectorQuery.md b/versioned_docs/version-3.x/apis/wxml/SelectorQuery.md index 5d37e91384af..d7c94ea350d8 100644 --- a/versioned_docs/version-3.x/apis/wxml/SelectorQuery.md +++ b/versioned_docs/version-3.x/apis/wxml/SelectorQuery.md @@ -13,7 +13,7 @@ sidebar_label: SelectorQuery 执行所有的请求。请求结果按请求次序构成数组,在callback的第一个参数中返回。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.exec.html) @@ -29,7 +29,7 @@ sidebar_label: SelectorQuery 将选择器的选取范围更改为自定义组件 `component` 内。(初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点)。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.in.html) @@ -70,7 +70,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.select.html) @@ -116,7 +116,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant - 多选择器的并集:#a-node, .some-other-nodes -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectAll.html) @@ -132,7 +132,7 @@ selector类似于 CSS 的选择器,但仅支持下列语法。 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectViewport.html) @@ -153,10 +153,10 @@ Taro.createSelectorQuery().selectViewport().scrollOffset(function (res) { ## API 支持度 -| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| SelectorQuery.exec | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.in | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.select | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.selectAll | ✔️ | ✔️ | ✔️ | | | -| SelectorQuery.selectViewport | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 抖音小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SelectorQuery.exec | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.in | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.select | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.selectAll | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SelectorQuery.selectViewport | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/apis/wxml/createIntersectionObserver.md b/versioned_docs/version-3.x/apis/wxml/createIntersectionObserver.md index 161a2aab75c2..fa34f33cacdd 100644 --- a/versioned_docs/version-3.x/apis/wxml/createIntersectionObserver.md +++ b/versioned_docs/version-3.x/apis/wxml/createIntersectionObserver.md @@ -5,7 +5,7 @@ sidebar_label: createIntersectionObserver 创建并返回一个 IntersectionObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createIntersectionObserver([options])` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/wx.createIntersectionObserver.html) diff --git a/versioned_docs/version-3.x/apis/wxml/createMediaQueryObserver.md b/versioned_docs/version-3.x/apis/wxml/createMediaQueryObserver.md index 7a28cd60d33d..a883ddff6ea1 100644 --- a/versioned_docs/version-3.x/apis/wxml/createMediaQueryObserver.md +++ b/versioned_docs/version-3.x/apis/wxml/createMediaQueryObserver.md @@ -5,7 +5,7 @@ sidebar_label: createMediaQueryObserver 创建并返回一个 MediaQueryObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createMediaQueryObserver()` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html#Media%20Query) diff --git a/versioned_docs/version-3.x/apis/wxml/createSelectorQuery.md b/versioned_docs/version-3.x/apis/wxml/createSelectorQuery.md index a6bf96787494..10d8e9e143d9 100644 --- a/versioned_docs/version-3.x/apis/wxml/createSelectorQuery.md +++ b/versioned_docs/version-3.x/apis/wxml/createSelectorQuery.md @@ -5,7 +5,7 @@ sidebar_label: createSelectorQuery 返回一个 SelectorQuery 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createSelectorQuery()` 来代替。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/api/wxml/wx.createSelectorQuery.html) diff --git a/versioned_docs/version-3.x/components/base/icon.md b/versioned_docs/version-3.x/components/base/icon.md index c3b9f74cb557..2aca96db67e2 100755 --- a/versioned_docs/version-3.x/components/base/icon.md +++ b/versioned_docs/version-3.x/components/base/icon.md @@ -5,7 +5,7 @@ sidebar_label: Icon 图标。组件属性的长度单位默认为 px -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/icon.html) @@ -83,12 +83,12 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| IconProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| IconProps.ariaLabel | | | | | ✔️ | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| IconProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| IconProps.ariaLabel | | | | | ✔️ | | | | | | ### TIconType diff --git a/versioned_docs/version-3.x/components/base/progress.md b/versioned_docs/version-3.x/components/base/progress.md index 1cb18a50d0f8..5c3a46eecd3a 100755 --- a/versioned_docs/version-3.x/components/base/progress.md +++ b/versioned_docs/version-3.x/components/base/progress.md @@ -5,7 +5,7 @@ sidebar_label: Progress 进度条。组件属性的长度单位默认为 px -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/progress.html) @@ -80,18 +80,18 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ProgressProps.percent | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.showInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.borderRadius | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.fontSize | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.strokeWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.color | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| ProgressProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.active | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.activeMode | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ProgressProps.duration | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | -| ProgressProps.ariaLabel | | | | | ✔️ | | | | | -| ProgressProps.onActiveEnd | ✔️ | | | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ProgressProps.percent | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.showInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.borderRadius | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.fontSize | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.strokeWidth | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.color | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.active | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.activeMode | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ProgressProps.duration | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | | ✔️ | +| ProgressProps.ariaLabel | | | | | ✔️ | | | | | | +| ProgressProps.onActiveEnd | ✔️ | | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/components/base/rich-text.md b/versioned_docs/version-3.x/components/base/rich-text.md index 09a3ba44baa3..059b11c96fa3 100755 --- a/versioned_docs/version-3.x/components/base/rich-text.md +++ b/versioned_docs/version-3.x/components/base/rich-text.md @@ -5,7 +5,7 @@ sidebar_label: RichText 富文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html) @@ -104,20 +104,20 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RichTextProps.userSelect | ✔️ | | | | | ✔️ | | | -| RichTextProps.nodes | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | -| RichTextProps.space | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RichTextProps.selectable | | ✔️ | | | | ✔️ | | | -| RichTextProps.imageMenuPrevent | | ✔️ | | | | | | | -| RichTextProps.preview | | ✔️ | | | | | | | -| RichTextProps.onTap | | | ✔️ | | | | | | -| RichTextProps.onTouchstart | | | ✔️ | | | | | | -| RichTextProps.onTouchmove | | | ✔️ | | | | | | -| RichTextProps.onTouchcancel | | | ✔️ | | | | | | -| RichTextProps.onTouchend | | | ✔️ | | | | | | -| RichTextProps.onLongtap | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RichTextProps.userSelect | ✔️ | | | | | ✔️ | | | ✔️ | +| RichTextProps.nodes | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| RichTextProps.space | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RichTextProps.selectable | | ✔️ | | | | ✔️ | | | ✔️ | +| RichTextProps.imageMenuPrevent | | ✔️ | | | | | | | | +| RichTextProps.preview | | ✔️ | | | | | | | | +| RichTextProps.onTap | | | ✔️ | | | | | | | +| RichTextProps.onTouchstart | | | ✔️ | | | | | | | +| RichTextProps.onTouchmove | | | ✔️ | | | | | | | +| RichTextProps.onTouchcancel | | | ✔️ | | | | | | | +| RichTextProps.onTouchend | | | ✔️ | | | | | | | +| RichTextProps.onLongtap | | | ✔️ | | | | | | | ### TSpace diff --git a/versioned_docs/version-3.x/components/base/text.md b/versioned_docs/version-3.x/components/base/text.md index aa590a92f0f2..bdeaa7959323 100755 --- a/versioned_docs/version-3.x/components/base/text.md +++ b/versioned_docs/version-3.x/components/base/text.md @@ -5,7 +5,7 @@ sidebar_label: Text 文本 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/text.html) @@ -119,18 +119,20 @@ export default { | space | `keyof TSpace` | | 否 | 显示连续空格 | | decode | `boolean` | `false` | 否 | 是否解码 | | numberOfLines | `number` | | 否 | 多行省略,值须大于等于 1,表现同 css 的 -webkit-line-clamp 属性一致。 | +| overflow | `keyof Overflow` | `'visible'` | 否 | 文本溢出处理 | | maxLines | `number` | | 否 | 限制文本最大行数 | ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| TextProps.selectable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextProps.userSelect | ✔️ | | | | | | ✔️ | | | -| TextProps.space | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| TextProps.decode | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | (默认解码,不支持设置) | | | -| TextProps.numberOfLines | | | ✔️ | | | | | | | -| TextProps.maxLines | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| TextProps.selectable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextProps.userSelect | ✔️ | | | | | | ✔️ | | | ✔️ | +| TextProps.space | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| TextProps.decode | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | (默认解码,不支持设置) | | | | +| TextProps.numberOfLines | | | ✔️ | | | | | | | | +| TextProps.overflow | | | | | | | | | | | +| TextProps.maxLines | ✔️ | | | | | | | | | | ### TSpace @@ -141,3 +143,12 @@ space 的合法值 | ensp | 中文字符空格一半大小 | | emsp | 中文字符空格大小 | | nbsp | 根据字体设置的空格大小 | + +### Overflow + +| 参数 | 说明 | +| --- | --- | +| clip | 修剪文本 | +| fade | 淡出 | +| ellipsis | 显示省略号 | +| visible | 文本不截断 | diff --git a/versioned_docs/version-3.x/components/canvas/canvas.md b/versioned_docs/version-3.x/components/canvas/canvas.md index 29fa218bb86f..1a83d55ced3f 100755 --- a/versioned_docs/version-3.x/components/canvas/canvas.md +++ b/versioned_docs/version-3.x/components/canvas/canvas.md @@ -7,7 +7,7 @@ sidebar_label: Canvas `` 组件的 RN 版本尚未实现。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html) @@ -72,23 +72,23 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CanvasProps.type | ✔️ | | ✔️ | ✔️ | | | | | | -| CanvasProps.canvasId | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.disableScroll | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| CanvasProps.id | | | ✔️ | | | | ✔️ | | | -| CanvasProps.width | | | ✔️ | | | | ✔️ | | | -| CanvasProps.height | | | ✔️ | | | | ✔️ | | | -| CanvasProps.nativeProps | | | | | | | ✔️ | | | -| CanvasProps.onTouchStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onTouchCancel | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onLongTap | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CanvasProps.onError | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | -| CanvasProps.onTap | | | ✔️ | | | | | | | -| CanvasProps.onReady | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CanvasProps.type | ✔️ | | ✔️ | ✔️ | | | | | | | +| CanvasProps.canvasId | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.disableScroll | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| CanvasProps.id | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.width | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.height | | | ✔️ | | | | ✔️ | | | ✔️ | +| CanvasProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| CanvasProps.onTouchStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onTouchCancel | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onLongTap | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CanvasProps.onError | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | | +| CanvasProps.onTap | | | ✔️ | | | | | | | | +| CanvasProps.onReady | | | ✔️ | | | | | | | | ### onErrorEventDetail diff --git a/versioned_docs/version-3.x/components/forms/button.md b/versioned_docs/version-3.x/components/forms/button.md index 6789b9e99004..c70f2b41d4a1 100755 --- a/versioned_docs/version-3.x/components/forms/button.md +++ b/versioned_docs/version-3.x/components/forms/button.md @@ -5,7 +5,7 @@ sidebar_label: Button 按钮 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) @@ -239,62 +239,62 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ButtonProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.plain | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.loading | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.formType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(支持 hoverStyle 属性,但框架未支持 hoverClass) | | -| ButtonProps.hoverStyle | | | | | | | | ✔️ | | -| ButtonProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ButtonProps.lang | ✔️ | | | | ✔️ | ✔️ | | | | -| ButtonProps.sessionFrom | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessageTitle | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessagePath | ✔️ | ✔️ | | | | | | | | -| ButtonProps.sendMessageImg | ✔️ | ✔️ | | | | | | | | -| ButtonProps.appParameter | ✔️ | | | | ✔️ | ✔️ | | | | -| ButtonProps.scope | | | ✔️ | | | | | | | -| ButtonProps.showMessageCard | ✔️ | ✔️ | | | | | | | | -| ButtonProps.publicId | | | ✔️ | | ✔️ | | | | | -| ButtonProps.templateId | | ✔️ | | | | | | | | -| ButtonProps.subscribeId | | ✔️ | | | | | | | | -| ButtonProps.groupId | | | | ✔️(通过创建聊天群、查询群信息获取) | ✔️(打开群资料卡时,传递的群号) | | | | | -| ButtonProps.guildId | | | | | ✔️ | | | | | -| ButtonProps.shareType | | | | | ✔️ | | | | | -| ButtonProps.shareMode | | | | | ✔️ | | | | | -| ButtonProps.ariaLabel | | | | | ✔️ | | | | | -| ButtonProps.openId | | | | | ✔️ | | | | | -| ButtonProps.shareMessageFriendInfo | | | | | ✔️ | | | | | -| ButtonProps.shareMessageTitle | | | | | ✔️ | | | | | -| ButtonProps.shareMessageImg | | | | | ✔️ | | | | | -| ButtonProps.dataAwemeId | | | | ✔️ | | | | | | -| ButtonProps.dataIsHalfPage | | | | ✔️ | | | | | | -| ButtonProps.onGetUserInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | -| ButtonProps.onGetAuthorize | | | ✔️ | | | | | | | -| ButtonProps.onContact | ✔️ | ✔️ | | | ✔️ | | | | | -| ButtonProps.onGetPhoneNumber | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | | -| ButtonProps.onGetRealTimePhoneNumber | ✔️ | | | | | | | | | -| ButtonProps.onError | ✔️ | | ✔️ | | ✔️ | ✔️ | | | | -| ButtonProps.onOpenSetting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| ButtonProps.onLaunchApp | ✔️ | | | | ✔️ | | | | | -| ButtonProps.onChooseAvatar | ✔️ | | | | | | | | | -| ButtonProps.onAgreePrivacyAuthorization | ✔️ | | | | | | | | | -| ButtonProps.onTap | | | ✔️ | | | | | | | -| ButtonProps.onFollowLifestyle | | | ✔️ | | | | | | | -| ButtonProps.onChooseAddress | | ✔️ | | | | | | | | -| ButtonProps.onChooseInvoiceTitle | | ✔️ | | | | | | | | -| ButtonProps.onLogin | | ✔️ | | | | | | | | -| ButtonProps.onSubscribe | | ✔️ | | | | | | | | -| ButtonProps.onAddFriend | | | | | ✔️ | | | | | -| ButtonProps.onAddGroupApp | | | | | ✔️ | | | | | -| ButtonProps.onOpenAwemeUserProfile | | | | ✔️ | | | | | | -| ButtonProps.onJoinGroup | | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ButtonProps.size | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.plain | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.loading | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.formType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(支持 hoverStyle 属性,但框架未支持 hoverClass) | | ✔️ | +| ButtonProps.hoverStyle | | | | | | | | ✔️ | | | +| ButtonProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ButtonProps.lang | ✔️ | | | | ✔️ | ✔️ | | | | | +| ButtonProps.sessionFrom | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessageTitle | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessagePath | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.sendMessageImg | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.appParameter | ✔️ | | | | ✔️ | ✔️ | | | | | +| ButtonProps.scope | | | ✔️ | | | | | | | | +| ButtonProps.showMessageCard | ✔️ | ✔️ | | | | | | | | | +| ButtonProps.publicId | | | ✔️ | | ✔️ | | | | | | +| ButtonProps.templateId | | ✔️ | | | | | | | | | +| ButtonProps.subscribeId | | ✔️ | | | | | | | | | +| ButtonProps.groupId | | | | ✔️(通过创建聊天群、查询群信息获取) | ✔️(打开群资料卡时,传递的群号) | | | | | | +| ButtonProps.guildId | | | | | ✔️ | | | | | | +| ButtonProps.shareType | | | | | ✔️ | | | | | | +| ButtonProps.shareMode | | | | | ✔️ | | | | | | +| ButtonProps.ariaLabel | | | | | ✔️ | | | | | | +| ButtonProps.openId | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageFriendInfo | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageTitle | | | | | ✔️ | | | | | | +| ButtonProps.shareMessageImg | | | | | ✔️ | | | | | | +| ButtonProps.dataAwemeId | | | | ✔️ | | | | | | | +| ButtonProps.dataIsHalfPage | | | | ✔️ | | | | | | | +| ButtonProps.onGetUserInfo | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | | | | +| ButtonProps.onGetAuthorize | | | ✔️ | | | | | | | | +| ButtonProps.onContact | ✔️ | ✔️ | | | ✔️ | | | | | | +| ButtonProps.onGetPhoneNumber | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | | | +| ButtonProps.onGetRealTimePhoneNumber | ✔️ | | | | | | | | | | +| ButtonProps.onError | ✔️ | | ✔️ | | ✔️ | ✔️ | | | | | +| ButtonProps.onOpenSetting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| ButtonProps.onLaunchApp | ✔️ | | | | ✔️ | | | | | | +| ButtonProps.onChooseAvatar | ✔️ | | | | | | | | | | +| ButtonProps.onAgreePrivacyAuthorization | ✔️ | | | | | | | | | | +| ButtonProps.onTap | | | ✔️ | | | | | | | | +| ButtonProps.onFollowLifestyle | | | ✔️ | | | | | | | | +| ButtonProps.onChooseAddress | | ✔️ | | | | | | | | | +| ButtonProps.onChooseInvoiceTitle | | ✔️ | | | | | | | | | +| ButtonProps.onLogin | | ✔️ | | | | | | | | | +| ButtonProps.onSubscribe | | ✔️ | | | | | | | | | +| ButtonProps.onAddFriend | | | | | ✔️ | | | | | | +| ButtonProps.onAddGroupApp | | | | | ✔️ | | | | | | +| ButtonProps.onOpenAwemeUserProfile | | | | ✔️ | | | | | | | +| ButtonProps.onJoinGroup | | | | ✔️ | | | | | | | ### Size diff --git a/versioned_docs/version-3.x/components/forms/checkbox-group.md b/versioned_docs/version-3.x/components/forms/checkbox-group.md index d63e6f9bce90..d3c5a27f55f2 100644 --- a/versioned_docs/version-3.x/components/forms/checkbox-group.md +++ b/versioned_docs/version-3.x/components/forms/checkbox-group.md @@ -5,7 +5,7 @@ sidebar_label: CheckboxGroup 多项选择器,内部由多个checkbox组成 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/checkbox-group.html) @@ -86,7 +86,7 @@ export default class PageCheckbox extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CheckboxGroupProps.name | | | ✔️ | ✔️ | | | ✔️ | | | -| CheckboxGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CheckboxGroupProps.name | | | ✔️ | ✔️ | | | ✔️ | | | ✔️ | +| CheckboxGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | diff --git a/versioned_docs/version-3.x/components/forms/checkbox.md b/versioned_docs/version-3.x/components/forms/checkbox.md index 2d7014adc70f..4a525b4d334b 100755 --- a/versioned_docs/version-3.x/components/forms/checkbox.md +++ b/versioned_docs/version-3.x/components/forms/checkbox.md @@ -5,7 +5,7 @@ sidebar_label: Checkbox 多选项目 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html) @@ -164,13 +164,13 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CheckboxProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| CheckboxProps.name | | | | | | | ✔️ | | ✔️ | -| CheckboxProps.nativeProps | | | | | | | ✔️ | | | -| CheckboxProps.ariaLabel | | | | | ✔️ | | | | | -| CheckboxProps.onChange | | | ✔️ | | | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CheckboxProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| CheckboxProps.name | | | | | | | ✔️ | | ✔️ | ✔️ | +| CheckboxProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| CheckboxProps.ariaLabel | | | | | ✔️ | | | | | | +| CheckboxProps.onChange | | | ✔️ | | | | ✔️ | ✔️ | | ✔️ | diff --git a/versioned_docs/version-3.x/components/forms/form.md b/versioned_docs/version-3.x/components/forms/form.md index 4da26219ea6b..f6ee840fda65 100755 --- a/versioned_docs/version-3.x/components/forms/form.md +++ b/versioned_docs/version-3.x/components/forms/form.md @@ -7,7 +7,7 @@ sidebar_label: Form 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/form.html) @@ -102,17 +102,17 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| FormProps.reportSubmit | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| FormProps.reportSubmitTimeout | ✔️ | | | | | | | | | -| FormProps.reportType | | ✔️ | | | | | | | | -| FormProps.templateId | | ✔️ | | | | | | | | -| FormProps.subscribeId | | ✔️ | | | | | | | | -| FormProps.conversionTarget | | | | ✔️ | | | | | | -| FormProps.clueComponentId | | | | ✔️ | | | | | | -| FormProps.onSubmit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| FormProps.onReset | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| FormProps.reportSubmit | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| FormProps.reportSubmitTimeout | ✔️ | | | | | | | | | | +| FormProps.reportType | | ✔️ | | | | | | | | | +| FormProps.templateId | | ✔️ | | | | | | | | | +| FormProps.subscribeId | | ✔️ | | | | | | | | | +| FormProps.conversionTarget | | | | ✔️ | | | | | | | +| FormProps.clueComponentId | | | | ✔️ | | | | | | | +| FormProps.onSubmit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| FormProps.onReset | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onSubmitEventDetail diff --git a/versioned_docs/version-3.x/components/forms/input.md b/versioned_docs/version-3.x/components/forms/input.md index 5f5cd9dcceb9..435d2da11a79 100755 --- a/versioned_docs/version-3.x/components/forms/input.md +++ b/versioned_docs/version-3.x/components/forms/input.md @@ -5,7 +5,7 @@ sidebar_label: Input 输入框。该组件是原生组件,使用时请注意相关限制 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) @@ -81,6 +81,7 @@ class App extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | value | `string` | | 否 | 输入框的初始内容 | +| defaultValue | `string` | | 否 | 设置 React 非受控输入框的初始内容 | | type | `keyof Type` | `"text"` | 否 | input 的类型 | | password | `boolean` | `false` | 否 | 是否是密码类型 | | placeholder | `string` | | 否 | 输入框为空时占位符 | @@ -122,47 +123,48 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| InputProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.password | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| InputProps.placeholderTextColor | | | | | | | | ✔️ | | -| InputProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| InputProps.autoFocus | ✔️ | | | | ✔️ | ✔️ | ✔️ | | | -| InputProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.confirmType | ✔️ | ✔️ | ✔️(confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system) | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.confirmHold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| InputProps.cursor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.selectionStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.selectionEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| InputProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| InputProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | -| InputProps.alwaysEmbed | ✔️ | | | | | | | | | -| InputProps.safePasswordCertPath | ✔️ | | | | | | | | | -| InputProps.safePasswordLength | ✔️ | | | | | | | | | -| InputProps.safePasswordTimeStamp | ✔️ | | | | | | | | | -| InputProps.safePasswordNonce | ✔️ | | | | | | | | | -| InputProps.safePasswordSalt | ✔️ | | | | | | | | | -| InputProps.safePasswordCustomHash | ✔️ | | | | | | | | | -| InputProps.randomNumber | | | ✔️ | | | | | | | -| InputProps.controlled | | | ✔️ | | | | | | | -| InputProps.nativeProps | | | | | | | ✔️ | | | -| InputProps.name | | | ✔️ | | | | | | | -| InputProps.alwaysSystem | | | ✔️ | | | | | | | -| InputProps.ariaLabel | | | | | ✔️ | | | | | -| InputProps.clueType | | | | ✔️ | | | | | | -| InputProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| InputProps.onKeyboardHeightChange | ✔️ | | | ✔️ | ✔️ | | | | | -| InputProps.onNickNameReview | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| InputProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.type | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.password | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.placeholderTextColor | | | | | | | | ✔️ | | | +| InputProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.autoFocus | ✔️ | | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| InputProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.confirmType | ✔️ | ✔️ | ✔️(confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system) | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.confirmHold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.cursor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.selectionStart | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.selectionEnd | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| InputProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| InputProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | | +| InputProps.alwaysEmbed | ✔️ | | | | | | | | | | +| InputProps.safePasswordCertPath | ✔️ | | | | | | | | | | +| InputProps.safePasswordLength | ✔️ | | | | | | | | | | +| InputProps.safePasswordTimeStamp | ✔️ | | | | | | | | | | +| InputProps.safePasswordNonce | ✔️ | | | | | | | | | | +| InputProps.safePasswordSalt | ✔️ | | | | | | | | | | +| InputProps.safePasswordCustomHash | ✔️ | | | | | | | | | | +| InputProps.randomNumber | | | ✔️ | | | | | | | | +| InputProps.controlled | | | ✔️ | | | | | | | | +| InputProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| InputProps.name | | | ✔️ | | | | | | | | +| InputProps.alwaysSystem | | | ✔️ | | | | | | | | +| InputProps.ariaLabel | | | | | ✔️ | | | | | | +| InputProps.clueType | | | | ✔️ | | | | | | | +| InputProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| InputProps.onKeyboardHeightChange | ✔️ | | | ✔️ | ✔️ | | | | | | +| InputProps.onNickNameReview | ✔️ | | | | | | | | | | ### Type @@ -182,17 +184,17 @@ Input 类型 #### API 支持度 -| API | 微信小程序 | 支付宝小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | -| Type.text | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.number | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.idcard | ✔️ | ✔️ | | ✔️ | | -| Type.digit | ✔️ | ✔️ | ✔️ | ✔️ | | -| Type.safe-password | ✔️ | ✔️ | | | | -| Type.nickname | ✔️ | ✔️ | | | | -| Type.numberpad | | ✔️ | | | | -| Type.digitpad | | ✔️ | | | | -| Type.idcardpad | | ✔️ | | | | +| API | 微信小程序 | 支付宝小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| Type.text | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.number | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.idcard | ✔️ | ✔️ | | ✔️ | | | +| Type.digit | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| Type.safe-password | ✔️ | ✔️ | | | | | +| Type.nickname | ✔️ | ✔️ | | | | | +| Type.numberpad | | ✔️ | | | | | +| Type.digitpad | | ✔️ | | | | | +| Type.idcardpad | | ✔️ | | | | | ### ConfirmType diff --git a/versioned_docs/version-3.x/components/forms/label.md b/versioned_docs/version-3.x/components/forms/label.md index bd4bdf06921c..12cb47d95d7b 100755 --- a/versioned_docs/version-3.x/components/forms/label.md +++ b/versioned_docs/version-3.x/components/forms/label.md @@ -7,7 +7,7 @@ sidebar_label: Label 使用for属性找到对应的id,或者将控件放在该标签下,当点击时,就会触发对应的控件。 for优先级高于内部控件,内部有多个控件的时候默认触发第一个控件。 目前可以绑定的控件有:button, checkbox, radio, switch。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/label.html) @@ -75,6 +75,6 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| LabelProps.for | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| LabelProps.for | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/components/forms/picker-view-column.md b/versioned_docs/version-3.x/components/forms/picker-view-column.md index 550087023b20..22f5a47cd8f5 100644 --- a/versioned_docs/version-3.x/components/forms/picker-view-column.md +++ b/versioned_docs/version-3.x/components/forms/picker-view-column.md @@ -6,7 +6,7 @@ sidebar_label: PickerViewColumn 滚动选择器子项 仅可放置于 `` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html) diff --git a/versioned_docs/version-3.x/components/forms/picker-view.md b/versioned_docs/version-3.x/components/forms/picker-view.md index f075532399ad..2351b3e29472 100755 --- a/versioned_docs/version-3.x/components/forms/picker-view.md +++ b/versioned_docs/version-3.x/components/forms/picker-view.md @@ -6,7 +6,7 @@ sidebar_label: PickerView 嵌入页面的滚动选择器 其中只可放置 picker-view-column 组件,其它节点不会显示 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html) @@ -167,6 +167,7 @@ export default class Picks extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | value | `number[]` | | 否 | 数组中的数字依次表示 picker-view 内的 picker-view-column 选择的第几项(下标从 0 开始),数字大于 picker-view-column 可选项长度时,选择最后一项。 | +| defaultValue | `number[]` | | 否 | 设置 React 非受控状态下的初始取值 | | indicatorStyle | `string` | | 否 | 设置选择器中间选中框的样式 | | indicatorClass | `string` | | 否 | 设置选择器中间选中框的类名 | | maskStyle | `string` | | 否 | 设置蒙层的样式 | @@ -183,6 +184,7 @@ export default class Picks extends Component { | API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | PickerViewProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | +| PickerViewProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | PickerViewProps.indicatorStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | PickerViewProps.indicatorClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | PickerViewProps.maskStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/forms/picker.md b/versioned_docs/version-3.x/components/forms/picker.md index 686eeec978bb..c58f395b0ea0 100755 --- a/versioned_docs/version-3.x/components/forms/picker.md +++ b/versioned_docs/version-3.x/components/forms/picker.md @@ -5,7 +5,7 @@ sidebar_label: Picker 从底部弹起的滚动选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/picker.html) @@ -166,17 +166,19 @@ export default class PagePicker extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | +| headerText | `string` | | 否 | 选择器的标题,微信小程序中仅安卓可用 | | mode | `keyof Mode` | `"selector"` | 否 | 选择器类型,默认是普通选择器 | | disabled | `boolean` | `false` | 否 | 是否禁用 | | onCancel | `CommonEventFunction` | | 否 | 取消选择或点遮罩层收起 picker 时触发 | ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerStandardProps.mode | ✔️ | ✔️ | ✔️ | | -| PickerStandardProps.disabled | ✔️ | ✔️ | ✔️ | | -| PickerStandardProps.onCancel | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerStandardProps.headerText | ✔️ | | | | | +| PickerStandardProps.mode | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerStandardProps.disabled | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerStandardProps.onCancel | ✔️ | ✔️ | ✔️ | | ✔️ | ### Mode @@ -207,22 +209,24 @@ export default class PagePicker extends Component { | range | string[] or number[] or Record[] | `[]` | 是 | mode为 selector 或 multiSelector 时,range 有效 | | rangeKey | `string` | | 否 | 当 range 是一个 Object Array 时,通过 rangeKey 来指定 Object 中 key 的值作为选择器显示内容 | | value | `number` | `0` | 否 | 表示选择了 range 中的第几个(下标从 0 开始) | +| defaultValue | `number` | | 否 | 设置 React 非受控状态下的初始取值 | | itemStyle | `StyleProp` | `{}` | 否 | mode为 selector 或 multiSelector 时 itemStyle 有效 | | indicatorStyle | `StyleProp` | `{}` | 否 | mode为 selector 或 multiSelector 时 indicatorStyle 有效 | -| onChange | `CommonEventFunction` | | 是 | value 改变时触发 change 事件 | +| onChange | `CommonEventFunction` | | 否 | value 改变时触发 change 事件 | | textProps | `PickerText` | | 否 | 用于替换组件内部文本 | ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerSelectorProps.range | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.value | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.itemStyle | | | ✔️ | | -| PickerSelectorProps.indicatorStyle | | | ✔️ | | -| PickerSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | -| PickerSelectorProps.textProps | | ✔️ | | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerSelectorProps.range | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.defaultValue | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.itemStyle | | | ✔️ | | | +| PickerSelectorProps.indicatorStyle | | | ✔️ | | | +| PickerSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerSelectorProps.textProps | | ✔️ | | | ✔️ | ### ChangeEventDetail @@ -247,15 +251,15 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerMultiSelectorProps.range | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.value | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.itemStyle | | | ✔️ | | -| PickerMultiSelectorProps.indicatorStyle | | | ✔️ | | -| PickerMultiSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | -| PickerMultiSelectorProps.onColumnChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerMultiSelectorProps.range | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.rangeKey | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.itemStyle | | | ✔️ | | | +| PickerMultiSelectorProps.indicatorStyle | | | ✔️ | | | +| PickerMultiSelectorProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerMultiSelectorProps.onColumnChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail @@ -277,19 +281,21 @@ export default class PagePicker extends Component { | 参数 | 类型 | 必填 | 说明 | | --- | --- | :---: | --- | | mode | `"time"` | 是 | 选择器类型 | -| value | `string` | 是 | value 的值表示选择了 range 中的第几个(下标从 0 开始) | +| value | `string` | 否 | value 的值表示选择了 range 中的第几个(下标从 0 开始) | +| defaultValue | `string` | 否 | 设置 React 非受控状态下的初始取值 | | start | `string` | 否 | 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的开始,字符串格式为"hh:mm" | | end | `string` | 否 | 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的结束,字符串格式为"hh:mm" | | onChange | `CommonEventFunction` | 是 | value 改变时触发 change 事件 | ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerTimeProps.value | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.start | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.end | ✔️ | ✔️ | ✔️ | | -| PickerTimeProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerTimeProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerTimeProps.start | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.end | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerTimeProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail @@ -305,6 +311,7 @@ export default class PagePicker extends Component { | --- | --- | :---: | :---: | --- | | mode | `"date"` | | 是 | 选择器类型 | | value | `string` | `0` | 是 | 表示选中的日期,格式为"YYYY-MM-DD" | +| defaultValue | `string` | | 否 | 设置 React 非受控状态下的初始取值 | | start | `string` | | 否 | 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的开始,字符串格式为"YYYY-MM-DD" | | end | `string` | | 否 | 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的结束,字符串格式为"YYYY-MM-DD" | | fields | `keyof Fields` | `"day"` | 否 | 有效值 year, month, day,表示选择器的粒度 | @@ -312,13 +319,14 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerDateProps.value | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.start | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.end | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.fields | ✔️ | ✔️ | ✔️ | | -| PickerDateProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerDateProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerDateProps.start | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.end | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.fields | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerDateProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### Fields @@ -342,6 +350,7 @@ export default class PagePicker extends Component { | --- | --- | :---: | :---: | --- | | mode | `"region"` | | 是 | 选择器类型 | | value | `string[]` | `[]` | 否 | 表示选中的省市区,默认选中每一列的第一个值 | +| defaultValue | `string[]` | | 否 | 设置 React 非受控状态下的初始取值 | | customItem | `string` | | 否 | 可为每一列的顶部添加一个自定义的项 | | level | `keyof Level` | `"region"` | 否 | 选择器层级 | | regionData | `RegionData[]` | | 否 | 自定义省市区数据 | @@ -349,13 +358,14 @@ export default class PagePicker extends Component { ### API 支持度 -| API | 微信小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | -| PickerRegionProps.value | ✔️ | ✔️ | ✔️ | | -| PickerRegionProps.customItem | ✔️ | ✔️ | ✔️ | | -| PickerRegionProps.level | ✔️ | | | | -| PickerRegionProps.regionData | | | ✔️ | | -| PickerRegionProps.onChange | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | +| PickerRegionProps.value | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerRegionProps.defaultValue | ✔️ | ✔️ | ✔️ | | | +| PickerRegionProps.customItem | ✔️ | ✔️ | ✔️ | | ✔️ | +| PickerRegionProps.level | ✔️ | | | | | +| PickerRegionProps.regionData | | | ✔️ | | | +| PickerRegionProps.onChange | ✔️ | ✔️ | ✔️ | | ✔️ | ### ChangeEventDetail diff --git a/versioned_docs/version-3.x/components/forms/radio-group.md b/versioned_docs/version-3.x/components/forms/radio-group.md index 26bd2c1f8756..53f012488896 100644 --- a/versioned_docs/version-3.x/components/forms/radio-group.md +++ b/versioned_docs/version-3.x/components/forms/radio-group.md @@ -5,7 +5,7 @@ sidebar_label: RadioGroup 单项选择器,内部由多个 Radio 组成。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html) @@ -24,10 +24,10 @@ ComponentType ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RadioGroupProps.name | | | ✔️ | ✔️ | | | | | | -| RadioGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RadioGroupProps.name | | | ✔️ | ✔️ | | | | | | | +| RadioGroupProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | ### onChangeEventDetail diff --git a/versioned_docs/version-3.x/components/forms/radio.md b/versioned_docs/version-3.x/components/forms/radio.md index bbea30556916..867a478c85a5 100755 --- a/versioned_docs/version-3.x/components/forms/radio.md +++ b/versioned_docs/version-3.x/components/forms/radio.md @@ -5,7 +5,7 @@ sidebar_label: Radio 单选项目 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/radio.html) @@ -183,13 +183,13 @@ export default { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| RadioProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| RadioProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | -| RadioProps.name | | | | | | | ✔️ | | ✔️ | -| RadioProps.nativeProps | | | | | | | ✔️ | | | -| RadioProps.ariaLabel | | | | | ✔️ | | | | | -| RadioProps.onChange | | | | | | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| RadioProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| RadioProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| RadioProps.name | | | | | | | ✔️ | | ✔️ | ✔️ | +| RadioProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| RadioProps.ariaLabel | | | | | ✔️ | | | | | | +| RadioProps.onChange | | | | | | | ✔️ | ✔️ | | ✔️ | diff --git a/versioned_docs/version-3.x/components/forms/slider.md b/versioned_docs/version-3.x/components/forms/slider.md index 87a331e82760..563a89a4144c 100755 --- a/versioned_docs/version-3.x/components/forms/slider.md +++ b/versioned_docs/version-3.x/components/forms/slider.md @@ -5,7 +5,7 @@ sidebar_label: Slider 滑动选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/slider.html) @@ -73,6 +73,7 @@ export default class PageView extends Component { | step | `number` | `1` | 否 | 步长,取值必须大于 0,并且可被(max - min)整除 | | disabled | `boolean` | `false` | 否 | 是否禁用 | | value | `number` | `0` | 否 | 当前取值 | +| defaultValue | `string` | | 否 | 设置 React 非受控状态下的初始取值 | | color | `string` | `"#e9e9e9"` | 否 | 背景条的颜色(请使用 backgroundColor) | | selectedColor | `string` | `"#1aad19"` | 否 | 已选择的颜色(请使用 activeColor) | | activeColor | `string` | `"#1aad19"` | 否 | 已选择的颜色 | @@ -90,26 +91,27 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SliderProps.min | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.max | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.step | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.color | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | -| SliderProps.selectedColor | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | -| SliderProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.blockSize | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SliderProps.blockColor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.showValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.name | | | ✔️ | | | | | | | -| SliderProps.trackSize | | | ✔️ | | | | | | | -| SliderProps.handleSize | | | ✔️ | | | | | | | -| SliderProps.handleColor | | | ✔️ | | | | | | | -| SliderProps.ariaLabel | | | | | ✔️ | | | | | -| SliderProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SliderProps.onChanging | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SliderProps.min | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.max | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.step | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.color | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | | +| SliderProps.selectedColor | ✔️ | | | ✔️ | ✔️ | ✔️ | | | | | +| SliderProps.activeColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.blockSize | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SliderProps.blockColor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.showValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.name | | | ✔️ | | | | | | | | +| SliderProps.trackSize | | | ✔️ | | | | | | | | +| SliderProps.handleSize | | | ✔️ | | | | | | | | +| SliderProps.handleColor | | | ✔️ | | | | | | | | +| SliderProps.ariaLabel | | | | | ✔️ | | | | | | +| SliderProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SliderProps.onChanging | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onChangeEventDetail diff --git a/versioned_docs/version-3.x/components/forms/switch.md b/versioned_docs/version-3.x/components/forms/switch.md index ba061cdc3242..e2c92947017d 100755 --- a/versioned_docs/version-3.x/components/forms/switch.md +++ b/versioned_docs/version-3.x/components/forms/switch.md @@ -5,7 +5,7 @@ sidebar_label: Switch 开关选择器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/switch.html) @@ -69,6 +69,7 @@ export default class PageView extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | checked | `boolean` | `false` | 否 | 是否选中 | +| defaultChecked | `boolean` | | 否 | 设置在 React 非受控状态下,当前是否选中 | | disabled | `boolean` | `false` | 否 | 是否禁用 | | type | "switch" or "checkbox" | `"switch"` | 否 | 样式,有效值:switch, checkbox | | color | `string` | `"#04BE02"` | 否 | switch 的颜色,同 css 的 color | @@ -80,17 +81,18 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwitchProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| SwitchProps.type | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwitchProps.nativeProps | | | | | | | ✔️ | | | -| SwitchProps.name | | | ✔️ | | | | | | | -| SwitchProps.controlled | | | ✔️ | | | | | | | -| SwitchProps.ariaLabel | | | | | ✔️ | | | | | -| SwitchProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwitchProps.checked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.defaultChecked | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| SwitchProps.type | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwitchProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| SwitchProps.name | | | ✔️ | | | | | | | | +| SwitchProps.controlled | | | ✔️ | | | | | | | | +| SwitchProps.ariaLabel | | | | | ✔️ | | | | | | +| SwitchProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | ### onChangeEventDetail diff --git a/versioned_docs/version-3.x/components/forms/textarea.md b/versioned_docs/version-3.x/components/forms/textarea.md index 6d8e5702c6cf..e080e2a4b7a7 100755 --- a/versioned_docs/version-3.x/components/forms/textarea.md +++ b/versioned_docs/version-3.x/components/forms/textarea.md @@ -5,7 +5,7 @@ sidebar_label: Textarea 多行输入框。该组件是原生组件,使用时请注意相关限制 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/textarea.html) @@ -65,6 +65,7 @@ export default class PageView extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | value | `string` | | 否 | 输入框的内容 | +| defaultValue | `string` | | 否 | 设置 React 非受控输入框的初始内容 | | placeholder | `string` | | 否 | 输入框为空时占位符 | | placeholderStyle | `string` | | 否 | 指定 placeholder 的样式 | | placeholderClass | `string` | `"textarea-placeholder"` | 否 | 指定 placeholder 的样式类 | @@ -99,40 +100,41 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| TextareaProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.autoFocus | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | -| TextareaProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.autoHeight | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.fixed | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | -| TextareaProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.cursor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.showConfirmBar | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.selectionStart | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.selectionEnd | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| TextareaProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | -| TextareaProps.disableDefaultPadding | ✔️ | | | ✔️ | | | | | | -| TextareaProps.nativeProps | | | | | | | ✔️ | | | -| TextareaProps.confirmType | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | -| TextareaProps.confirmHold | ✔️ | ✔️ | | ✔️ | | | | | | -| TextareaProps.name | | | ✔️ | | | | | | | -| TextareaProps.showCount | | | ✔️ | | | | | | | -| TextareaProps.controlled | | | ✔️ | | | | | | | -| TextareaProps.ariaLabel | | | | | ✔️ | | | | | -| TextareaProps.adjustKeyboardTo | ✔️ | | | | | | | | | -| TextareaProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onLineChange | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | -| TextareaProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| TextareaProps.onKeyboardHeightChange | ✔️ | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| TextareaProps.value | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.defaultValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.placeholder | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.placeholderStyle | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.placeholderClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.maxlength | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.autoFocus | ✔️ | ✔️ | | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| TextareaProps.focus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.autoHeight | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.fixed | ✔️ | ✔️ | | | ✔️ | ✔️ | | | | | +| TextareaProps.cursorSpacing | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.cursor | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.showConfirmBar | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.selectionStart | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.selectionEnd | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.adjustPosition | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| TextareaProps.holdKeyboard | ✔️ | | | ✔️ | | | | | | | +| TextareaProps.disableDefaultPadding | ✔️ | | | ✔️ | | | | | | | +| TextareaProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| TextareaProps.confirmType | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | | +| TextareaProps.confirmHold | ✔️ | ✔️ | | ✔️ | | | | | | | +| TextareaProps.name | | | ✔️ | | | | | | | | +| TextareaProps.showCount | | | ✔️ | | | | | | | | +| TextareaProps.controlled | | | ✔️ | | | | | | | | +| TextareaProps.ariaLabel | | | | | ✔️ | | | | | | +| TextareaProps.adjustKeyboardTo | ✔️ | | | | | | | | | | +| TextareaProps.onFocus | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onBlur | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onLineChange | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | | | +| TextareaProps.onInput | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onConfirm | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| TextareaProps.onKeyboardHeightChange | ✔️ | | | ✔️ | | | | | | | ### onFocusEventDetail diff --git a/versioned_docs/version-3.x/components/media/audio.md b/versioned_docs/version-3.x/components/media/audio.md index 986a368b79a6..016c39337a62 100755 --- a/versioned_docs/version-3.x/components/media/audio.md +++ b/versioned_docs/version-3.x/components/media/audio.md @@ -5,7 +5,7 @@ sidebar_label: Audio 音频。1.6.0版本开始,该组件不再维护。建议使用能力更强的 Taro.createInnerAudioContext 接口 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/audio.html) @@ -90,22 +90,22 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| AudioProps.id | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.src | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.muted | | | | ✔️ | | | -| AudioProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.poster | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.name | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.author | ✔️ | ✔️ | ✔️ | | | | -| AudioProps.nativeProps | | | | ✔️ | | | -| AudioProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | | | -| AudioProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| AudioProps.id | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.src | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.muted | | | | ✔️ | | | ✔️ | +| AudioProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.poster | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.name | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.author | ✔️ | ✔️ | ✔️ | | | | | +| AudioProps.nativeProps | | | | ✔️ | | | ✔️ | +| AudioProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| AudioProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | ### onErrorEventDetail diff --git a/versioned_docs/version-3.x/components/media/image.md b/versioned_docs/version-3.x/components/media/image.md index 1749fe19fc86..b3295f6d0154 100755 --- a/versioned_docs/version-3.x/components/media/image.md +++ b/versioned_docs/version-3.x/components/media/image.md @@ -7,7 +7,7 @@ sidebar_label: Image **Note:** 为实现小程序的 `mode` 特性,在 H5 组件中使用一个 `div` 容器来对内部的 `img` 进行展示区域的裁剪,因此请勿使用元素选择器来重置 `img` 的样式! -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/image.html) @@ -95,26 +95,26 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.mode | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(部分支持 scaleToFill, aspectFit, aspectFill, widthFix) | | -| ImageProps.webp | ✔️ | ✔️ | | | | | | | | -| ImageProps.svg | | | | | | | | ✔️ | | -| ImageProps.lazyLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| ImageProps.showMenuByLongpress | ✔️ | | | | | | | | | -| ImageProps.imgProps | | | | | | | ✔️ | | | -| ImageProps.nativeProps | | | | | | | ✔️ | | | -| ImageProps.defaultSource | | | ✔️ | | | | | | | -| ImageProps.imageMenuPrevent | | ✔️ | | | | | | | | -| ImageProps.preview | | ✔️ | | | | | | | | -| ImageProps.originalSrc | | ✔️ | | | | | | | | -| ImageProps.ariaLabel | | | | | ✔️ | | | | | -| ImageProps.fadeIn | ✔️ | | | | | | | | | -| ImageProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.onLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ImageProps.onTap | | | ✔️ | | | | | | | -| ImageProps.catchTap | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.mode | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(部分支持 scaleToFill, aspectFit, aspectFill, widthFix) | | ✔️ | +| ImageProps.webp | ✔️ | ✔️ | | | | | | | | | +| ImageProps.svg | | | | | | | | ✔️ | | | +| ImageProps.lazyLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| ImageProps.showMenuByLongpress | ✔️ | | | | | | | | | | +| ImageProps.imgProps | | | | | | | ✔️ | | | ✔️ | +| ImageProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| ImageProps.defaultSource | | | ✔️ | | | | | | | | +| ImageProps.imageMenuPrevent | | ✔️ | | | | | | | | | +| ImageProps.preview | | ✔️ | | | | | | | | | +| ImageProps.originalSrc | | ✔️ | | | | | | | | | +| ImageProps.ariaLabel | | | | | ✔️ | | | | | | +| ImageProps.fadeIn | ✔️ | | | | | | | | | | +| ImageProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.onLoad | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ImageProps.onTap | | | ✔️ | | | | | | | | +| ImageProps.catchTap | | | ✔️ | | | | | | | | ### Mode diff --git a/versioned_docs/version-3.x/components/media/video.md b/versioned_docs/version-3.x/components/media/video.md index d52b65f7fe49..18eb5077e7ac 100755 --- a/versioned_docs/version-3.x/components/media/video.md +++ b/versioned_docs/version-3.x/components/media/video.md @@ -5,7 +5,7 @@ sidebar_label: Video 视频。相关api:Taro.createVideoContext -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/video.html) @@ -175,106 +175,106 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| VideoProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.duration | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | | -| VideoProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.danmuList | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.danmuBtn | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.enableDanmu | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.muted | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.initialTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.pageGesture | ✔️ | ✔️ | | | ✔️ | | | | | -| VideoProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | -| VideoProps.showProgress | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| VideoProps.showFullscreenBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.showPlayBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.showCenterPlayBtn | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | -| VideoProps.enableProgressGesture | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.objectFit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| VideoProps.poster | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.showMuteBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.title | ✔️ | ✔️ | | | ✔️ | | | | | -| VideoProps.playBtnPosition | ✔️ | | | ✔️ | ✔️ | | | | | -| VideoProps.enablePlayGesture | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.autoPauseIfNavigate | ✔️ | | | | ✔️ | | | | | -| VideoProps.autoPauseIfOpenNative | ✔️ | | | | ✔️ | | | | | -| VideoProps.vslideGesture | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | -| VideoProps.vslideGestureInFullscreen | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | -| VideoProps.adUnitId | ✔️ | | | | | | | | | -| VideoProps.posterForCrawler | ✔️ | | | | | | | | | -| VideoProps.showCastingButton | ✔️ | | | | | | | | | -| VideoProps.pictureInPictureMode | ✔️ | | | | | | | | | -| VideoProps.enableAutoRotation | ✔️ | | | | | | | | | -| VideoProps.showScreenLockButton | ✔️ | | | ✔️ | | | | | | -| VideoProps.showSnapshotButton | ✔️ | | | | | | | | | -| VideoProps.showBackgroundPlaybackButton | ✔️ | | | | | | | | | -| VideoProps.backgroundPoster | ✔️ | | | | | | | | | -| VideoProps.nativeProps | | | | | | | ✔️ | | | -| VideoProps.showBottomProgress | ✔️ | | | | | | | | | -| VideoProps.pictureInPictureShowProgress | ✔️ | | | | | | | | | -| VideoProps.referrerPolicy | ✔️ | | | | | | | | | -| VideoProps.isDrm | ✔️ | | | | | | | | | -| VideoProps.provisionUrl | ✔️ | | | | | | | | | -| VideoProps.certificateUrl | ✔️ | | | | | | | | | -| VideoProps.licenseUrl | ✔️ | | | | | | | | | -| VideoProps.posterSize | | | ✔️ | | | | | | | -| VideoProps.showThinProgressBar | | | ✔️ | | | | | | | -| VideoProps.mobilenetHintType | | | ✔️ | | | ✔️ | | | | -| VideoProps.floatingMode | | | ✔️ | | | | | | | -| VideoProps.showNoWifiTip | | ✔️ | | | | | | | | -| VideoProps.showLockBtn | | ✔️ | | | | | | | | -| VideoProps.showRateBtn | | ✔️ | | | | | | | | -| VideoProps.showVslideBtnInFullscreen | | ✔️ | | | | | | | | -| VideoProps.silentPlay | | ✔️ | | | | | | | | -| VideoProps.preRollUnitId | | | | ✔️ | | | | | | -| VideoProps.postRollUnitId | | | | ✔️ | | | | | | -| VideoProps.showPlaybackRateBtn | | | | ✔️ | | | | | | -| VideoProps.enablePlayInBackground | | | | ✔️ | | | | | | -| VideoProps.signature | | | | ✔️ | | | | | | -| VideoProps.preferredPeakBitRate | ✔️ | | | | | | | | | -| VideoProps.isLive | ✔️ | | | | | | | | | -| VideoProps.definition | | | | ✔️ | | | | | | -| VideoProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onFullscreenChange | | | ✔️ | | | | ✔️ | ✔️ | | -| VideoProps.onWaiting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| VideoProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| VideoProps.onProgress | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | -| VideoProps.onLoadedMetaData | ✔️ | ✔️ | | ✔️ | | ✔️ | | ✔️ | | -| VideoProps.onEnterPictureInPicture | ✔️ | | | | | | | | | -| VideoProps.onLeavePictureInPicture | ✔️ | | | | | | | | | -| VideoProps.onSeekComplete | ✔️ | | | ✔️ | | | | | | -| VideoProps.onFullScreenChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| VideoProps.onControlsToggle | ✔️ | ✔️ | | | | | | | | -| VideoProps.onLoading | | | ✔️ | | | | | | | -| VideoProps.onTap | | | ✔️ | | | | | | | -| VideoProps.onUserAction | | | ✔️ | | | | | | | -| VideoProps.onStop | | | ✔️ | | | | | | | -| VideoProps.onRenderStart | | | ✔️ | | | | | | | -| VideoProps.onAdStart | | | | ✔️ | | | | | | -| VideoProps.onAdEnded | | | | ✔️ | | | | | | -| VideoProps.onAdClose | | | | ✔️ | | | | | | -| VideoProps.onAdError | | | | ✔️ | | | | | | -| VideoProps.onPlayBackRateChange | | | | ✔️ | | | | | | -| VideoProps.onMuteChange | | | | ✔️ | | | | | | -| VideoProps.onControlTap | | | | ✔️ | | | | | | -| VideoProps.onEnterBackground | | | | ✔️ | | | | | | -| VideoProps.onCloseBackground | | | | ✔️ | | | | | | -| VideoProps.onLeaveBackground | | | | ✔️ | | | | | | -| VideoProps.onLoadedData | | | | | | ✔️ | | | | -| VideoProps.onLoadStart | | | | | | ✔️ | | | | -| VideoProps.onSeeked | | | | | | ✔️ | | | | -| VideoProps.onSeeking | | | | | | ✔️ | | | | -| VideoProps.onAdLoad | | | | ✔️ | | | | | | -| VideoProps.onCastingUserSelect | ✔️ | | | | | | | | | -| VideoProps.onCastingStateChange | ✔️ | | | | | | | | | -| VideoProps.onCastingInterrupt | ✔️ | | | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| VideoProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.duration | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | | ✔️ | +| VideoProps.controls | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.danmuList | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.danmuBtn | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.enableDanmu | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.loop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.muted | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.initialTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.pageGesture | ✔️ | ✔️ | | | ✔️ | | | | | | +| VideoProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | +| VideoProps.showProgress | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showFullscreenBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showPlayBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.showCenterPlayBtn | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | ✔️ | | ✔️ | +| VideoProps.enableProgressGesture | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.objectFit | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| VideoProps.poster | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.showMuteBtn | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.title | ✔️ | ✔️ | | | ✔️ | | | | | | +| VideoProps.playBtnPosition | ✔️ | | | ✔️ | ✔️ | | | | | | +| VideoProps.enablePlayGesture | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.autoPauseIfNavigate | ✔️ | | | | ✔️ | | | | | | +| VideoProps.autoPauseIfOpenNative | ✔️ | | | | ✔️ | | | | | | +| VideoProps.vslideGesture | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | ✔️ | +| VideoProps.vslideGestureInFullscreen | ✔️ | ✔️ | | ✔️ | | | ✔️ | | | ✔️ | +| VideoProps.adUnitId | ✔️ | | | | | | | | | | +| VideoProps.posterForCrawler | ✔️ | | | | | | | | | | +| VideoProps.showCastingButton | ✔️ | | | | | | | | | | +| VideoProps.pictureInPictureMode | ✔️ | | | | | | | | | | +| VideoProps.enableAutoRotation | ✔️ | | | | | | | | | | +| VideoProps.showScreenLockButton | ✔️ | | | ✔️ | | | | | | | +| VideoProps.showSnapshotButton | ✔️ | | | | | | | | | | +| VideoProps.showBackgroundPlaybackButton | ✔️ | | | | | | | | | | +| VideoProps.backgroundPoster | ✔️ | | | | | | | | | | +| VideoProps.nativeProps | | | | | | | ✔️ | | | ✔️ | +| VideoProps.showBottomProgress | ✔️ | | | | | | | | | | +| VideoProps.pictureInPictureShowProgress | ✔️ | | | | | | | | | | +| VideoProps.referrerPolicy | ✔️ | | | | | | | | | | +| VideoProps.isDrm | ✔️ | | | | | | | | | | +| VideoProps.provisionUrl | ✔️ | | | | | | | | | | +| VideoProps.certificateUrl | ✔️ | | | | | | | | | | +| VideoProps.licenseUrl | ✔️ | | | | | | | | | | +| VideoProps.posterSize | | | ✔️ | | | | | | | | +| VideoProps.showThinProgressBar | | | ✔️ | | | | | | | | +| VideoProps.mobilenetHintType | | | ✔️ | | | ✔️ | | | | | +| VideoProps.floatingMode | | | ✔️ | | | | | | | | +| VideoProps.showNoWifiTip | | ✔️ | | | | | | | | | +| VideoProps.showLockBtn | | ✔️ | | | | | | | | | +| VideoProps.showRateBtn | | ✔️ | | | | | | | | | +| VideoProps.showVslideBtnInFullscreen | | ✔️ | | | | | | | | | +| VideoProps.silentPlay | | ✔️ | | | | | | | | | +| VideoProps.preRollUnitId | | | | ✔️ | | | | | | | +| VideoProps.postRollUnitId | | | | ✔️ | | | | | | | +| VideoProps.showPlaybackRateBtn | | | | ✔️ | | | | | | | +| VideoProps.enablePlayInBackground | | | | ✔️ | | | | | | | +| VideoProps.signature | | | | ✔️ | | | | | | | +| VideoProps.preferredPeakBitRate | ✔️ | | | | | | | | | | +| VideoProps.isLive | ✔️ | | | | | | | | | | +| VideoProps.definition | | | | ✔️ | | | | | | | +| VideoProps.onPlay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onFullscreenChange | | | ✔️ | | | | ✔️ | ✔️ | | ✔️ | +| VideoProps.onWaiting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| VideoProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| VideoProps.onProgress | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | ✔️ | +| VideoProps.onLoadedMetaData | ✔️ | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | +| VideoProps.onEnterPictureInPicture | ✔️ | | | | | | | | | | +| VideoProps.onLeavePictureInPicture | ✔️ | | | | | | | | | | +| VideoProps.onSeekComplete | ✔️ | | | ✔️ | | | | | | | +| VideoProps.onFullScreenChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| VideoProps.onControlsToggle | ✔️ | ✔️ | | | | | | | | | +| VideoProps.onLoading | | | ✔️ | | | | | | | | +| VideoProps.onTap | | | ✔️ | | | | | | | | +| VideoProps.onUserAction | | | ✔️ | | | | | | | | +| VideoProps.onStop | | | ✔️ | | | | | | | | +| VideoProps.onRenderStart | | | ✔️ | | | | | | | | +| VideoProps.onAdStart | | | | ✔️ | | | | | | | +| VideoProps.onAdEnded | | | | ✔️ | | | | | | | +| VideoProps.onAdClose | | | | ✔️ | | | | | | | +| VideoProps.onAdError | | | | ✔️ | | | | | | | +| VideoProps.onPlayBackRateChange | | | | ✔️ | | | | | | | +| VideoProps.onMuteChange | | | | ✔️ | | | | | | | +| VideoProps.onControlTap | | | | ✔️ | | | | | | | +| VideoProps.onEnterBackground | | | | ✔️ | | | | | | | +| VideoProps.onCloseBackground | | | | ✔️ | | | | | | | +| VideoProps.onLeaveBackground | | | | ✔️ | | | | | | | +| VideoProps.onLoadedData | | | | | | ✔️ | | | | | +| VideoProps.onLoadStart | | | | | | ✔️ | | | | | +| VideoProps.onSeeked | | | | | | ✔️ | | | | | +| VideoProps.onSeeking | | | | | | ✔️ | | | | | +| VideoProps.onAdLoad | | | | ✔️ | | | | | | | +| VideoProps.onCastingUserSelect | ✔️ | | | | | | | | | | +| VideoProps.onCastingStateChange | ✔️ | | | | | | | | | | +| VideoProps.onCastingInterrupt | ✔️ | | | | | | | | | | ### direction diff --git a/versioned_docs/version-3.x/components/navig/navigator.md b/versioned_docs/version-3.x/components/navig/navigator.md index d8556155d79e..067d31853ff2 100755 --- a/versioned_docs/version-3.x/components/navig/navigator.md +++ b/versioned_docs/version-3.x/components/navig/navigator.md @@ -5,7 +5,7 @@ sidebar_label: Navigator 页面链接 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html) @@ -39,25 +39,25 @@ ComponentType ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| NavigatorProps.target | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.url | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.delta | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.appId | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.path | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.extraData | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.version | ✔️ | ✔️ | | | ✔️ | | | | | -| NavigatorProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| NavigatorProps.hoverStopPropagation | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| NavigatorProps.shortLink | ✔️ | | | | | | | | | -| NavigatorProps.ariaLabel | | | | | ✔️ | | | | | -| NavigatorProps.onSuccess | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| NavigatorProps.onFail | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | -| NavigatorProps.onComplete | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| NavigatorProps.target | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.url | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.openType | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.delta | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.appId | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.path | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.extraData | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.version | ✔️ | ✔️ | | | ✔️ | | | | | | +| NavigatorProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| NavigatorProps.hoverStopPropagation | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| NavigatorProps.shortLink | ✔️ | | | | | | | | | | +| NavigatorProps.ariaLabel | | | | | ✔️ | | | | | | +| NavigatorProps.onSuccess | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| NavigatorProps.onFail | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | +| NavigatorProps.onComplete | ✔️ | ✔️ | | | ✔️ | | ✔️ | | | ✔️ | ### Target diff --git a/versioned_docs/version-3.x/components/open/web-view.md b/versioned_docs/version-3.x/components/open/web-view.md index 16a4a89d7d87..18a4e44f8ef2 100755 --- a/versioned_docs/version-3.x/components/open/web-view.md +++ b/versioned_docs/version-3.x/components/open/web-view.md @@ -5,7 +5,7 @@ sidebar_label: WebView web-view 组件是一个可以用来承载网页的容器,会自动铺满整个小程序页面。个人类型与海外类型的小程序暂不支持使用。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html) @@ -61,14 +61,14 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| WebViewProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| WebViewProps.progressbarColor | | | | ✔️ | | | | | | -| WebViewProps.type | | | | ✔️ | | | | | | -| WebViewProps.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| WebViewProps.onLoad | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | -| WebViewProps.onError | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| WebViewProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| WebViewProps.progressbarColor | | | | ✔️ | | | | | | | +| WebViewProps.type | | | | ✔️ | | | | | | | +| WebViewProps.onMessage | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| WebViewProps.onLoad | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | +| WebViewProps.onError | ✔️ | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | ### onMessageEventDetail diff --git a/versioned_docs/version-3.x/components/page-meta.md b/versioned_docs/version-3.x/components/page-meta.md index 0b03e3ae796b..7a6732593785 100644 --- a/versioned_docs/version-3.x/components/page-meta.md +++ b/versioned_docs/version-3.x/components/page-meta.md @@ -110,18 +110,21 @@ function Index () { ### onResizeEventDetail -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| size | `resizeType` | 窗口尺寸 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| deviceOrientation | "portrait" or "landscape" | 否 | 设备方向 | +| size | `resizeType` | 是 | 窗口尺寸 | ### resizeType 窗口尺寸类型 -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| windowWidth | `number` | 窗口宽度 | -| windowHeight | `number` | 窗口高度 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| windowWidth | `number` | 是 | 窗口宽度 | +| windowHeight | `number` | 是 | 窗口高度 | +| screenWidth | `number` | 否 | 屏幕宽度 | +| screenHeight | `number` | 否 | 屏幕高度 | ### onScrollEventDetail diff --git a/versioned_docs/version-3.x/components/skyline/draggable-sheet.md b/versioned_docs/version-3.x/components/skyline/draggable-sheet.md new file mode 100644 index 000000000000..9f507ed21ba6 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/draggable-sheet.md @@ -0,0 +1,39 @@ +--- +title: DraggableSheet +sidebar_label: DraggableSheet +--- + +半屏可拖拽组件 +该组件需配合 DraggableSheetContext 接口使用。 目前仅在 Skyline 渲染引擎下支持。 +页面内拖拽是一种常见的交互效果,开发者可通过手势系统灵活实现。draggable-sheet 组件封装了常见的交互逻辑,实现起来更加简单。 +该组件需结合 scroll-view 使用。scroll-view 组件声明 associative-container 属性后,可与 draggable-sheet 关联起来。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/draggable-sheet.html) + +## 类型 + +```tsx +ComponentType +``` + +## DraggableSheetProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| initialChildSize | `number` | `0.5` | 否 | 初始时占父容器的比例 | +| minChildSize | `number` | `0.25` | 否 | 最小时占父容器的比例 | +| maxChildSize | `number` | `1.0` | 否 | 最大时占父容器的比例 | +| snap | `boolean` | `false` | 否 | 拖拽后是否自动对齐关键点 | +| snapSizes | `any[]` | `[]` | 否 | 拖拽后对齐的关键点,无需包含最小和最大值 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| DraggableSheetProps.initialChildSize | ✔️ | | | | +| DraggableSheetProps.minChildSize | ✔️ | | | | +| DraggableSheetProps.maxChildSize | ✔️ | | | | +| DraggableSheetProps.snap | ✔️ | | | | +| DraggableSheetProps.snapSizes | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/grid-builder.md b/versioned_docs/version-3.x/components/skyline/grid-builder.md new file mode 100644 index 000000000000..e1cf4ece4482 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/grid-builder.md @@ -0,0 +1,46 @@ +--- +title: GridBuilder +sidebar_label: GridBuilder +--- + +网格构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/grid-builder.html) + +## 类型 + +```tsx +ComponentType +``` + +## GridBuilderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| type | "aligned" or "masonry" | `"aligned"

可选值:
- aligned: 每行高度由同一行中最大高度子节点决定
- masonry: 瀑布流,根据子元素高度自动布局` | 是 | 布局方式 | +| list | `any[]` | `[]` | 是 | 需要用于渲染的列表 | +| childCount | `number` | | 否 | 完整列表的长度,如果不传则取 list 的长度作为其值 | +| crossAxisCount | `number` | `2` | 否 | 交叉轴元素数量 | +| maxCrossAxisExtent | `number` | `0` | 否 | 交叉轴元素最大范围 | +| mainAxisGap | `number` | `0` | 否 | 主轴方向间隔 | +| crossAxisGap | `number` | `0` | 否 | 交叉轴方向间隔 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | +| onItemBuild | `CommonEventFunction` | | 否 | 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 | +| onItemDispose | `CommonEventFunction` | | 否 | 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| GridBuilderProps.type | ✔️ | | | | +| GridBuilderProps.list | ✔️ | | | | +| GridBuilderProps.childCount | ✔️ | | | | +| GridBuilderProps.crossAxisCount | ✔️ | | | | +| GridBuilderProps.maxCrossAxisExtent | ✔️ | | | | +| GridBuilderProps.mainAxisGap | ✔️ | | | | +| GridBuilderProps.crossAxisGap | ✔️ | | | | +| GridBuilderProps.padding | ✔️ | | | | +| GridBuilderProps.onItemBuild | ✔️ | | | | +| GridBuilderProps.onItemDispose | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/grid-view.md b/versioned_docs/version-3.x/components/skyline/grid-view.md index c7bd828e55a8..f79298d74f42 100644 --- a/versioned_docs/version-3.x/components/skyline/grid-view.md +++ b/versioned_docs/version-3.x/components/skyline/grid-view.md @@ -19,11 +19,12 @@ ComponentType | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | -| type | `string` | `"aligned"` | 是 | 布局方式。masonry - 瀑布流,根据子元素高度自动布局。 aligned - 每行高度由同一行中最大高度子节点决定。 | +| type | "aligned" or "masonry" | `"aligned"

可选值:
- aligned: 每行高度由同一行中最大高度子节点决定
- masonry: 瀑布流,根据子元素高度自动布局` | 是 | 布局方式 | | crossAxisCount | `number` | `2` | 否 | 交叉轴元素数量 | | mainAxisGap | `number` | `0` | 否 | 主轴方向间隔 | | crossAxisGap | `number` | `0` | 否 | 交叉轴方向间隔 | | maxCrossAxisExtent | `number` | `0` | 否 | 交叉轴元素最大范围 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | ### API 支持度 @@ -34,3 +35,4 @@ ComponentType | GridViewProps.mainAxisGap | ✔️ | | | | | GridViewProps.crossAxisGap | ✔️ | | | | | GridViewProps.maxCrossAxisExtent | ✔️ | | | | +| GridViewProps.padding | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/list-builder.md b/versioned_docs/version-3.x/components/skyline/list-builder.md new file mode 100644 index 000000000000..9de2903b2bc1 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/list-builder.md @@ -0,0 +1,40 @@ +--- +title: ListBuilder +sidebar_label: ListBuilder +--- + +列表构造器,仅支持作为 模式的直接子节点,仅 Skyline 支持。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/list-builder.html) + +## 类型 + +```tsx +ComponentType +``` + +## ListBuilderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| type | "static" or "dynamic" | `"aligned"

可选值:
- static: 定高模式,所有列表项等高,需要传入 child-height
- dynamic: 不定高模式` | 是 | 布局方式 | +| list | `any[]` | `[]` | 是 | 需要用于渲染的列表 | +| childCount | `number` | | 否 | 完整列表的长度,如果不传则取 list 的长度作为其值 | +| childHeight | `number` | | 否 | 列表项的高度,当 type 为 static 时必须传入 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | +| onItemBuild | `CommonEventFunction` | | 否 | 列表项创建时触发,event.detail = {index},index 即被创建的列表项序号 | +| onItemDispose | `CommonEventFunction` | | 否 | 列表项回收时触发,event.detail = {index},index 即被回收的列表项序号 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| ListBuilderProps.type | ✔️ | | | | +| ListBuilderProps.list | ✔️ | | | | +| ListBuilderProps.childCount | ✔️ | | | | +| ListBuilderProps.childHeight | ✔️ | | | | +| ListBuilderProps.padding | ✔️ | | | | +| ListBuilderProps.onItemBuild | ✔️ | | | | +| ListBuilderProps.onItemDispose | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/list-view.md b/versioned_docs/version-3.x/components/skyline/list-view.md index 372eb444c69a..0f724dae8a3e 100644 --- a/versioned_docs/version-3.x/components/skyline/list-view.md +++ b/versioned_docs/version-3.x/components/skyline/list-view.md @@ -16,3 +16,13 @@ ComponentType ``` ## ListViewProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| ListViewProps.padding | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/nested-scroll-body.md b/versioned_docs/version-3.x/components/skyline/nested-scroll-body.md new file mode 100644 index 000000000000..1f20c147d479 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/nested-scroll-body.md @@ -0,0 +1,20 @@ +--- +title: NestedScrollBody +sidebar_label: NestedScrollBody +--- + +嵌套 scroll-view 场景中属于里层 scroll-view 的节点, +仅支持作为 模式的直接子节点。 +不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-body.html) + +## 类型 + +```tsx +ComponentType +``` + +## NestedScrollBodyProps diff --git a/versioned_docs/version-3.x/components/skyline/nested-scroll-header.md b/versioned_docs/version-3.x/components/skyline/nested-scroll-header.md new file mode 100644 index 000000000000..8ad0e1c64221 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/nested-scroll-header.md @@ -0,0 +1,20 @@ +--- +title: NestedScrollHeader +sidebar_label: NestedScrollHeader +--- + +嵌套 scroll-view 场景中属于外层 scroll-view 的节点, +仅支持作为 模式的直接子节点。 +不支持复数子节点,渲染时会取其第一个子节点来渲染。具体用法可参考 scroll-view + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/nested-scroll-header.html) + +## 类型 + +```tsx +ComponentType +``` + +## NestedScrollHeaderProps diff --git a/versioned_docs/version-3.x/components/skyline/open-container.md b/versioned_docs/version-3.x/components/skyline/open-container.md new file mode 100644 index 000000000000..7c56cfe182f3 --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/open-container.md @@ -0,0 +1,47 @@ +--- +title: OpenContainer +sidebar_label: OpenContainer +--- + +容器转场动画组件 +点击 组件,当使用 wx.navigateTo 跳转下一页面时,对其子节点和下一个页面进行过渡。 +下个页面从 所在位置大小渐显放大,同时 内容渐隐,过渡效果包含背景色、圆角和阴影。 +源页面 为 closed 状态,转场动画后为 open 状态。 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/open-container.html) + +## 类型 + +```tsx +ComponentType +``` + +## OpenContainerProps + +| 参数 | 类型 | 默认值 | 说明 | +| --- | --- | :---: | --- | +| transitionType | "fade" or "fadeThrough" | `"fade"

可选值:
- fade: 将传入元素淡入传出元素之上
- fadeThrough: 首先淡出传出元素,并在传出元素完全淡出后开始淡入传入元素` | 动画类型 | +| transitionDuration | `number` | `300` | 动画时长 | +| closedColor | `string` | `"white"` | 初始容器背景色 | +| closedElevation | `number` | `0` | 初始容器影深大小 | +| closeBorderRadius | `number` | `0` | 初始容器圆角大小 | +| middleColor | `string` | `""` | fadeThrough 模式下的过渡背景色 | +| openColor | `string` | `"white"` | 打开状态下容器背景色 | +| openElevation | `number` | `0` | 打开状态下容器影深大小 | +| openBorderRadius | `number` | `0` | 打开状态下容器圆角大小 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| OpenContainerProps.transitionType | ✔️ | | | | +| OpenContainerProps.transitionDuration | ✔️ | | | | +| OpenContainerProps.closedColor | ✔️ | | | | +| OpenContainerProps.closedElevation | ✔️ | | | | +| OpenContainerProps.closeBorderRadius | ✔️ | | | | +| OpenContainerProps.middleColor | ✔️ | | | | +| OpenContainerProps.openColor | ✔️ | | | | +| OpenContainerProps.openElevation | ✔️ | | | | +| OpenContainerProps.openBorderRadius | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/snapshot.md b/versioned_docs/version-3.x/components/skyline/snapshot.md index 282efa0e0423..2103e8dc0c4e 100644 --- a/versioned_docs/version-3.x/components/skyline/snapshot.md +++ b/versioned_docs/version-3.x/components/skyline/snapshot.md @@ -3,7 +3,7 @@ title: Snapshot sidebar_label: Snapshot --- -截图组件。 +截图组件 支持将其子节点的渲染结果导出成图片,该组件需配合 snapshot 接口使用。 目前仅在 Skyline 渲染引擎 下支持。 支持情况: @@ -18,6 +18,12 @@ ComponentType ## SnapshotProps -| 参数 | 类型 | -| --- | --- | -| id | `string` | +| 参数 | 类型 | 默认值 | 说明 | +| --- | --- | :---: | --- | +| mode | "view" or "picture" | `'view'

可选值:
- view: 以真实节点渲染
- picture: 对子节点生成的内容截图渲染` | 渲染模式 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| SnapshotProps.mode | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/span.md b/versioned_docs/version-3.x/components/skyline/span.md new file mode 100644 index 000000000000..33dec36761ca --- /dev/null +++ b/versioned_docs/version-3.x/components/skyline/span.md @@ -0,0 +1,18 @@ +--- +title: Span +sidebar_label: Span +--- + +用于支持内联文本和 image / navigator 的混排 + +支持情况: + +> [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/span.html) + +## 类型 + +```tsx +ComponentType +``` + +## SpanProps diff --git a/versioned_docs/version-3.x/components/skyline/sticky-header.md b/versioned_docs/version-3.x/components/skyline/sticky-header.md index 574096078600..352ae5ef161e 100644 --- a/versioned_docs/version-3.x/components/skyline/sticky-header.md +++ b/versioned_docs/version-3.x/components/skyline/sticky-header.md @@ -16,3 +16,15 @@ ComponentType ``` ## StickyHeaderProps + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +| --- | --- | :---: | :---: | --- | +| offsetTop | `number` | `0` | 否 | 吸顶时与顶部的距(px) | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | + +### API 支持度 + +| API | 微信小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | +| StickyHeaderProps.offsetTop | ✔️ | | | | +| StickyHeaderProps.padding | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/skyline/sticky-section.md b/versioned_docs/version-3.x/components/skyline/sticky-section.md index 952115cf4eef..e516acbd2012 100644 --- a/versioned_docs/version-3.x/components/skyline/sticky-section.md +++ b/versioned_docs/version-3.x/components/skyline/sticky-section.md @@ -20,9 +20,11 @@ ComponentType | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | | pushPinnedHeader | `boolean` | `true` | 否 | 吸顶元素重叠时是否继续上推 | +| padding | `[number, number, number, number]` | `[0, 0, 0, 0]` | 否 | 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距 | ### API 支持度 | API | 微信小程序 | H5 | React Native | Harmony | | :---: | :---: | :---: | :---: | :---: | | StickySectionProps.pushPinnedHeader | ✔️ | | | | +| StickySectionProps.padding | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/viewContainer/cover-image.md b/versioned_docs/version-3.x/components/viewContainer/cover-image.md index f5f31dbe0bbb..58afbc97f4e6 100644 --- a/versioned_docs/version-3.x/components/viewContainer/cover-image.md +++ b/versioned_docs/version-3.x/components/viewContainer/cover-image.md @@ -5,7 +5,7 @@ sidebar_label: CoverImage 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/cover-image.html) @@ -106,16 +106,16 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| CoverImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.referrerPolicy | ✔️ | | | | | | | | -| CoverImageProps.fixedTop | | ✔️ | | | | | | | -| CoverImageProps.fixedRight | | ✔️ | | | | | | | -| CoverImageProps.fixedBottom | | ✔️ | | | | | | | -| CoverImageProps.fixedLeft | | ✔️ | | | | | | | -| CoverImageProps.ariaRole | | | | ✔️ | | | | | -| CoverImageProps.ariaLabel | | | | ✔️ | | | | | -| CoverImageProps.onLoad | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.onError | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | -| CoverImageProps.onTap | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| CoverImageProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.referrerPolicy | ✔️ | | | | | | | | | +| CoverImageProps.fixedTop | | ✔️ | | | | | | | | +| CoverImageProps.fixedRight | | ✔️ | | | | | | | | +| CoverImageProps.fixedBottom | | ✔️ | | | | | | | | +| CoverImageProps.fixedLeft | | ✔️ | | | | | | | | +| CoverImageProps.ariaRole | | | | ✔️ | | | | | | +| CoverImageProps.ariaLabel | | | | ✔️ | | | | | | +| CoverImageProps.onLoad | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.onError | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | ✔️ | +| CoverImageProps.onTap | | | ✔️ | | | | | | | diff --git a/versioned_docs/version-3.x/components/viewContainer/cover-view.md b/versioned_docs/version-3.x/components/viewContainer/cover-view.md index 6cf1f2fd9b23..fb83d8ddbfab 100755 --- a/versioned_docs/version-3.x/components/viewContainer/cover-view.md +++ b/versioned_docs/version-3.x/components/viewContainer/cover-view.md @@ -5,7 +5,7 @@ sidebar_label: CoverView 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/cover-view.html) diff --git a/versioned_docs/version-3.x/components/viewContainer/custom-wrapper.md b/versioned_docs/version-3.x/components/viewContainer/custom-wrapper.md index 5c69e0c633b1..8577b840c0c7 100644 --- a/versioned_docs/version-3.x/components/viewContainer/custom-wrapper.md +++ b/versioned_docs/version-3.x/components/viewContainer/custom-wrapper.md @@ -6,7 +6,7 @@ sidebar_label: CustomWrapper custom-wrapper 自定义组件包裹器 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/components/viewContainer/movable-area.md b/versioned_docs/version-3.x/components/viewContainer/movable-area.md index 2ebceebead33..5a7ca67a28e8 100644 --- a/versioned_docs/version-3.x/components/viewContainer/movable-area.md +++ b/versioned_docs/version-3.x/components/viewContainer/movable-area.md @@ -5,7 +5,7 @@ sidebar_label: MovableArea movable-view 的可移动区域 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/movable-area.html) @@ -56,6 +56,6 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| MovableAreaProps.scaleArea | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| MovableAreaProps.scaleArea | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | diff --git a/versioned_docs/version-3.x/components/viewContainer/movable-view.md b/versioned_docs/version-3.x/components/viewContainer/movable-view.md index f0575b4f595f..c9a124852499 100755 --- a/versioned_docs/version-3.x/components/viewContainer/movable-view.md +++ b/versioned_docs/version-3.x/components/viewContainer/movable-view.md @@ -5,7 +5,7 @@ sidebar_label: MovableView 可移动的视图容器,在页面中可以拖拽滑动。movable-view 必须在 movable-area 组件中,并且必须是直接子节点,否则不能移动。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/movable-view.html) @@ -82,35 +82,35 @@ class App extends Components { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| MovableViewProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.inertia | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.outOfBounds | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.y | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.damping | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.friction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| MovableViewProps.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleMin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleMax | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.scaleValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.animation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| MovableViewProps.onChangeEnd | | | ✔️ | | | | | | -| MovableViewProps.onDragStart | | | | | | | ✔️ | | -| MovableViewProps.onDragEnd | | | | | | | ✔️ | | -| MovableViewProps.onScale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| MovableViewProps.onTouchStart | | | ✔️ | | | | | | -| MovableViewProps.onTouchMove | | | ✔️ | | | | | | -| MovableViewProps.onTouchEnd | | | ✔️ | | | ✔️(此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理) | | | -| MovableViewProps.onTouchCancel | | | ✔️ | | | | | | -| MovableViewProps.onHTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | -| MovableViewProps.onVTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | -| MovableViewProps.catchTouchStart | | | ✔️ | | | | | | -| MovableViewProps.catchTouchMove | | | ✔️ | | | | | | -| MovableViewProps.catchTouchEnd | | | ✔️ | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| MovableViewProps.direction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.inertia | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.outOfBounds | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.y | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.damping | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.friction | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.disabled | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| MovableViewProps.scale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleMin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleMax | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.scaleValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.animation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| MovableViewProps.onChangeEnd | | | ✔️ | | | | | | | +| MovableViewProps.onDragStart | | | | | | | ✔️ | | | +| MovableViewProps.onDragEnd | | | | | | | ✔️ | | | +| MovableViewProps.onScale | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| MovableViewProps.onTouchStart | | | ✔️ | | | | | | | +| MovableViewProps.onTouchMove | | | ✔️ | | | | | | | +| MovableViewProps.onTouchEnd | | | ✔️ | | | ✔️(此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理) | | | ✔️ | +| MovableViewProps.onTouchCancel | | | ✔️ | | | | | | | +| MovableViewProps.onHTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | ✔️ | +| MovableViewProps.onVTouchMove | ✔️ | ✔️ | | ✔️ | | ✔️ | | | ✔️ | +| MovableViewProps.catchTouchStart | | | ✔️ | | | | | | | +| MovableViewProps.catchTouchMove | | | ✔️ | | | | | | | +| MovableViewProps.catchTouchEnd | | | ✔️ | | | | | | | ### TChangeSource diff --git a/versioned_docs/version-3.x/components/viewContainer/native-slot.md b/versioned_docs/version-3.x/components/viewContainer/native-slot.md index 0c68436497b5..77b253daeb03 100644 --- a/versioned_docs/version-3.x/components/viewContainer/native-slot.md +++ b/versioned_docs/version-3.x/components/viewContainer/native-slot.md @@ -5,7 +5,7 @@ sidebar_label: NativeSlot 编译的原生组件支持使用 slot 插槽 -支持情况: +支持情况: > [参考文档](https://github.com/NervJS/taro/pull/12627) diff --git a/versioned_docs/version-3.x/components/viewContainer/script.md b/versioned_docs/version-3.x/components/viewContainer/script.md new file mode 100644 index 000000000000..8d3980be6d73 --- /dev/null +++ b/versioned_docs/version-3.x/components/viewContainer/script.md @@ -0,0 +1,56 @@ +--- +title: Script +sidebar_label: Script +--- + +script 类似微信小程序的 wxs 标签,支持引用各种小程序的 xs 文件 +只能在 CompileMode 中使用 + +支持情况: + +## 类型 + +```tsx +ComponentType +``` + +## 示例代码 + +import { ReactIcon, VueIcon } from '@site/static/icons' +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' + +, value: "React" }]}> + + +```tsx +import { Component } from 'react' +import { View, Script } from '@tarojs/components' + +export function Index () { + return ( + + + Hello, {logic.name}! + + ) +} +``` + + + +## ScriptProps + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| src | `string` | xs 文件的相对路径 | +| module | `string` | xs 模块名 | + +### API 支持度 + +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ScriptProps.src | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | +| ScriptProps.module | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/viewContainer/scroll-view.md b/versioned_docs/version-3.x/components/viewContainer/scroll-view.md index ada3f0c12340..cf23ddbec1ba 100755 --- a/versioned_docs/version-3.x/components/viewContainer/scroll-view.md +++ b/versioned_docs/version-3.x/components/viewContainer/scroll-view.md @@ -9,7 +9,7 @@ Tips: H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html) @@ -197,6 +197,7 @@ typeof ScrollViewProps | refresherBackground | `string` | `'#FFF'` | 否 | 设置自定义下拉刷新区域背景颜色 | | refresherTriggered | `boolean` | `false` | 否 | 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发 | | enhanced | `boolean` | `false` | 否 | 启用 scroll-view 增强特性 | +| usingSticky | `boolean` | `false` | 否 | 使 scroll-view 下的 position sticky 特性生效,否则滚动一屏后 sticky 元素会被隐藏 | | bounces | `boolean` | `true` | 否 | iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效) | | showScrollbar | `boolean` | `true` | 否 | 滚动条显隐控制 (同时开启 enhanced 属性后生效) | | pagingEnabled | `boolean` | `false` | 否 | 分页滑动效果 (同时开启 enhanced 属性后生效) | @@ -207,7 +208,7 @@ typeof ScrollViewProps | disableUpperScroll | `string` | | 否 | 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。 | | ariaLabel | `string` | | 否 | 无障碍访问,(属性)元素的额外描述 | | enablePassive | `boolean` | `false` | 否 | 开启 passive 特性,能优化一定的滚动性能 | -| type | "list" or "custom" | `'list'` | 否 | 渲染模式
list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件 | +| type | "list" or "custom" or "nested" | `'list'` | 否 | 渲染模式
list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件
nested - 嵌套模式。用于处理父子 scroll-view 间的嵌套滚动,子节点可以是 nested-scroll-header nested-scroll-body 组件或自定义 refresher | | reverse | `boolean` | `false` | 否 | 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。 | | clip | `boolean` | `true` | 否 | 是否对溢出进行裁剪,默认开启 | | cacheExtent | `number` | | 否 | 指定视口外渲染区域的距离,默认情况下视口外节点不渲染。指定 cache-extent 可优化滚动体验和加载速度,但会提高内存占用且影响首屏速度,可按需启用。 | @@ -243,68 +244,69 @@ typeof ScrollViewProps ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ScrollViewProps.scrollX | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | -| ScrollViewProps.scrollY | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | -| ScrollViewProps.upperThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.lowerThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollTop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollLeft | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.scrollIntoView | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| ScrollViewProps.scrollWithAnimation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.enableBackToTop | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | -| ScrollViewProps.enableFlex | ✔️ | | | | | ✔️ | | | | -| ScrollViewProps.scrollAnchoring | ✔️ | | | | | | | | | -| ScrollViewProps.refresherEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherDefaultStyle | ✔️ | | | | | | | | | -| ScrollViewProps.refresherBackground | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTriggered | ✔️ | | | | | | | | | -| ScrollViewProps.enhanced | ✔️ | ✔️ | | | | | | | | -| ScrollViewProps.bounces | ✔️ | ✔️ | | | | | | | | -| ScrollViewProps.showScrollbar | ✔️ | | | | | | | | | -| ScrollViewProps.pagingEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.fastDeceleration | ✔️ | | | | | | | | | -| ScrollViewProps.scrollAnimationDuration | | | ✔️ | | | | | | | -| ScrollViewProps.trapScroll | | | ✔️ | | | | | | | -| ScrollViewProps.disableLowerScroll | | | ✔️ | | | | | | | -| ScrollViewProps.disableUpperScroll | | | ✔️ | | | | | | | -| ScrollViewProps.ariaLabel | | | | | ✔️ | | | | | -| ScrollViewProps.enablePassive | ✔️ | | | | | | | | | -| ScrollViewProps.type | ✔️ | | | | | | | | | -| ScrollViewProps.reverse | ✔️ | | | | | | | | | -| ScrollViewProps.clip | ✔️ | | | | | | | | | -| ScrollViewProps.cacheExtent | ✔️ | | | | | | | | | -| ScrollViewProps.minDragDistance | ✔️ | | | | | | | | | -| ScrollViewProps.padding | ✔️ | | | | | | | | | -| ScrollViewProps.scrollIntoViewWithinExtent | ✔️ | | | | | | | | | -| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | ✔️ | | | -| ScrollViewProps.refresherTwoLevelEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelTriggered | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelCloseThreshold | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelScrollEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherBallisticRefreshEnabled | ✔️ | | | | | | | | | -| ScrollViewProps.refresherTwoLevelPinned | ✔️ | | | | | | | | | -| ScrollViewProps.onScrollToUpper | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScrollToLower | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScroll | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ScrollViewProps.onScrollStart | ✔️ | | | | | | | | | -| ScrollViewProps.onScrollEnd | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherPulling | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherRefresh | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherRestore | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherAbort | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherWillRefresh | ✔️ | | | | | | | | | -| ScrollViewProps.onRefresherStatusChange | ✔️ | | | | | | | | | -| ScrollViewProps.onDragStart | ✔️ | | | | | | | | | -| ScrollViewProps.onDragging | ✔️ | | | | | | | | | -| ScrollViewProps.onDragEnd | ✔️ | | | | | | | | | -| ScrollViewProps.onTouchStart | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchMove | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchEnd | | | ✔️ | | | | | | | -| ScrollViewProps.onTouchCancel | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ScrollViewProps.scrollX | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | ✔️ | +| ScrollViewProps.scrollY | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(二选一) | | ✔️ | +| ScrollViewProps.upperThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.lowerThreshold | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollTop | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollLeft | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.scrollIntoView | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| ScrollViewProps.scrollWithAnimation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.enableBackToTop | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | | ✔️ | | | +| ScrollViewProps.enableFlex | ✔️ | | | | | ✔️ | | | | | +| ScrollViewProps.scrollAnchoring | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherDefaultStyle | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherBackground | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTriggered | ✔️ | | | | | | | | | | +| ScrollViewProps.enhanced | ✔️ | ✔️ | | | | | | | | | +| ScrollViewProps.usingSticky | ✔️ | | | | | | | | | | +| ScrollViewProps.bounces | ✔️ | ✔️ | | | | | | | | | +| ScrollViewProps.showScrollbar | ✔️ | | | | | | | | | | +| ScrollViewProps.pagingEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.fastDeceleration | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollAnimationDuration | | | ✔️ | | | | | | | | +| ScrollViewProps.trapScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.disableLowerScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.disableUpperScroll | | | ✔️ | | | | | | | | +| ScrollViewProps.ariaLabel | | | | | ✔️ | | | | | | +| ScrollViewProps.enablePassive | ✔️ | | | | | | | | | | +| ScrollViewProps.type | ✔️ | | | | | | | | | | +| ScrollViewProps.reverse | ✔️ | | | | | | | | | | +| ScrollViewProps.clip | ✔️ | | | | | | | | | | +| ScrollViewProps.cacheExtent | ✔️ | | | | | | | | | | +| ScrollViewProps.minDragDistance | ✔️ | | | | | | | | | | +| ScrollViewProps.padding | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollIntoViewWithinExtent | ✔️ | | | | | | | | | | +| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | ✔️ | | | ✔️ | +| ScrollViewProps.refresherTwoLevelEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelTriggered | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelCloseThreshold | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelScrollEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherBallisticRefreshEnabled | ✔️ | | | | | | | | | | +| ScrollViewProps.refresherTwoLevelPinned | ✔️ | | | | | | | | | | +| ScrollViewProps.onScrollToUpper | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScrollToLower | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScroll | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ScrollViewProps.onScrollStart | ✔️ | | | | | | | | | | +| ScrollViewProps.onScrollEnd | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherPulling | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherRefresh | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherRestore | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherAbort | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherWillRefresh | ✔️ | | | | | | | | | | +| ScrollViewProps.onRefresherStatusChange | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragStart | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragging | ✔️ | | | | | | | | | | +| ScrollViewProps.onDragEnd | ✔️ | | | | | | | | | | +| ScrollViewProps.onTouchStart | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchMove | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchEnd | | | ✔️ | | | | | | | | +| ScrollViewProps.onTouchCancel | | | ✔️ | | | | | | | | | 参数 | 类型 | | --- | --- | diff --git a/versioned_docs/version-3.x/components/viewContainer/slot.md b/versioned_docs/version-3.x/components/viewContainer/slot.md index 6c3b041fae66..dcc8de7292e1 100644 --- a/versioned_docs/version-3.x/components/viewContainer/slot.md +++ b/versioned_docs/version-3.x/components/viewContainer/slot.md @@ -5,7 +5,7 @@ sidebar_label: Slot slot 插槽 -支持情况: +支持情况: ## 类型 diff --git a/versioned_docs/version-3.x/components/viewContainer/swiper-item.md b/versioned_docs/version-3.x/components/viewContainer/swiper-item.md index d7b840dcc1b0..34e2745654fd 100644 --- a/versioned_docs/version-3.x/components/viewContainer/swiper-item.md +++ b/versioned_docs/version-3.x/components/viewContainer/swiper-item.md @@ -6,7 +6,7 @@ sidebar_label: SwiperItem 仅可放置在 swiper 组件中,宽高自动设置为100% > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/swiper-item.html) @@ -88,10 +88,12 @@ class App extends Component { | --- | --- | :---: | :---: | --- | | itemId | `string` | | 否 | 该 swiper-item 的标识符 | | skipHiddenItemLayout | `boolean` | `false` | 否 | 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息 | +| deep | `boolean` | `false` | 否 | Swiper 循环状态下,前后垫片节点拷贝模式,用于修复 Vue 在 CustomElements 下的节点拷贝问题 | ### API 支持度 -| API | 微信小程序 | 百度小程序 | 抖音小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwiperItemProps.itemId | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperItemProps.skipHiddenItemLayout | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 抖音小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwiperItemProps.itemId | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperItemProps.skipHiddenItemLayout | ✔️ | | | | | | | | +| SwiperItemProps.deep | | | | | ✔️ | | | | diff --git a/versioned_docs/version-3.x/components/viewContainer/swiper.md b/versioned_docs/version-3.x/components/viewContainer/swiper.md index 939cc8d41e5a..47f27044fd83 100755 --- a/versioned_docs/version-3.x/components/viewContainer/swiper.md +++ b/versioned_docs/version-3.x/components/viewContainer/swiper.md @@ -6,7 +6,7 @@ sidebar_label: Swiper 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。 > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html) @@ -124,43 +124,43 @@ class App extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| SwiperProps.indicatorDots | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.indicatorColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.indicatorActiveColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.current | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.currentItemId | (deprecated) | | | ✔️ | | | | | | -| SwiperProps.interval | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.duration | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.circular | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.vertical | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.previousMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.nextMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.snapToEdge | ✔️ | | ✔️ | | | | | | | -| SwiperProps.displayMultipleItems | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | -| SwiperProps.skipHiddenItemLayout | | | | | ✔️ | ✔️ | | | | -| SwiperProps.easingFunction | ✔️ | | ✔️ | ✔️ | | ✔️ | | | | -| SwiperProps.disableTouch | | | ✔️ | | | | | | | -| SwiperProps.zoom | | | | | | | ✔️ | | | -| SwiperProps.full | | | | | | | ✔️ | | | -| SwiperProps.activeClass | | | ✔️ | | | | | | | -| SwiperProps.changingClass | | | ✔️ | | | | | | | -| SwiperProps.acceleration | | | ✔️ | | | | | | | -| SwiperProps.disableProgrammaticAnimation | | | ✔️ | | | | | | | -| SwiperProps.swipeRatio | | | ✔️ | | | | | | | -| SwiperProps.swipeSpeed | | | ✔️ | | | | | | | -| SwiperProps.touchAngle | | | ✔️ | | | | | | | -| SwiperProps.adjustHeight | | | ✔️ | | | | | | | -| SwiperProps.adjustVerticalHeight | | | ✔️ | | | | | | | -| SwiperProps.disableTouchmove | | ✔️ | | | | | | | | -| SwiperProps.scrollWithAnimation | ✔️ | | | | | | | | | -| SwiperProps.cacheExtent | ✔️ | | | | | | | | | -| SwiperProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.onTransition | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | -| SwiperProps.onAnimationFinish | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| SwiperProps.onAnimationEnd | | | ✔️ | | | | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| SwiperProps.indicatorDots | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.indicatorColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.indicatorActiveColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.autoplay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.current | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.currentItemId | (deprecated) | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.interval | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.duration | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.circular | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.vertical | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.previousMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.nextMargin | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.snapToEdge | ✔️ | | ✔️ | | | | | | | | +| SwiperProps.displayMultipleItems | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ | +| SwiperProps.skipHiddenItemLayout | | | | | ✔️ | ✔️ | | | | | +| SwiperProps.easingFunction | ✔️ | | ✔️ | ✔️ | | ✔️ | | | | | +| SwiperProps.disableTouch | | | ✔️ | | | | | | | | +| SwiperProps.zoom | | | | | | | ✔️ | | | ✔️ | +| SwiperProps.full | | | | | | | ✔️ | | | ✔️ | +| SwiperProps.activeClass | | | ✔️ | | | | | | | | +| SwiperProps.changingClass | | | ✔️ | | | | | | | | +| SwiperProps.acceleration | | | ✔️ | | | | | | | | +| SwiperProps.disableProgrammaticAnimation | | | ✔️ | | | | | | | | +| SwiperProps.swipeRatio | | | ✔️ | | | | | | | | +| SwiperProps.swipeSpeed | | | ✔️ | | | | | | | | +| SwiperProps.touchAngle | | | ✔️ | | | | | | | | +| SwiperProps.adjustHeight | | | ✔️ | | | | | | | | +| SwiperProps.adjustVerticalHeight | | | ✔️ | | | | | | | | +| SwiperProps.disableTouchmove | | ✔️ | | | | | | | | | +| SwiperProps.scrollWithAnimation | ✔️ | | | | | | | | | | +| SwiperProps.cacheExtent | ✔️ | | | | | | | | | | +| SwiperProps.onChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.onTransition | ✔️ | | ✔️ | ✔️ | ✔️ | | | | | | +| SwiperProps.onAnimationFinish | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| SwiperProps.onAnimationEnd | | | ✔️ | | | | | | | | ### TChangeSource diff --git a/versioned_docs/version-3.x/components/viewContainer/view.md b/versioned_docs/version-3.x/components/viewContainer/view.md index 1a10cd929466..388dada8a494 100755 --- a/versioned_docs/version-3.x/components/viewContainer/view.md +++ b/versioned_docs/version-3.x/components/viewContainer/view.md @@ -5,7 +5,7 @@ sidebar_label: View 视图容器 -支持情况: +支持情况: > [参考文档](https://developers.weixin.qq.com/miniprogram/dev/component/view.html) @@ -121,30 +121,30 @@ export default class PageView extends Component { ### API 支持度 -| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | -| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| ViewProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。) | | -| ViewProps.hoverStyle | | | | | | | | ✔️ | | -| ViewProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | -| ViewProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ViewProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | -| ViewProps.disableScroll | | | ✔️ | | | | | | | -| ViewProps.hidden | | | ✔️ | | | | | | | -| ViewProps.animation | | | ✔️ | | | | | | | -| ViewProps.role | | | ✔️ | | | | | | | -| ViewProps.ariaRole | | | | | ✔️ | | | | | -| ViewProps.ariaLabel | | | | | ✔️ | | | | | -| ViewProps.onTap | | | ✔️ | | | | | | | -| ViewProps.onTouchStart | | | ✔️ | | | | | | | -| ViewProps.onTouchMove | | | ✔️ | | | | | | | -| ViewProps.onTouchEnd | | | ✔️ | | | | | | | -| ViewProps.onTouchCancel | | | ✔️ | | | | | | | -| ViewProps.onLongTap | | | ✔️ | | | | | | | -| ViewProps.onTransitionEnd | | | ✔️ | | | | | | | -| ViewProps.onAnimationIteration | | | ✔️ | | | | | | | -| ViewProps.onAnimationStart | | | ✔️ | | | | | | | -| ViewProps.onAnimationEnd | | | ✔️ | | | | | | | -| ViewProps.onAppear | | | ✔️ | | | | | | | -| ViewProps.onDisappear | | | ✔️ | | | | | | | -| ViewProps.onFirstAppear | | | ✔️ | | | | | | | -| ViewProps.catchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | +| API | 微信小程序 | 百度小程序 | 支付宝小程序 | 抖音小程序 | QQ 小程序 | 京东小程序 | H5 | React Native | Harmony | Harmony hybrid | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| ViewProps.hoverClass | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️(由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。) | | ✔️ | +| ViewProps.hoverStyle | | | | | | | | ✔️ | | | +| ViewProps.hoverStopPropagation | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | +| ViewProps.hoverStartTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ViewProps.hoverStayTime | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | +| ViewProps.disableScroll | | | ✔️ | | | | | | | | +| ViewProps.hidden | | | ✔️ | | | | | | | | +| ViewProps.animation | | | ✔️ | | | | | | | | +| ViewProps.role | | | ✔️ | | | | | | | | +| ViewProps.ariaRole | | | | | ✔️ | | | | | | +| ViewProps.ariaLabel | | | | | ✔️ | | | | | | +| ViewProps.onTap | | | ✔️ | | | | | | | | +| ViewProps.onTouchStart | | | ✔️ | | | | | | | | +| ViewProps.onTouchMove | | | ✔️ | | | | | | | | +| ViewProps.onTouchEnd | | | ✔️ | | | | | | | | +| ViewProps.onTouchCancel | | | ✔️ | | | | | | | | +| ViewProps.onLongTap | | | ✔️ | | | | | | | | +| ViewProps.onTransitionEnd | | | ✔️ | | | | | | | | +| ViewProps.onAnimationIteration | | | ✔️ | | | | | | | | +| ViewProps.onAnimationStart | | | ✔️ | | | | | | | | +| ViewProps.onAnimationEnd | | | ✔️ | | | | | | | | +| ViewProps.onAppear | | | ✔️ | | | | | | | | +| ViewProps.onDisappear | | | ✔️ | | | | | | | | +| ViewProps.onFirstAppear | | | ✔️ | | | | | | | | +| ViewProps.catchMove | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | | diff --git a/versioned_docs/version-3.x/config.md b/versioned_docs/version-3.x/config.md index adcd417aa541..d4aace8449ae 100644 --- a/versioned_docs/version-3.x/config.md +++ b/versioned_docs/version-3.x/config.md @@ -49,13 +49,6 @@ const config = { autoprefixer: { enable: true, }, - // 小程序端样式引用本地资源内联配置 - url: { - enable: true, - config: { - limit: 10240, - }, - }, cssModules: { enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true config: { diff --git a/versioned_sidebars/version-3.x-sidebars.json b/versioned_sidebars/version-3.x-sidebars.json index 662f363554f0..5af7a6e0aeb1 100644 --- a/versioned_sidebars/version-3.x-sidebars.json +++ b/versioned_sidebars/version-3.x-sidebars.json @@ -177,6 +177,7 @@ "components/viewContainer/native-slot", "components/viewContainer/page-container", "components/viewContainer/root-portal", + "components/viewContainer/script", "components/viewContainer/scroll-view", "components/viewContainer/slot", "components/viewContainer/swiper", @@ -208,10 +209,17 @@ "components/forms/textarea" ], "Skyline": [ + "components/skyline/draggable-sheet", + "components/skyline/grid-builder", "components/skyline/grid-view", + "components/skyline/list-builder", "components/skyline/list-view", + "components/skyline/nested-scroll-body", + "components/skyline/nested-scroll-header", + "components/skyline/open-container", "components/skyline/share-element", "components/skyline/snapshot", + "components/skyline/span", "components/skyline/sticky-header", "components/skyline/sticky-section" ], @@ -900,7 +908,9 @@ "type": "category", "items": [ "apis/open-api/subscribe-message/requestSubscribeMessage", - "apis/open-api/subscribe-message/requestSubscribeDeviceMessage" + "apis/open-api/subscribe-message/requestSubscribeDeviceMessage", + "apis/open-api/subscribe-message/subscribeService", + "apis/open-api/subscribe-message/unsubscribeMessage" ] }, { @@ -961,6 +971,15 @@ "label": "微信客服", "type": "category", "items": ["apis/open-api/customer-service/openCustomerServiceChat"] + }, + { + "label": "微信表情", + "type": "category", + "items": [ + "apis/open-api/sticker/openStickerSetView", + "apis/open-api/sticker/openStickerIPView", + "apis/open-api/sticker/openSingleStickerView" + ] } ], "设备": [ @@ -1260,7 +1279,51 @@ "Skyline": ["apis/skyline/Snapshot"], "云开发": ["apis/cloud/cloud", "apis/cloud/DB"], "Alipay": ["apis/alipay/getOpenUserInfo", "apis/alipay/tradePay"], - "QQ": ["apis/qq/openQzonePublish"], - "Swan": ["apis/swan/setPageInfo"] + "QQ": [ + "apis/qq/addRecentColorSign", + "apis/qq/applyAddToMyApps", + "apis/qq/getGuildInfo", + "apis/qq/getQQRunData", + "apis/qq/isAddedToMyApps", + "apis/qq/openQzonePublish", + "apis/qq/setCustomDress", + "apis/qq/setOfficialDress", + "apis/qq/updateQQApp" + ], + "Swan": [ + { + "label": "书架", + "type": "category", + "items": [ + "apis/swan/bookshelf/insertBookshelf", + "apis/swan/bookshelf/deleteBookshelf", + "apis/swan/bookshelf/queryBookshelf", + "apis/swan/bookshelf/updateBookshelfReadTime", + "apis/swan/bookshelf/navigateToBookshelf" + ] + }, + { + "label": "小程序包 / 分包预下载", + "type": "category", + "items": [ + "apis/swan/download-package/downloadPackage", + "apis/swan/download-package/downloadPackages", + "apis/swan/download-package/loadSubPackage" + ] + }, + { + "label": "百度收银台支付", + "type": "category", + "items": ["apis/swan/pay/requestPolymerPayment", "apis/swan/pay/getOptimalPriceInfo"] + }, + "apis/swan/getFavorStatus", + "apis/swan/getSystemRiskInfo", + "apis/swan/getTopStatus", + "apis/swan/openBdboxWebview", + "apis/swan/setDocumentTitle", + "apis/swan/setMetaDescription", + "apis/swan/setMetaKeywords", + "apis/swan/setPageInfo" + ] } }