@tarojs/components 3.6.2-canary.0 → 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 (111) 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/react/components.js +81 -160
  35. package/lib/react/components.js.map +1 -1
  36. package/lib/vue2/components.d.ts +361 -589
  37. package/lib/vue2/components.js +249 -328
  38. package/lib/vue2/components.js.map +1 -1
  39. package/lib/vue3/components.js +81 -160
  40. package/lib/vue3/components.js.map +1 -1
  41. package/package.json +5 -5
  42. package/types/Ad.d.ts +2 -31
  43. package/types/AdCustom.d.ts +0 -4
  44. package/types/AnimationVideo.d.ts +0 -9
  45. package/types/AnimationView.d.ts +0 -6
  46. package/types/ArCamera.d.ts +0 -7
  47. package/types/Audio.d.ts +0 -18
  48. package/types/AwemeData.d.ts +0 -6
  49. package/types/Button.d.ts +3 -106
  50. package/types/Camera.d.ts +0 -28
  51. package/types/Canvas.d.ts +2 -17
  52. package/types/ChannelLive.d.ts +0 -2
  53. package/types/ChannelVideo.d.ts +0 -6
  54. package/types/Checkbox.d.ts +1 -8
  55. package/types/CheckboxGroup.d.ts +0 -2
  56. package/types/CommentDetail.d.ts +4 -10
  57. package/types/CommentList.d.ts +4 -20
  58. package/types/ContactButton.d.ts +0 -7
  59. package/types/CoverImage.d.ts +0 -11
  60. package/types/CoverView.d.ts +0 -26
  61. package/types/Editor.d.ts +0 -10
  62. package/types/FollowSwan.d.ts +0 -3
  63. package/types/Form.d.ts +1 -9
  64. package/types/FunctionalPageNavigator.d.ts +0 -11
  65. package/types/GridView.d.ts +5 -10
  66. package/types/Icon.d.ts +0 -14
  67. package/types/Image.d.ts +0 -31
  68. package/types/InlinePaymentPanel.d.ts +0 -9
  69. package/types/Input.d.ts +0 -62
  70. package/types/Label.d.ts +3 -2
  71. package/types/Lifestyle.d.ts +0 -3
  72. package/types/Like.d.ts +0 -17
  73. package/types/LivePlayer.d.ts +1 -58
  74. package/types/LivePusher.d.ts +0 -77
  75. package/types/Login.d.ts +0 -5
  76. package/types/Lottie.d.ts +0 -16
  77. package/types/Map.d.ts +19 -136
  78. package/types/MatchMedia.d.ts +0 -7
  79. package/types/MovableArea.d.ts +0 -1
  80. package/types/MovableView.d.ts +0 -35
  81. package/types/NavigationBar.d.ts +0 -6
  82. package/types/Navigator.d.ts +0 -27
  83. package/types/OfficialAccount.d.ts +0 -12
  84. package/types/OpenData.d.ts +0 -20
  85. package/types/PageContainer.d.ts +0 -21
  86. package/types/PageMeta.d.ts +0 -16
  87. package/types/Picker.d.ts +17 -45
  88. package/types/PickerView.d.ts +1 -12
  89. package/types/Progress.d.ts +0 -13
  90. package/types/Radio.d.ts +1 -8
  91. package/types/RadioGroup.d.ts +0 -2
  92. package/types/RichText.d.ts +1 -22
  93. package/types/RootPortal.d.ts +1 -2
  94. package/types/RtcRoom.d.ts +0 -16
  95. package/types/RtcRoomItem.d.ts +0 -3
  96. package/types/ScrollView.d.ts +2 -57
  97. package/types/ShareElement.d.ts +2 -7
  98. package/types/Slider.d.ts +0 -19
  99. package/types/Swiper.d.ts +0 -44
  100. package/types/SwiperItem.d.ts +0 -2
  101. package/types/Switch.d.ts +2 -11
  102. package/types/TabItem.d.ts +0 -4
  103. package/types/Tabs.d.ts +0 -8
  104. package/types/Text.d.ts +0 -7
  105. package/types/Textarea.d.ts +0 -36
  106. package/types/Video.d.ts +1 -112
  107. package/types/View.d.ts +0 -25
  108. package/types/VoipRoom.d.ts +0 -6
  109. package/types/WebView.d.ts +0 -6
  110. package/dist/taro-components/p-0aaf66d2.entry.js +0 -1
  111. package/dist/taro-components/p-da1f3d54.system.entry.js +0 -1
