@tarojs/components 4.2.1-beta.0 → 4.2.1-beta.2
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.
- package/dist/cjs/image-315b9040.js +61 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{scroll-view-65cb8d5f.js → scroll-view-f1361b2b.js} +3 -2
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
- package/dist/cjs/web-view-1ec276e7.js +74 -0
- package/dist/collection/components/image/image.js +32 -11
- package/dist/collection/components/image/style/index.css +1 -1
- package/dist/collection/components/scroll-view/scroll-view.js +3 -2
- package/dist/collection/components/web-view/web-view.js +62 -1
- package/dist/components/taro-image-core.js +13 -12
- package/dist/components/taro-scroll-view-core.js +3 -2
- package/dist/components/taro-web-view-core.js +48 -1
- package/dist/esm/image-a2d81773.js +59 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{scroll-view-43e9acfc.js → scroll-view-7f9988b3.js} +3 -2
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm/taro-web-view-core.entry.js +1 -1
- package/dist/esm/web-view-abc07992.js +72 -0
- package/dist/hydrate/index.js +64 -15
- package/dist/taro-components/index.esm.js +1 -1
- package/dist/taro-components/p-3e521c50.entry.js +1 -0
- package/dist/taro-components/{p-58a709ad.js → p-5108ba78.js} +1 -1
- package/dist/taro-components/p-85e84cde.entry.js +1 -0
- package/dist/taro-components/p-8635925e.js +1 -0
- package/dist/taro-components/p-a5f2ce14.entry.js +1 -0
- package/dist/taro-components/p-b28231cc.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/image/image.d.ts +5 -1
- package/dist/types/components/web-view/web-view.d.ts +5 -0
- package/dist/types/components.d.ts +11 -0
- package/lib/vue3/components.js +3 -1
- package/lib/vue3/components.js.map +1 -1
- package/package.json +5 -5
- package/types/Audio.d.ts +13 -13
- package/types/Button.d.ts +50 -16
- package/types/Camera.d.ts +7 -7
- package/types/Canvas.d.ts +10 -10
- package/types/Checkbox.d.ts +5 -5
- package/types/CheckboxGroup.d.ts +2 -2
- package/types/CoverImage.d.ts +42 -4
- package/types/CoverView.d.ts +21 -1
- package/types/CustomWrapper.d.ts +1 -1
- package/types/Editor.d.ts +20 -8
- package/types/Form.d.ts +3 -3
- package/types/Icon.d.ts +4 -4
- package/types/Image.d.ts +12 -6
- package/types/Input.d.ts +16 -16
- package/types/Label.d.ts +2 -2
- package/types/Map.d.ts +21 -17
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +16 -16
- package/types/Navigator.d.ts +8 -8
- package/types/Picker.d.ts +26 -26
- package/types/PickerView.d.ts +7 -7
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +13 -13
- package/types/Radio.d.ts +5 -5
- package/types/RadioGroup.d.ts +2 -2
- package/types/RichText.d.ts +4 -4
- package/types/ScrollView.d.ts +16 -16
- package/types/Slider.d.ts +14 -14
- package/types/Swiper.d.ts +14 -14
- package/types/SwiperItem.d.ts +2 -2
- package/types/Switch.d.ts +7 -7
- package/types/Text.d.ts +4 -4
- package/types/Textarea.d.ts +13 -13
- package/types/Video.d.ts +37 -37
- package/types/View.d.ts +5 -5
- package/types/WebView.d.ts +4 -4
- package/types/common.d.ts +24 -1
- package/dist/cjs/image-4303ed3a.js +0 -60
- package/dist/cjs/web-view-be5a2d1d.js +0 -27
- package/dist/esm/image-b0b222bc.js +0 -58
- package/dist/esm/web-view-8f780a19.js +0 -25
- package/dist/taro-components/p-00e72620.entry.js +0 -1
- package/dist/taro-components/p-1f81d4f4.js +0 -1
- package/dist/taro-components/p-5570a53e.entry.js +0 -1
- package/dist/taro-components/p-beae3fe0.js +0 -1
- package/dist/taro-components/p-cb7e1d6e.entry.js +0 -1
package/types/ScrollView.d.ts
CHANGED
|
@@ -3,40 +3,40 @@ import { BaseEventOrigFunction, CommonEventFunction, StandardProps } from './com
|
|
|
3
3
|
interface ScrollViewProps extends StandardProps {
|
|
4
4
|
/** 允许横向滚动
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
7
7
|
* @rn 二选一
|
|
8
8
|
*/
|
|
9
9
|
scrollX?: boolean
|
|
10
10
|
/** 允许纵向滚动
|
|
11
11
|
* @default false
|
|
12
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
12
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
13
13
|
* @rn 二选一
|
|
14
14
|
*/
|
|
15
15
|
scrollY?: boolean
|
|
16
16
|
/** 距顶部/左边多远时(单位px),触发 scrolltoupper 事件
|
|
17
17
|
* @default 50
|
|
18
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
18
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
19
19
|
*/
|
|
20
20
|
upperThreshold?: number
|
|
21
21
|
/** 距底部/右边多远时(单位px),触发 scrolltolower 事件
|
|
22
22
|
* @default 50
|
|
23
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
23
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
24
24
|
*/
|
|
25
25
|
lowerThreshold?: number
|
|
26
26
|
/** 设置竖向滚动条位置
|
|
27
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
27
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
28
28
|
*/
|
|
29
29
|
scrollTop?: number
|
|
30
30
|
/** 设置横向滚动条位置
|
|
31
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
31
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
32
32
|
*/
|
|
33
33
|
scrollLeft?: number
|
|
34
34
|
/** 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
|
|
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
|
scrollIntoView?: string
|
|
38
38
|
/** 在设置滚动条位置时使用动画过渡
|
|
39
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
39
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
scrollWithAnimation?: boolean
|
|
@@ -56,32 +56,32 @@ interface ScrollViewProps extends StandardProps {
|
|
|
56
56
|
*/
|
|
57
57
|
scrollAnchoring?: boolean
|
|
58
58
|
/** 开启自定义下拉刷新
|
|
59
|
-
* @supported weapp
|
|
59
|
+
* @supported weapp, ascf
|
|
60
60
|
* @default false
|
|
61
61
|
*/
|
|
62
62
|
refresherEnabled?: boolean
|
|
63
63
|
/** 设置自定义下拉刷新阈值
|
|
64
|
-
* @supported weapp
|
|
64
|
+
* @supported weapp, ascf
|
|
65
65
|
* @default 45
|
|
66
66
|
*/
|
|
67
67
|
refresherThreshold?: number
|
|
68
68
|
/** 设置自定义下拉刷新默认样式,支持设置 `black | white | none`, none 表示不使用默认样式
|
|
69
|
-
* @supported weapp
|
|
69
|
+
* @supported weapp, ascf
|
|
70
70
|
* @default 'black'
|
|
71
71
|
*/
|
|
72
72
|
refresherDefaultStyle?: string
|
|
73
73
|
/** 设置自定义下拉刷新区域背景颜色
|
|
74
|
-
* @supported weapp
|
|
74
|
+
* @supported weapp, ascf
|
|
75
75
|
* @default '#FFF'
|
|
76
76
|
*/
|
|
77
77
|
refresherBackground?: string
|
|
78
78
|
/** 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
|
|
79
|
-
* @supported weapp
|
|
79
|
+
* @supported weapp, ascf
|
|
80
80
|
* @default false
|
|
81
81
|
*/
|
|
82
82
|
refresherTriggered?: boolean
|
|
83
83
|
/** 启用 scroll-view 增强特性
|
|
84
|
-
* @supported weapp, swan
|
|
84
|
+
* @supported weapp, swan, ascf
|
|
85
85
|
* @default false
|
|
86
86
|
*/
|
|
87
87
|
enhanced?: boolean
|
|
@@ -96,7 +96,7 @@ interface ScrollViewProps extends StandardProps {
|
|
|
96
96
|
*/
|
|
97
97
|
bounces?: boolean
|
|
98
98
|
/** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
|
|
99
|
-
* @supported weapp, harmony
|
|
99
|
+
* @supported weapp, harmony, ascf
|
|
100
100
|
* @default true
|
|
101
101
|
*/
|
|
102
102
|
showScrollbar?: boolean
|
|
@@ -367,7 +367,7 @@ declare namespace ScrollViewProps {
|
|
|
367
367
|
* H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
|
|
368
368
|
* 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
|
|
369
369
|
* @classification viewContainer
|
|
370
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
370
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
371
371
|
* @example_react
|
|
372
372
|
* ```tsx
|
|
373
373
|
* export default class PageView extends Component {
|
package/types/Slider.d.ts
CHANGED
|
@@ -3,31 +3,31 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
interface SliderProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 最小值
|
|
5
5
|
* @default 0
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
7
7
|
*/
|
|
8
8
|
min?: number
|
|
9
9
|
/** 最大值
|
|
10
10
|
* @default 100
|
|
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
|
*/
|
|
13
13
|
max?: number
|
|
14
14
|
/** 步长,取值必须大于 0,并且可被(max - min)整除
|
|
15
15
|
* @default 1
|
|
16
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
17
17
|
*/
|
|
18
18
|
step?: number
|
|
19
19
|
/** 是否禁用
|
|
20
20
|
* @default false
|
|
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
|
*/
|
|
23
23
|
disabled?: boolean
|
|
24
24
|
/** 当前取值
|
|
25
25
|
* @default 0
|
|
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
|
*/
|
|
28
28
|
value?: number
|
|
29
29
|
/** 设置 React 非受控状态下的初始取值
|
|
30
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
30
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
31
31
|
* @unique
|
|
32
32
|
*/
|
|
33
33
|
defaultValue?: string
|
|
@@ -43,27 +43,27 @@ interface SliderProps extends StandardProps, FormItemProps {
|
|
|
43
43
|
selectedColor?: string
|
|
44
44
|
/** 已选择的颜色
|
|
45
45
|
* @default "#1aad19"
|
|
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
|
activeColor?: string
|
|
49
49
|
/** 背景条的颜色
|
|
50
50
|
* @default "#e9e9e9"
|
|
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
|
*/
|
|
53
53
|
backgroundColor?: string
|
|
54
54
|
/** 滑块的大小,取值范围为 12 - 28
|
|
55
55
|
* @default 28
|
|
56
|
-
* @supported weapp, swan, tt, qq, jd, h5, harmony, harmony_hybrid
|
|
56
|
+
* @supported weapp, swan, tt, qq, jd, h5, harmony, harmony_hybrid, ascf
|
|
57
57
|
*/
|
|
58
58
|
blockSize?: number
|
|
59
59
|
/** 滑块的颜色
|
|
60
60
|
* @default "#ffffff"
|
|
61
|
-
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
61
|
+
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
62
62
|
*/
|
|
63
63
|
blockColor?: string
|
|
64
64
|
/** 是否显示当前 value
|
|
65
65
|
* @default false
|
|
66
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
66
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
67
67
|
*/
|
|
68
68
|
showValue?: boolean
|
|
69
69
|
/** 组件名字,用于表单提交获取数据。
|
|
@@ -89,11 +89,11 @@ interface SliderProps extends StandardProps, FormItemProps {
|
|
|
89
89
|
*/
|
|
90
90
|
ariaLabel?: string
|
|
91
91
|
/** 完成一次拖动后触发的事件
|
|
92
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
92
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
93
93
|
*/
|
|
94
94
|
onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
95
95
|
/** 拖动过程中触发的事件
|
|
96
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
96
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
97
97
|
*/
|
|
98
98
|
onChanging?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
99
99
|
}
|
|
@@ -104,7 +104,7 @@ declare namespace SliderProps {
|
|
|
104
104
|
}
|
|
105
105
|
/** 滑动选择器
|
|
106
106
|
* @classification forms
|
|
107
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
107
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
108
108
|
* @example_react
|
|
109
109
|
* ```tsx
|
|
110
110
|
* export default class PageView extends Component {
|
package/types/Swiper.d.ts
CHANGED
|
@@ -3,27 +3,27 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
3
3
|
interface SwiperProps extends StandardProps {
|
|
4
4
|
/** 是否显示面板指示点
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
7
7
|
*/
|
|
8
8
|
indicatorDots?: boolean
|
|
9
9
|
/** 指示点颜色
|
|
10
10
|
* @default "rgba(0, 0, 0, .3)"
|
|
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
|
*/
|
|
13
13
|
indicatorColor?: string
|
|
14
14
|
/** 当前选中的指示点颜色
|
|
15
15
|
* @default "#000000"
|
|
16
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
17
17
|
*/
|
|
18
18
|
indicatorActiveColor?: string
|
|
19
19
|
/** 是否自动切换
|
|
20
20
|
* @default false
|
|
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
|
*/
|
|
23
23
|
autoplay?: boolean
|
|
24
24
|
/** 当前所在滑块的 index
|
|
25
25
|
* @default 0
|
|
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
|
*/
|
|
28
28
|
current?: number
|
|
29
29
|
/** 当前所在滑块的 item-id ,不能与 current 被同时指定
|
|
@@ -34,32 +34,32 @@ interface SwiperProps extends StandardProps {
|
|
|
34
34
|
currentItemId?: string
|
|
35
35
|
/** 自动切换时间间隔
|
|
36
36
|
* @default 5000
|
|
37
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
37
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
38
38
|
*/
|
|
39
39
|
interval?: number
|
|
40
40
|
/** 滑动动画时长
|
|
41
41
|
* @default 500
|
|
42
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony, harmony_hybrid
|
|
42
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony, harmony_hybrid, ascf
|
|
43
43
|
*/
|
|
44
44
|
duration?: number
|
|
45
45
|
/** 是否采用衔接滑动
|
|
46
46
|
* @default false
|
|
47
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
48
48
|
*/
|
|
49
49
|
circular?: boolean
|
|
50
50
|
/** 滑动方向是否为纵向
|
|
51
51
|
* @default false
|
|
52
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
52
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
53
53
|
*/
|
|
54
54
|
vertical?: boolean
|
|
55
55
|
/** 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
|
|
56
56
|
* @default "0px"
|
|
57
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
|
|
57
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
|
|
58
58
|
*/
|
|
59
59
|
previousMargin?: string
|
|
60
60
|
/** 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
|
|
61
61
|
* @default "0px"
|
|
62
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
|
|
62
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
|
|
63
63
|
*/
|
|
64
64
|
nextMargin?: string
|
|
65
65
|
/**
|
|
@@ -70,7 +70,7 @@ interface SwiperProps extends StandardProps {
|
|
|
70
70
|
snapToEdge?: boolean
|
|
71
71
|
/** 同时显示的滑块数量
|
|
72
72
|
* @default 1
|
|
73
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
|
|
73
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
|
|
74
74
|
*/
|
|
75
75
|
displayMultipleItems?: number
|
|
76
76
|
/** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
|
|
@@ -85,7 +85,7 @@ interface SwiperProps extends StandardProps {
|
|
|
85
85
|
easingFunction?: keyof SwiperProps.TEasingFunction
|
|
86
86
|
/** 是否禁止用户 touch 操作
|
|
87
87
|
* @default false
|
|
88
|
-
* @supported alipay
|
|
88
|
+
* @supported alipay, ascf
|
|
89
89
|
*/
|
|
90
90
|
disableTouch?: boolean
|
|
91
91
|
/** 是否启用缩放
|
|
@@ -281,7 +281,7 @@ declare namespace SwiperProps {
|
|
|
281
281
|
/** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。
|
|
282
282
|
* > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
|
|
283
283
|
* @classification viewContainer
|
|
284
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
284
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
285
285
|
* @example_react
|
|
286
286
|
* ```tsx
|
|
287
287
|
* class App extends Component {
|
package/types/SwiperItem.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps } from './common'
|
|
3
3
|
interface SwiperItemProps extends StandardProps {
|
|
4
4
|
/** 该 swiper-item 的标识符
|
|
5
|
-
* @supported weapp, swan, tt, jd, h5, rn, harmony, harmony_hybrid
|
|
5
|
+
* @supported weapp, swan, tt, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
6
6
|
*/
|
|
7
7
|
itemId?: string
|
|
8
8
|
/** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
|
|
@@ -19,7 +19,7 @@ interface SwiperItemProps extends StandardProps {
|
|
|
19
19
|
/** 仅可放置在 swiper 组件中,宽高自动设置为100%
|
|
20
20
|
* > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
|
|
21
21
|
* @classification viewContainer
|
|
22
|
-
* @supported weapp, alipay, swan, tt, jd, h5, rn, harmony, harmony_hybrid
|
|
22
|
+
* @supported weapp, alipay, swan, tt, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
23
23
|
* @example_react
|
|
24
24
|
* ```tsx
|
|
25
25
|
* class App extends Component {
|
package/types/Switch.d.ts
CHANGED
|
@@ -3,27 +3,27 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
interface SwitchProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 是否选中
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
7
7
|
*/
|
|
8
8
|
checked?: boolean
|
|
9
9
|
/** 设置在 React 非受控状态下,当前是否选中
|
|
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
|
* @unique
|
|
12
12
|
*/
|
|
13
13
|
defaultChecked?: boolean
|
|
14
14
|
/** 是否禁用
|
|
15
15
|
* @default false
|
|
16
|
-
* @supported weapp, alipay, swan, tt, qq, h5, rn, harmony, harmony_hybrid
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn, harmony, harmony_hybrid, ascf
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean
|
|
19
19
|
/** 样式,有效值:switch, checkbox
|
|
20
20
|
* @default "switch"
|
|
21
|
-
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
21
|
+
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
22
22
|
*/
|
|
23
23
|
type?: 'switch' | 'checkbox'
|
|
24
24
|
/** switch 的颜色,同 css 的 color
|
|
25
25
|
* @default "#04BE02"
|
|
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
|
*/
|
|
28
28
|
color?: string
|
|
29
29
|
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
@@ -44,7 +44,7 @@ interface SwitchProps extends StandardProps, FormItemProps {
|
|
|
44
44
|
*/
|
|
45
45
|
ariaLabel?: string
|
|
46
46
|
/** checked 改变时触发 change 事件
|
|
47
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
48
48
|
*/
|
|
49
49
|
onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
|
|
50
50
|
}
|
|
@@ -89,7 +89,7 @@ declare namespace SwitchProps {
|
|
|
89
89
|
* </view>
|
|
90
90
|
* </template>
|
|
91
91
|
* ```
|
|
92
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
92
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
93
93
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/switch.html
|
|
94
94
|
*/
|
|
95
95
|
declare const Switch: ComponentType<SwitchProps>
|
package/types/Text.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ interface TextProps extends StandardProps {
|
|
|
8
8
|
selectable?: boolean
|
|
9
9
|
/** 文本是否可选,该属性会使文本节点显示为 inline-block
|
|
10
10
|
* @default false
|
|
11
|
-
* @supported weapp, h5, harmony_hybrid
|
|
11
|
+
* @supported weapp, h5, harmony_hybrid, ascf
|
|
12
12
|
*/
|
|
13
13
|
userSelect?: boolean
|
|
14
14
|
/** 显示连续空格
|
|
15
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
|
|
15
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid, ascf
|
|
16
16
|
*/
|
|
17
17
|
space?: keyof TextProps.TSpace
|
|
18
18
|
/** 是否解码
|
|
19
19
|
* @default false
|
|
20
|
-
* @supported weapp, alipay, tt, qq, jd
|
|
20
|
+
* @supported weapp, alipay, tt, qq, jd, ascf
|
|
21
21
|
* @h5 默认解码,不支持设置
|
|
22
22
|
*/
|
|
23
23
|
decode?: boolean
|
|
@@ -59,7 +59,7 @@ declare namespace TextProps {
|
|
|
59
59
|
}
|
|
60
60
|
/** 文本
|
|
61
61
|
* @classification base
|
|
62
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
62
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
63
63
|
* @example_react
|
|
64
64
|
* ```tsx
|
|
65
65
|
* export default class PageView extends Component {
|
package/types/Textarea.d.ts
CHANGED
|
@@ -2,20 +2,20 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
3
|
interface TextareaProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 输入框的内容
|
|
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
|
/** 设置 React 非受控输入框的初始内容
|
|
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
|
* @unique
|
|
11
11
|
*/
|
|
12
12
|
defaultValue?: string
|
|
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
|
*/
|
|
16
16
|
placeholder?: string
|
|
17
17
|
/** 指定 placeholder 的样式
|
|
18
|
-
* @supported weapp, alipay, swan, tt, qq, jd, harmony
|
|
18
|
+
* @supported weapp, alipay, swan, tt, qq, jd, harmony, ascf
|
|
19
19
|
*/
|
|
20
20
|
placeholderStyle?: string
|
|
21
21
|
/** 指定 placeholder 的样式类
|
|
@@ -25,12 +25,12 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
25
25
|
placeholderClass?: string
|
|
26
26
|
/** 是否禁用
|
|
27
27
|
* @default false
|
|
28
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
28
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
29
29
|
*/
|
|
30
30
|
disabled?: boolean
|
|
31
31
|
/** 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
32
32
|
* @default 140
|
|
33
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
33
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
34
34
|
*/
|
|
35
35
|
maxlength?: number
|
|
36
36
|
/** 自动聚焦,拉起键盘
|
|
@@ -40,12 +40,12 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
40
40
|
autoFocus?: boolean
|
|
41
41
|
/** 获取焦点
|
|
42
42
|
* @default false
|
|
43
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
43
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
44
44
|
*/
|
|
45
45
|
focus?: boolean
|
|
46
46
|
/** 是否自动增高,设置 autoHeight 时,style.height不生效
|
|
47
47
|
* @default false
|
|
48
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
48
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
49
49
|
*/
|
|
50
50
|
autoHeight?: boolean
|
|
51
51
|
/** 如果 Textarea 是在一个 `position:fixed` 的区域,需要显示指定属性 fixed 为 true
|
|
@@ -129,11 +129,11 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
129
129
|
*/
|
|
130
130
|
adjustKeyboardTo?: 'cursor' | 'bottom'
|
|
131
131
|
/** 输入框聚焦时触发
|
|
132
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
132
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
133
133
|
*/
|
|
134
134
|
onFocus?: CommonEventFunction<TextareaProps.onFocusEventDetail>
|
|
135
135
|
/** 输入框失去焦点时触发
|
|
136
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
136
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
137
137
|
*/
|
|
138
138
|
onBlur?: CommonEventFunction<TextareaProps.onBlurEventDetail>
|
|
139
139
|
/** 输入框行数变化时调用
|
|
@@ -143,11 +143,11 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
143
143
|
/** 当键盘输入时,触发 input 事件
|
|
144
144
|
*
|
|
145
145
|
* **onInput 处理函数的返回值并不会反映到 textarea 上**
|
|
146
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
146
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
147
147
|
*/
|
|
148
148
|
onInput?: CommonEventFunction<TextareaProps.onInputEventDetail>
|
|
149
149
|
/** 点击完成时, 触发 confirm 事件
|
|
150
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
|
|
150
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid, ascf
|
|
151
151
|
*/
|
|
152
152
|
onConfirm?: CommonEventFunction<TextareaProps.onConfirmEventDetail>
|
|
153
153
|
/** 键盘高度发生变化的时候触发此事件
|
|
@@ -215,7 +215,7 @@ declare namespace TextareaProps {
|
|
|
215
215
|
}
|
|
216
216
|
/** 多行输入框。该组件是原生组件,使用时请注意相关限制
|
|
217
217
|
* @classification forms
|
|
218
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid
|
|
218
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid, ascf
|
|
219
219
|
* @example_react
|
|
220
220
|
* ```tsx
|
|
221
221
|
* export default class PageView extends Component {
|