@tarojs/components 4.2.1-beta.1 → 4.2.1-beta.3

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 (86) hide show
  1. package/dist/cjs/{image-32205a1d.js → image-4303ed3a.js} +4 -9
  2. package/dist/cjs/index.cjs.js +3 -3
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{scroll-view-f1361b2b.js → scroll-view-65cb8d5f.js} +2 -3
  5. package/dist/cjs/taro-components.cjs.js +1 -1
  6. package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
  7. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
  9. package/dist/cjs/web-view-be5a2d1d.js +27 -0
  10. package/dist/collection/components/image/image.js +3 -29
  11. package/dist/collection/components/image/style/index.css +1 -1
  12. package/dist/collection/components/scroll-view/scroll-view.js +2 -3
  13. package/dist/collection/components/web-view/web-view.js +1 -62
  14. package/dist/components/taro-image-core.js +4 -10
  15. package/dist/components/taro-scroll-view-core.js +2 -3
  16. package/dist/components/taro-web-view-core.js +1 -48
  17. package/dist/esm/{image-9c1a61f3.js → image-b0b222bc.js} +4 -9
  18. package/dist/esm/index.js +3 -3
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/{scroll-view-7f9988b3.js → scroll-view-43e9acfc.js} +2 -3
  21. package/dist/esm/taro-components.js +1 -1
  22. package/dist/esm/taro-image-core.entry.js +1 -1
  23. package/dist/esm/taro-scroll-view-core.entry.js +1 -1
  24. package/dist/esm/taro-web-view-core.entry.js +1 -1
  25. package/dist/esm/web-view-8f780a19.js +25 -0
  26. package/dist/hydrate/index.js +7 -61
  27. package/dist/taro-components/index.esm.js +1 -1
  28. package/dist/taro-components/p-00e72620.entry.js +1 -0
  29. package/dist/taro-components/p-1f81d4f4.js +1 -0
  30. package/dist/taro-components/p-5570a53e.entry.js +1 -0
  31. package/dist/taro-components/{p-5108ba78.js → p-58a709ad.js} +1 -1
  32. package/dist/taro-components/p-beae3fe0.js +1 -0
  33. package/dist/taro-components/p-cb7e1d6e.entry.js +1 -0
  34. package/dist/taro-components/taro-components.esm.js +1 -1
  35. package/dist/types/components/image/image.d.ts +0 -5
  36. package/dist/types/components/web-view/web-view.d.ts +0 -5
  37. package/dist/types/components.d.ts +0 -11
  38. package/lib/react/react-component-lib/utils/attachProps.js +4 -1
  39. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  40. package/lib/vue3/components.js +1 -3
  41. package/lib/vue3/components.js.map +1 -1
  42. package/package.json +5 -5
  43. package/types/Audio.d.ts +13 -13
  44. package/types/Button.d.ts +50 -16
  45. package/types/Camera.d.ts +7 -7
  46. package/types/Canvas.d.ts +10 -10
  47. package/types/Checkbox.d.ts +5 -5
  48. package/types/CheckboxGroup.d.ts +2 -2
  49. package/types/CoverImage.d.ts +42 -4
  50. package/types/CoverView.d.ts +21 -1
  51. package/types/CustomWrapper.d.ts +1 -1
  52. package/types/Editor.d.ts +20 -8
  53. package/types/Form.d.ts +3 -3
  54. package/types/Icon.d.ts +4 -4
  55. package/types/Image.d.ts +6 -12
  56. package/types/Input.d.ts +16 -16
  57. package/types/Label.d.ts +2 -2
  58. package/types/Map.d.ts +21 -17
  59. package/types/MovableArea.d.ts +2 -2
  60. package/types/MovableView.d.ts +16 -16
  61. package/types/Navigator.d.ts +8 -8
  62. package/types/Picker.d.ts +26 -26
  63. package/types/PickerView.d.ts +7 -7
  64. package/types/PickerViewColumn.d.ts +1 -1
  65. package/types/Progress.d.ts +13 -13
  66. package/types/Radio.d.ts +5 -5
  67. package/types/RadioGroup.d.ts +2 -2
  68. package/types/RichText.d.ts +4 -4
  69. package/types/ScrollView.d.ts +17 -17
  70. package/types/Slider.d.ts +14 -14
  71. package/types/Swiper.d.ts +14 -14
  72. package/types/SwiperItem.d.ts +2 -2
  73. package/types/Switch.d.ts +7 -7
  74. package/types/Text.d.ts +4 -4
  75. package/types/Textarea.d.ts +13 -13
  76. package/types/Video.d.ts +37 -37
  77. package/types/View.d.ts +5 -5
  78. package/types/WebView.d.ts +4 -4
  79. package/types/common.d.ts +6 -24
  80. package/dist/cjs/web-view-1ec276e7.js +0 -74
  81. package/dist/esm/web-view-abc07992.js +0 -72
  82. package/dist/taro-components/p-85e84cde.entry.js +0 -1
  83. package/dist/taro-components/p-8635925e.js +0 -1
  84. package/dist/taro-components/p-a5f2ce14.entry.js +0 -1
  85. package/dist/taro-components/p-acf31ef0.js +0 -1
  86. package/dist/taro-components/p-eeec4f43.entry.js +0 -1
