@tarojs/components 3.6.2-canary.1 → 3.6.2-canary.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.
Files changed (107) hide show
  1. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  2. package/dist/cjs/taro-picker-core_2.cjs.entry.js +1 -1
  3. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +28 -18
  4. package/dist/cjs/taro-textarea-core.cjs.entry.js +2 -2
  5. package/dist/collection/components/input/input.js +1 -1
  6. package/dist/collection/components/picker/picker.js +1 -1
  7. package/dist/collection/components/swiper/swiper-item.js +16 -9
  8. package/dist/collection/components/swiper/swiper.js +12 -9
  9. package/dist/collection/components/textarea/textarea.js +7 -3
  10. package/dist/components/taro-input-core.js +1 -1
  11. package/dist/components/taro-picker-core.js +1 -1
  12. package/dist/components/taro-swiper-core.js +12 -9
  13. package/dist/components/taro-swiper-item-core.js +16 -9
  14. package/dist/components/taro-textarea-core.js +2 -2
  15. package/dist/esm/taro-input-core.entry.js +1 -1
  16. package/dist/esm/taro-picker-core_2.entry.js +1 -1
  17. package/dist/esm/taro-swiper-core_2.entry.js +28 -18
  18. package/dist/esm/taro-textarea-core.entry.js +2 -2
  19. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  20. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  21. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  22. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  23. package/dist/taro-components/{p-4d390d17.entry.js → p-0b8b3af5.entry.js} +1 -1
  24. package/dist/taro-components/p-1c446c65.system.js +1 -1
  25. package/dist/taro-components/p-1eac7c75.system.entry.js +1 -0
  26. package/dist/taro-components/{p-3e23fa46.system.entry.js → p-39685396.system.entry.js} +1 -1
  27. package/dist/taro-components/{p-e53feb03.system.entry.js → p-58f9a827.system.entry.js} +1 -1
  28. package/dist/taro-components/{p-ab84c88e.entry.js → p-7704e165.entry.js} +1 -1
  29. package/dist/taro-components/{p-10046f1a.system.entry.js → p-a5afdc47.system.entry.js} +1 -1
  30. package/dist/taro-components/p-affb28de.entry.js +1 -0
  31. package/dist/taro-components/{p-7db63e92.entry.js → p-c30d1b2d.entry.js} +1 -1
  32. package/dist/taro-components/taro-components.esm.js +1 -1
  33. package/dist/types/components/textarea/textarea.d.ts +1 -1
  34. package/lib/vue2/components.d.ts +361 -589
  35. package/lib/vue2/components.js +248 -246
  36. package/lib/vue2/components.js.map +1 -1
  37. package/package.json +5 -5
  38. package/types/Ad.d.ts +2 -31
  39. package/types/AdCustom.d.ts +0 -4
  40. package/types/AnimationVideo.d.ts +0 -9
  41. package/types/AnimationView.d.ts +0 -6
  42. package/types/ArCamera.d.ts +0 -7
  43. package/types/Audio.d.ts +0 -18
  44. package/types/AwemeData.d.ts +0 -6
  45. package/types/Button.d.ts +3 -106
  46. package/types/Camera.d.ts +0 -28
  47. package/types/Canvas.d.ts +2 -17
  48. package/types/ChannelLive.d.ts +0 -2
  49. package/types/ChannelVideo.d.ts +0 -6
  50. package/types/Checkbox.d.ts +1 -8
  51. package/types/CheckboxGroup.d.ts +0 -2
  52. package/types/CommentDetail.d.ts +4 -10
  53. package/types/CommentList.d.ts +4 -20
  54. package/types/ContactButton.d.ts +0 -7
  55. package/types/CoverImage.d.ts +0 -11
  56. package/types/CoverView.d.ts +0 -26
  57. package/types/Editor.d.ts +0 -10
  58. package/types/FollowSwan.d.ts +0 -3
  59. package/types/Form.d.ts +1 -9
  60. package/types/FunctionalPageNavigator.d.ts +0 -11
  61. package/types/GridView.d.ts +5 -10
  62. package/types/Icon.d.ts +0 -14
  63. package/types/Image.d.ts +0 -31
  64. package/types/InlinePaymentPanel.d.ts +0 -9
  65. package/types/Input.d.ts +0 -62
  66. package/types/Label.d.ts +3 -2
  67. package/types/Lifestyle.d.ts +0 -3
  68. package/types/Like.d.ts +0 -17
  69. package/types/LivePlayer.d.ts +1 -58
  70. package/types/LivePusher.d.ts +0 -77
  71. package/types/Login.d.ts +0 -5
  72. package/types/Lottie.d.ts +0 -16
  73. package/types/Map.d.ts +19 -136
  74. package/types/MatchMedia.d.ts +0 -7
  75. package/types/MovableArea.d.ts +0 -1
  76. package/types/MovableView.d.ts +0 -35
  77. package/types/NavigationBar.d.ts +0 -6
  78. package/types/Navigator.d.ts +0 -27
  79. package/types/OfficialAccount.d.ts +0 -12
  80. package/types/OpenData.d.ts +0 -20
  81. package/types/PageContainer.d.ts +0 -21
  82. package/types/PageMeta.d.ts +0 -16
  83. package/types/Picker.d.ts +17 -45
  84. package/types/PickerView.d.ts +1 -12
  85. package/types/Progress.d.ts +0 -13
  86. package/types/Radio.d.ts +1 -8
  87. package/types/RadioGroup.d.ts +0 -2
  88. package/types/RichText.d.ts +1 -22
  89. package/types/RootPortal.d.ts +1 -2
  90. package/types/RtcRoom.d.ts +0 -16
  91. package/types/RtcRoomItem.d.ts +0 -3
  92. package/types/ScrollView.d.ts +2 -57
  93. package/types/ShareElement.d.ts +2 -7
  94. package/types/Slider.d.ts +0 -19
  95. package/types/Swiper.d.ts +0 -44
  96. package/types/SwiperItem.d.ts +0 -2
  97. package/types/Switch.d.ts +2 -11
  98. package/types/TabItem.d.ts +0 -4
  99. package/types/Tabs.d.ts +0 -8
  100. package/types/Text.d.ts +0 -7
  101. package/types/Textarea.d.ts +0 -36
  102. package/types/Video.d.ts +1 -112
  103. package/types/View.d.ts +0 -25
  104. package/types/VoipRoom.d.ts +0 -6
  105. package/types/WebView.d.ts +0 -6
  106. package/dist/taro-components/p-0aaf66d2.entry.js +0 -1
  107. package/dist/taro-components/p-da1f3d54.system.entry.js +0 -1
package/types/Swiper.d.ts CHANGED
@@ -6,183 +6,151 @@ interface SwiperProps extends StandardProps {
6
6
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
7
7
  */
8
8
  indicatorDots?: boolean
9
-
10
9
  /** 指示点颜色
11
10
  * @default "rgba(0, 0, 0, .3)"
12
11
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
13
12
  */
14
13
  indicatorColor?: string
15
-
16
14
  /** 当前选中的指示点颜色
17
15
  * @default "#000000"
18
16
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
19
17
  */
20
18
  indicatorActiveColor?: string
21
-
22
19
  /** 是否自动切换
23
20
  * @default false
24
21
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
25
22
  */
26
23
  autoplay?: boolean
27
-
28
24
  /** 当前所在滑块的 index
29
25
  * @default 0
30
26
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
31
27
  */
32
28
  current?: number
33
-
34
29
  /** 当前所在滑块的 item-id ,不能与 current 被同时指定
35
30
  * @default ""
36
31
  */
37
32
  currentItemId?: string
38
-
39
33
  /** 自动切换时间间隔
40
34
  * @default 5000
41
35
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
42
36
  */
43
37
  interval?: number
44
-
45
38
  /** 滑动动画时长
46
39
  * @default 500
47
40
  * @supported weapp, alipay, swan, tt, qq, jd, h5
48
41
  */
49
42
  duration?: number
50
-
51
43
  /** 是否采用衔接滑动
52
44
  * @default false
53
45
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
54
46
  */
55
47
  circular?: boolean
56
-
57
48
  /** 滑动方向是否为纵向
58
49
  * @default false
59
50
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
60
51
  */
61
52
  vertical?: boolean
62
-
63
53
  /** 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
64
54
  * @default "0px"
65
55
  * @supported weapp, alipay, swan, tt, qq, jd, h5
66
56
  */
67
57
  previousMargin?: string
68
-
69
58
  /** 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
70
59
  * @default "0px"
71
60
  * @supported weapp, alipay, swan, tt, qq, jd, h5
72
61
  */
73
62
  nextMargin?: string
74
-
75
63
  /**
76
64
  * 当 swiper-item 的个数大于等于 2,关闭 circular 并且开启 previous-margin 或 next-margin 的时候,可以指定这个边距是否应用到第一个、最后一个元素
77
65
  * @default false
78
66
  * @supported weapp, alipay
79
67
  */
80
68
  snapToEdge?: boolean
81
-
82
69
  /** 同时显示的滑块数量
83
70
  * @default 1
84
71
  * @supported weapp, alipay, swan, tt, qq, jd, h5
85
72
  */
86
73
  displayMultipleItems?: number
87
-
88
74
  /** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
89
75
  * @default false
90
76
  * @supported qq, jd
91
77
  */
92
78
  skipHiddenItemLayout?: boolean
93
-
94
79
  /** 指定 swiper 切换缓动动画类型
95
80
  * @default "default"
96
81
  * @supported weapp, alipay, tt, jd
97
82
  */
98
83
  easingFunction?: keyof SwiperProps.TEasingFunction
99
-
100
84
  /** 是否禁止用户 touch 操作
101
85
  * @default false
102
86
  * @supported alipay
103
87
  */
104
88
  disableTouch?: boolean
105
-
106
89
  /** 是否启用缩放
107
90
  * @default false
108
91
  * @supported h5
109
92
  */
110
93
  zoom?: boolean
111
-
112
94
  /** 是否开启全屏
113
95
  * @default false
114
96
  * @supported h5
115
97
  */
116
98
  full?: boolean
117
-
118
99
  /** swiper-item 可见时的 class。
119
100
  * @supported alipay
120
101
  */
121
102
  activeClass?: string
122
-
123
103
  /** acceleration 设置为 {{true}} 时且处于滑动过程中,中间若干屏处于可见时的 class。
124
104
  * @supported alipay
125
105
  */
126
106
  changingClass?: string
127
-
128
107
  /** 当开启时,会根据滑动速度,连续滑动多屏。
129
108
  * @default false
130
109
  * @supported alipay
131
110
  */
132
111
  acceleration?: string
133
-
134
112
  /** 是否禁用代码变动触发 swiper 切换时使用动画。
135
113
  * @default false
136
114
  * @supported alipay
137
115
  */
138
116
  disableProgrammaticAnimation?: string
139
-
140
117
  /** 滑动距离阈值,当滑动距离超过阈值时进行 swiper-item 切换。
141
118
  * @supported alipay
142
119
  */
143
120
  swipeRatio?: string
144
-
145
121
  /** 滑动综合速度阈值,当超过阈值时进行 swiper-item 切换,数值越小越敏感。
146
122
  * @supported alipay
147
123
  */
148
124
  swipeSpeed?: string
149
-
150
125
  /** 计算用户手势时所依赖的滑动角度。角度根据 touchstart 事件和首次 touchmove 事件的坐标计算得出。数值越小越对用户的滑动方向准确度要求越高。
151
126
  * @supported alipay
152
127
  */
153
128
  touchAngle?: string
154
-
155
129
  /** 自动以指定滑块的高度为整个容器的高度。当 vertical 为 true 时,默认不调整。可选值为:
156
130
  * @supported alipay
157
131
  */
158
132
  adjustHeight?: 'first' | 'current' | 'highest' | 'none'
159
-
160
133
  /** vertical 为 true 时强制使 adjust-height 生效。
161
134
  * @supported alipay
162
135
  */
163
136
  adjustVerticalHeight?: string
164
-
165
137
  /** 是否停止响应用户 touchmove 操作
166
138
  * @default false
167
139
  * @supported swan
168
140
  */
169
141
  disableTouchmove?: string
170
-
171
142
  /** current 改变时会触发 change 事件
172
143
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
173
144
  */
174
145
  onChange?: CommonEventFunction<SwiperProps.onChangeEventDetail>
175
-
176
146
  /** swiper-item 的位置发生改变时会触发 transition 事件
177
147
  * @supported weapp, alipay, tt, qq
178
148
  */
179
149
  onTransition?: CommonEventFunction<SwiperProps.onTransitionEventDetail>
180
-
181
150
  /** 动画结束时会触发 animationfinish 事件
182
151
  * @supported weapp, swan, tt, qq, jd, h5, rn
183
152
  */
184
153
  onAnimationFinish?: SwiperProps['onChange']
185
-
186
154
  /** 动画结束时会触发 animationEnd 事件
187
155
  * @supported alipay
188
156
  */
@@ -193,57 +161,45 @@ declare namespace SwiperProps {
193
161
  interface TChangeSource {
194
162
  /** 自动播放 */
195
163
  autoplay
196
-
197
164
  /** 用户划动 */
198
165
  touch
199
-
200
166
  /** 其它原因 */
201
167
  ''
202
168
  }
203
-
204
169
  /** 指定 swiper 切换缓动动画类型 */
205
170
  interface TEasingFunction {
206
171
  /** 默认缓动函数 */
207
172
  default
208
-
209
173
  /** 线性动画 */
210
174
  linear
211
-
212
175
  /** 缓入动画 */
213
176
  easeInCubic
214
-
215
177
  /** 缓出动画 */
216
178
  easeOutCubic
217
-
218
179
  /** 缓入缓出动画 */
219
180
  easeInOutCubic
220
181
  }
221
182
  interface onCommonEventDetail {
222
183
  /** 当前所在滑块的索引 */
223
184
  current: number
224
-
225
185
  /** 导致变更的原因 */
226
186
  source: keyof SwiperProps.TChangeSource
227
187
  }
228
188
  interface onChangeEventDetail {
229
189
  /** 当前所在滑块的索引 */
230
190
  current: number
231
-
232
191
  /** 导致变更的原因 */
233
192
  source: keyof SwiperProps.TChangeSource
234
-
235
193
  /** SwiperItem的itemId参数值 */
236
194
  currentItemId?: string
237
195
  }
238
196
  interface onTransitionEventDetail {
239
197
  /** X 坐标 */
240
198
  dx: number
241
-
242
199
  /** Y 坐标 */
243
200
  dy: number
244
201
  }
245
202
  }
246
-
247
203
  /** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。
248
204
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
249
205
  * @classification viewContainer
@@ -5,14 +5,12 @@ interface SwiperItemProps extends StandardProps {
5
5
  * @supported weapp, swan, tt, jd, h5, rn
6
6
  */
7
7
  itemId?: string
8
-
9
8
  /** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
10
9
  * @default false
11
10
  * @supported weapp
12
11
  */
13
12
  skipHiddenItemLayout?: boolean
14
13
  }
15
-
16
14
  /** 仅可放置在 swiper 组件中,宽高自动设置为100%
17
15
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
18
16
  * @classification viewContainer
package/types/Switch.d.ts CHANGED
@@ -6,48 +6,40 @@ interface SwitchProps extends StandardProps, FormItemProps {
6
6
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
7
7
  */
8
8
  checked?: boolean
9
-
10
9
  /** 是否禁用
11
10
  * @default false
12
- * @supported weapp, alipay, swan, tt, qq, rn
11
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
13
12
  */
14
13
  disabled?: boolean
15
-
16
14
  /** 样式,有效值:switch, checkbox
17
15
  * @default "switch"
18
16
  * @supported weapp, swan, tt, qq, jd, h5, rn
19
17
  */
20
18
  type?: 'switch' | 'checkbox'
21
-
22
19
  /** switch 的颜色,同 css 的 color
23
20
  * @default "#04BE02"
24
21
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
25
22
  */
26
23
  color?: string
27
-
28
24
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
29
25
  * @supported h5
30
26
  */
31
27
  nativeProps?: Record<string, unknown>
32
-
33
28
  /** 组件名字,用于表单提交获取数据。
34
29
  * @supported alipay
35
30
  */
36
31
  name?: string
37
-
38
32
  /** 是否为受控组件,为 true 时,checked 会完全受 setData 控制。
39
33
  * @default false
40
34
  * @supported alipay
41
35
  */
42
36
  controlled?: string
43
-
44
37
  /** 无障碍访问,(属性)元素的额外描述
45
38
  * @supported qq
46
39
  */
47
40
  ariaLabel?: string
48
-
49
41
  /** checked 改变时触发 change 事件
50
- * @supported weapp, alipay, swan, tt, qq, jd, rn
42
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
51
43
  */
52
44
  onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
53
45
  }
@@ -56,7 +48,6 @@ declare namespace SwitchProps {
56
48
  value: boolean
57
49
  }
58
50
  }
59
-
60
51
  /** 开关选择器
61
52
  * @classification forms
62
53
  * @example_react
@@ -6,26 +6,22 @@ interface TabItemProps extends StandardProps {
6
6
  * @default 无
7
7
  */
8
8
  label?: string
9
-
10
9
  /** tab-item 对应的 name 值
11
10
  * @supported swan
12
11
  * @default 无
13
12
  */
14
13
  name?: string
15
-
16
14
  /** 徽标类型 badge-type 分为圆点“dot”和文本“text”,不设置 badge-type 则不显示徽标
17
15
  * @supported swan
18
16
  * @default 无
19
17
  */
20
18
  badgeType?: string
21
-
22
19
  /** badge-type 为 text 的时候,徽标内的数字,为空时badge-type="text"不生效
23
20
  * @supported swan
24
21
  * @default 无
25
22
  */
