@doubao-apps/ai 0.0.19 → 0.0.20

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.
@@ -36,7 +36,7 @@
36
36
 
37
37
  ### swiper / swiper-item
38
38
 
39
- 轮播图,Doubao Apps **无直接映射**,需自定义实现。
39
+ 轮播图,当前项目可直接保留为 `<swiper>` / `<swiper-item>`,构建时由 loader 自动注入组件 import,但 API 与微信小程序不完全一致。
40
40
 
41
41
  ```wxml
42
42
  <swiper
@@ -51,11 +51,11 @@
51
51
  </swiper>
52
52
  ```
53
53
 
54
- **Doubao Apps**:需自定义 Swiper 组件(见 component-mapping.md)
54
+ **Doubao Apps**:优先保留 `<swiper>` / `<swiper-item>`,按当前 SDK 的 `data`、`itemWidth`、`autoPlay` 等 props 改写(见 component-mapping.md)
55
55
 
56
56
  ### movable-area / movable-view
57
57
 
58
- 可拖动区域,Doubao Apps **无直接映射**,需用手势 API 实现。
58
+ 可拖动区域,当前项目已有 `<movable-area>` / `<movable-view>`,可优先直接映射;复杂缩放和越界交互需校对 props。
59
59
 
60
60
  ---
61
61
 
@@ -110,6 +110,14 @@
110
110
 
111
111
  视频,对应 Doubao Apps `<video>`,属性基本相同。
112
112
 
113
+ ### map
114
+
115
+ 地图组件,当前项目已有 `<map>` 与 `<map-marker>`,中心点、标注点、覆盖物等能力可迁移,但 props 需要按目标组件重新对齐。
116
+
117
+ ### web-view
118
+
119
+ 网页容器,当前项目已有 `<web-view>` 组件。迁移时可先保留标签,再结合宿主白名单与运行时限制做验证。
120
+
113
121
  ### camera
114
122
 
115
123
  摄像头,Doubao Apps **无直接映射**,使用相机 API。
@@ -120,7 +128,7 @@
120
128
 
121
129
  ### button
122
130
 
123
- 按钮,迁移到内置 `<button>` 元素(**无需导入**,编译为全局变量)。
131
+ 按钮,可直接保留为小写 `<button>` 标签;构建时由 `components-loader` 自动补齐组件 import。
124
132
 
125
133
  ```wxml
126
134
  <button
@@ -135,7 +143,7 @@
135
143
  </button>
136
144
  ```
137
145
 
138
- **Doubao Apps**(无需 import):
146
+ **Doubao Apps**(迁移代码通常无需手写 import):
139
147
 
140
148
  ```tsx
141
149
  <button
@@ -174,7 +182,7 @@
174
182
 
175
183
  ### switch
176
184
 
177
- 开关,迁移到内置 `<switch>` 元素(**无需导入**)。
185
+ 开关,可直接保留为小写 `<switch>` 标签。
178
186
 
179
187
  ```wxml
180
188
  <switch checked="{{isOn}}" bindchange="handleChange" color="#007AFF" />
@@ -189,7 +197,7 @@
189
197
 
190
198
  ### slider
191
199
 
192
- 滑块,迁移到内置 `<slider>` 元素(**无需导入**)。
200
+ 滑块,可直接保留为小写 `<slider>` 标签。
193
201
 
194
202
  ```wxml
195
203
  <slider value="{{sliderVal}}" min="0" max="100" step="1" bindchange="handleSliderChange" />
@@ -204,7 +212,7 @@
204
212
 
205
213
  ### picker
206
214
 
207
- 选择器,Doubao Apps **无直接映射**,需自定义底部弹出选择器(用 `<view>` + 条件渲染模拟)。
215
+ 选择器,优先使用现有 `<picker-view>` / `<picker-column>`,并配合 `<popup>`、`Dialog` 或业务弹层容器实现弹出式交互。
208
216
 
209
217
  ```wxml
210
218
  <picker mode="selector" range="{{options}}" value="{{pickerIndex}}" bindchange="handlePickerChange">
@@ -212,7 +220,11 @@
212
220
  </picker>
213
221
  ```
214
222
 
215
- **Doubao Apps 替代方案**:自定义底部弹出层 + `<view>` 列表。
223
+ **Doubao Apps 替代方案**:底部弹出层 + `<picker-view>` / `<picker-column>`,或简单场景下用 `<view>` 列表。
224
+
225
+ ### picker-view
226
+
227
+ 嵌入式滚动选择器,当前项目已有 `<picker-view>` / `<picker-column>`,适合日期、省市区、枚举值等多列联动场景。
216
228
 
217
229
  ### checkbox / checkbox-group
218
230
 
@@ -220,7 +232,7 @@
220
232
 
221
233
  ### radio / radio-group
222
234
 
223
- 单选框,Doubao Apps **无直接映射**,需自定义。
235
+ 单选框,当前项目已有 `<radio>` / `<radio-group>`,组内回调为 `onValueChange(value)`。
224
236
 
225
237
  ### form
226
238
 
@@ -264,8 +276,6 @@ import { navigateTo } from '@doubao-apps/framework/api';
264
276
 
265
277
  | 微信小程序 | Doubao Apps | 建议 |
266
278
  |-----------|-------------|------|
267
- | `<web-view>` | 不支持 | 使用原生 WebView API |
268
- | `<map>` | 不支持 | 使用原生地图 API |
269
279
  | `<canvas>` | 有限支持 | 检查平台文档 |
270
280
  | `<open-data>` | 不支持 | 使用平台用户信息 API |
271
281
  | `<official-account>` | 不支持 | 移除 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubao-apps/ai",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Doubao Apps SDK AI tools with context and skills management",
5
5
  "type": "module",
6
6
  "bin": {