package/types/Audio.d.ts CHANGED
@@ -5,72 +5,59 @@ interface AudioProps extends StandardProps {
5
5
  * @supported weapp, swan, qq
6
6
  */
7
7
  id?: string
8
-
9
8
  /** 要播放音频的资源地址
10
9
  * @supported weapp, swan, qq, h5
11
10
  */
12
11
  src?: string
13
-
14
12
  /** 是否循环播放
15
13
  * @default false
16
14
  * @supported weapp, swan, qq, h5
17
15
  */
18
16
  loop?: boolean
19
-
20
17
  /** 是否静音播放
21
18
  * @default false
22
19
  * @supported h5
23
20
  */
24
21
  muted?: boolean
25
-
26
22
  /** 是否显示默认控件
27
23
  * @default false
28
24
  * @supported weapp, swan, qq, h5
29
25
  */
30
26
  controls?: boolean
31
-
32
27
  /** 默认控件上的音频封面的图片资源地址,如果 controls 属性值为 false 则设置 poster 无效
33
28
  * @supported weapp, swan, qq
34
29
  */
35
30
  poster?: string
36
-
37
31
  /** 默认控件上的音频名字,如果 controls 属性值为 false 则设置 name 无效
38
32
  * @default "未知音频"
39
33
  * @supported weapp, swan, qq
40
34
  */
41
35
  name?: string
42
-
43
36
  /** 默认控件上的作者名字,如果 controls 属性值为 false 则设置 author 无效
44
37
  * @default "未知作者"
45
38
  * @supported weapp, swan, qq
46
39
  */
47
40
  author?: string
48
-
49
41
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
50
42
  * @supported h5
51
43
  */
52
44
  nativeProps?: Record<string, unknown>
53
-
54
45
  /** 当发生错误时触发 error 事件,detail = {errMsg: MediaError.code}
55
46
  * @supported weapp, swan, qq, h5
56
47
  */
57
48
  onError?: CommonEventFunction<AudioProps.onErrorEventDetail>
58
-
59
49
  /** 当开始/继续播放时触发play事件
60
50
  * @supported weapp, swan, qq, h5
61
51
  */
62
52
  onPlay?: CommonEventFunction
63
-
64
53
  /** 当暂停播放时触发 pause 事件
65
54
  * @supported weapp, swan, qq, h5
66
55
  */
67
56
  onPause?: CommonEventFunction
68
-
69
57
  /** 当播放进度改变时触发 timeupdate 事件,detail = {currentTime, duration}
70
58
  * @supported weapp, swan, qq, h5
71
59
  */
72
60
  onTimeUpdate?: CommonEventFunction<AudioProps.onTimeUpdateEventDetail>
73
-
74
61
  /** 当播放到末尾时触发 ended 事件
75
62
  * @supported weapp, swan, qq, h5
76
63
  */
@@ -83,7 +70,6 @@ declare namespace AudioProps {
83
70
  interface onTimeUpdateEventDetail {
84
71
  /** 当前时间 */
85
72
  currentTime: number
86
-
87
73
  /** 持续时间 */
88
74
  duration: number
89
75
  }
@@ -91,19 +77,15 @@ declare namespace AudioProps {
91
77
  interface Code {
92
78
  /** 获取资源被用户禁止 */
93
79
  1
94
-
95
80
  /** 网络错误 */
96
81
  2
97
-
98
82
  /** 解码错误 */
99
83
  3
100
-
101
84
  /** 不合适资源 */
102
85
  4
103
86
  }
104
87
  }
105
88
  }
106
-
107
89
  /** 音频。1.6.0版本开始,该组件不再维护。建议使用能力更强的 Taro.createInnerAudioContext 接口
108
90
  * @classification media
109
91
  * @deprecated
@@ -5,35 +5,29 @@ interface AwemeDataProps extends StandardProps {
5
5
  * @supported tt
6
6
  */
7
7
  awemeId?: string
8
-
9
8
  /** 类型,可以选择头像或昵称
10
9
  * @supported tt
11
10
  * @default "avatar"
12
11
  */
13
12
  type?: string
14
-
15
13
  /** 禁用默认行为。点击头像时,如果用户处于直播状态下默认会跳转到直播间,非直播状态下跳转到个人主页。如果为 true,点击头像时不会有默认行为。
16
14
  * @supported tt
17
15
  * @default false
18
16
  */
19
17
  disableDefault?: boolean
20
-
21
18
  /** 获取信息失败时显示的默认头像 url
22
19
  * @supported tt
23
20
  */
24
21
  defaultAvatar?: string
25
-
26
22
  /** 获取信息失败时显示的默认昵称文本
27
23
  * @supported tt
28
24
  */
29
25
  defaultText?: string
30
-
31
26
  /** 当错误发生时触发
32
27
  * @supported tt
33
28
  */
34
29
  onError?: CommonEventFunction
35
30
  }