26
23
  badgeText?: string
27
24
  }
28
-
29
25
  /** 标签栏子项
30
26
  * @classification navig
31
27
  * @supported swan
package/types/Tabs.d.ts CHANGED
@@ -6,49 +6,41 @@ interface TabsProps extends StandardProps {
6
6
  * @default "#fff"
7
7
  */
8
8
  tabsBackgroundColor?: string
9
-
10
9
  /** tabs 激活 tab-item 文字颜色
11
10
  * @supported swan
12
11
  * @default "#000"
13
12
  */
14
13
  tabsActiveTextColor?: string
15
-
16
14
  /** tabs 非激活 tab-item 文字颜色
17
15
  * @supported swan
18
16
  * @default "#666"
19
17
  */
20
18
  tabsInactiveTextColor?: string
21
-
22
19
  /** tabs 激活 tab-item 下划线颜色
23
20
  * @supported swan
24
21
  * @default "#333"
25
22
  */
26
23
  tabsUnderlineColor?: string
27
-
28
24
  /** 仅用于普通标签栏组件,当前激活 tab-item 的对应的 name 值,须搭配 bindtabchange 一起使用。
29
25
  * @supported swan
30
26
  * @default 无
31
27
  */
32
28
  activeName?: string
33
-
34
29
  /** 仅用于可寻址标签栏组件,当前 tab 所改变的 url query 中参数 key,需要通过 tabs 修改页面 url 的时候设置。
35
30
  * @supported swan
36
31
  * @default 无
37
32
  */
38
33
  urlQueryName?: string
39
-
40
34
  /** 当前 tabs 视图中最多容纳的 tab-item 数量,低于此数量均分排列,超出此数量划屏。默认五个,开发者可根据业务需求调整
41
35
  * @supported swan
42
36
  * @default 5
43
37
  */
44
38
  maxTabItemAmount?: number
45
-
46
39
  /** tab 被点击的回调,可以在 e.detail.name 中取到当前点击的 tab-item 对应的 name 值
47
40
  * @supported swan
48
41
  */
49
42
  onTabChange?: CommonEventFunction
50
43
  }
51
-
52
44
  /** 标签栏
53
45
  * @classification navig
54
46
  * @supported swan
package/types/Text.d.ts CHANGED
@@ -6,24 +6,20 @@ interface TextProps extends StandardProps {
6
6
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
7
7
  */
8
8
  selectable?: boolean
9
-
10
9
  /** 文本是否可选,该属性会使文本节点显示为 inline-block
11
10
  * @default false
12
11
  * @supported weapp
13
12
  */
14
13
  userSelect?: boolean
15
-
16
14
  /** 显示连续空格
17
15
  * @supported weapp, alipay, swan, tt, qq, jd
18
16
  */
19
17
  space?: keyof TextProps.TSpace
20
-
21
18
  /** 是否解码
22
19
  * @default false
23
20
  * @supported weapp, alipay, tt, qq, jd
24
21
  */
25
22
  decode?: boolean
26
-
27
23
  /** 多行省略,值须大于等于 1,表现同 css 的 -webkit-line-clamp 属性一致。
28
24
  * @supported alipay
29
25
  */
@@ -34,15 +30,12 @@ declare namespace TextProps {
34
30
  interface TSpace {
35
31
  /** 中文字符空格一半大小 */
36
32
  ensp
37
-
38
33
  /** 中文字符空格大小 */
39
34
  emsp
40
-
41
35
  /** 根据字体设置的空格大小 */
42
36
  nbsp
43
37
  }
44
38
  }
45
-
46
39
  /** 文本
47
40
  * @classification base
48
41
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
@@ -5,169 +5,139 @@ interface TextareaProps extends StandardProps, FormItemProps {
5
5
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
6
  */
7
7
  value?: string
8
-
9
8
  /** 输入框为空时占位符
10
9
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
11
10
  */
12
11
  placeholder?: string
13
-
14
12
  /** 指定 placeholder 的样式
15
13
  * @supported weapp, alipay, swan, tt, qq, jd
16
14
  */
17
15
  placeholderStyle?: string
18
-
19
16
  /** 指定 placeholder 的样式类
20
17
  * @default "textarea-placeholder"
21
18
  * @supported weapp, alipay, swan, tt, qq, jd
22
19
  */
23
20
  placeholderClass?: string
24
-
25
21
  /** 是否禁用
26
22
  * @default false
27
23
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
28
24
  */
29
25
  disabled?: boolean
30
-
31
26
  /** 最大输入长度,设置为 -1 的时候不限制最大长度
32
27
  * @default 140
33
28
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
34
29
  */
35
30
  maxlength?: number
36
-
37
31
  /** 自动聚焦,拉起键盘
38
32
  * @default false
39
33
  * @supported weapp, swan, qq, jd, h5
40
34
  */
41
35
  autoFocus?: boolean
42
-
43
36
  /** 获取焦点
44
37
  * @default false
45
38
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
46
39
  */
47
40
  focus?: boolean
48
-
49
41
  /** 是否自动增高,设置 autoHeight 时,style.height不生效
50
42
  * @default false
51
43
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
52
44
  */
53
45
  autoHeight?: boolean
54
-
55
46
  /** 如果 Textarea 是在一个 `position:fixed` 的区域,需要显示指定属性 fixed 为 true
56
47
  * @default false
57
48
  * @supported weapp, swan, qq, jd
58
49
  */
59
50
  fixed?: boolean
60
-
61
51
  /** 指定光标与键盘的距离,单位 px 。取 Textarea 距离底部的距离和 cursorSpacing 指定的距离的最小值作为光标与键盘的距离
62
52
  * @default 0
63
53
  * @supported weapp, swan, tt, qq, jd
64
54
  */
65
55
  cursorSpacing?: number
66
-
67
56
  /** 指定 focus 时的光标位置
68
57
  * @default -1
69
58
  * @supported weapp, swan, tt, qq, jd
70
59
  */
71
60
  cursor?: number
72
-
73
61
  /** 是否显示键盘上方带有”完成“按钮那一栏
74
62
  * @default true
75
63
  * @supported weapp, swan, tt, qq, jd
76
64
  */
77
65
  showConfirmBar?: boolean
78
-
79
66
  /** 光标起始位置,自动聚集时有效,需与 selectionEnd 搭配使用
80
67
  * @default -1
81
68
  * @supported weapp, swan, tt, qq, jd, rn
82
69
  */
83
70
  selectionStart?: number
84
-
85
71
  /** 光标结束位置,自动聚集时有效,需与 selectionStart 搭配使用
86
72
  * @default -1
87
73
  * @supported weapp, swan, tt, qq, jd, rn
88
74
  */
89
75
  selectionEnd?: number
90
-
91
76
  /** 键盘弹起时,是否自动上推页面
92
77
  * @default true
93
78
  * @supported weapp, swan, tt, qq, jd
94
79
  */
95
80
  adjustPosition?: boolean
96
-
97
81
  /** focus 时,点击页面的时候不收起键盘
98
82
  * @default false
99
83
  * @supported weapp, tt
100
84
  */
101
85
  holdKeyboard?: boolean
102
-
103
86
  /** 是否去掉 iOS 下的默认内边距
104
87
  * @default false
105
88
  * @supported weapp, tt
106
89
  */
107
90
  disableDefaultPadding?: boolean
108
-
109
91
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
110
92
  * @supported h5
111
93
  */
112
94
  nativeProps?: Record<string, unknown>
113
-
114
95
  /** 设置键盘右下角按钮的文字
115
96
  * @supported weapp, alipay, swan, tt
116
97
  */
117
98
  confirmType?: 'send' | 'search' | 'next' | 'go' | 'done' | 'return'
118
-
119
99
  /** 点击键盘右下角按钮时是否保持键盘不收起
120
100
  * @supported weapp, swan, tt
121
101
  */
122
102
  confirmHold?: string
123
-
124
103
  /** 组件名字,用于表单提交获取数据。
125
104
  * @supported alipay
126
105
  */
127
106
  name?: string
128
-
129
107
  /** 是否渲染字数统计功能(是否删除默认计数器/是否显示字数统计)。
130
108
  * @supported alipay
131
109
  */
132
110
  showCount?: string
133
-
134
111
  /** 是否为受控组件。为 true 时,value 内容会完全受 setData 控制。
135
112
  * @supported alipay
136
113
  */
137
114
  controlled?: string
138
-
139
115
  /** 无障碍访问,(属性)元素的额外描述
140
116
  * @supported qq
141
117
  */
142
118
  ariaLabel?: string
143
-
144
119
  /** 输入框聚焦时触发
145
120
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
146
121
  */
147
122
  onFocus?: CommonEventFunction<TextareaProps.onFocusEventDetail>
148
-
149
123
  /** 输入框失去焦点时触发
150
124
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
151
125
  */
152
126
  onBlur?: CommonEventFunction<TextareaProps.onBlurEventDetail>
153
-
154
127
  /** 输入框行数变化时调用
155
128
  * @supported weapp, swan, tt, qq, jd, rn
156
129
  */
157
130
  onLineChange?: CommonEventFunction<TextareaProps.onLineChangeEventDetail>
158
-
159
131
  /** 当键盘输入时,触发 input 事件
160
132
  *
161
133
  * **onInput 处理函数的返回值并不会反映到 textarea 上**
162
134
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
163
135
  */
164
136
  onInput?: CommonEventFunction<TextareaProps.onInputEventDetail>
165
-
166
137
  /** 点击完成时, 触发 confirm 事件
167
138
  * @supported weapp, alipay, swan, tt, qq, jd, rn
168
139
  */
169
140
  onConfirm?: CommonEventFunction<TextareaProps.onConfirmEventDetail>
170
-
171
141
  /** 键盘高度发生变化的时候触发此事件
172
142
  * @supported weapp
173
143
  */
@@ -177,14 +147,12 @@ declare namespace TextareaProps {
177
147
  interface onFocusEventDetail {
178
148
  /** 输入值 */
179
149
  value: string
180
-
181
150
  /** 键盘高度 */
182
151
  height: number
183
152
  }
184
153
  interface onBlurEventDetail {
185
154
  /** 输入值 */
186
155
  value: string
187
-
188
156
  /** 光标位置 */
189
157
  cursor: number
190
158
  }
@@ -196,10 +164,8 @@ declare namespace TextareaProps {
196
164
  interface onInputEventDetail {
197
165
  /** 输入值 */
198
166
  value: string
199
-
200
167
  /** 光标位置 */
201
168
  cursor: number
202
-
203
169
  /** 键值 */
204
170
  keyCode: number
205
171
  }
@@ -210,12 +176,10 @@ declare namespace TextareaProps {
210
176
  interface onKeyboardHeightChangeEventDetail {
211
177
  /** 键盘高度 */
212
178
  height: number
213
-
214
179
  /** 持续时间 */
215
180
  duration: number
216
181
  }
217
182
  }
218
-
219
183
  /** 多行输入框。该组件是原生组件,使用时请注意相关限制
220
184
  * @classification forms
221
185
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony