@open-dy/interest-card-cli 0.1.0-beta.29 → 0.1.0-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/browser-runtime/scripts/cli.mjs +10 -3
  2. package/browser-runtime/scripts/inspect-preview-state.mjs +6 -4
  3. package/card-skills/douyin-interest-card-browser/references/commands.md +1 -1
  4. package/card-skills/douyin-interest-card-capability/SKILL.md +12 -4
  5. package/card-skills/douyin-interest-card-capability/references/common/openapi/external/guide.md +5 -5
  6. package/card-skills/douyin-interest-card-capability/references/microapp/api/capability-index.json +27 -27
  7. package/card-skills/douyin-interest-card-capability/references/microapp/api/connect-socket.md +24 -1
  8. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-bytenn-engine-context.md +11 -1
  9. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-camera-context.md +12 -0
  10. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-canvas-context.md +45 -1
  11. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-effect-camera-stream.md +21 -1
  12. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-inner-audio-context.md +80 -3
  13. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-intersection-observer.md +12 -1
  14. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-interstitial-ad.md +12 -0
  15. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-live-player-context.md +16 -0
  16. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-map-context.md +24 -0
  17. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-media-recorder.md +17 -0
  18. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-offscreen-canvas.md +9 -1
  19. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-rewarded-video-ad.md +16 -0
  20. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-rtc-room-context.md +33 -0
  21. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-scene-activity-context.md +13 -0
  22. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-selector-query.md +13 -1
  23. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-sticker-manager.md +11 -1
  24. package/card-skills/douyin-interest-card-capability/references/microapp/api/create-video-context.md +17 -0
  25. package/card-skills/douyin-interest-card-capability/references/microapp/api/download-file.md +10 -0
  26. package/card-skills/douyin-interest-card-capability/references/microapp/api/get-algorithm-manager.md +9 -1
  27. package/card-skills/douyin-interest-card-capability/references/microapp/api/get-background-audio-manager.md +60 -1
  28. package/card-skills/douyin-interest-card-capability/references/microapp/api/get-file-system-manager.md +37 -0
  29. package/card-skills/douyin-interest-card-capability/references/microapp/api/get-recorder-manager.md +23 -0
  30. package/card-skills/douyin-interest-card-capability/references/microapp/api/get-update-manager.md +11 -0
  31. package/card-skills/douyin-interest-card-capability/references/microapp/api/preload-video.md +8 -0
  32. package/card-skills/douyin-interest-card-capability/references/microapp/api/request.md +8 -0
  33. package/card-skills/douyin-interest-card-capability/references/microapp/api/upload-file.md +10 -0
  34. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/capability-index.json +9 -4
  35. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/censor-image.md +1 -1
  36. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/censor-text.md +1 -1
  37. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/check-fans.md +1 -1
  38. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/create-activity.md +1 -1
  39. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-affiliate-id.md +1 -1
  40. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-aiuser-data-info.md +1 -1
  41. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-aiuser-item-list.md +1 -1
  42. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-aiuser-profile.md +1 -1
  43. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-fans-favourite.md +1 -1
  44. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-fans-profile.md +1 -1
  45. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-fans-source.md +1 -1
  46. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-feed.md +1 -1
  47. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-follow-feed.md +1 -1
  48. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-follow-hot-word.md +1 -1
  49. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-friend-list.md +1 -1
  50. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-hot-list.md +1 -1
  51. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-music-collection-list.md +1 -1
  52. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-recommend.md +1 -1
  53. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-related-id.md +1 -1
  54. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-room-real-time-data.md +1 -1
  55. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-basic-data.md +1 -1
  56. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-cert-labels-info.md +1 -1
  57. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-comment-data.md +1 -1
  58. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-constellation.md +1 -1
  59. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-fans-data.md +1 -1
  60. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-fans-profile.md +1 -1
  61. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-following.md +1 -1
  62. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-hash-mobile.md +1 -1
  63. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-interest.md +1 -1
  64. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-item-data.md +1 -1
  65. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-like-data.md +1 -1
  66. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-profile-data.md +1 -1
  67. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-user-share-data.md +1 -1
  68. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/get-video-pack.md +48 -3
  69. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/modify-activity.md +1 -1
  70. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/query-activity-info.md +1 -1
  71. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/query-activity-user-completion-status.md +1 -1
  72. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/query-room-data.md +1 -1
  73. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-experience.md +1 -1
  74. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-general.md +1 -1
  75. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-live.md +1 -1
  76. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-music.md +1 -1
  77. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-user.md +1 -1
  78. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-video.md +1 -1
  79. package/card-skills/douyin-interest-card-capability/references/microapp/openapi/external/search-vision.md +1 -1
  80. package/card-skills/douyin-interest-card-capability/references/opencard/api/call-container.md +1 -0
  81. package/card-skills/douyin-interest-card-capability/references/opencard/api/capability-index.json +6 -6
  82. package/card-skills/douyin-interest-card-capability/references/opencard/api/create-inner-audio-context.md +60 -1
  83. package/card-skills/douyin-interest-card-capability/references/opencard/api/create-map-context.md +24 -0
  84. package/card-skills/douyin-interest-card-capability/references/opencard/api/create-selector-query.md +13 -1
  85. package/card-skills/douyin-interest-card-capability/references/opencard/api/create-video-context.md +17 -0
  86. package/card-skills/douyin-interest-card-capability/references/opencard/api/download-file.md +1 -3
  87. package/card-skills/douyin-interest-card-capability/references/opencard/api/get-background-audio-manager.md +60 -1
  88. package/card-skills/douyin-interest-card-capability/references/opencard/api/request.md +1 -3
  89. package/card-skills/douyin-interest-card-capability/references/opencard/api/upload-file.md +1 -3
  90. package/card-skills/douyin-interest-card-capability/references/opencard/closed-domain-openapi.md +2 -2
  91. package/card-skills/douyin-interest-card-capability/references/opencard/component/button.md +4 -2
  92. package/card-skills/douyin-interest-card-capability/references/opencard/component/canvas.md +4 -3
  93. package/card-skills/douyin-interest-card-capability/references/opencard/component/capability-index.json +8 -9
  94. package/card-skills/douyin-interest-card-capability/references/opencard/component/checkbox-group.md +2 -0
  95. package/card-skills/douyin-interest-card-capability/references/opencard/component/image.md +3 -2
  96. package/card-skills/douyin-interest-card-capability/references/opencard/component/input.md +3 -2
  97. package/card-skills/douyin-interest-card-capability/references/opencard/component/text.md +3 -3
  98. package/card-skills/douyin-interest-card-capability/references/opencard/component/textarea.md +5 -5
  99. package/card-skills/douyin-interest-card-capability/references/opencard/component/video.md +10 -2
  100. package/card-skills/douyin-interest-card-capability/references/opencard/component-guide.md +5 -3
  101. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/capability-index.json +16 -11
  102. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/censor-image.md +1 -1
  103. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/censor-text.md +1 -1
  104. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/check-fans.md +1 -1
  105. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/create-activity.md +1 -1
  106. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-affiliate-id.md +1 -1
  107. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-aiuser-data-info.md +10 -9
  108. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-aiuser-item-list.md +10 -9
  109. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-aiuser-profile.md +10 -9
  110. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-fans-favourite.md +1 -1
  111. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-fans-profile.md +1 -1
  112. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-fans-source.md +1 -1
  113. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-feed.md +1 -1
  114. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-follow-feed.md +1 -1
  115. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-follow-hot-word.md +1 -1
  116. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-friend-list.md +1 -1
  117. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-hot-list.md +1 -1
  118. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-music-collection-list.md +1 -1
  119. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-recommend.md +1 -1
  120. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-related-id.md +1 -1
  121. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-room-real-time-data.md +1 -1
  122. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-basic-data.md +10 -9
  123. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-cert-labels-info.md +1 -1
  124. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-comment-data.md +1 -1
  125. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-constellation.md +10 -9
  126. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-fans-data.md +1 -1
  127. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-fans-profile.md +1 -1
  128. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-following.md +10 -9
  129. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-hash-mobile.md +1 -1
  130. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-interest.md +10 -9
  131. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-item-data.md +1 -1
  132. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-like-data.md +1 -1
  133. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-profile-data.md +1 -1
  134. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-user-share-data.md +1 -1
  135. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/get-video-pack.md +48 -3
  136. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/modify-activity.md +1 -1
  137. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/query-activity-info.md +1 -1
  138. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/query-activity-user-completion-status.md +1 -1
  139. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/query-room-data.md +1 -1
  140. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-experience.md +1 -1
  141. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-general.md +1 -1
  142. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-live.md +1 -1
  143. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-music.md +1 -1
  144. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-user.md +1 -1
  145. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-video.md +1 -1
  146. package/card-skills/douyin-interest-card-capability/references/opencard/openapi/search-vision.md +1 -1
  147. package/card-skills/douyin-interest-card-cli/SKILL.md +1 -1
  148. package/card-skills/douyin-interest-card-generate/SKILL.md +5 -3
  149. package/card-skills/douyin-interest-card-generate/init.sh +13 -23
  150. package/card-skills/douyin-interest-card-generate/references/common/fullstack.md +6 -10
  151. package/card-skills/douyin-interest-card-generate/references/common/private-data-intent-routing.md +1 -1
  152. package/card-skills/douyin-interest-card-generate/references/common/upgrade-to-post.md +1 -1
  153. package/card-skills/douyin-interest-card-generate/references/microapp/microapp.md +1 -1
  154. package/card-skills/douyin-interest-card-generate/references/opencard/api.md +8 -0
  155. package/card-skills/douyin-interest-card-generate/references/opencard/closed-domain-card.md +1 -1
  156. package/card-skills/douyin-interest-card-generate/references/opencard/components.md +11 -28
  157. package/card-skills/douyin-interest-card-generate/references/opencard/opencard.md +9 -7
  158. package/card-skills/douyin-interest-card-generate/references/opencard/rendering.md +5 -5
  159. package/card-skills/douyin-interest-card-generate/references/opencard/taro-dsl.md +6 -6
  160. package/card-skills/douyin-interest-card-generate/templates/fragments/opencard/package.json +2 -2
  161. package/card-skills/douyin-interest-card-generate/templates/fragments/opencard/pnpm-lock.yaml +17 -17
  162. package/card-skills/douyin-interest-card-generate/templates/taro/closed-domain-server/package.json +1 -1
  163. package/card-skills/douyin-interest-card-generate/templates/taro/package.json +5 -4
  164. package/card-skills/douyin-interest-card-generate/templates/taro/pnpm-lock.yaml +27 -26
  165. package/card-skills/douyin-interest-card-generate/templates/taro/server/package.json +1 -1
  166. package/dist/src/args.js +23 -8
  167. package/dist/src/browser.js +3 -1
  168. package/dist/src/card/agent-chat.js +4 -0
  169. package/dist/src/card/binding.js +2 -1
  170. package/dist/src/card/candidate.js +90 -0
  171. package/dist/src/card/card-api.js +2 -2
  172. package/dist/src/card/card-token.js +25 -2
  173. package/dist/src/card/chat-commands.js +26 -11
  174. package/dist/src/card/constants.js +5 -0
  175. package/dist/src/card/create-project-client.js +2 -2
  176. package/dist/src/card/create.js +29 -3
  177. package/dist/src/card/editor-client.js +41 -6
  178. package/dist/src/card/editor-fs.js +4 -4
  179. package/dist/src/card/global-skills.js +6 -1
  180. package/dist/src/card/handlers-misc.js +3 -6
  181. package/dist/src/card/handlers.js +32 -24
  182. package/dist/src/card/help.js +6 -4
  183. package/dist/src/card/ignore.js +22 -0
  184. package/dist/src/card/project.js +13 -4
  185. package/dist/src/card-install.js +8 -9
  186. package/dist/src/cli.js +5 -2
  187. package/dist/src/config.js +26 -3
  188. package/dist/src/creator-device-login.js +2 -1
  189. package/dist/src/creator-login-session.js +6 -6
  190. package/dist/src/creator-passport-login.js +8 -2
  191. package/dist/src/creator-session.js +30 -7
  192. package/dist/src/current-user.js +29 -0
  193. package/dist/src/help-access.js +22 -0
  194. package/dist/src/help.js +6 -2
  195. package/dist/src/http.js +4 -4
  196. package/dist/src/login-handlers.js +2 -1
  197. package/dist/src/platform-process.js +98 -0
  198. package/dist/src/platform.js +1 -1
  199. package/dist/src/request-source.js +4 -0
  200. package/dist/src/telemetry-session.js +17 -0
  201. package/dist/src/telemetry.js +166 -3
  202. package/dist/src/update-check.js +5 -3
  203. package/dist/src/upgrade.js +20 -8
  204. package/package.json +1 -1
  205. package/card-skills/douyin-interest-card-capability/references/opencard/component/svg.md +0 -58
@@ -3,7 +3,7 @@
3
3
  "capabilities": [
4
4
  {"id": "tt.arrayBufferToBase64", "type": "api", "name": "tt.arrayBufferToBase64", "summary_zh": "将 arraybuffer 对象转成 base64 字符串。", "search_terms_zh": ["tt.arrayBufferToBase64", "arrayBufferToBase64", "将 arraybuffer 对象转成 base64 字符串。", "foundation", "arraybuffer", "unkown", "useCardTaro((taro) => { ... })", "taro.arrayBufferToBase64(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.arrayBufferToBase64(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "foundation", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "array-buffer-to-base64.md", "has_taro_example": true},
5
5
  {"id": "tt.base64ToArrayBuffer", "type": "api", "name": "tt.base64ToArrayBuffer", "summary_zh": "将 base64 字符串转成 arraybuffer 对象。", "search_terms_zh": ["tt.base64ToArrayBuffer", "base64ToArrayBuffer", "将 base64 字符串转成 arraybuffer 对象。", "foundation", "str", "unkown", "useCardTaro((taro) => { ... })", "taro.base64ToArrayBuffer(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.base64ToArrayBuffer(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "foundation", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "base64-to-array-buffer.md", "has_taro_example": true},
6
- {"id": "tt.callContainer", "type": "api", "name": "tt.callContainer", "summary_zh": "调用抖音云容器服务。", "search_terms_zh": ["tt.callContainer", "callContainer", "调用抖音云容器服务。", "cloud/container", "useCardTaro((taro) => { ... })", "Network.request(taro, options)", "Network.request", "then/await", "catch", "在 React 组件顶层调用 useCardTaro((taro) => { ... }) 获取当前卡片实例,并调用 Network.request(taro, options)。", "调用语义:Network.request 返回 Promise;在 then/await 读取成功结果,在 catch 记录完整异常。", "工程网络层内部使用 callContainer 完成容器调用。"], "domain": "cloud/container", "constraints": {"min_base_library": "unknown", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "call-container.md", "has_taro_example": true},
6
+ {"id": "tt.callContainer", "type": "api", "name": "tt.callContainer", "summary_zh": "调用抖音云容器服务。", "search_terms_zh": ["tt.callContainer", "callContainer", "调用抖音云容器服务。", "cloud/container", "useCardTaro((taro) => { ... })", "Network.request(taro, options)", "Network.request", "then/await", "catch", "timeout", "0~60000ms", "在 React 组件顶层调用 useCardTaro((taro) => { ... }) 获取当前卡片实例,并调用 Network.request(taro, options)。", "调用语义:Network.request 返回 Promise;在 then/await 读取成功结果,在 catch 记录完整异常。", "工程网络层内部使用 callContainer 完成容器调用。", "timeout 取值范围为 0~60000ms;超出范围时在请求发出前返回参数错误。"], "domain": "cloud/container", "constraints": {"min_base_library": "unknown", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "call-container.md", "has_taro_example": true},
7
7
  {"id": "tt.canIUse", "type": "api", "name": "tt.canIUse", "summary_zh": "判断小程序的 API、回调、参数、组件、Page 或 Component 实例的属性和方法等是否在当前版本可用。", "search_terms_zh": ["tt.canIUse", "canIUse", "判断小程序的 API、回调、参数、组件、Page 或 Component 实例的属性和方法等是否在当前版本可用。", "foundation", "schema", "unkown", "useCardTaro((taro) => { ... })", "taro.canIUse(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.canIUse(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "foundation", "constraints": {"min_base_library": "1.35.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "can-iuse.md", "has_taro_example": true},
8
8
  {"id": "tt.checkSession", "type": "api", "name": "tt.checkSession", "summary_zh": "用户的登录态具有时效性,随着用户未使用小程序的时间增加,用户的登录态越容易失效;反之,则用户登录态可持续保持有效。", "search_terms_zh": ["tt.checkSession", "checkSession", "用户的登录态具有时效性,随着用户未使用小程序的时间增加,用户的登录态越容易失效;反之,则用户登录态可持续保持有效。", "open-interface/log-in", "success", "res", "res.errMsg", "fail", "useCardTaro((taro) => { ... })", "taro.checkSession(...)", "then/await", "catch", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.checkSession(...) 使用当前卡片实例。", "调用语义:返回 Promise;在 then/await 读取成功结果,在 catch 记录完整异常。"], "domain": "open-interface/log-in", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "check-session.md", "has_taro_example": true},
9
9
  {"id": "tt.chooseImage", "type": "api", "name": "tt.chooseImage", "summary_zh": "从系统相册中选择图片,或使用相机拍摄图片,选取成功后将存入本地临时文件,并在 success 回调中返回相应路径列表。", "search_terms_zh": ["tt.chooseImage", "chooseImage", "从系统相册中选择图片,或使用相机拍摄图片,选取成功后将存入本地临时文件,并在 success 回调中返回相应路径列表。", "media/picture", "count", "sourceType", "sizeType", "success", "res", "res.errMsg", "res.tempFiles", "res.tempFiles.path", "res.tempFiles.size", "res.tempFilePaths", "fail", "useCardTaro((taro) => { ... })", "taro.chooseImage(...)", "then/await", "catch", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.chooseImage(...) 使用当前卡片实例。", "调用语义:返回 Promise;在 then/await 读取成功结果,在 catch 记录完整异常。"], "domain": "media/picture", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "choose-image.md", "has_taro_example": true},
@@ -14,12 +14,12 @@
14
14
  {"id": "tt.createChannelVideoContext", "type": "api", "name": "tt.createChannelVideoContext", "summary_zh": "创建 ChannelVideo 上下文,用于控制播放、暂停和停止。", "search_terms_zh": ["tt.createChannelVideoContext", "createChannelVideoContext", "创建 ChannelVideo 上下文,用于控制播放、暂停和停止。", "media/channel-video", "id", "useCardTaro((taro) => { ... })", "taro.createChannelVideoContext(id)", "play()", "pause()", "stop()", "[open-card] createChannelVideoContext is nonsupport in h5", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createChannelVideoContext(id) 获取当前卡片的 ChannelVideo 上下文。", "调用语义:返回上下文对象;组件 id 与调用参数保持一致,通过返回对象调用 play()、pause()、stop()。", "H5 facade:不支持,调用会抛出 [open-card] createChannelVideoContext is nonsupport in h5。"], "domain": "media/channel-video", "constraints": {"min_base_library": "unknown", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-channel-video-context.md", "has_taro_example": true},
15
15
  {"id": "tt.createCloud", "type": "api", "name": "tt.createCloud", "summary_zh": "抖音云创建", "search_terms_zh": ["tt.createCloud", "createCloud", "抖音云创建", "useCardTaro((taro) => { ... })", "taro.createCloud(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createCloud(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "unknown", "constraints": {"min_base_library": "2.70.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-cloud.md", "has_taro_example": true},
16
16
  {"id": "tt.createEventSource", "type": "api", "name": "tt.createEventSource", "summary_zh": "小程序流式传输能力,调用后返回一个 EventSource 实例。", "search_terms_zh": ["tt.createEventSource", "createEventSource", "小程序流式传输能力,调用后返回一个 EventSource 实例。", "params", "params.header", "params.method", "params.data", "params.url", "timeout", "EventSourceTask", "useCardTaro((taro) => { ... })", "taro.createEventSource(...)", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createEventSource(...) 使用当前卡片实例。", "调用语义:返回任务对象;通过任务对象注册消息、错误和结束回调。"], "domain": "unknown", "constraints": {"min_base_library": "3.35.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "create-event-source.md", "has_taro_example": true},
17
- {"id": "tt.createInnerAudioContext", "type": "api", "name": "tt.createInnerAudioContext", "summary_zh": "创建并返回内部 audio 上下文 innerAudioContext 实例,通过它能够操作音频播放。", "search_terms_zh": ["tt.createInnerAudioContext", "createInnerAudioContext", "创建并返回内部 audio 上下文 innerAudioContext 实例,通过它能够操作音频播放。", "media/audio", "useCardTaro((taro) => { ... })", "taro.createInnerAudioContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createInnerAudioContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。"], "domain": "media/audio", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-inner-audio-context.md", "has_taro_example": true},
18
- {"id": "tt.createMapContext", "type": "api", "name": "tt.createMapContext", "summary_zh": "创建 组件上下文 MapContext 对象。", "search_terms_zh": ["tt.createMapContext", "createMapContext", "创建 组件上下文 MapContext 对象。", "map", "id", "component", "MapContext", "useCardTaro((taro) => { ... })", "taro.createMapContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createMapContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。"], "domain": "map", "constraints": {"min_base_library": "1.63.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "create-map-context.md", "has_taro_example": true},
19
- {"id": "tt.createSelectorQuery", "type": "api", "name": "tt.createSelectorQuery", "summary_zh": "返回一个 SelectorQuery 的实例,该实例上有 select、 selectViewport 等方法用于选择页面节点或显示区域。", "search_terms_zh": ["tt.createSelectorQuery", "createSelectorQuery", "返回一个 SelectorQuery 的实例,该实例上有 select、 selectViewport 等方法用于选择页面节点或显示区域。", "ttml", "useCardTaro((taro) => { ... })", "taro.createSelectorQuery(...)", "select", "boundingClientRect", "exec", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createSelectorQuery(...) 使用当前卡片实例。", "调用语义:返回链式对象;按对象自身的 select、boundingClientRect、exec 等方法继续调用。"], "domain": "ttml", "constraints": {"min_base_library": "1.7.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-selector-query.md", "has_taro_example": true},
20
- {"id": "tt.createVideoContext", "type": "api", "name": "tt.createVideoContext", "summary_zh": "根据 video 组件 id 创建可以控制组件的上下文 VideoContext 对象。", "search_terms_zh": ["tt.createVideoContext", "createVideoContext", "根据 video 组件 id 创建可以控制组件的上下文 VideoContext 对象。", "media/video", "id", "component", "VideoContext", "useCardTaro((taro) => { ... })", "taro.createVideoContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createVideoContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。"], "domain": "media/video", "constraints": {"min_base_library": "1.18.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "create-video-context.md", "has_taro_example": true},
17
+ {"id": "tt.createInnerAudioContext", "type": "api", "name": "tt.createInnerAudioContext", "summary_zh": "创建并返回内部 audio 上下文 innerAudioContext 实例,通过它能够操作音频播放。", "search_terms_zh": ["tt.createInnerAudioContext", "createInnerAudioContext", "创建并返回内部 audio 上下文 innerAudioContext 实例,通过它能够操作音频播放。", "media/audio", "useCardTaro((taro) => { ... })", "taro.createInnerAudioContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createInnerAudioContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。", "InnerAudioContext", "src", "音频资源地址,仅支持临时路径(如通过下载到本地的音频地址)、网络地址(该地址的域名必须在开发者平台 request 域名白名单中配置),只支持 mp3、wav…", "startTime", "开始播放的位置(单位:s)", "autoplay", "是否自动播放", "loop", "是否自动循环", "obeyMuteSwitch", "是否遵循系统静音开关,当此参数为 false 时,即使用户打开了静音开关,也能继续发出声音", "volume", "当前音量,范围 0 ~ 1", "playbackRate", "播放速度。", "duration", "当前音频总时长(单位:s),只有在当前有合法的 src 时返回", "currentTime", "当前音频进度(单位:s),只有在当前有合法的 src 时返回", "paused", "当前音频是否处于暂停状态", "buffered", "当前音频已缓冲部分(单位:s),仅保证当前播放时间点到此时间点内容已缓冲,只读", "tt.InnerAudioContext.destroy", "destroy", "销毁当前实例。", "tt.InnerAudioContext.offCanplay", "offCanplay", "取消 onCanplay 监听的事件", "tt.InnerAudioContext.offEnded", "offEnded", "取消 onEnded 监听的事件", "tt.InnerAudioContext.offError", "offError", "取消 onError 监听的事件", "tt.InnerAudioContext.offPause", "offPause", "取消 onPause 监听的事件", "tt.InnerAudioContext.offPlay", "offPlay", "取消 onPlay 监听的事件", "tt.InnerAudioContext.offSeeked", "offSeeked", "取消 onSeeked 监听的事件", "tt.InnerAudioContext.offSeeking", "offSeeking", "取消 onSeeking 监听的事件", "tt.InnerAudioContext.offStop", "offStop", "取消 onStop 监听的事件", "tt.InnerAudioContext.offTimeUpdate", "offTimeUpdate", "取消 onTimeUpdate 监听的事件", "tt.InnerAudioContext.offWaiting", "offWaiting", "取消 onWaiting 监听的事件", "tt.InnerAudioContext.onCanplay", "onCanplay", "监听音频进入可以播放状态,但不保证后面可以流畅播放", "tt.InnerAudioContext.onEnded", "onEnded", "监听自然播放结束事件", "tt.InnerAudioContext.onError", "onError", "监听音频播放出错事件", "tt.InnerAudioContext.onPause", "onPause", "监听音频暂停事件", "tt.InnerAudioContext.onPlay", "onPlay", "监听音频播放事件", "tt.InnerAudioContext.onSeeked", "onSeeked", "监听音频完成 seek 操作的事件", "tt.InnerAudioContext.onSeeking", "onSeeking", "监听音频开始进行 seek 操作的事件", "tt.InnerAudioContext.onStop", "onStop", "监听音频停止播放事件", "tt.InnerAudioContext.onTimeUpdate", "onTimeUpdate", "监听音频进度更新事件", "tt.InnerAudioContext.onWaiting", "onWaiting", "监听音频加载中事件,当音频因为数据不足,需要停下来加载时会触发", "tt.InnerAudioContext.pause", "pause", "暂停播放", "tt.InnerAudioContext.play", "play", "播放音频", "tt.InnerAudioContext.seek", "seek", "跳转到指定位置播放", "tt.InnerAudioContext.stop", "stop", "停止播放"], "domain": "media/audio", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-inner-audio-context.md", "has_taro_example": true},
18
+ {"id": "tt.createMapContext", "type": "api", "name": "tt.createMapContext", "summary_zh": "创建 组件上下文 MapContext 对象。", "search_terms_zh": ["tt.createMapContext", "createMapContext", "创建 组件上下文 MapContext 对象。", "map", "id", "component", "MapContext", "useCardTaro((taro) => { ... })", "taro.createMapContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createMapContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。", "tt.MapContext.addGroundOverlay", "addGroundOverlay", "创建自定义图片图层,图片会随着地图缩放而缩放", "tt.MapContext.getCenterLocation", "getCenterLocation", "获取当前地图中心的经纬度,返回的是 gcj02 坐标系,可以用于 tt.openLocation()", "tt.MapContext.getRegion", "getRegion", "获取当前地图的视野范围", "tt.MapContext.getRotate", "getRotate", "获取当前地图的旋转角", "tt.MapContext.getScale", "getScale", "获取当前地图的缩放级别", "tt.MapContext.getSkew", "getSkew", "获取当前地图的倾斜角", "tt.MapContext.includePoints", "includePoints", "缩放视野展示所有经纬度", "tt.MapContext.mapToScreen", "mapToScreen", "用于将地图经纬度坐标系转换成屏幕坐标系", "tt.MapContext.moveAlong", "moveAlong", "沿指定路径移动 marker,用于轨迹回放等场景。", "tt.MapContext.moveToLocation", "moveToLocation", "将地图中心移动到定位点", "tt.MapContext.openMapApp", "openMapApp", "拉起地图 APP 选择导航", "tt.MapContext.removeGroundOverlay", "removeGroundOverlay", "移除自定义图片图层", "tt.MapContext.screenToMap", "screenToMap", "用于将屏幕坐标系转换成地图经纬度坐标系", "tt.MapContext.setCenterOffset", "setCenterOffset", "设置地图中心点偏移,未设置时默认偏移为 [0.5, 0.5]", "tt.MapContext.setLocMarkerIcon", "setLocMarkerIcon", "设置定位点图标,支持网络路径、本地路径、代码包路径", "tt.MapContext.translateMarker", "translateMarker", "平移 marker,带动画", "tt.MapContext.updateGroundOverlay", "updateGroundOverlay", "更新自定义图片图层"], "domain": "map", "constraints": {"min_base_library": "1.63.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "create-map-context.md", "has_taro_example": true},
19
+ {"id": "tt.createSelectorQuery", "type": "api", "name": "tt.createSelectorQuery", "summary_zh": "返回一个 SelectorQuery 的实例,该实例上有 select、 selectViewport 等方法用于选择页面节点或显示区域。", "search_terms_zh": ["tt.createSelectorQuery", "createSelectorQuery", "返回一个 SelectorQuery 的实例,该实例上有 select、 selectViewport 等方法用于选择页面节点或显示区域。", "ttml", "useCardTaro((taro) => { ... })", "taro.createSelectorQuery(...)", "select", "boundingClientRect", "exec", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createSelectorQuery(...) 使用当前卡片实例。", "调用语义:返回链式对象;按对象自身的 select、boundingClientRect、exec 等方法继续调用。", "SelectorQuery", "tt.SelectorQuery.exec", "执行所有的查询。", "tt.SelectorQuery.in", "in", "将选择器的选取范围更改为自定义组件", "tt.SelectorQuery.select", "在当前页面下选择第一个匹配选择器 selector 的节点", "tt.SelectorQuery.selectAll", "selectAll", "在当前页面下选择匹配选择器 selector 的所有节点", "tt.SelectorQuery.selectViewport", "selectViewport", "选择显示区域"], "domain": "ttml", "constraints": {"min_base_library": "1.7.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "create-selector-query.md", "has_taro_example": true},
20
+ {"id": "tt.createVideoContext", "type": "api", "name": "tt.createVideoContext", "summary_zh": "根据 video 组件 id 创建可以控制组件的上下文 VideoContext 对象。", "search_terms_zh": ["tt.createVideoContext", "createVideoContext", "根据 video 组件 id 创建可以控制组件的上下文 VideoContext 对象。", "media/video", "id", "component", "VideoContext", "useCardTaro((taro) => { ... })", "taro.createVideoContext(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.createVideoContext(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。", "tt.VideoContext.exitFullScreen", "exitFullScreen", "退出全屏", "tt.VideoContext.getMediaVolume", "getMediaVolume", "获取音量", "tt.VideoContext.pause", "pause", "暂停视频", "tt.VideoContext.play", "play", "播放视频", "tt.VideoContext.playbackRate", "playbackRate", "设置倍速播放", "tt.VideoContext.requestFullScreen", "requestFullScreen", "进入全屏", "tt.VideoContext.seek", "seek", "视频点播", "tt.VideoContext.setMediaVolume", "setMediaVolume", "设置音量", "tt.VideoContext.setWaterMark", "setWaterMark", "设置水印", "tt.VideoContext.stop", "stop", "停止视频"], "domain": "media/video", "constraints": {"min_base_library": "1.18.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "create-video-context.md", "has_taro_example": true},
21
21
  {"id": "tt.downloadFile", "type": "api", "name": "tt.downloadFile", "summary_zh": "下载文件资源到本地。", "search_terms_zh": ["tt.downloadFile", "downloadFile", "下载文件资源到本地。", "network/http", "header", "filePath", "timeout", "url", "DownloadTask", "success", "res", "res.tempFilePath", "res.filePath", "res.header", "res.errMsg", "res.statusCode", "res.profile", "res.profile.domainLookupStart", "res.profile.domainLookupEnd", "res.profile.connectStart", "res.profile.connectEnd", "res.profile.sslConnectionStart", "res.profile.sslConnectionEnd", "res.profile.requestStart", "res.profile.requestEnd", "res.profile.rtt", "res.profile.estimateNetType", "res.profile.throughputKbps", "res.profile.port", "res.profile.socketReused", "res.profile.sentBytesCount", "res.profile.receivedBytesCount", "fail", "useCardTaro((taro) => { ... })", "Network.downloadFile(taro, options)", "then/await", "catch", "在 React 组件顶层调用 useCardTaro((taro) => { ... }) 获取当前卡片实例,并调用 Network.downloadFile(taro, options)。", "调用语义:返回 Promise;在 then/await 读取成功结果,在 catch 记录完整异常。", "工程网络层统一处理卡片容器路由。"], "domain": "network/http", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "download-file.md", "has_taro_example": true},
22
- {"id": "tt.getBackgroundAudioManager", "type": "api", "name": "tt.getBackgroundAudioManager", "summary_zh": "获取全局唯一的背景音频管理器 BackgroundAudioManager。", "search_terms_zh": ["tt.getBackgroundAudioManager", "getBackgroundAudioManager", "获取全局唯一的背景音频管理器 BackgroundAudioManager。", "media/audio", "useCardTaro((taro) => { ... })", "taro.getBackgroundAudioManager(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.getBackgroundAudioManager(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。"], "domain": "media/audio", "constraints": {"min_base_library": "1.36.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "get-background-audio-manager.md", "has_taro_example": true},
22
+ {"id": "tt.getBackgroundAudioManager", "type": "api", "name": "tt.getBackgroundAudioManager", "summary_zh": "获取全局唯一的背景音频管理器 BackgroundAudioManager。", "search_terms_zh": ["tt.getBackgroundAudioManager", "getBackgroundAudioManager", "获取全局唯一的背景音频管理器 BackgroundAudioManager。", "media/audio", "useCardTaro((taro) => { ... })", "taro.getBackgroundAudioManager(...)", "useRef", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.getBackgroundAudioManager(...) 使用当前卡片实例。", "调用语义:返回当前卡片实例对应的上下文对象;后续能力通过该对象的方法调用。", "将返回的上下文对象保存在 useRef 或当前组件作用域中,再由用户事件调用对象方法。", "BackgroundAudioManager", "src", "音频源地址, 默认为空字符串,当设置了新的 src 时,会自动开始播放,仅支持临时路径(如通过下载到本地的音频地址)、网络地址(需在小程序开发者平台配置域名白…", "startTime", "开始播放的位置(单位:s)", "title", "音频标题, 用于原生音频播放器音频标题", "epname", "专辑名", "singer", "歌手名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值", "coverImgUrl", "封面图 URL,用于做原生音频播放器背景图。", "webUrl", "页面链接,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值", "protocol", "音频协议。", "audioPage", "设置点击悬浮控件/通知栏跳转当前小程序指定页面,数据格式为 {path:\"(音乐播放路径)\",query:{name:''}}", "playbackRate", "播放速度。", "duration", "当前音频总时长(单位:s)", "currentTime", "当前音频进度(单位:s)", "paused", "当前音频是否处于暂停状态", "buffered", "当前音频已缓冲部分(单位:s)", "tt.BackgroundAudioManager.offCanplay", "offCanplay", "移除 onCanplay 绑定的事件处理函数。", "tt.BackgroundAudioManager.offEnded", "offEnded", "移除 onEnded 绑定的事件处理函数。", "tt.BackgroundAudioManager.offError", "offError", "移除 onError 绑定的事件处理函数", "tt.BackgroundAudioManager.offNext", "offNext", "移除 onNext 绑定的事件处理函数", "tt.BackgroundAudioManager.offPause", "offPause", "移除 onPause 绑定的事件处理函数。", "tt.BackgroundAudioManager.offPlay", "offPlay", "移除 onPlay 绑定的事件处理函数。", "tt.BackgroundAudioManager.offPrev", "offPrev", "移除 onPrev 绑定的事件处理函数", "tt.BackgroundAudioManager.offSeeked", "offSeeked", "移除 onSeeked 绑定的事件处理函数", "tt.BackgroundAudioManager.offSeeking", "offSeeking", "移除 onSeeking 绑定的事件处理函数", "tt.BackgroundAudioManager.offStop", "offStop", "移除 onStop 绑定的事件处理函数。", "tt.BackgroundAudioManager.offTimeUpdate", "offTimeUpdate", "移除 onTimeUpdate 绑定的事件处理函数。", "tt.BackgroundAudioManager.offWaiting", "offWaiting", "取消监听 BackgroundAudioManager.onWaiting 绑定的事件处理函数。", "tt.BackgroundAudioManager.onCanplay", "onCanplay", "监听背景音频进入可播放状态事件。", "tt.BackgroundAudioManager.onEnded", "onEnded", "监听背景音频自然播放结束事件。", "tt.BackgroundAudioManager.onError", "onError", "监听背景音频播放错误事件。", "tt.BackgroundAudioManager.onNext", "onNext", "监听用户在系统音乐播放面板点击下一曲事件。", "tt.BackgroundAudioManager.onPause", "onPause", "监听背景音频暂停事件。", "tt.BackgroundAudioManager.onPlay", "onPlay", "监听背景音频播放事件。", "tt.BackgroundAudioManager.onPrev", "onPrev", "监听用户在系统音乐播放面板点击上一曲事件。", "tt.BackgroundAudioManager.onSeeked", "onSeeked", "监听背景音频完成跳转操作事件。", "tt.BackgroundAudioManager.onSeeking", "onSeeking", "监听背景音频开始跳转操作事件。", "tt.BackgroundAudioManager.onStop", "onStop", "监听背景音频停止事件。", "tt.BackgroundAudioManager.onTimeUpdate", "onTimeUpdate", "监听背景音频播放进度更新事件。", "tt.BackgroundAudioManager.onWaiting", "onWaiting", "监听加载中事件,当音频因为数据不足,需要停下来加载时会触发,音频开始播放后需要停下来加载资源时也会触发,此时首先会暂停播放,待资源加载完成后继续播放。", "tt.BackgroundAudioManager.pause", "pause", "暂停播放。", "tt.BackgroundAudioManager.play", "play", "播放背景音频。", "tt.BackgroundAudioManager.seek", "seek", "跳转到 position 指定的位置播放,数据格式为 number,单位为 s。", "tt.BackgroundAudioManager.stop", "stop", "停止播放。"], "domain": "media/audio", "constraints": {"min_base_library": "1.36.0", "requires_user_auth": "unknown", "web_simulator_support": "unknown"}, "detail": "get-background-audio-manager.md", "has_taro_example": true},
23
23
  {"id": "tt.getDeviceInfoSync", "type": "api", "name": "tt.getDeviceInfoSync", "summary_zh": "用于获取当前设备的信息。", "search_terms_zh": ["tt.getDeviceInfoSync", "getDeviceInfoSync", "用于获取当前设备的信息。", "device/system-information", "abi", "deviceAbi", "benchmarkLevel", "brand", "model", "system", "platform", "CPUType", "memorySize", "useCardTaro((taro) => { ... })", "taro.getDeviceInfoSync(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.getDeviceInfoSync(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "device/system-information", "constraints": {"min_base_library": "1.0.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "get-device-info-sync.md", "has_taro_example": true},
24
24
  {"id": "tt.getEnterOptionsSync", "type": "api", "name": "tt.getEnterOptionsSync", "summary_zh": "获取本次小程序启动时的参数。", "search_terms_zh": ["tt.getEnterOptionsSync", "getEnterOptionsSync", "获取本次小程序启动时的参数。", "foundation/lifecycle", "LaunchOptions", "LaunchOptions.query", "LaunchOptions.path", "LaunchOptions.scene", "LaunchOptions.refererInfo", "LaunchOptions.refererInfo.appId", "LaunchOptions.refererInfo.extraData", "LaunchOptions.showFrom", "useCardTaro((taro) => { ... })", "taro.getEnterOptionsSync(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.getEnterOptionsSync(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "foundation/lifecycle", "constraints": {"min_base_library": "2.12.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "get-enter-options-sync.md", "has_taro_example": true},
25
25
  {"id": "tt.getEnvInfoSync", "type": "api", "name": "tt.getEnvInfoSync", "summary_zh": "获取小程序环境信息。", "search_terms_zh": ["tt.getEnvInfoSync", "getEnvInfoSync", "获取小程序环境信息。", "foundation/env", "microapp", "microapp.mpVersion", "microapp.envType", "microapp.appId", "common", "common.USER_DATA_PATH", "useCardTaro((taro) => { ... })", "taro.getEnvInfoSync(...)", "console.log", "在 React 组件顶层调用 useCardTaro((taro) => { ... }),通过 taro.getEnvInfoSync(...) 使用当前卡片实例。", "调用语义:直接返回同步结果;调用后立即读取并用 console.log 验证返回值。"], "domain": "foundation/env", "constraints": {"min_base_library": "2.21.0", "requires_user_auth": false, "web_simulator_support": "unknown"}, "detail": "get-env-info-sync.md", "has_taro_example": true},
@@ -23,7 +23,60 @@
23
23
 
24
24
  ## 返回值
25
25
 
26
- 无。
26
+ 返回 `InnerAudioContext` 实例。实例属性和方法见下方说明。
27
+
28
+ ## 返回实例:`InnerAudioContext`
29
+
30
+ ### 可设置属性
31
+
32
+ | 属性 | 类型 | 默认值 | 必填 | 最低基础库 | 说明 |
33
+ | --- | --- | --- | --- | --- | --- |
34
+ | `src` | string | '' | 是 | 1.0.0 | 音频资源地址,仅支持临时路径(如通过下载到本地的音频地址)、网络地址(该地址的域名必须在开发者平台 request 域名白名单中配置),只支持 mp3、wav、m4a、aac 格式。 |
35
+ | `startTime` | number | 0 | 否 | 1.0.0 | 开始播放的位置(单位:s) |
36
+ | `autoplay` | boolean | false | 否 | 1.0.0 | 是否自动播放 |
37
+ | `loop` | boolean | false | 否 | 1.0.0 | 是否自动循环 |
38
+ | `obeyMuteSwitch` | boolean | true | 否 | 1.0.0 | 是否遵循系统静音开关,当此参数为 false 时,即使用户打开了静音开关,也能继续发出声音 |
39
+ | `volume` | number | 1 | 否 | 1.0.0 | 当前音量,范围 0 ~ 1 |
40
+ | `playbackRate` | number | 1 | 否 | 2.33.0 | 播放速度。范围 0.5 ~ 2.0,默认为 1 |
41
+
42
+ ### 只读属性
43
+
44
+ | 属性 | 类型 | 默认值 | 必填 | 最低基础库 | 说明 |
45
+ | --- | --- | --- | --- | --- | --- |
46
+ | `duration` | number | - | - | 1.0.0 | 当前音频总时长(单位:s),只有在当前有合法的 src 时返回 |
47
+ | `currentTime` | number | - | - | 1.0.0 | 当前音频进度(单位:s),只有在当前有合法的 src 时返回 |
48
+ | `paused` | boolean | - | - | 1.0.0 | 当前音频是否处于暂停状态 |
49
+ | `buffered` | number | - | - | 1.0.0 | 当前音频已缓冲部分(单位:s),仅保证当前播放时间点到此时间点内容已缓冲,只读 |
50
+
51
+ ### 实例方法
52
+
53
+ | 方法 | 说明 | 最低基础库 |
54
+ | --- | --- | --- |
55
+ | `destroy` | 销毁当前实例。销毁后该实例将不存在,如需播放需要再次创建 | 1.0.0 |
56
+ | `offCanplay` | 取消 onCanplay 监听的事件 | 1.0.0 |
57
+ | `offEnded` | 取消 onEnded 监听的事件 | 1.0.0 |
58
+ | `offError` | 取消 onError 监听的事件 | 1.0.0 |
59
+ | `offPause` | 取消 onPause 监听的事件 | 1.0.0 |
60
+ | `offPlay` | 取消 onPlay 监听的事件 | 1.0.0 |
61
+ | `offSeeked` | 取消 onSeeked 监听的事件 | 1.0.0 |
62
+ | `offSeeking` | 取消 onSeeking 监听的事件 | 1.0.0 |
63
+ | `offStop` | 取消 onStop 监听的事件 | 1.0.0 |
64
+ | `offTimeUpdate` | 取消 onTimeUpdate 监听的事件 | 1.0.0 |
65
+ | `offWaiting` | 取消 onWaiting 监听的事件 | 1.0.0 |
66
+ | `onCanplay` | 监听音频进入可以播放状态,但不保证后面可以流畅播放 | 1.0.0 |
67
+ | `onEnded` | 监听自然播放结束事件 | 1.0.0 |
68
+ | `onError` | 监听音频播放出错事件 | 1.0.0 |
69
+ | `onPause` | 监听音频暂停事件 | 1.0.0 |
70
+ | `onPlay` | 监听音频播放事件 | 1.0.0 |
71
+ | `onSeeked` | 监听音频完成 seek 操作的事件 | 1.0.0 |
72
+ | `onSeeking` | 监听音频开始进行 seek 操作的事件 | 1.0.0 |
73
+ | `onStop` | 监听音频停止播放事件 | 1.0.0 |
74
+ | `onTimeUpdate` | 监听音频进度更新事件 | 1.0.0 |
75
+ | `onWaiting` | 监听音频加载中事件,当音频因为数据不足,需要停下来加载时会触发 | 1.0.0 |
76
+ | `pause` | 暂停播放 | 1.0.0 |
77
+ | `play` | 播放音频 | 1.0.0 |
78
+ | `seek` | 跳转到指定位置播放 | 1.0.0 |
79
+ | `stop` | 停止播放 | 1.0.0 |
27
80
 
28
81
  ## 回调
29
82
 
@@ -34,6 +87,8 @@
34
87
 
35
88
  ## Taro 代码示例
36
89
 
90
+ 来源:[抖音开放平台官网文档](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/api/media/audio/inner-audio-context/overview)
91
+
37
92
  `audioUrl` 使用业务接口返回的稳定音频资源地址。
38
93
 
39
94
  ```tsx
@@ -43,9 +98,13 @@ export default function InnerAudioDemo({ audioUrl }: { audioUrl: string }) {
43
98
  useCardTaro((taro) => {
44
99
  const audio = taro.createInnerAudioContext();
45
100
  audio.src = audioUrl;
101
+ audio.obeyMuteSwitch = true;
102
+ audio.volume = 1;
46
103
  audio.onPlay(() => console.log('createInnerAudioContext play'));
104
+ audio.onEnded(() => console.log('createInnerAudioContext ended'));
47
105
  audio.onError((error) => console.error('createInnerAudioContext fail', error));
48
106
  audio.play();
107
+ return () => audio.destroy();
49
108
  });
50
109
 
51
110
  return null;
@@ -30,6 +30,30 @@
30
30
  | --- | --- | --- | --- | --- | --- |
31
31
  | `MapContext` | object | 未标注 | - | 1.63.0 | MapContext |
32
32
 
33
+ ## 返回实例:`MapContext`
34
+
35
+ ### 实例方法
36
+
37
+ | 方法 | 说明 | 最低基础库 |
38
+ | --- | --- | --- |
39
+ | `addGroundOverlay` | 创建自定义图片图层,图片会随着地图缩放而缩放 | 2.42.0 |
40
+ | `getCenterLocation` | 获取当前地图中心的经纬度,返回的是 gcj02 坐标系,可以用于 tt.openLocation() | 1.63.0 |
41
+ | `getRegion` | 获取当前地图的视野范围 | 1.63.0 |
42
+ | `getRotate` | 获取当前地图的旋转角 | 2.34.0 |
43
+ | `getScale` | 获取当前地图的缩放级别 | 1.63.0 |
44
+ | `getSkew` | 获取当前地图的倾斜角 | 2.34.0 |
45
+ | `includePoints` | 缩放视野展示所有经纬度 | 1.63.0 |
46
+ | `mapToScreen` | 用于将地图经纬度坐标系转换成屏幕坐标系 | 2.34.0 |
47
+ | `moveAlong` | 沿指定路径移动 marker,用于轨迹回放等场景。动画完成时触发回调事件,若动画进行中,对同一 marker 再次调用 moveAlong 方法,前一次的动画将被打断。 | 2.34.0 |
48
+ | `moveToLocation` | 将地图中心移动到定位点 | 1.63.0 |
49
+ | `openMapApp` | 拉起地图 APP 选择导航 | 2.42.0 |
50
+ | `removeGroundOverlay` | 移除自定义图片图层 | 2.42.0 |
51
+ | `screenToMap` | 用于将屏幕坐标系转换成地图经纬度坐标系 | 2.34.0 |
52
+ | `setCenterOffset` | 设置地图中心点偏移,未设置时默认偏移为 [0.5, 0.5] | 2.42.0 |
53
+ | `setLocMarkerIcon` | 设置定位点图标,支持网络路径、本地路径、代码包路径 | 2.42.0 |
54
+ | `translateMarker` | 平移 marker,带动画 | 2.34.0 |
55
+ | `updateGroundOverlay` | 更新自定义图片图层 | 2.42.0 |
56
+
33
57
  ## 回调
34
58
 
35
59
  无元数据。
@@ -22,7 +22,19 @@
22
22
 
23
23
  ## 返回值
24
24
 
25
- 无。
25
+ 返回 `SelectorQuery` 实例。实例属性和方法见下方说明。
26
+
27
+ ## 返回实例:`SelectorQuery`
28
+
29
+ ### 实例方法
30
+
31
+ | 方法 | 说明 | 最低基础库 |
32
+ | --- | --- | --- |
33
+ | `exec` | 执行所有的查询。查询结果按查询次序构成数组,在 callback 的第一个参数中返回 | 1.7.0 |
34
+ | `in` | 将选择器的选取范围更改为自定义组件 | 1.7.0 |
35
+ | `select` | 在当前页面下选择第一个匹配选择器 selector 的节点 | 1.7.0 |
36
+ | `selectAll` | 在当前页面下选择匹配选择器 selector 的所有节点 | 1.7.0 |
37
+ | `selectViewport` | 选择显示区域 | 1.7.0 |
26
38
 
27
39
  ## 回调
28
40
 
@@ -30,6 +30,23 @@
30
30
  | --- | --- | --- | --- | --- | --- |
31
31
  | `VideoContext` | object | 未标注 | - | 1.18.0 | VideoContext |
32
32
 
33
+ ## 返回实例:`VideoContext`
34
+
35
+ ### 实例方法
36
+
37
+ | 方法 | 说明 | 最低基础库 |
38
+ | --- | --- | --- |
39
+ | `exitFullScreen` | 退出全屏 | 1.18.0 |
40
+ | `getMediaVolume` | 获取音量 | 2.65.0 |
41
+ | `pause` | 暂停视频 | 1.18.0 |
42
+ | `play` | 播放视频 | 1.18.0 |
43
+ | `playbackRate` | 设置倍速播放 | 2.65.0 |
44
+ | `requestFullScreen` | 进入全屏 | 1.18.0 |
45
+ | `seek` | 视频点播 | 1.18.0 |
46
+ | `setMediaVolume` | 设置音量 | 2.65.0 |
47
+ | `setWaterMark` | 设置水印 | 2.48.0 |
48
+ | `stop` | 停止视频 | 1.18.0 |
49
+
33
50
  ## 回调
34
51
 
35
52
  无元数据。
@@ -33,9 +33,7 @@
33
33
 
34
34
  ## 返回值
35
35
 
36
- | 字段 | 类型 | 必填 | 默认值 | 字段最低基础库 | 说明 |
37
- | --- | --- | --- | --- | --- | --- |
38
- | `DownloadTask` | object | 未标注 | - | 1.0.0 | DownloadTask |
36
+ `Network.downloadFile` 的公开返回类型为 `DownloadTask`。完整 HTTP(S) URL 直传分支返回原生 `DownloadTask`;工程托管或代理分支返回 Promise。跨调用路径统一使用 `then/await` 或 `success`、`fail` 回调处理结果,`DownloadTask` 的中断和进度方法仅适用于原生直传分支。
39
37
 
40
38
  ## 回调
41
39
 
@@ -23,7 +23,66 @@
23
23
 
24
24
  ## 返回值
25
25
 
26
- 无。
26
+ 返回 `BackgroundAudioManager` 实例。实例属性和方法见下方说明。
27
+
28
+ ## 返回实例:`BackgroundAudioManager`
29
+
30
+ ### 可设置属性
31
+
32
+ | 属性 | 类型 | 默认值 | 必填 | 最低基础库 | 说明 |
33
+ | --- | --- | --- | --- | --- | --- |
34
+ | `src` | string | '' | 否 | 1.36.0 | 音频源地址, 默认为空字符串,当设置了新的 src 时,会自动开始播放,仅支持临时路径(如通过下载到本地的音频地址)、网络地址(需在小程序开发者平台配置域名白名单),所支持的格式同系统音频播放器 |
35
+ | `startTime` | number | 0 | 否 | 1.36.0 | 开始播放的位置(单位:s) |
36
+ | `title` | string | 小程序 AppID | 否 | 1.36.0 | 音频标题, 用于原生音频播放器音频标题 |
37
+ | `epname` | string | '' | 否 | 1.36.0 | 专辑名 |
38
+ | `singer` | string | '' | 否 | 1.36.0 | 歌手名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值 |
39
+ | `coverImgUrl` | string | 小程序图标 | 否 | 1.36.0 | 封面图 URL,用于做原生音频播放器背景图。原生音频播放器中的分享功能,分享出去的卡片配图及背景也将使用该图 |
40
+ | `webUrl` | string | '' | 否 | 1.36.0 | 页面链接,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值 |
41
+ | `protocol` | string | 'http' | 否 | 1.36.0 | 音频协议。默认值为 http,设置 HLS 可以支持播放 HLS 协议的直播音频 |
42
+ | `audioPage` | Object | ​ | 否 | 1.36.0 | 设置点击悬浮控件/通知栏跳转当前小程序指定页面,数据格式为 {path:"(音乐播放路径)",query:{name:''}} |
43
+ | `playbackRate` | number | 1 | 否 | 2.33.0 | 播放速度。范围 0.5 ~ 2.0,默认为 1 |
44
+
45
+ ### 只读属性
46
+
47
+ | 属性 | 类型 | 默认值 | 必填 | 最低基础库 | 说明 |
48
+ | --- | --- | --- | --- | --- | --- |
49
+ | `duration` | number | ​ | ​ | 1.36.0 | 当前音频总时长(单位:s) |
50
+ | `currentTime` | number | ​ | ​ | 1.36.0 | 当前音频进度(单位:s) |
51
+ | `paused` | boolean | ​ | ​ | 1.36.0 | 当前音频是否处于暂停状态 |
52
+ | `buffered` | number | ​ | ​ | 1.36.0 | 当前音频已缓冲部分(单位:s) |
53
+
54
+ ### 实例方法
55
+
56
+ | 方法 | 说明 | 最低基础库 |
57
+ | --- | --- | --- |
58
+ | `offCanplay` | 移除 onCanplay 绑定的事件处理函数。 | 1.36.0 |
59
+ | `offEnded` | 移除 onEnded 绑定的事件处理函数。 | 1.36.0 |
60
+ | `offError` | 移除 onError 绑定的事件处理函数 | 1.36.0 |
61
+ | `offNext` | 移除 onNext 绑定的事件处理函数 | 1.36.0 |
62
+ | `offPause` | 移除 onPause 绑定的事件处理函数。 | 1.36.0 |
63
+ | `offPlay` | 移除 onPlay 绑定的事件处理函数。 | 1.36.0 |
64
+ | `offPrev` | 移除 onPrev 绑定的事件处理函数 | 1.36.0 |
65
+ | `offSeeked` | 移除 onSeeked 绑定的事件处理函数 | 1.36.0 |
66
+ | `offSeeking` | 移除 onSeeking 绑定的事件处理函数 | 1.36.0 |
67
+ | `offStop` | 移除 onStop 绑定的事件处理函数。 | 1.36.0 |
68
+ | `offTimeUpdate` | 移除 onTimeUpdate 绑定的事件处理函数。 | 1.36.0 |
69
+ | `offWaiting` | 取消监听 BackgroundAudioManager.onWaiting 绑定的事件处理函数。 | 1.36.0 |
70
+ | `onCanplay` | 监听背景音频进入可播放状态事件。但不保证后面可以流畅播放。 | 1.36.0 |
71
+ | `onEnded` | 监听背景音频自然播放结束事件。 | 1.36.0 |
72
+ | `onError` | 监听背景音频播放错误事件。 | 1.36.0 |
73
+ | `onNext` | 监听用户在系统音乐播放面板点击下一曲事件。 | 1.36.0 |
74
+ | `onPause` | 监听背景音频暂停事件。 | 1.36.0 |
75
+ | `onPlay` | 监听背景音频播放事件。 | 1.36.0 |
76
+ | `onPrev` | 监听用户在系统音乐播放面板点击上一曲事件。 | 1.36.0 |
77
+ | `onSeeked` | 监听背景音频完成跳转操作事件。 | 1.36.0 |
78
+ | `onSeeking` | 监听背景音频开始跳转操作事件。 | 1.36.0 |
79
+ | `onStop` | 监听背景音频停止事件。 | 1.36.0 |
80
+ | `onTimeUpdate` | 监听背景音频播放进度更新事件。 | 1.36.0 |
81
+ | `onWaiting` | 监听加载中事件,当音频因为数据不足,需要停下来加载时会触发,音频开始播放后需要停下来加载资源时也会触发,此时首先会暂停播放,待资源加载完成后继续播放。 | 1.36.0 |
82
+ | `pause` | 暂停播放。 | 1.36.0 |
83
+ | `play` | 播放背景音频。 | 1.36.0 |
84
+ | `seek` | 跳转到 position 指定的位置播放,数据格式为 number,单位为 s。 | 1.36.0 |
85
+ | `stop` | 停止播放。 | 1.36.0 |
27
86
 
28
87
  ## 回调
29
88
 
@@ -36,9 +36,7 @@
36
36
 
37
37
  ## 返回值
38
38
 
39
- | 字段 | 类型 | 必填 | 默认值 | 字段最低基础库 | 说明 |
40
- | --- | --- | --- | --- | --- | --- |
41
- | `RequestTask` | object | 未标注 | - | 1.0.0 | RequestTask |
39
+ `Network.request` 返回 `Promise`;成功结果按本页回调字段读取,不暴露原生 `RequestTask`。
42
40
 
43
41
  ## 回调
44
42
 
@@ -36,9 +36,7 @@
36
36
 
37
37
  ## 返回值
38
38
 
39
- | 字段 | 类型 | 必填 | 默认值 | 字段最低基础库 | 说明 |
40
- | --- | --- | --- | --- | --- | --- |
41
- | `UploadTask` | object | 未标注 | - | 1.0.0 | UploadTask |
39
+ `Network.uploadFile` 的公开返回类型为 `UploadTask`。完整 HTTP(S) URL 直传分支返回原生 `UploadTask`;工程托管或代理分支返回 Promise。跨调用路径统一使用 `then/await` 或 `success`、`fail` 回调处理结果,`UploadTask` 的中断和进度方法仅适用于原生直传分支。
42
40
 
43
41
  ## 回调
44
42
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 接口授权要求与卡片调用
6
6
 
7
- OpenCard 不支持用户授权。下表列出的 7 个封闭域接口均无需用户授权,由平台默认赋权,业务代码不获取或传入 token。
7
+ OpenCard 不支持用户授权。下表列出的 7 个封闭域接口均无需用户授权,调用时透传平台委托令牌。
8
8
 
9
9
  - 其他需要用户授权获取 token 的接口在卡片中不支持,不能通过其他场景补授权。
10
10
  - 卡片索引直接给出 `constraints.supported` 和不支持原因;`false` 时不生成能力申报、授权、凭证换取或调用代码。
@@ -15,7 +15,7 @@ OpenCard 不支持用户授权。下表列出的 7 个封闭域接口均无需
15
15
 
16
16
  - 服务端实现放在 `closed-domain-server/`。
17
17
  - 直接依赖封闭域高敏 OpenAPI 的业务接口由封闭域服务承接。
18
- - 平台默认赋予封闭域调用权限,直接使用 `@open-dy/ai_coding_sdk/openapi`;业务代码不获取或传入 token。
18
+ - 从可信入口请求读取 `x-dy-delegatetoken`,经 Controller 和 Service 传到 SDK 的 `CallOptions.delegateToken`。用户授权后的 `access_token` 用于用户态 OpenAPI。
19
19
  - 兴趣卡前端通过项目封闭域网络收敛层调用对应业务接口。
20
20
 
21
21
  ## 当前支持的封闭域 OpenAPI 清单
@@ -14,9 +14,11 @@
14
14
  - 从 `@tarojs/components` 导入 `Button`,在 TSX 中使用 Taro/React 属性名。
15
15
  - 下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 `className`、`style`、`id`、`data-*` 属性继续按 Taro 组件类型使用。
16
16
  - 普通点击使用 `onClick`;打开抖音视频页时使用 `openType="navigateToVideoView"`、`dataVideoId`、`dataVideoType="raw"` 和 `onNavigateToVideoView`。
17
- - 无边框按钮使用 `hideBorder`。
17
+
18
+ - OpenCard 支持通过 `hideBorder` 隐藏按钮默认边框;`hoverStayTime` 不在当前属性范围。
19
+ - OpenCard 用法:当前属性范围不包含 `hoverStartTime`、`hoverStayTime`、`hoverStopPropagation`,点击态通过业务样式类实现。
18
20
  - `searchVideo` 的 `item_id` 为空时,从同一条结果的 `link` 中提取 `/video/{item_id}`;无法提取时跳过该条,不构造视频 ID。
19
- - `onNavigateToVideoView` 使用项目已有的 OpenCard Button 类型扩展;保留 `@tarojs/components` 官方导出,不使用空壳模块声明覆盖它。
21
+ - `onNavigateToVideoView` 使用项目已有的 OpenCard Button 类型扩展,并基于 `@tarojs/components` 官方导出追加类型,确保官方导出保持完整。
20
22
  - `onNavigateToVideoView` 输出 `errMsg`、`errNo` 和当前视频 ID,便于真机核对跳转结果。
21
23
 
22
24
  ## OpenCard 可用属性
@@ -14,10 +14,11 @@
14
14
  - 从 `@tarojs/components` 导入 `Canvas`,在 TSX 中使用 Taro/React 属性名。
15
15
  - 下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 `className`、`style`、`id`、`data-*` 属性继续按 Taro 组件类型使用。
16
16
  - 使用公共 `id` 标识节点,并在页面配置中设置 `renderOptions.lynx.enableCanvas = true`。
17
- - 通过首帧、定时器或点击事件触发 2D 绘制。
17
+
18
+ - OpenCard 2D Canvas 的方法范围不包含 `Canvas.createPath2D`、`Canvas.requestAnimationFrame` 和 `Canvas.cancelAnimationFrame`。
18
19
  - 2D Canvas 通过首帧、定时器或点击触发离散重绘;业务层不绑定 move、drag、pan、swipe 等跟手交互。
19
20
  - 条件渲染场景先挂载 Canvas 节点,再执行 `selectorQuery` 和初始化。
20
- - 当前兴趣卡 Canvas 使用 `type="2d"` 和公共 `id`,不使用旧 `canvasId`。
21
+ - 当前兴趣卡 Canvas 使用 `type="2d"`,并通过公共 `id` 标识节点;旧 `canvasId` 迁移为 `id`。
21
22
 
22
23
  ## OpenCard 可用属性
23
24
 
@@ -41,7 +42,7 @@
41
42
 
42
43
  ## Taro 代码示例
43
44
 
44
- 兴趣卡使用 `id` 和 `type='2d'`。页面同时开启 Lynx Canvas 渲染配置。
45
+ 兴趣卡使用 `id` 和 `type='2d'`,并通过 `renderOptions.lynx.enableCanvas` 开启 Canvas 渲染。
45
46
 
46
47
  ```tsx
47
48
  import { Canvas, View } from '@tarojs/components';
@@ -1,28 +1,27 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "capabilities": [
4
- {"id": "button", "type": "component", "name": "button", "summary_zh": "按钮,用于强调操作并引导用户去点击。", "search_terms_zh": ["button", "按钮,用于强调操作并引导用户去点击。", "list", "@tarojs/components", "className", "style", "id", "data-*", "onClick", "openType=\"navigateToVideoView\"", "dataVideoId", "dataVideoType=\"raw\"", "onNavigateToVideoView", "hideBorder", "searchVideo", "item_id", "link", "/video/{item_id}", "errMsg", "errNo", "openType", "navigateToVideoView", "dataVideoType", "从 @tarojs/components 导入 Button,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "普通点击使用 onClick;打开抖音视频页时使用 openType=\"navigateToVideoView\"、dataVideoId、dataVideoType=\"raw\" 和 onNavigateToVideoView。", "无边框按钮使用 hideBorder。", "searchVideo 的 itemid 为空时,从同一条结果的 link 中提取 /video/{itemid};无法提取时跳过该条,不构造视频 ID。", "onNavigateToVideoView 使用项目已有的 OpenCard Button 类型扩展;保留 @tarojs/components 官方导出,不使用空壳模块声明覆盖它。", "onNavigateToVideoView 输出 errMsg、errNo 和当前视频 ID,便于真机核对跳转结果。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "button.md", "has_taro_example": true},
5
- {"id": "canvas", "type": "component", "name": "canvas", "summary_zh": "画布。", "search_terms_zh": ["canvas", "画布。", "@tarojs/components", "className", "style", "id", "data-*", "renderOptions.lynx.enableCanvas = true", "selectorQuery", "type=\"2d\"", "canvasId", "type", "2d", "onTouchStart", "onTouchEnd", "onTouchCancel", "从 @tarojs/components 导入 Canvas,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "使用公共 id 标识节点,并在页面配置中设置 renderOptions.lynx.enableCanvas = true。", "通过首帧、定时器或点击事件触发 2D 绘制。", "2D Canvas 通过首帧、定时器或点击触发离散重绘;业务层不绑定 move、drag、pan、swipe 等跟手交互。", "条件渲染场景先挂载 Canvas 节点,再执行 selectorQuery 和初始化。", "当前兴趣卡 Canvas 使用 type=\"2d\" 和公共 id,不使用旧 canvasId。"], "domain": "canvas", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "canvas.md", "has_taro_example": true},
4
+ {"id": "button", "type": "component", "name": "button", "summary_zh": "按钮,用于强调操作并引导用户去点击。", "search_terms_zh": ["button", "按钮,用于强调操作并引导用户去点击。", "list", "@tarojs/components", "className", "style", "id", "data-*", "onClick", "openType=\"navigateToVideoView\"", "dataVideoId", "dataVideoType=\"raw\"", "onNavigateToVideoView", "hideBorder", "hoverStayTime", "hoverStartTime", "hoverStopPropagation", "searchVideo", "item_id", "link", "/video/{item_id}", "errMsg", "errNo", "openType", "navigateToVideoView", "dataVideoType", "从 @tarojs/components 导入 Button,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "普通点击使用 onClick;打开抖音视频页时使用 openType=\"navigateToVideoView\"、dataVideoId、dataVideoType=\"raw\" 和 onNavigateToVideoView。", "OpenCard 支持通过 hideBorder 隐藏按钮默认边框;hoverStayTime 不在当前属性范围。", "OpenCard 用法:当前属性范围不包含 hoverStartTime、hoverStayTime、hoverStopPropagation,点击态通过业务样式类实现。", "searchVideo 的 itemid 为空时,从同一条结果的 link 中提取 /video/{itemid};无法提取时跳过该条,不构造视频 ID。", "onNavigateToVideoView 使用项目已有的 OpenCard Button 类型扩展,并基于 @tarojs/components 官方导出追加类型,确保官方导出保持完整。", "onNavigateToVideoView 输出 errMsg、errNo 和当前视频 ID,便于真机核对跳转结果。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "button.md", "has_taro_example": true},
5
+ {"id": "canvas", "type": "component", "name": "canvas", "summary_zh": "画布。", "search_terms_zh": ["canvas", "画布。", "@tarojs/components", "className", "style", "id", "data-*", "renderOptions.lynx.enableCanvas = true", "Canvas.createPath2D", "Canvas.requestAnimationFrame", "Canvas.cancelAnimationFrame", "selectorQuery", "type=\"2d\"", "canvasId", "type", "2d", "onTouchStart", "onTouchEnd", "onTouchCancel", "从 @tarojs/components 导入 Canvas,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "使用公共 id 标识节点,并在页面配置中设置 renderOptions.lynx.enableCanvas = true。", "OpenCard 2D Canvas 的方法范围不包含 Canvas.createPath2D、Canvas.requestAnimationFrame 和 Canvas.cancelAnimationFrame。", "2D Canvas 通过首帧、定时器或点击触发离散重绘;业务层不绑定 move、drag、pan、swipe 等跟手交互。", "条件渲染场景先挂载 Canvas 节点,再执行 selectorQuery 和初始化。", "当前兴趣卡 Canvas 使用 type=\"2d\",并通过公共 id 标识节点;旧 canvasId 迁移为 id。"], "domain": "canvas", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "canvas.md", "has_taro_example": true},
6
6
  {"id": "channel-video", "type": "component", "name": "channel-video", "summary_zh": "抖音视频跳转组件", "search_terms_zh": ["channel-video", "channelVideo", "抖音视频跳转组件", "@tarojs/components", "itemId", "itemIdType", "raw", "encrypted", "className", "style", "id", "data-*", "number", "String(number)", "createChannelVideoContext(id)", "useCardTaro", "src", "Video", "autoplay", "loop", "objectFit", "contain", "fill", "cover", "preload", "onError", "onPlay", "onPosterLoad", "onMetadataLoad", "onFirstFrame", "onPause", "onWaiting", "onProgress", "onStop", "onEnd", "从 @tarojs/components 导入 ChannelVideo,使用抖音视频 ID 播放内容,并设置明确的组件尺寸。", "itemId 与 itemIdType 成对传入:数字视频 ID 使用 raw,加密 token 使用 encrypted。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "运行时输入在组件边界检查 itemId 确实为字符串,并将 itemId、itemIdType 作为同一组数据校验和回退。", "19 位数字 ID 从数据源开始保持字符串;已经进入 JavaScript number 的值可能丢失精度,不再通过 String(number) 恢复。", "JSX 使用 itemId、itemIdType;Taro 负责生成目标端属性名。", "通过 createChannelVideoContext(id) 控制播放时,组件 id 与 Context 参数保持一致,并通过 useCardTaro 取得运行时 API。", "ChannelVideo 按抖音视频 ID 播放,与接收 URL src 的 Video 分开使用。"], "domain": "unknown", "constraints": {"min_base_library": "unknown", "web_simulator_support": "unknown"}, "detail": "channel-video.md", "has_taro_example": true},
7
7
  {"id": "checkbox", "type": "component", "name": "checkbox", "summary_zh": "多选项目。", "search_terms_zh": ["checkbox", "多选项目。", "list", "@tarojs/components", "className", "style", "id", "data-*", "value", "disabled", "checked", "color", "从 @tarojs/components 导入 Checkbox,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "checkbox.md", "has_taro_example": true},
8
- {"id": "checkbox-group", "type": "component", "name": "checkbox-group", "summary_zh": "多项选择器组,内部由多个 checkbox 组成。", "search_terms_zh": ["checkbox-group", "checkboxGroup", "多项选择器组,内部由多个 checkbox 组成。", "list", "@tarojs/components", "className", "style", "id", "data-*", "name", "onChange", "从 @tarojs/components 导入 CheckboxGroup,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "checkbox-group.md", "has_taro_example": true},
8
+ {"id": "checkbox-group", "type": "component", "name": "checkbox-group", "summary_zh": "多项选择器组,内部由多个 checkbox 组成。", "search_terms_zh": ["checkbox-group", "checkboxGroup", "多项选择器组,内部由多个 checkbox 组成。", "list", "@tarojs/components", "className", "style", "id", "data-*", "name", "onChange", "从 @tarojs/components 导入 CheckboxGroup,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "CheckboxGroup 不支持嵌套。多组选项使用多个同级 CheckboxGroup。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "checkbox-group.md", "has_taro_example": true},
9
9
  {"id": "form", "type": "component", "name": "form", "summary_zh": "表单,将组件内的用户输入的 switch 、 input 、 checkbox 、 slider 、 radio 、 picker 、 textarea 提交。", "search_terms_zh": ["form", "表单,将组件内的用户输入的 switch 、 input 、 checkbox 、 slider 、 radio 、 picker 、 textarea 提交。", "list", "@tarojs/components", "className", "style", "id", "data-*", "onSubmit", "onReset", "name", "value", "conversionTarget", "clueComponentId", "从 @tarojs/components 导入 Form,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "表单提交和重置分别通过 onSubmit、onReset 获取事件结果。", "表单字段使用常规 name、value 和输入事件;普通小程序的 conversionTarget、clueComponentId 不属于当前 OpenCard 表面。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "form.md", "has_taro_example": true},
10
10
  {"id": "icon", "type": "component", "name": "icon", "summary_zh": "图标。", "search_terms_zh": ["icon", "图标。", "basic-content", "@tarojs/components", "className", "style", "id", "data-*", "type", "size", "color", "从 @tarojs/components 导入 Icon,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "basic-content", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "icon.md", "has_taro_example": true},
11
- {"id": "image", "type": "component", "name": "image", "summary_zh": "图片。", "search_terms_zh": ["image", "图片。", "media-component", "@tarojs/components", "className", "style", "id", "data-*", "mode", "scaleToFill", "aspectFit", "aspectFill", "center", "Svg", "webp", "lazyLoad", "widthFix", "heightFix", "src", "onError", "onLoad", "从 @tarojs/components 导入 Image,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "mode 使用 scaleToFill、aspectFit、aspectFill 或 center;SVG 资源使用 Svg 组件承载。", "图片设置明确尺寸、比例或父级尺寸链路;WebP 由运行时直接解析,无需设置 webp 开关。", "普通小程序的 lazyLoad 以及 widthFix、heightFix、方向裁剪等 mode 不属于当前 OpenCard 表面。"], "domain": "media-component", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "image.md", "has_taro_example": true},
12
- {"id": "input", "type": "component", "name": "input", "summary_zh": "输入框组件,用于键盘交互。", "search_terms_zh": ["input", "输入框组件,用于键盘交互。", "list", "@tarojs/components", "className", "style", "id", "data-*", "value", "onInput", "name", "clueType", "type", "password", "placeholder", "placeholderStyle", "placeholderClass", "disabled", "maxlength", "cursorSpacing", "focus", "cursor", "selectionStart", "selectionEnd", "adjustPosition", "confirmType", "confirmHold", "holdKeyboard", "onFocus", "onBlur", "onConfirm", "onKeyboardHeightChange", "从 @tarojs/components 导入 Input,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "输入值通过 value 与 onInput 形成受控更新,需要提交表单时同时设置 name 公共属性。", "普通小程序的线索分发属性 clueType 不属于当前 OpenCard 表面。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "input.md", "has_taro_example": true},
11
+ {"id": "image", "type": "component", "name": "image", "summary_zh": "用于展示图片资源。兴趣卡支持 JPG、PNG、WebP 等位图资源,不支持 SVG 资源。", "search_terms_zh": ["image", "用于展示图片资源。兴趣卡支持 JPG、PNG、WebP 等位图资源,不支持 SVG 资源。", "media-component", "@tarojs/components", "className", "style", "id", "data-*", "mode", "scaleToFill", "aspectFit", "aspectFill", "center", "webp", "lazyLoad", "widthFix", "heightFix", "src", "onError", "onLoad", "从 @tarojs/components 导入 Image,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "mode 使用 scaleToFill、aspectFit、aspectFill 或 center。", "图片设置明确尺寸、比例或父级尺寸链路;WebP 由运行时直接解析,无需设置 webp 开关。", "图标或插图为 SVG 时,先转换为 PNG、JPG 或 WebP,再通过 Image 使用。", "普通小程序的 lazyLoad 以及 widthFix、heightFix、方向裁剪等 mode 不属于当前 OpenCard 表面。"], "domain": "media-component", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "image.md", "has_taro_example": true},
12
+ {"id": "input", "type": "component", "name": "input", "summary_zh": "输入框组件,用于键盘交互。", "search_terms_zh": ["input", "输入框组件,用于键盘交互。", "list", "@tarojs/components", "className", "style", "id", "data-*", "value", "onInput", "name", "placeholderClass", "placeholderStyle", "type='number'", "clueType", "Text", "type", "password", "placeholder", "disabled", "maxlength", "cursorSpacing", "focus", "cursor", "selectionStart", "selectionEnd", "adjustPosition", "confirmType", "confirmHold", "holdKeyboard", "onFocus", "onBlur", "onConfirm", "onKeyboardHeightChange", "从 @tarojs/components 导入 Input,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "输入值通过 value 与 onInput 形成受控更新,需要提交表单时同时设置 name 公共属性。", "OpenCard 的当前属性范围不包含 placeholderClass,占位符样式通过 placeholderStyle 设置;type='number' 不能将输入内容显示为星号。", "OpenCard 用法:当前属性范围不包含 clueType。需要展示脱敏内容时,使用单独的 Text 展示处理后的结果。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "input.md", "has_taro_example": true},
13
13
  {"id": "label", "type": "component", "name": "label", "summary_zh": "用于改进表单组件的可用性。", "search_terms_zh": ["label", "用于改进表单组件的可用性。", "list", "@tarojs/components", "className", "style", "id", "data-*", "for", "从 @tarojs/components 导入 Label,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "label.md", "has_taro_example": true},
14
14
  {"id": "map", "type": "component", "name": "map", "summary_zh": "地图组件。", "search_terms_zh": ["map", "地图组件。", "@tarojs/components", "className", "style", "id", "data-*", "longitude", "latitude", "scale", "markers", "circles", "showLocation", "polyline", "includePoints", "rotate", "skew", "polygons", "showCompass", "enableOverlooking", "enableRotate", "minScale", "maxScale", "enable3D", "showScale", "enableZoom", "enableScroll", "enableSatellite", "enableTraffic", "enablePoi", "enableBuilding", "onClick", "onMarkerTap", "onCalloutTap", "onRegionChange", "onLabelTap", "onUpdated", "onAnchorPointTap", "从 @tarojs/components 导入 Map,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "设置明确的 longitude、latitude 和容器尺寸,通过组件事件响应标记点击和区域变化。", "Map 用于展示中心点和轻量标注;业务交互通过组件事件和离散状态切换实现。"], "domain": "map", "constraints": {"min_base_library": "1.63.0", "web_simulator_support": "unknown"}, "detail": "map.md", "has_taro_example": true},
15
15
  {"id": "progress", "type": "component", "name": "progress", "summary_zh": "进度条。", "search_terms_zh": ["progress", "进度条。", "basic-content", "@tarojs/components", "className", "style", "id", "data-*", "percent", "strokeWidth", "activeColor", "backgroundColor", "active", "activeMode", "duration", "onActiveEnd", "从 @tarojs/components 导入 Progress,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "basic-content", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "progress.md", "has_taro_example": true},
16
16
  {"id": "radio", "type": "component", "name": "radio", "summary_zh": "单项选择器。", "search_terms_zh": ["radio", "单项选择器。", "list", "@tarojs/components", "className", "style", "id", "data-*", "value", "checked", "disabled", "color", "从 @tarojs/components 导入 Radio,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "radio.md", "has_taro_example": true},
17
17
  {"id": "radio-group", "type": "component", "name": "radio-group", "summary_zh": "单项选择器,内部由多个 radio 组成。", "search_terms_zh": ["radio-group", "radioGroup", "单项选择器,内部由多个 radio 组成。", "list", "@tarojs/components", "className", "style", "id", "data-*", "name", "onChange", "从 @tarojs/components 导入 RadioGroup,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "radio-group.md", "has_taro_example": true},
18
18
  {"id": "slider", "type": "component", "name": "slider", "summary_zh": "滑动选择器。", "search_terms_zh": ["slider", "滑动选择器。", "list", "@tarojs/components", "className", "style", "id", "data-*", "value", "onChanging", "onChange", "min", "max", "step", "disabled", "color", "selectedColor", "activeColor", "backgroundColor", "blockSize", "blockColor", "showValue", "从 @tarojs/components 导入 Slider,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "Slider 用于明确的数值选择;拖拽布局、跟手动画和滚动模拟使用对应业务状态或组件能力实现。", "传入受控 value 时,在 onChanging 或 onChange 中同步更新状态,保持业务值与滑块位置一致。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "slider.md", "has_taro_example": true},
19
- {"id": "svg", "type": "component", "name": "svg", "summary_zh": "兴趣卡 SVG 承载组件,使用 src 加载 SVG 资源或使用 content 传入内联 SVG。", "search_terms_zh": ["svg", "兴趣卡 SVG 承载组件,使用 src 加载 SVG 资源或使用 content 传入内联 SVG。", "basic-content", "@tarojs/components", "className", "style", "id", "data-*", "src", "content", "Image", "context", "从 @tarojs/components 导入 Svg,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "使用 src 加载 SVG 资源,或使用 content 传入内联 SVG 字符串,并设置明确尺寸。", "SVG 资源仅通过 Svg 的 src 或 content 承载;Image、CSS 背景或遮罩、inline style 和普通业务图片字段用于位图资源。", "当前 OpenCard Svg 不使用旧 context 属性。"], "domain": "basic-content", "constraints": {"min_base_library": "unknown", "web_simulator_support": "unknown"}, "detail": "svg.md", "has_taro_example": true},
20
19
  {"id": "swiper", "type": "component", "name": "swiper", "summary_zh": "滑块视图容器。", "search_terms_zh": ["swiper", "滑块视图容器。", "view-container", "@tarojs/components", "className", "style", "id", "data-*", "SwiperItem", "rgb()", "rgba()", "onTouchMove", "z-index", "previousMargin", "nextMargin", "displayMultipleItems", "easingFunction", "indicatorDots", "indicatorColor", "indicatorActiveColor", "autoplay", "current", "currentItemId", "interval", "duration", "circular", "vertical", "onChange", "onAnimationFinish", "onTransition", "从 @tarojs/components 导入 Swiper,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "与 SwiperItem 配套使用;指示点颜色使用 rgb() 或 rgba()。", "轮播交互使用 Swiper 自身能力,不在业务层补充 onTouchMove、drag、pan 或 swipe 手势。", "Swiper、SwiperItem 及其子树使用正常文档流组织层级,不设置 z-index。", "多项露出使用固定尺寸、previousMargin、nextMargin 或静态横向布局;displayMultipleItems、easingFunction 不属于当前 OpenCard 表面。"], "domain": "view-container", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "swiper.md", "has_taro_example": true},
21
20
  {"id": "swiper-item", "type": "component", "name": "swiper-item", "summary_zh": "滑块视图容器子项,仅可放置在 swiper 组件中,宽高自动设置为 100%。", "search_terms_zh": ["swiper-item", "swiperItem", "滑块视图容器子项,仅可放置在 swiper 组件中,宽高自动设置为 100%。", "view-container", "@tarojs/components", "className", "style", "id", "data-*", "Swiper", "z-index", "itemId", "从 @tarojs/components 导入 SwiperItem,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "作为 Swiper 的直接子节点使用,每个轮播项承载一屏内容。", "SwiperItem 及其子树使用正常文档流组织层级,不设置 z-index;轮播交互由父级 Swiper 提供。"], "domain": "view-container", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "swiper-item.md", "has_taro_example": true},
22
21
  {"id": "switch", "type": "component", "name": "switch", "summary_zh": "开关选择器。", "search_terms_zh": ["switch", "开关选择器。", "list", "@tarojs/components", "className", "style", "id", "data-*", "checked", "disabled", "type", "color", "onChange", "从 @tarojs/components 导入 Switch,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "switch.md", "has_taro_example": true},
23
- {"id": "text", "type": "component", "name": "text", "summary_zh": "文本组件。", "search_terms_zh": ["text", "文本组件。", "basic-content", "@tarojs/components", "className", "style", "id", "data-*", "View", "white-space", "userSelect", "space", "selectable", "decode", "从 @tarojs/components 导入 Text,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "文本布局由外层 View 承担;实体字符按 OpenCard 默认解码结果展示。", "连续空格和换行通过真实文案、CSS white-space 或布局节点表达;Text 只承载文本,不作为 Flex 或 Grid 容器。", "使用下方列出的 userSelect;普通小程序的 space、旧 selectable 和依赖 decode 控制解码的写法不属于当前 OpenCard 表面。"], "domain": "basic-content", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "text.md", "has_taro_example": true},
24
- {"id": "textarea", "type": "component", "name": "textarea", "summary_zh": "多行文本输入框。", "search_terms_zh": ["textarea", "多行文本输入框。", "list", "@tarojs/components", "className", "style", "id", "data-*", "autoHeight", "disableDefaultPadding", "showConfirmBar", "clueType", "value", "placeholder", "placeholderStyle", "placeholderClass", "disabled", "maxlength", "focus", "cursorSpacing", "cursor", "selectionStart", "selectionEnd", "adjustPosition", "holdKeyboard", "confirmType", "confirmHold", "onInput", "onFocus", "onBlur", "onConfirm", "onLineChange", "onKeyboardHeightChange", "从 @tarojs/components 导入 Textarea,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "多行输入区域使用固定高度或父容器约束。", "当前 OpenCard 表面使用固定区域承载多行输入,不使用 autoHeight、disableDefaultPadding、showConfirmBar 或 clueType。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "textarea.md", "has_taro_example": true},
25
- {"id": "video", "type": "component", "name": "video", "summary_zh": "视频组件,相关 API 请参考 tt.createVideoContext 。", "search_terms_zh": ["video", "视频组件,相关 API 请参考 tt.createVideoContext 。", "media-component", "@tarojs/components", "className", "style", "id", "data-*", "src", "poster", "autoplay", "muted", "initialTime", "objectFit", "https://", "ttfile://", "file://", "onPlay", "onPause", "onEnded", "onError", "onTimeUpdate", "从 @tarojs/components 导入 Video,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "视频用于轻量播放展示,设置明确宽高,并通过基础播放、进度和错误事件更新 UI。", "当前 OpenCard Video 使用 src、poster、autoplay、muted、initialTime、objectFit 及下方基础事件;播放器控件、循环播放、手势调节、后台小窗、倍速、清晰度、投屏、水印、试看和加密播放能力不在当前表面。", "封面和视频使用稳定 URL 或项目静态资源,关键首屏内容使用可持续访问的资源地址。"], "domain": "media-component", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "video.md", "has_taro_example": true},
22
+ {"id": "text", "type": "component", "name": "text", "summary_zh": "文本组件。", "search_terms_zh": ["text", "文本组件。", "basic-content", "@tarojs/components", "className", "style", "id", "data-*", "space", "decode", "selectable", "userSelect", "white-space", "View", "从 @tarojs/components 导入 Text,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "OpenCard 中,Text 默认按块级元素展示;需要同行展示多个文本时,使用一个父 Text 包裹多个子 Text。当前属性范围不包含 space,decode 设置无效,HTML 实体始终解码。", "OpenCard 用法:当前属性范围不包含 selectable、userSelect。连续空格和换行通过真实文案、CSS white-space 或布局节点表达,其他布局由外层 View 承担。"], "domain": "basic-content", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "text.md", "has_taro_example": true},
23
+ {"id": "textarea", "type": "component", "name": "textarea", "summary_zh": "多行文本输入框。", "search_terms_zh": ["textarea", "多行文本输入框。", "list", "@tarojs/components", "className", "style", "id", "data-*", "autoHeight", "placeholderClass", "disableDefaultPadding", "showConfirmBar", "placeholderStyle", "clueType", "focus", "false", "duration", "onKeyboardHeightChange", "onFocus", "onBlur", "value", "placeholder", "disabled", "maxlength", "cursorSpacing", "cursor", "selectionStart", "selectionEnd", "adjustPosition", "holdKeyboard", "confirmType", "confirmHold", "onInput", "onConfirm", "onLineChange", "event.detail", "height", "从 @tarojs/components 导入 Textarea,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "OpenCard 的当前属性范围不包含 autoHeight、placeholderClass、disableDefaultPadding、showConfirmBar;点击页面可以收起键盘,滑动页面不会收起键盘。", "OpenCard 用法:使用固定高度或父容器约束,通过 placeholderStyle 设置占位符样式;当前属性范围不包含 clueType。需要主动收起键盘时,将受控 focus 设为 false。", "键盘高度变化事件不返回 duration;当前 OpenCard 的事件范围不包含 onKeyboardHeightChange,键盘状态通过 onFocus、onBlur 和受控 focus 处理。"], "domain": "list", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "textarea.md", "has_taro_example": true},
24
+ {"id": "video", "type": "component", "name": "video", "summary_zh": "视频组件,相关 API 请参考 tt.createVideoContext 。", "search_terms_zh": ["video", "视频组件,相关 API 请参考 tt.createVideoContext 。", "media-component", "@tarojs/components", "className", "style", "id", "data-*", "loop", "controls", "vslideGesture", "vslideGestureInFullscreen", "enableProgressGesture", "enablePlayGesture", "enablePlayInBackground", "showMuteBtn", "showPlaybackRateBtn", "showScreenLockButton", "showCastingButton", "showProgress", "showBottomProgress", "playbackRateList", "direction", "signature", "definition", "posterSize", "durationLimit", "encryptedToken", "enableDarkWaterMark", "onWaiting", "onLoadedMetadata", "onControlTap", "onEnterBackground", "onCloseBackground", "onLeaveBackground", "onControlsToggle", "onPlaybackRateListChange", "src", "https://", "ttfile://", "file://", "autoplay", "poster", "showFullscreenBtn", "showPlayBtn", "objectFit", "playBtnPosition", "center", "bottom", "muted", "initialTime", "onPlay", "onPause", "onEnded", "onError", "onTimeUpdate", "onSeekComplete", "event.detail = { position }", "onMuteChange", "event.detail = { isMuted }", "从 @tarojs/components 导入 Video,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。", "视频设置明确宽高,通过播放、暂停、进度、跳转播放位置完成、静音变化和错误事件更新 UI。", "基础库 4.28.0 及以上时,OpenCard Video 与普通小程序表现一致,对应抖音 40.2.0;4.28.0 以下存在属性和事件差异。", "当前 OpenCard 的可用范围以下方“OpenCard 可用属性”和“OpenCard 可用事件”为准。属性范围不包含:loop、controls、vslideGesture、vslideGestureInFullscreen、enableProgressGesture、enablePlayGesture、enablePlayInBackground、showMuteBtn、showPlaybackRateBtn、showScreenLockButton、showCastingButton、showProgress、showBottomProgress、playbackRateList、direction、signature、definition、posterSize、durationLimit、encryptedToken、enableDarkWaterMark。", "事件范围不包含:onWaiting、onLoadedMetadata、onControlTap、onEnterBackground、onCloseBackground、onLeaveBackground、onControlsToggle、onPlaybackRateListChange。", "封面和视频使用稳定 URL 或项目静态资源,关键首屏内容使用可持续访问的资源地址。"], "domain": "media-component", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "video.md", "has_taro_example": true},
26
25
  {"id": "view", "type": "component", "name": "view", "summary_zh": "视图容器,相当于 html 中的 div 。", "search_terms_zh": ["view", "视图容器,相当于 html 中的 div 。", "view-container", "@tarojs/components", "className", "style", "id", "data-*", "hoverClass", "hoverStopPropagation", "hoverStartTime", "hoverStayTime", "从 @tarojs/components 导入 View,在 TSX 中使用 Taro/React 属性名。", "下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 className、style、id、data- 属性继续按 Taro 组件类型使用。"], "domain": "view-container", "constraints": {"min_base_library": "1.0.0", "web_simulator_support": "unknown"}, "detail": "view.md", "has_taro_example": true}
27
26
  ]
28
27
  }
@@ -14,6 +14,8 @@
14
14
  - 从 `@tarojs/components` 导入 `CheckboxGroup`,在 TSX 中使用 Taro/React 属性名。
15
15
  - 下方“OpenCard 可用属性”和“OpenCard 可用事件”是该组件在卡片场景的组件专属范围;公共的 `className`、`style`、`id`、`data-*` 属性继续按 Taro 组件类型使用。
16
16
 
17
+ - `CheckboxGroup` 不支持嵌套。多组选项使用多个同级 `CheckboxGroup`。
18
+
17
19
  ## OpenCard 可用属性
18
20
 
19
21
  | 字段 | 类型 | 必填 | 默认值 | 字段最低基础库 | 说明 |