package/types/Audio.d.ts CHANGED
@@ -2,16 +2,16 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
3
  interface AudioProps extends StandardProps {
4
4
  /** audio 组件的唯一标识符
5
- * @supported weapp, swan, qq
5
+ * @supported weapp, swan, qq, ascf
6
6
  */
7
7
  id?: string
8
8
  /** 要播放音频的资源地址
9
- * @supported weapp, swan, qq, h5, harmony_hybrid
9
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
10
10
  */
11
11
  src?: string
12
12
  /** 是否循环播放
13
13
  * @default false
14
- * @supported weapp, swan, qq, h5, harmony_hybrid
14
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
15
15
  */
16
16
  loop?: boolean
17
17
  /** 是否静音播放
@@ -21,21 +21,21 @@ interface AudioProps extends StandardProps {
21
21
  muted?: boolean
22
22
  /** 是否显示默认控件
23
23
  * @default false
24
- * @supported weapp, swan, qq, h5, harmony_hybrid
24
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
25
25
  */
26
26
  controls?: boolean
27
27
  /** 默认控件上的音频封面的图片资源地址,如果 controls 属性值为 false 则设置 poster 无效
28
- * @supported weapp, swan, qq
28
+ * @supported weapp, swan, qq, ascf
29
29
  */
30
30
  poster?: string
31
31
  /** 默认控件上的音频名字,如果 controls 属性值为 false 则设置 name 无效
32
32
  * @default "未知音频"
33
- * @supported weapp, swan, qq
33
+ * @supported weapp, swan, qq, ascf
34
34
  */
35
35
  name?: string
36
36
  /** 默认控件上的作者名字,如果 controls 属性值为 false 则设置 author 无效
37
37
  * @default "未知作者"
38
- * @supported weapp, swan, qq
38
+ * @supported weapp, swan, qq, ascf
39
39
  */
40
40
  author?: string
41
41
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
@@ -43,23 +43,23 @@ interface AudioProps extends StandardProps {
43
43
  */
44
44
  nativeProps?: Record<string, unknown>
45
45
  /** 当发生错误时触发 error 事件,detail = {errMsg: MediaError.code}
46
- * @supported weapp, swan, qq, h5, harmony_hybrid
46
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
47
47
  */
48
48
  onError?: CommonEventFunction<AudioProps.onErrorEventDetail>
49
49
  /** 当开始/继续播放时触发play事件
50
- * @supported weapp, swan, qq, h5, harmony_hybrid
50
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
51
51
  */
52
52
  onPlay?: CommonEventFunction
53
53
  /** 当暂停播放时触发 pause 事件
54
- * @supported weapp, swan, qq, h5, harmony_hybrid
54
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
55
55
  */
56
56
  onPause?: CommonEventFunction
57
57
  /** 当播放进度改变时触发 timeupdate 事件,detail = {currentTime, duration}
58
- * @supported weapp, swan, qq, h5, harmony_hybrid
58
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
59
59
  */
60
60
  onTimeUpdate?: CommonEventFunction<AudioProps.onTimeUpdateEventDetail>
61
61
  /** 当播放到末尾时触发 ended 事件
62
- * @supported weapp, swan, qq, h5, harmony_hybrid
62
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
63
63
  */
64
64
  onEnded?: CommonEventFunction
65
65
  }
@@ -89,7 +89,7 @@ declare namespace AudioProps {
89
89
  /** 音频。1.6.0版本开始,该组件不再维护。建议使用能力更强的 Taro.createInnerAudioContext 接口
90
90
  * @classification media
91
91
  * @deprecated
92
- * @supported weapp, swan, qq, h5, harmony_hybrid
92
+ * @supported weapp, swan, qq, h5, harmony_hybrid, ascf
93
93
  * @example_react
94
94
  * ```tsx
95
95
  * export default class PageView extends Component {
package/types/Button.d.ts CHANGED
@@ -3,44 +3,69 @@ import { StandardProps, CommonEventFunction } from './common'
3
3
  import { StyleProp, ViewStyle } from 'react-native'
4
4
  interface ButtonProps extends StandardProps {
5
5
  /** 按钮的大小
6
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
6
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
7
7
  * @default default
8
8
  */
9
9
  size?: keyof ButtonProps.Size
10
10
  /** 按钮的样式类型
11
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
11
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
12
12
  * @default default
13
13
  */
14
14
  type?: keyof ButtonProps.Type
15
15
  /** 按钮是否镂空,背景色透明
16
- * @supported weapp, alipay, swan, qq, jd, h5, rn, harmony, harmony_hybrid
16
+ * @supported weapp, alipay, swan, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
17
17
  * @default false
18
18
  */
19
19
  plain?: boolean
20
20
  /** 是否禁用
21
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
21
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
22
22
  * @default false
23
23
  */
24
24
  disabled?: boolean
25
25
  /** 名称前是否带 loading 图标
26
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
26
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
27
27
  * @default false
28
28
  */
29
29
  loading?: boolean
30
30
  /** 用于 `<form/>` 组件,点击分别会触发 `<form/>` 组件的 submit/reset 事件
31
- * @supported weapp, alipay, swan, tt, qq, jd, harmony
31
+ * @supported weapp, alipay, swan, tt, qq, jd, harmony, ascf
32
32
  */
33
33
  formType?: keyof ButtonProps.FormType
34
34
  /** 微信开放能力
35
- * @supported weapp, alipay, swan, tt, qq, jd
35
+ * @supported weapp, alipay, swan, tt, qq, jd, ascf
36
36
  */
37
37
  openType?: ButtonProps.OpenType
38
38
  /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
39
39
  * @default button-hover
40
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
40
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
41
41
  * @rn 支持 hoverStyle 属性,但框架未支持 hoverClass
42
42
  */
43
43
  hoverClass?: string
44
+ /** open-type=launchApp时有效,表示待启动Ability所在的应用Bundle名称。
45
+ * @default none
46
+ * @supported ascf
47
+ */
48
+ appBundleName?: string
49
+ /** open-type=launchApp时有效,表示待启动Ability所属的模块名称。
50
+ * @default none
51
+ * @supported ascf
52
+ */
53
+ appModuleName?: string
54
+ /** open-type=launchApp时有效,表示待启动Ability名称。
55
+ * @default none
56
+ * @supported ascf
57
+ */
58
+ appAbilityName?: string
59
+ /** open-type=launchApp时有效,表示启动Ability时的自定义参数。
60
+ * @default none
61
+ * @supported ascf
62
+ */
63
+ appParameters?: Object
64
+ /** open-type=liveActivity时有效,表示子场景ID,当open-type=liveActivity时,该参数必填。
65
+ * @default none
66
+ * @supported ascf
67
+ */
68
+ activityType?: string
44
69
  /** 由于 RN 不支持 hoverClass,故 RN 端的 Button 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。
45
70
  * @default none
46
71
  * @supported rn
@@ -48,17 +73,17 @@ interface ButtonProps extends StandardProps {
48
73
  hoverStyle?: StyleProp<ViewStyle>
49
74
  /** 指定是否阻止本节点的祖先节点出现点击态
50
75
  * @default false
51
- * @supported weapp, alipay, swan, tt, qq, jd
76
+ * @supported weapp, alipay, swan, tt, qq, jd, ascf
52
77
  */
53
78
  hoverStopPropagation?: boolean
54
79
  /** 按住后多久出现点击态,单位毫秒
55
80
  * @default 20
56
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
81
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
57
82
  */
58
83
  hoverStartTime?: number
59
84
  /** 手指松开后点击态保留时间,单位毫秒
60
85
  * @default 70
61
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
86
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
62
87
  */
63
88
  hoverStayTime?: number
64
89
  /** 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。
@@ -197,7 +222,7 @@ interface ButtonProps extends StandardProps {
197
222
  /** 获取用户手机号回调
198
223
  *
199
224
  * 生效时机:`open-type="getPhoneNumber"`
200
- * @supported weapp, alipay, swan, tt, jd
225
+ * @supported weapp, alipay, swan, tt, jd, ascf
201
226
  */
202
227
  onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
203
228
  /** 获取手机号和风险等级的回调
@@ -206,6 +231,12 @@ interface ButtonProps extends StandardProps {
206
231
  * @supported ascf
207
232
  */
208
233
  onGetPhoneNumberAndRiskLevel?: CommonEventFunction<ButtonProps.onGetPhoneNumberAndRiskLevelEventDetail>
234
+ /** 获取服务动态授权码的回调
235
+ *
236
+ * 生效时机:`open-type="liveActivity"`
237
+ * @supported ascf
238
+ */
239
+ onCreateLiveActivity?: CommonEventFunction<ButtonProps.onCreateLiveActivityEventDetail>
209
240
  /**
210
241
  * 手机号实时验证回调,`open-type="getRealtimePhoneNumber"` 时有效
211
242
  * @supported weapp
@@ -214,19 +245,19 @@ interface ButtonProps extends StandardProps {
214
245
  /** 当使用开放能力时,发生错误的回调
215
246
  *
216
247
  * 生效时机:`open-type="launchApp"`
217
- * @supported weapp, alipay, qq, jd
248
+ * @supported weapp, alipay, qq, jd, ascf
218
249
  */
219
250
  onError?: CommonEventFunction
220
251
  /** 在打开授权设置页后回调
221
252
  *
222
253
  * 生效时机:`open-type="openSetting"`
223
- * @supported weapp, swan, tt, qq, jd
254
+ * @supported weapp, swan, tt, qq, jd, ascf
224
255
  */
225
256
  onOpenSetting?: CommonEventFunction<ButtonProps.onOpenSettingEventDetail>
226
257
  /** 打开 APP 成功的回调
227
258
  *
228
259
  * 生效时机:`open-type="launchApp"`
229
- * @supported weapp, qq
260
+ * @supported weapp, qq, ascf
230
261
  */
231
262
  onLaunchApp?: CommonEventFunction
232
263
  /** 获取用户头像回调
@@ -539,6 +570,9 @@ declare namespace ButtonProps {
539
570
  interface onGetPhoneNumberAndRiskLevelEventDetail {
540
571
  code: string
541
572
  }
573
+ interface onCreateLiveActivityEventDetail {
574
+ code: string
575
+ }
542
576
  interface onGetRealTimePhoneNumberEventDetail {
543
577
  code: string
544
578
  }
@@ -551,7 +585,7 @@ declare namespace ButtonProps {
551
585
  }
552
586
  /** 按钮
553
587
  * @classification forms
554
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
588
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
555
589
  * @example_react
556
590
  * ```tsx
557
591
  * export default class PageButton extends Component {
package/types/Camera.d.ts CHANGED
@@ -8,17 +8,17 @@ interface CameraProps extends StandardProps {
8
8
  mode?: keyof CameraProps.Mode
9
9
  /** 分辨率,不支持动态修改
10
10
  * @default "medium"
11
- * @supported weapp, tt
11
+ * @supported weapp, tt, ascf
12
12
  */
13
13
  resolution?: keyof CameraProps.Resolution
14
14
  /** 摄像头朝向
15
15
  * @default "back"
16
- * @supported weapp, alipay, swan, tt, qq, jd, rn
16
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, ascf
17
17
  */
18
18
  devicePosition?: keyof CameraProps.DevicePosition
19
19
  /** 闪光灯
20
20
  * @default "auto"
21
- * @supported weapp, alipay, swan, tt, qq, jd, rn
21
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, ascf
22
22
  */
23
23
  flash?: keyof CameraProps.Flash
24
24
  /** 指定期望的相机帧数据尺寸
@@ -33,15 +33,15 @@ interface CameraProps extends StandardProps {
33
33
  outputDimension?: '360P' | '540P' | '720P' | '1080P' | 'max'
34
34
  /** 摄像头在非正常终止时触发,
35
35
  * 如退出后台等情况
36
- * @supported weapp, alipay, swan, tt, qq, jd, rn
36
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, ascf
37
37
  */
38
38
  onStop?: CommonEventFunction
39
39
  /** 用户不允许使用摄像头时触发
40
- * @supported weapp, alipay, swan, tt, qq, jd, rn
40
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, ascf
41
41
  */
42
42
  onError?: CommonEventFunction
43
43
  /** 相机初始化完成时触发
44
- * @supported weapp, tt, rn
44
+ * @supported weapp, tt, rn, ascf
45
45
  */
46
46
  onInitDone?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
47
47
  /** 相机初始化成功时触发。
@@ -121,7 +121,7 @@ declare namespace CameraProps {
121
121
  }
122
122
  /** 系统相机
123
123
  * @classification media
124
- * @supported weapp, alipay, swan, tt, qq, jd, rn
124
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, ascf
125
125
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
126
126
  */
127
127
  declare const Camera: ComponentType<CameraProps>
package/types/Canvas.d.ts CHANGED
@@ -2,16 +2,16 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction, CanvasTouchEventFunction, CanvasTouchEvent } from './common'
3
3
  interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
4
4
  /** 指定 canvas 类型,支持 2d 和 webgl
5
- * @supported weapp, alipay, tt
5
+ * @supported weapp, alipay, tt, ascf
6
6
  */
7
7
  type?: string
8
8
  /** canvas 组件的唯一标识符,若指定了 type 则无需再指定该属性
9
- * @supported weapp, swan, tt, qq, jd, h5, harmony_hybrid
9
+ * @supported weapp, swan, tt, qq, jd, h5, harmony_hybrid, ascf
10
10
  */
11
11
  canvasId?: string
12
12
  /** 当在 canvas 中移动时且有绑定手势事件时,禁止屏幕滚动以及下拉刷新
13
13
  * @default false
14
- * @supported weapp, alipay, swan, qq, jd
14
+ * @supported weapp, alipay, swan, qq, jd, ascf
15
15
  */
16
16
  disableScroll?: boolean
17
17
  /** 组件唯一标识符。
@@ -32,27 +32,27 @@ interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
32
32
  */
33
33
  nativeProps?: Record<string, unknown>
34
34
  /** 手指触摸动作开始
35
- * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
35
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
36
36
  */
37
37
  onTouchStart?: CanvasTouchEventFunction
38
38
  /** 手指触摸后移动
39
- * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
39
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
40
40
  */
41
41
  onTouchMove?: CanvasTouchEventFunction
42
42
  /** 手指触摸动作结束
43
- * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
43
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
44
44
  */
45
45
  onTouchEnd?: CanvasTouchEventFunction
46
46
  /** 手指触摸动作被打断,如来电提醒,弹窗
47
- * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
47
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
48
48
  */
49
49
  onTouchCancel?: CanvasTouchEventFunction
50
50
  /** 手指长按 500ms 之后触发,触发了长按事件后进行移动不会触发屏幕的滚动
51
- * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid
51
+ * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid, ascf
52
52
  */
53
53
  onLongTap?: CommonEventFunction
54
54
  /** 当发生错误时触发 error 事件,detail = {errMsg: 'something wrong'}
55
- * @supported weapp, swan, qq, jd
55
+ * @supported weapp, swan, qq, jd, ascf
56
56
  */
57
57
  onError?: CommonEventFunction<CanvasProps.onErrorEventDetail>
58
58
  /** 点击。
@@ -73,7 +73,7 @@ declare namespace CanvasProps {
73
73
  *
74
74
  * `<Canvas />` 组件的 RN 版本尚未实现。
75
75
  * @classification canvas
76
- * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
76
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
77
77
  * @example_react
78
78
  * ```tsx
79
79
  * class App extends Components {
@@ -2,21 +2,21 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface CheckboxProps extends StandardProps {
4
4
  /** `<Checkbox/>`标识,选中时触发`<CheckboxGroup/>`的 change 事件,并携带 `<Checkbox/>` 的 value
5
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
6
6
  */
7
7
  value: string
8
8
  /** 是否禁用
9
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
9
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
10
10
  * @default false
11
11
  */
12
12
  disabled?: boolean
13
13
  /** 当前是否选中,可用来设置默认选中
14
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
14
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
15
15
  * @default false
16
16
  */
17
17
  checked?: boolean
18
18
  /** checkbox的颜色,同 css 的 color
19
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
19
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
20
20
  */
21
21
  color?: string
22
22
  /**
@@ -41,7 +41,7 @@ interface CheckboxProps extends StandardProps {
41
41
  }
42
42
  /** 多选项目
43
43
  * @classification forms
44
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
44
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
45
45
  * @example_react
46
46
  * ```tsx
47
47
  * export default class PageCheckbox extends Component {
@@ -6,7 +6,7 @@ interface CheckboxGroupProps extends StandardProps, FormItemProps {
6
6
  */
7
7
  name?: string
8
8
  /** `<CheckboxGroup/>` 中选中项发生改变是触发 change 事件
9
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
9
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
10
10
  */
11
11
  onChange?: CommonEventFunction<{
12
12
  value: string[]
@@ -14,7 +14,7 @@ interface CheckboxGroupProps extends StandardProps, FormItemProps {
14
14
  }
15
15
  /** 多项选择器,内部由多个checkbox组成
16
16
  * @classification forms
17
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
17
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
18
18
  * @example
19
19
  * ```tsx
20
20
  * export default class PageCheckbox extends Component {
@@ -2,9 +2,14 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
3
  interface CoverImageProps extends StandardProps {
4
4
  /** 图标路径,支持临时路径、网络地址、云文件ID。暂不支持base64格式。
5
- * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid
5
+ * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid, ascf
6
6
  */
7
7
  src: string
8
+ /** 图片裁剪、缩放的模式
9
+ * @default "scaleToFill"
10
+ * @supported ascf
11
+ */
12
+ mode?: keyof CoverImageProps.Mode
8
13
  /** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
9
14
  * @supported weapp
10
15
  */
@@ -34,11 +39,11 @@ interface CoverImageProps extends StandardProps {
34
39
  */
35
40
  ariaLabel?: string
36
41
  /** 图片加载成功时触发
37
- * @supported weapp, swan, qq, jd, h5, harmony_hybrid
42
+ * @supported weapp, swan, qq, jd, h5, harmony_hybrid, ascf
38
43
  */
39
44
  onLoad?: CommonEventFunction
40
45
  /** 图片加载失败时触发
41
- * @supported weapp, swan, qq, jd, h5, harmony_hybrid
46
+ * @supported weapp, swan, qq, jd, h5, harmony_hybrid, ascf
42
47
  */
43
48
  onError?: CommonEventFunction
44
49
  /** 点击事件回调。
@@ -46,9 +51,42 @@ interface CoverImageProps extends StandardProps {
46
51
  */
47
52
  onTap?: CommonEventFunction
48
53
  }
54
+ declare namespace CoverImageProps {
55
+ /** mode 的合法值 */
56
+ interface Mode {
57
+ /** 缩放模式,不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素 */
58
+ scaleToFill
59
+ /** 缩放模式,保持纵横比缩放图片,使图片的长边能完全显示出来。也就是说,可以完整地将图片显示出来。 */
60
+ aspectFit
61
+ /** 缩放模式,保持纵横比缩放图片,只保证图片的短边能完全显示出来。也就是说,图片通常只在水平或垂直方向是完整的,另一个方向将会发生截取。 */
62
+ aspectFill
63
+ /** 缩放模式,宽度不变,高度自动变化,保持原图宽高比不变 */
64
+ widthFix
65
+ /** 缩放模式,高度不变,宽度自动变化,保持原图宽高比不变 */
66
+ heightFix
67
+ /** 裁剪模式,不缩放图片,只显示图片的顶部区域 */
68
+ top
69
+ /** 裁剪模式,不缩放图片,只显示图片的底部区域 */
70
+ bottom
71
+ /** 裁剪模式,不缩放图片,只显示图片的中间区域 */
72
+ center
73
+ /** 裁剪模式,不缩放图片,只显示图片的左边区域 */
74
+ left
75
+ /** 裁剪模式,不缩放图片,只显示图片的右边区域 */
76
+ right
77
+ /** 裁剪模式,不缩放图片,只显示图片的左上边区域 */
78
+ 'top left'
79
+ /** 裁剪模式,不缩放图片,只显示图片的右上边区域 */
80
+ 'top right'
81
+ /** 裁剪模式,不缩放图片,只显示图片的左下边区域 */
82
+ 'bottom left'
83
+ /** 裁剪模式,不缩放图片,只显示图片的右下边区域 */
84
+ 'bottom right'
85
+ }
86
+ }
49
87
  /** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。
50
88
  * @classification viewContainer
51
- * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid
89
+ * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid, ascf
52
90
  * @example_react
53
91
  * ```tsx
54
92
  * // js
@@ -130,10 +130,30 @@ interface CoverViewProps extends ViewProps {
130
130
  * <CoverView slot="header" />
131
131
  */
132
132
  slot?: string
133
+ /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
134
+ * @default none
135
+ * @supported ascf
136
+ */
137
+ hoverClass?: string
138
+ /** 指定是否阻止本节点的祖先节点出现点击态
139
+ * @default false
140
+ * @supported ascf
141
+ */
142
+ hoverStopPropagation?: boolean
143
+ /** 按住后多久出现点击态,单位毫秒
144
+ * @default 50
145
+ * @supported ascf
146
+ */
147
+ hoverStartTime?: number
148
+ /** 手指松开后点击态保留时间,单位毫秒
149
+ * @default 400
150
+ * @supported ascf
151
+ */
152
+ hoverStayTime?: number
133
153
  }
134
154
  /** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。
135
155
  * @classification viewContainer
136
- * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid
156
+ * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid, ascf
137
157
  * @example_react
138
158
  * ```tsx
139
159
  * // js
@@ -7,7 +7,7 @@ interface CustomWrapperProps extends StandardProps {
7
7
  /** custom-wrapper 自定义组件包裹器
8
8
  * 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少
9
9
  * @classification viewContainer
10
- * @supported weapp, swan, alipay, tt, jd, qq, h5, harmony_hybrid
10
+ * @supported weapp, swan, alipay, tt, jd, qq, h5, harmony_hybrid, ascf
11
11
  * @example
12
12
  * ```tsx
13
13
  * import { Component } from 'react'
package/types/Editor.d.ts CHANGED
@@ -3,11 +3,11 @@ import { StandardProps, CommonEventFunction } from './common'
3
3
  interface EditorProps extends StandardProps {
4
4
  /** 设置编辑器为只读
5
5
  * @default false
6
- * @supported weapp, jd
6
+ * @supported weapp, jd, ascf
7
7
  */
8
8
  readOnly?: boolean
9
9
  /** 提示信息
10
- * @supported weapp, jd
10
+ * @supported weapp, jd, ascf
11
11
  */
12
12
  placeholder?: string
13
13
  /** 点击图片时显示图片大小控件
@@ -25,26 +25,38 @@ interface EditorProps extends StandardProps {
25
25
  * @supported weapp, jd
26
26
  */
27
27
  showImgResize?: boolean
28
+ /** 编辑器允许的名单内的格式。
29
+ * @supported ascf
30
+ */
31
+ enableFormats?: string[]
32
+ /** 点击编辑器拉起输入法后,输入法键盘右下角文字类型。
33
+ * @supported ascf
34
+ */
35
+ enterkeyhint?: 'send' | 'search' | 'next' | 'previous' | 'go' | 'done' | 'enter'
36
+ /** 点击键盘回车键时是否保持键盘不收起。
37
+ * @supported ascf
38
+ */
39
+ confirmHold?: boolean
28
40
  /** 编辑器初始化完成时触发
29
- * @supported weapp, jd
41
+ * @supported weapp, jd, ascf
30
42
  */
31
43
  onReady?: CommonEventFunction
32
44
  /** 编辑器聚焦时触发
33
- * @supported weapp, jd
45
+ * @supported weapp, jd, ascf
34
46
  */
35
47
  onFocus?: CommonEventFunction<EditorProps.editorEventDetail>
36
48
  /** 编辑器失去焦点时触发
37
49
  * detail = { html, text, delta }
38
- * @supported weapp, jd
50
+ * @supported weapp, jd, ascf
39
51
  */
40
52
  onBlur?: CommonEventFunction<EditorProps.editorEventDetail>
41
53
  /** 编辑器内容改变时触发
42
54
  * detail = { html, text, delta }
43
- * @supported weapp, jd
55
+ * @supported weapp, jd, ascf
44
56
  */
45
57
  onInput?: CommonEventFunction<EditorProps.editorEventDetail>
46
58
  /** 通过 Context 方法改变编辑器内样式时触发,返回选区已设置的样式
47
- * @supported weapp, jd
59
+ * @supported weapp, jd, ascf
48
60
  */
49
61
  onStatusChange?: CommonEventFunction
50
62
  }
@@ -67,7 +79,7 @@ declare namespace EditorProps {
67
79
  *
68
80
  * *编辑器内支持部分 HTML 标签和内联样式,不支持 **class** 和 **id***
69
81
  * @classification forms
70
- * @supported weapp, jd
82
+ * @supported weapp, jd, ascf
71
83
  * @example_react
72
84
  * ```tsx
73
85
  * class App extends Components {
package/types/Form.d.ts CHANGED
@@ -43,11 +43,11 @@ interface FormProps extends StandardProps {
43
43
  */
44
44
  clueComponentId?: string
45
45
  /** 携带 form 中的数据触发 submit 事件
46
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
46
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
47
47
  */
48
48
  onSubmit?: CommonEventFunction<FormProps.onSubmitEventDetail>
49
49
  /** 表单重置时会触发 reset 事件
50
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
50
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
51
51
  */
52
52
  onReset?: CommonEventFunction
53
53
  }
@@ -69,7 +69,7 @@ declare namespace FormProps {
69
69
  *
70
70
  * 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。
71
71
  * @classification forms
72
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
72
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
73
73
  * @example_react
74
74
  * ```tsx
75
75
  * class App extends Component {
package/types/Icon.d.ts CHANGED
@@ -2,16 +2,16 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps } from './common'
3
3
  interface IconProps extends StandardProps {
4
4
  /** icon 的类型
5
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
6
6
  */
7
7
  type: keyof IconProps.TIconType
8
8
  /** icon 的大小,单位px
9
9
  * @default 23
10
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
10
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
11
11
  */
12
12
  size?: number
13
13
  /** icon 的颜色,同 css 的 color
14
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
14
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
15
15
  */
16
16
  color?: string
17
17
  /** 无障碍访问,(属性)元素的额外描述
@@ -48,7 +48,7 @@ declare namespace IconProps {
48
48
  }
49
49
  /** 图标。组件属性的长度单位默认为 px
50
50
  * @classification base
51
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
51
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
52
52
  * @example_react
53
53
  * ```tsx
54
54
  * export default class PageView extends Component {