36
-
37
31
  /** 直播间状态组件
38
32
  * @classification open
39
33
  * @supported tt
package/types/Button.d.ts CHANGED
@@ -7,86 +7,72 @@ interface ButtonProps extends StandardProps {
7
7
  * @default default
8
8
  */
9
9
  size?: keyof ButtonProps.Size
10
-
11
10
  /** 按钮的样式类型
12
11
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
13
12
  * @default default
14
13
  */
15
14
  type?: keyof ButtonProps.Type
16
-
17
15
  /** 按钮是否镂空,背景色透明
18
16
  * @supported weapp, alipay, swan, qq, jd, h5, rn
19
17
  * @default false
20
18
  */
21
19
  plain?: boolean
22
-
23
20
  /** 是否禁用
24
21
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
25
22
  * @default false
26
23
  */
27
24
  disabled?: boolean
28
-
29
25
  /** 名称前是否带 loading 图标
30
26
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
31
27
  * @default false
32
28
  */
33
29
  loading?: boolean
34
-
35
30
  /** 用于 `<form/>` 组件,点击分别会触发 `<form/>` 组件的 submit/reset 事件
36
31
  * @supported weapp, alipay, swan, tt, qq, jd
37
32
  */
38
33
  formType?: keyof ButtonProps.FormType
39
-
40
34
  /** 微信开放能力
41
35
  * @supported weapp, alipay, swan, tt, qq, jd
42
36
  */
43
37
  openType?: ButtonProps.OpenType
44
-
45
38
  /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
46
39
  * @default button-hover
47
40
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
48
41
  * @rn 支持 hoverStyle 属性,但框架未支持 hoverClass
49
42
  */
50
43
  hoverClass?: string
51
-
52
44
  /** 由于 RN 不支持 hoverClass,故 RN 端的 Button 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。
53
45
  * @default none
54
46
  * @supported rn
55
47
  */
56
48
  hoverStyle?: StyleProp<ViewStyle>
57
-
58
49
  /** 指定是否阻止本节点的祖先节点出现点击态
59
50
  * @default false
60
51
  * @supported weapp, alipay, swan, tt, qq, jd
61
52
  */
62
53
  hoverStopPropagation?: boolean
63
-
64
54
  /** 按住后多久出现点击态,单位毫秒
65
55
  * @default 20
66
56
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
67
57
  */
68
58
  hoverStartTime?: number
69
-
70
59
  /** 手指松开后点击态保留时间,单位毫秒
71
60
  * @default 70
72
61
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
73
62
  */
74
63
  hoverStayTime?: number
75
-
76
64
  /** 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。
77
65
  *
78
66
  * 生效时机: `open-type="getUserInfo"`
79
67
  * @supported weapp, qq, jd
80
68
  */
81
69
  lang?: keyof ButtonProps.Lang
82
-
83
70
  /** 会话来源
84
71
  *
85
72
  * 生效时机:`open-type="contact"`
86
73
  * @supported weapp
87
74
  */
88
75
  sessionFrom?: string
89
-
90
76
  /** 会话内消息卡片标题
91
77
  *
92
78
  * 生效时机:`open-type="contact"`
@@ -94,7 +80,6 @@ interface ButtonProps extends StandardProps {
94
80
  * @supported weapp
95
81
  */
96
82
  sendMessageTitle?: string
97
-
98
83
  /** 会话内消息卡片点击跳转小程序路径
99
84
  *
100
85
  * 生效时机:`open-type="contact"`
@@ -102,7 +87,6 @@ interface ButtonProps extends StandardProps {
102
87
  * @supported weapp
103
88
  */
104
89
  sendMessagePath?: string
105
-
106
90
  /** 会话内消息卡片图片
107
91
  *
108
92
  * 生效时机:`open-type="contact"`
@@ -110,154 +94,130 @@ interface ButtonProps extends StandardProps {
110
94
  * @supported weapp
111
95
  */
112
96
  sendMessageImg?: string
113
-
114
97
  /** 打开 APP 时,向 APP 传递的参数
115
98
  *
116
99
  * 生效时机:`open-type="launchApp"`
117
100
  * @supported weapp, qq, jd
118
101
  */
119
102
  appParameter?: string
120
-
121
103
  /** 支付宝小程序 scope
122
104
  *
123
105
  * 生效时机:`open-type="getAuthorize"`
124
106
  * @supported alipay
125
107
  */
126
108
  scope?: 'userInfo' | 'phoneNumber'
127
-
128
109
  /** 显示会话内消息卡片
129
110
  *
130
111
  * 生效时机:`open-type="contact"`
112
+ * @supported weapp
131
113
  * @default false
132
114
  */
133
115
  showMessageCard?: boolean
134
-
135
116
  /** 生活号 id,必须是当前小程序同主体且已关联的生活号,open-type="lifestyle" 时有效。
136
117
  * @supported alipay, qq
137
118
  */
138
119
  publicId?: string
139
-
140
120
  /** 发送订阅类模板消息所用的模板库标题 ID ,可通过 getTemplateLibraryList 获取
141
121
  * 当参数类型为 Array 时,可传递 1~3 个模板库标题 ID
142
122
  * @supported swan
143
123
  */
144
124
  templateId?: string | Array<string>
145
-
146
125
  /** 发送订阅类模板消息时所使用的唯一标识符,内容由开发者自定义,用来标识订阅场景
147
126
  * 注意:同一用户在同一 subscribe-id 下的多次授权不累积下发权限,只能下发一条。若要订阅多条,需要不同 subscribe-id
148
127
  * @supported swan
149
128
  */
150
129
  subscribeId?: string
151
-
152
130
  /** 打开群资料卡时,传递的群号
153
131
  * @supported qq
154
132
  */
155
133
  groupId?: string
156
-
157
134
  /** 打开频道页面时,传递的频道号
158
135
  * @supported qq
159
136
  */
160
137
  guildId?: string
161
-
162
138
  /** 分享类型集合,请参考下面share-type有效值说明。share-type后续将不再维护,请更新为share-mode
163
139
  * @supported qq
164
140
  * @default 27
165
141
  */
166
142
  shareType?: string
167
-
168
143
  /** 分享类型集合,请参考下面share-mode有效值说明
169
144
  * @supported qq
170
145
  * @default ['qq', 'qzone']
171
146
  */
172
147
  shareMode?: string
173
-
174
148
  /** 无障碍访问,(属性)元素的额外描述
175
149
  * @supported qq
176
150
  */
177
151
  ariaLabel?: string
178
-
179
152
  /** 添加好友时,对方的 openid
180
153
  * @supported qq
181
154
  */
182
155
  openId?: string
183
-
184
156
  /** 发送对象的 FriendInfo
185
157
  * @supported qq
186
158
  */
187
159
  shareMessageFriendInfo?: string
188
-
189
160
  /** 转发标题,不传则默认使用当前小程序的昵称。 FriendInfo
190
161
  * @supported qq
191
162
  */
192
163
  shareMessageTitle?: string
193
-
194
164
  /** 转发显示图片的链接,可以是网络图片路径(仅 QQ CDN 域名路径)或本地图片文件路径或相对代码包根目录的图片文件路径。显示图片长宽比是 5:4FriendInfo
195
165
  * @supported qq
196
166
  */
197
167
  shareMessageImg?: string
198
-
199
168
  /** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致
200
169
  *
201
170
  * 生效时机: `open-type="getUserInfo"`
202
171
  * @supported weapp, alipay, swan, qq, jd
203
172
  */
204
173
  onGetUserInfo?: CommonEventFunction<ButtonProps.onGetUserInfoEventDetail>
205
-
206
174
  /** 支付宝获取会员基础信息授权回调
207
175
  *
208
176
  * 生效时机:`open-type="getAuthorize"`
209
177
  * @supported alipay
210
178
  */
211
179
  onGetAuthorize?: CommonEventFunction
212
-
213
180
  /** 客服消息回调
214
181
  *
215
182
  * 生效时机:`open-type="contact"`
216
183
  * @supported weapp, swan, qq
217
184
  */
218
185
  onContact?: CommonEventFunction<ButtonProps.onContactEventDetail>
219
-
220
186
  /** 获取用户手机号回调
221
187
  *
222
188
  * 生效时机:`open-type="getphonenumber"`
223
189
  * @supported weapp, alipay, swan, tt, jd
224
190
  */
225
191
  onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
226
-
227
192
  /** 当使用开放能力时,发生错误的回调
228
193
  *
229
194
  * 生效时机:`open-type="launchApp"`
230
195
  * @supported weapp, alipay, qq, jd
231
196
  */
232
197
  onError?: CommonEventFunction
233
-
234
198
  /** 在打开授权设置页后回调
235
199
  *
236
200
  * 生效时机:`open-type="openSetting"`
237
201
  * @supported weapp, swan, qq, jd
238
202
  */
239
203
  onOpenSetting?: CommonEventFunction<ButtonProps.onOpenSettingEventDetail>
240
-
241
204
  /** 打开 APP 成功的回调
242
205
  *
243
206
  * 生效时机:`open-type="launchApp"`
244
207
  * @supported weapp, qq
245
208
  */
246
209
  onLaunchApp?: CommonEventFunction
247
-
248
210
  /** 获取用户头像回调
249
211
  *
250
212
  * 生效时机:`open-type="chooseAvatar"`
251
213
  * @supported weapp
252
214
  */
253
215
  onChooseAvatar?: CommonEventFunction
254
-
255
216
  /** 点击。
256
217
  * 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。
257
218
  * @supported alipay
258
219
  */
259
220
  onTap?: CommonEventFunction
260
-
261
221
  /** 当 open-type 为 lifestyle 时有效。
262
222
  * 当点击按钮时触发。
263
223
  * event.detail = { followStatus },followStatus 合法值有 1、2、3,其中 1 表示已关注。2 表示用户不允许关注。3 表示发生未知错误;
@@ -267,32 +227,26 @@ interface ButtonProps extends StandardProps {
267
227
  onFollowLifestyle?: CommonEventFunction<{
268
228
  followStatus: 1 | 2 | 3 | true
269
229
  }>
270
-
271
230
  /** 用户点击该按钮时,调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址,从返回参数的 detail 中获取,和 swan.chooseAddress 一样的。和 open-type 搭配使用,使用时机:open-type="chooseAddress"
272
231
  * @supported swan
273
232
  */
274
233
  onChooseAddress?: CommonEventFunction
275
-
276
234
  /** 用户点击该按钮时,选择用户的发票抬头,和 swan.chooseInvoiceTitle 一样的。和 open-type 搭配使用,使用时机:open-type="chooseInvoiceTitle"
277
235
  * @supported swan
278
236
  */
279
237
  onChooseInvoiceTitle?: CommonEventFunction
280
-
281
238
  /** 登录回调,和 open-type 搭配使用,使用时机:open-type="login"。可以通过返回参数的 detail 判断是否登录成功,当 errMsg 为'login:ok'时即为成功。如想获取登录凭证请使用 swan.getLoginCode
282
239
  * @supported swan
283
240
  */
284
241
  onLogin?: CommonEventFunction
285
-
286
242
  /** 订阅消息授权回调,和 open-type 搭配使用,使用时机:open-type="subscribe"
287
243
  * @supported swan
288
244
  */
289
245
  onSubscribe?: CommonEventFunction
290
-
291
246
  /** 添加好友的回调
292
247
  * @supported qq
293
248
  */
294
249
  onAddFriend?: CommonEventFunction
295
-
296
250
  /** 添加群应用的回调。errCode 错误码:41004(当前用户非管理员或群主,无权操作),41005(超过可添加群应用的群数量)
297
251
  * @supported qq
298
252
  */
@@ -303,35 +257,27 @@ declare namespace ButtonProps {
303
257
  interface Size {
304
258
  /** 默认大小 */
305
259
  default
306
-
307
260
  /** 小尺寸 */
308
261
  mini
309
262
  }
310
-
311
263
  /** type 的合法值 */
312
264
  interface Type {
313
265
  /** 绿色 */
314
266
  primary
315
-
316
267
  /** 白色 */
317
268
  default
318
-
319
269
  /** 红色 */
320
270
  warn
321
271
  }
322
-
323
272
  /** form-type 的合法值 */
324
273
  interface FormType {
325
274
  /** 提交表单 */
326
275
  submit
327
-
328
276
  /** 重置表单 */
329
277
  reset
330
278
  }
331
-
332
279
  /** open-type 的合法值 */
333
280
  type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq']
334
-
335
281
  /** open-type 的合法值 */
336
282
  interface openTypeKeys {
337
283
  weapp: {
@@ -339,52 +285,40 @@ declare namespace ButtonProps {
339
285
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html
340
286
  */
341
287
  contact
342
-
343
288
  /** 触发用户转发,使用前建议先阅读使用指引
344
289
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95
345
290
  */
346
291
  share
347
-
348
292
  /** 获取用户手机号,可以从回调中获取到用户信息
349
293
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html
350
294
  */
351
295
  getPhoneNumber
352
-
353
296
  /** 获取用户信息,可以从回调中获取到用户信息 */
354
297
  getUserInfo
355
-
356
298
  /** 打开APP,可以通过 app-parameter 属性设定向APP传的参数
357
299
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html
358
300
  */
359
301
  launchApp
360
-
361
302
  /** 打开授权设置页 */
362
303
  openSetting
363
-
364
304
  /** 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容 */
365
305
  feedback
366
-
367
306
  /** 获取用户头像,可以从回调中获得具体信息 */
368
307
  chooseAvatar
369
308
  }
370
-
371
309
  /** 支付宝小程序专属的 open-type 合法值
372
310
  * @see https://opendocs.alipay.com/mini/component/button
373
311
  */
374
312
  alipay: {
375
313
  /** 触发 自定义分享 */
376
314
  share
377
-
378
315
  /** 支持小程序授权 */
379
316
  getAuthorize
380
-
381
317
  /** 分享到通讯录好友 */
382
318
  contactShare
383
-
384
319
  /** 关注生活号 */
385
320
  lifestyle
386
321
  }
387
-
388
322
  /** QQ 小程序专属的 open-type 合法值
389
323
  * @see https://q.qq.com/wiki/develop/miniprogram/component/form/button.html
390
324
  */
@@ -393,49 +327,36 @@ declare namespace ButtonProps {
393
327
  * @see https://q.qq.com/wiki/develop/miniprogram/frame/open_ability/open_share.html#%E8%BD%AC%E5%8F%91-2
394
328
  */
395
329
  share
396
-
397
330
  /** 获取用户信息,可以从 onGetUserInfo 回调中获取到用户信息 */
398
331
  getUserInfo
399
-
400
332
  /** 打开APP,可以通过 app-parameter 属性设定向APP传的参数
401
333
  * @see https://q.qq.com/wiki/develop/miniprogram/frame/open_ability/open_app.html
402
334
  */
403
335
  launchApp
404
-
405
336
  /** 打开授权设置页 */
406
337
  openSetting
407
-
408
338
  /** 呼起吐个槽反馈页面,开发者可以到官网查看反馈 */
409
339
  feedback
410
-
411
340
  /** 呼起群资料卡页面,可以通过 group-id 属性设定需要打开的群资料卡的群号,同时 app.json 中必须配置 groupIdList(数量不超过 10 个),表明可以打开群资料卡的群号 */
412
341
  openGroupProfile
413
-
414
342
  /** 添加好友,对方需要通过该小程序进行授权,允许被加好友后才能调用成功[用户授权](https://q.qq.com/wiki/develop/miniprogram/frame/open_ability/open_userinfo.html#%E6%8E%88%E6%9D%83) */
415
343
  addFriend
416
-
417
344
  /** 添加彩签,点击后添加状态有用户提示,无回调 */
418
345
  addColorSign
419
-
420
346
  /** 打开公众号资料卡,可以通过 public-id 属性设定需要打开的公众号资料卡的号码,同时 app.json 中必须配置 publicIdList(目前只能配置 1 个),表明可以打开的公众号资料卡的号码 */
421
347
  openPublicProfile
422
-
423
348
  /** 添加群应用(只有管理员或群主有权操作,建议先调用 qq.getGroupInfo 获取当前用户是否为管理员,如果是管理员才显示该按钮),添加后给button绑定 onAddGroupApp 事件接收回调数据。 */
424
349
  addGroupApp
425
-
426
350
  /** 在自定义开放数据域组件中,向指定好友发起分享据 */
427
351
  shareMessageToFriend
428
352
  }
429
353
  }
430
-
431
354
  /** lang 的合法值 */
432
355
  interface Lang {
433
356
  /** 英文 */
434
357
  en
435
-
436
358
  /** 简体中文 */
437
359
  zh_CN
438
-
439
360
  /** 繁体中文 */
440
361
  zh_TW
441
362
  }
@@ -443,84 +364,62 @@ declare namespace ButtonProps {
443
364
  userInfo: {
444
365
  /** 昵称 */
445
366
  nickName: string
446
-
447
- /** 头像 */
367
+ /** 头像链接 */
448
368
  avatarUrl: string
449
-
450
- /**
451
- * 头像
369
+ /** 头像
452
370
  * @supported alipay
453
371
  */
454
372
  avatar: string
455
-
456
373
  /** 性别 */
457
374
  gender: keyof Gender
458
-
459
375
  /** 省份,如:`Yunnan` */
460
376
  province: string
461
-
462
377
  /** 城市,如:`Dalian` */
463
378
  city: string
464
-
465
379
  /** 国家,如:`China` */
466
380
  country: string
467
381
  }
468
-
469
382
  /** 不包括敏感信息的原始数据 `JSON` 字符串,用于计算签名 */
470
383
  rawData: string
471
-
472
384
  /** 使用 `sha1(rawData + sessionkey)` 得到字符串,用于校验用户信息 */
473
385
  signature: string
474
-
475
386
  /** 包括敏感数据在内的完整用户信息的加密数据 */
476
387
  encryptedData: string
477
-
478
388
  /** 加密算法的初始向量 */
479
389
  iv: string
480
-
481
390
  /* 用户信息的调用状态 */
482
391
  errMsg: string
483
-
484
392
  /** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
485
393
  cloudID?: string
486
394
  }
487
-
488
395
  /** 性别的合法值 */
489
396
  interface Gender {
490
397
  /** 未知 */
491
398
  0
492
-
493
399
  /** 男 */
494
400
  1
495
-
496
401
  /** 女 */
497
402
  2
498
403
  }
499
404
  interface onContactEventDetail {
500
405
  /* 小程序消息的调用状态 */
501
406
  errMsg: string
502
-
503
407
  /** 小程序消息指定的路径 */
504
408
  path: string
505
-
506
409
  /** 小程序消息指定的查询参数 */
507
410
  query: Record<string, any>
508
411
  }
509
412
  interface onGetPhoneNumberEventDetail {
510
413
  /* 获取用户手机号的调用状态 */
511
414
  errMsg: string
512
-
513
415
  /** 包括敏感数据在内的完整用户信息的加密数据 */
514
416
  encryptedData: string
515
-
516
417
  /** 加密算法的初始向量 */
517
418
  iv: string
518
-
519
419
  /** 动态令牌。可通过动态令牌换取用户手机号。
520
420
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95
521
421
  */
522
422
  code?: string
523
-
524
423
  /**
525
424
  * 签名信息,如果在开放平台后台配置了加签方式后有此字段
526
425
  * @supported alipay
@@ -530,12 +429,10 @@ declare namespace ButtonProps {
530
429
  interface onOpenSettingEventDetail {
531
430
  /* 打开授权设置页的调用状态 */
532
431
  errMsg: string
533
-
534
432
  /* 用户授权结果 */
535
433
  authSetting: Record<string, boolean>
536
434
  }
537
435
  }
538
-
539
436
  /** 按钮
540
437
  * @classification forms
541
438
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony