@tarojs/components 3.6.0-canary.7 → 3.6.0-canary.8

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 (59) hide show
  1. package/dist/react/component-lib/index.js +20 -10
  2. package/dist/react/component-lib/input.js +2 -3
  3. package/dist/react/component-lib/reactify-wc.js +6 -43
  4. package/dist/react/components.js +0 -2
  5. package/dist/react/react-component-lib/createComponent.js +9 -29
  6. package/dist/react/react-component-lib/createOverlayComponent.js +2 -29
  7. package/dist/react/react-component-lib/utils/attachProps.js +9 -18
  8. package/dist/react/react-component-lib/utils/index.js +0 -2
  9. package/dist/vue2/component-lib/components.js +22 -11
  10. package/dist/vue2/component-lib/createFormsComponent.js +0 -5
  11. package/dist/vue2/component-lib/index.js +6 -8
  12. package/dist/vue2/component-lib/mixins/refs.js +0 -5
  13. package/dist/vue2/components.js +0 -3
  14. package/dist/vue2/index.js +3 -7
  15. package/dist/vue2/vue-component-lib/utils.js +0 -1
  16. package/dist/vue3/component-lib/createComponent.js +1 -1
  17. package/dist/vue3/component-lib/createFormsComponent.js +3 -8
  18. package/dist/vue3/component-lib/forwardRef.js +0 -2
  19. package/dist/vue3/component-lib/icon.js +2 -2
  20. package/dist/vue3/component-lib/image.js +2 -2
  21. package/dist/vue3/component-lib/index.js +22 -11
  22. package/dist/vue3/component-lib/scroll-view.js +2 -2
  23. package/dist/vue3/component-lib/text.js +2 -2
  24. package/dist/vue3/components.js +0 -2
  25. package/dist/vue3/index.js +2 -4
  26. package/dist/vue3/vue-component-lib/utils.js +7 -29
  27. package/package.json +4 -4
  28. package/types/Button.d.ts +1 -1
  29. package/types/Camera.d.ts +1 -1
  30. package/types/Checkbox.d.ts +1 -1
  31. package/types/CheckboxGroup.d.ts +1 -1
  32. package/types/CoverImage.d.ts +1 -1
  33. package/types/CustomWrapper.d.ts +1 -0
  34. package/types/Form.d.ts +1 -1
  35. package/types/Icon.d.ts +1 -1
  36. package/types/Image.d.ts +1 -1
  37. package/types/Input.d.ts +15 -1
  38. package/types/Label.d.ts +1 -1
  39. package/types/NativeSlot.d.ts +1 -0
  40. package/types/NavigationBar.d.ts +2 -1
  41. package/types/Navigator.d.ts +1 -1
  42. package/types/Picker.d.ts +1 -1
  43. package/types/PickerView.d.ts +1 -1
  44. package/types/PickerViewColumn.d.ts +1 -1
  45. package/types/Progress.d.ts +1 -1
  46. package/types/Radio.d.ts +1 -1
  47. package/types/RadioGroup.d.ts +1 -1
  48. package/types/RichText.d.ts +1 -1
  49. package/types/ScrollView.d.ts +1 -1
  50. package/types/ShareElement.d.ts +3 -3
  51. package/types/Slider.d.ts +1 -1
  52. package/types/Slot.d.ts +2 -1
  53. package/types/Swiper.d.ts +1 -1
  54. package/types/SwiperItem.d.ts +1 -1
  55. package/types/Switch.d.ts +1 -1
  56. package/types/Textarea.d.ts +1 -1
  57. package/types/Video.d.ts +1 -1
  58. package/types/View.d.ts +1 -1
  59. package/types/WebView.d.ts +1 -1
package/types/Form.d.ts CHANGED
@@ -66,7 +66,7 @@ declare namespace FormProps {
66
66
  *
67
67
  * 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。
68
68
  * @classification forms
69
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
69
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
70
70
  * @example_react
71
71
  * ```tsx
72
72
  * class App extends Component {
package/types/Icon.d.ts CHANGED
@@ -62,7 +62,7 @@ declare namespace IconProps {
62
62
 
63
63
  /** 图标。组件属性的长度单位默认为 px
64
64
  * @classification base
65
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
65
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
66
66
  * @example_react
67
67
  * ```tsx
68
68
  * export default class PageView extends Component {
package/types/Image.d.ts CHANGED
@@ -155,7 +155,7 @@ declare namespace ImageProps {
155
155
  *
156
156
  * **Note:** 为实现小程序的 `mode` 特性,在 H5 组件中使用一个 `div` 容器来对内部的 `img` 进行展示区域的裁剪,因此请勿使用元素选择器来重置 `img` 的样式!
157
157
  * @classification media
158
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
158
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
159
159
  * @example_react
160
160
  * ```tsx
161
161
  * export default class PageView extends Component {
package/types/Input.d.ts CHANGED
@@ -231,52 +231,66 @@ declare namespace InputProps {
231
231
  * @supported weapp, alipay, h5, rn
232
232
  */
233
233
  text
234
+
234
235
  /** 数字输入键盘
235
236
  * @supported weapp, alipay, h5, rn
236
237
  */
237
238
  number
239
+
238
240
  /** 身份证输入键盘
239
241
  *@supported weapp, alipay, rn
240
242
  */
241
243
  idcard
244
+
242
245
  /** 带小数点的数字键盘
243
246
  * @supported weapp, alipay, h5, rn
244
247
  */
245
248
  digit
249
+
246
250
  /** 密码安全输入键盘[指引](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/safe-password.html)
247
251
  * @supported weapp, alipay
248
252
  */
249
253
  'safe-password'
254
+
250
255
  /** 昵称输入键盘
251
256
  * @supported weapp, alipay
252
257
  */
253
258
  nickname
259
+
254
260
  /** 数字输入键盘
255
261
  * @supported alipay
256
262
  */
257
263
  numberpad
264
+
258
265
  /** 带小数点的数字键盘
259
266
  * @supported alipay
260
267
  */
261
268
  digitpad
269
+
262
270
  /** 身份证输入键盘
263
271
  * @supported alipay
264
272
  */
265
273
  idcardpad
266
274
  }
275
+
267
276
  /** Confirm 类型 */
268
277
  interface ConfirmType {
269
278
  /** 右下角按钮为“发送” */
270
279
  send
280
+
271
281
  /** 右下角按钮为“搜索” */
272
282
  search
283
+
273
284
  /** 右下角按钮为“下一个” */
274
285
  next
286
+
275
287
  /** 右下角按钮为“前往” */
276
288
  go
289
+
277
290
  /** 右下角按钮为“完成” */
278
291
  done
279
292
  }
293
+
280
294
  /** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */
281
295
  interface inputEventDetail {
282
296
  /** 输入值 */
@@ -310,7 +324,7 @@ declare namespace InputProps {
310
324
 
311
325
  /** 输入框。该组件是原生组件,使用时请注意相关限制
312
326
  * @classification forms
313
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
327
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
314
328
  * @example_react
315
329
  * ```tsx
316
330
  * class App extends Component {
package/types/Label.d.ts CHANGED
@@ -9,7 +9,7 @@ interface LabelProps extends StandardProps {
9
9
  *
10
10
  * 使用for属性找到对应的id,或者将控件放在该标签下,当点击时,就会触发对应的控件。 for优先级高于内部控件,内部有多个控件的时候默认触发第一个控件。 目前可以绑定的控件有:button, checkbox, radio, switch。
11
11
  * @classification forms
12
- * @supported weapp, swan, alipay, tt, h5, rn
12
+ * @supported weapp, swan, alipay, tt, h5, rn, harmony
13
13
  * @example_react
14
14
  * ```tsx
15
15
  * class App extends Components {
@@ -9,6 +9,7 @@ interface NativeSlotProps {
9
9
  }
10
10
 
11
11
  /** 编译的原生组件支持使用 slot 插槽
12
+ * @classification viewContainer
12
13
  * @supported weapp, swan, alipay, tt, jd, qq
13
14
  * @version 3.5.7+
14
15
  * @example
@@ -36,7 +36,8 @@ interface NavigationBarProps extends StandardProps {
36
36
 
37
37
  /** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。
38
38
  * 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。
39
- * @supported weapp
39
+ * @classification navig
40
+ * @supported weapp, harmony
40
41
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigation-bar.html
41
42
  */
42
43
  declare const NavigationBar: ComponentType<NavigationBarProps>
@@ -138,7 +138,7 @@ declare namespace NavigatorProps {
138
138
 
139
139
  /** 页面链接
140
140
  * @classification navig
141
- * @supported weapp, alipay, swan, tt, qq, jd
141
+ * @supported weapp, alipay, swan, tt, qq, jd, harmony
142
142
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
143
143
  */
144
144
  declare const Navigator: ComponentType<NavigatorProps>
package/types/Picker.d.ts CHANGED
@@ -302,7 +302,7 @@ declare namespace PickerRegionProps {
302
302
  /**
303
303
  * 从底部弹起的滚动选择器
304
304
  * @classification forms
305
- * @supported weapp, swan, alipay, tt, h5, rn
305
+ * @supported weapp, swan, alipay, tt, h5, rn, harmony
306
306
  * @example_react
307
307
  * ```tsx
308
308
  * export default class PagePicker extends Component {
@@ -66,7 +66,7 @@ declare namespace PickerViewProps {
66
66
  /** 嵌入页面的滚动选择器
67
67
  * 其中只可放置 picker-view-column 组件,其它节点不会显示
68
68
  * @classification forms
69
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
69
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
70
70
  * @example_react
71
71
  * ```tsx
72
72
  * export default class Picks extends Component {
@@ -5,7 +5,7 @@ type PickerViewColumnProps = StandardProps
5
5
  /** 滚动选择器子项
6
6
  * 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
7
7
  * @classification forms
8
- * @supported weapp, swan, alipay, tt, h5, rn
8
+ * @supported weapp, swan, alipay, tt, h5, rn, harmony
9
9
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
10
10
  */
11
11
  declare const PickerViewColumn: ComponentType<StandardProps>
@@ -81,7 +81,7 @@ interface ProgressProps extends StandardProps {
81
81
 
82
82
  /** 进度条。组件属性的长度单位默认为 px
83
83
  * @classification base
84
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
84
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
85
85
  * @example_react
86
86
  * ```tsx
87
87
  * export default class PageView extends Component {
package/types/Radio.d.ts CHANGED
@@ -44,7 +44,7 @@ interface RadioProps extends StandardProps {
44
44
 
45
45
  /** 单选项目
46
46
  * @classification forms
47
- * @supported weapp, alipay, swan, tt, qq, h5, rn
47
+ * @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
48
48
  * @example_react
49
49
  * ```tsx
50
50
  * export default class PageRadio extends Component {
@@ -19,7 +19,7 @@ declare namespace RadioGroupProps {
19
19
 
20
20
  /** 单项选择器,内部由多个 Radio 组成。
21
21
  * @classification forms
22
- * @supported weapp, alipay, swan, tt, qq, h5, rn
22
+ * @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
23
23
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html
24
24
  */
25
25
  declare const RadioGroup: ComponentType<RadioGroupProps>
@@ -118,7 +118,7 @@ declare namespace RichTextProps {
118
118
 
119
119
  /** 富文本
120
120
  * @classification base
121
- * @supported weapp, swan, alipay, tt, h5, rn
121
+ * @supported weapp, swan, alipay, tt, h5, rn, harmony
122
122
  * @example_react
123
123
  * ```tsx
124
124
  * class App extends Components {
@@ -262,7 +262,7 @@ declare namespace ScrollViewProps {
262
262
  * H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
263
263
  * 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
264
264
  * @classification viewContainer
265
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
265
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
266
266
  * @example_react
267
267
  * ```tsx
268
268
  * export default class PageView extends Component {
@@ -2,17 +2,17 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
3
  interface ShareElementProps extends StandardProps {
4
4
  /** 映射标记
5
- * @supported weapp
5
+ * @supported weapp
6
6
  */
7
7
  key?: string
8
8
 
9
9
  /** 映射标记
10
- * @supported weapp
10
+ * @supported weapp
11
11
  */
12
12
  mapkey?: string
13
13
 
14
14
  /** 映射标记
15
- * @supported alipay
15
+ * @supported alipay
16
16
  */
17
17
  name?: string
18
18
 
package/types/Slider.d.ts CHANGED
@@ -118,7 +118,7 @@ declare namespace SliderProps {
118
118
 
119
119
  /** 滑动选择器
120
120
  * @classification forms
121
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
121
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
122
122
  * @example_react
123
123
  * ```tsx
124
124
  * export default class PageView extends Component {
package/types/Slot.d.ts CHANGED
@@ -14,7 +14,8 @@ interface SlotProps {
14
14
  }
15
15
 
16
16
  /** slot 插槽
17
- * @supported weapp, swan, alipay, tt, jd, qq
17
+ * @classification viewContainer
18
+ * @supported weapp, swan, alipay, tt, jd, qq, harmony
18
19
  * @example
19
20
  * ```tsx
20
21
  * import { Slot, View, Text } from '@tarojs/components'
package/types/Swiper.d.ts CHANGED
@@ -247,7 +247,7 @@ declare namespace SwiperProps {
247
247
  /** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。
248
248
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
249
249
  * @classification viewContainer
250
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
250
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
251
251
  * @example_react
252
252
  * ```tsx
253
253
  * class App extends Component {
@@ -16,7 +16,7 @@ interface SwiperItemProps extends StandardProps {
16
16
  /** 仅可放置在 swiper 组件中,宽高自动设置为100%
17
17
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
18
18
  * @classification viewContainer
19
- * @supported weapp, alipay, swan, tt, jd, h5, rn
19
+ * @supported weapp, alipay, swan, tt, jd, h5, rn, harmony
20
20
  * @example_react
21
21
  * ```tsx
22
22
  * class App extends Component {
package/types/Switch.d.ts CHANGED
@@ -93,7 +93,7 @@ declare namespace SwitchProps {
93
93
  * </view>
94
94
  * </template>
95
95
  * ```
96
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
96
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
97
97
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/switch.html
98
98
  */
99
99
  declare const Switch: ComponentType<SwitchProps>
@@ -224,7 +224,7 @@ declare namespace TextareaProps {
224
224
 
225
225
  /** 多行输入框。该组件是原生组件,使用时请注意相关限制
226
226
  * @classification forms
227
- * @supported weapp, alipay, swan, tt, qq, h5, rn
227
+ * @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
228
228
  * @example_react
229
229
  * ```tsx
230
230
  * export default class PageView extends Component {
package/types/Video.d.ts CHANGED
@@ -643,7 +643,7 @@ declare namespace VideoProps {
643
643
 
644
644
  /** 视频。相关api:Taro.createVideoContext
645
645
  * @classification media
646
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
646
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
647
647
  * @example_react
648
648
  * ```tsx
649
649
  * export default class PageView extends Component {
package/types/View.d.ts CHANGED
@@ -142,7 +142,7 @@ interface ViewProps extends StandardProps {
142
142
 
143
143
  /** 视图容器
144
144
  * @classification viewContainer
145
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
145
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
146
146
  * @example_react
147
147
  * ```tsx
148
148
  * export default class PageView extends Component {
@@ -49,7 +49,7 @@ declare namespace WebViewProps {
49
49
 
50
50
  /** web-view 组件是一个可以用来承载网页的容器,会自动铺满整个小程序页面。个人类型与海外类型的小程序暂不支持使用。
51
51
  * @classification open
52
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
52
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
53
53
  * @example_react
54
54
  * ```tsx
55
55
  * class App extends Component {