@tarojs/components 3.6.2 → 3.6.4

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 (205) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-grid-view-core.cjs.entry.js +21 -0
  5. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  6. package/dist/cjs/taro-list-view-core.cjs.entry.js +21 -0
  7. package/dist/cjs/taro-picker-core_2.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-sticky-header-core.cjs.entry.js +21 -0
  9. package/dist/cjs/taro-sticky-section-core.cjs.entry.js +21 -0
  10. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +28 -18
  11. package/dist/cjs/taro-textarea-core.cjs.entry.js +13 -3
  12. package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -1
  13. package/dist/collection/collection-manifest.json +4 -0
  14. package/dist/collection/components/grid-view/grid-view.js +11 -0
  15. package/dist/collection/components/input/input.js +1 -1
  16. package/dist/collection/components/list-view/list-view.js +11 -0
  17. package/dist/collection/components/picker/picker.js +1 -1
  18. package/dist/collection/components/sticky-header/sticky-header.js +11 -0
  19. package/dist/collection/components/sticky-section/sticky-section.js +11 -0
  20. package/dist/collection/components/swiper/swiper-item.js +16 -9
  21. package/dist/collection/components/swiper/swiper.js +12 -9
  22. package/dist/collection/components/textarea/textarea.js +23 -6
  23. package/dist/collection/components/video/video.js +3 -1
  24. package/dist/components/index.d.ts +4 -0
  25. package/dist/components/index.js +4 -0
  26. package/dist/components/taro-grid-view-core.d.ts +11 -0
  27. package/dist/components/taro-grid-view-core.js +33 -0
  28. package/dist/components/taro-input-core.js +1 -1
  29. package/dist/components/taro-list-view-core.d.ts +11 -0
  30. package/dist/components/taro-list-view-core.js +33 -0
  31. package/dist/components/taro-picker-core.js +1 -1
  32. package/dist/components/taro-sticky-header-core.d.ts +11 -0
  33. package/dist/components/taro-sticky-header-core.js +33 -0
  34. package/dist/components/taro-sticky-section-core.d.ts +11 -0
  35. package/dist/components/taro-sticky-section-core.js +33 -0
  36. package/dist/components/taro-swiper-core.js +12 -9
  37. package/dist/components/taro-swiper-item-core.js +16 -9
  38. package/dist/components/taro-textarea-core.js +14 -4
  39. package/dist/components/taro-video-core.js +3 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/taro-components.js +1 -1
  42. package/dist/esm/taro-grid-view-core.entry.js +17 -0
  43. package/dist/esm/taro-input-core.entry.js +1 -1
  44. package/dist/esm/taro-list-view-core.entry.js +17 -0
  45. package/dist/esm/taro-picker-core_2.entry.js +1 -1
  46. package/dist/esm/taro-sticky-header-core.entry.js +17 -0
  47. package/dist/esm/taro-sticky-section-core.entry.js +17 -0
  48. package/dist/esm/taro-swiper-core_2.entry.js +28 -18
  49. package/dist/esm/taro-textarea-core.entry.js +13 -3
  50. package/dist/esm/taro-video-control_3.entry.js +3 -1
  51. package/dist/esm-es5/loader.js +1 -1
  52. package/dist/esm-es5/taro-components.js +1 -1
  53. package/dist/esm-es5/taro-grid-view-core.entry.js +1 -0
  54. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  55. package/dist/esm-es5/taro-list-view-core.entry.js +1 -0
  56. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  57. package/dist/esm-es5/taro-sticky-header-core.entry.js +1 -0
  58. package/dist/esm-es5/taro-sticky-section-core.entry.js +1 -0
  59. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  60. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  61. package/dist/taro-components/p-02aa7366.system.entry.js +1 -0
  62. package/dist/taro-components/p-05c757b7.entry.js +1 -0
  63. package/dist/taro-components/{p-4d390d17.entry.js → p-0b8b3af5.entry.js} +1 -1
  64. package/dist/taro-components/p-1c446c65.system.js +1 -1
  65. package/dist/taro-components/p-1eac7c75.system.entry.js +1 -0
  66. package/dist/taro-components/{p-3e23fa46.system.entry.js → p-39685396.system.entry.js} +1 -1
  67. package/dist/taro-components/p-4402972b.system.entry.js +1 -0
  68. package/dist/taro-components/{p-e53feb03.system.entry.js → p-58f9a827.system.entry.js} +1 -1
  69. package/dist/taro-components/p-5931c82e.entry.js +1 -0
  70. package/dist/taro-components/{p-ab84c88e.entry.js → p-7704e165.entry.js} +1 -1
  71. package/dist/taro-components/p-7c1fc8f5.system.entry.js +1 -0
  72. package/dist/taro-components/p-7df9de66.system.entry.js +1 -0
  73. package/dist/taro-components/{p-10046f1a.system.entry.js → p-a5afdc47.system.entry.js} +1 -1
  74. package/dist/taro-components/p-affb28de.entry.js +1 -0
  75. package/dist/taro-components/{p-8267b686.entry.js → p-c30d1b2d.entry.js} +1 -1
  76. package/dist/taro-components/p-dfc405a5.entry.js +1 -0
  77. package/dist/taro-components/p-e753b776.entry.js +1 -0
  78. package/dist/taro-components/taro-components.esm.js +1 -1
  79. package/dist/types/components/grid-view/grid-view.d.ts +5 -0
  80. package/dist/types/components/list-view/list-view.d.ts +5 -0
  81. package/dist/types/components/sticky-header/sticky-header.d.ts +5 -0
  82. package/dist/types/components/sticky-section/sticky-section.d.ts +5 -0
  83. package/dist/types/components/textarea/textarea.d.ts +2 -1
  84. package/dist/types/components.d.ts +52 -0
  85. package/lib/react/components.d.ts +81 -77
  86. package/lib/react/components.js +82 -77
  87. package/lib/react/components.js.map +1 -1
  88. package/lib/react/index.js +1 -1
  89. package/lib/react/{interfaces-4f837811.d.ts → interfaces-f526f1a2.d.ts} +4 -0
  90. package/lib/react/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js +221 -0
  91. package/lib/react/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js.map +1 -0
  92. package/lib/react/react-component-lib/createComponent.d.ts +5 -1
  93. package/lib/react/react-component-lib/createComponent.js +6 -4
  94. package/lib/react/react-component-lib/createComponent.js.map +1 -1
  95. package/lib/react/react-component-lib/createOverlayComponent.d.ts +5 -1
  96. package/lib/react/react-component-lib/createOverlayComponent.js +2 -1
  97. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
  98. package/lib/react/react-component-lib/utils/attachProps.d.ts +2 -6
  99. package/lib/react/react-component-lib/utils/attachProps.js +41 -36
  100. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  101. package/lib/react/react-component-lib/utils/case.d.ts +4 -0
  102. package/lib/react/react-component-lib/utils/case.js +4 -0
  103. package/lib/react/react-component-lib/utils/case.js.map +1 -1
  104. package/lib/react/react-component-lib/utils/index.d.ts +5 -1
  105. package/lib/react/react-component-lib/utils/index.js +4 -0
  106. package/lib/react/react-component-lib/utils/index.js.map +1 -1
  107. package/lib/vue2/components-loader.d.ts +2 -0
  108. package/lib/vue2/components-loader.js +21 -0
  109. package/lib/vue2/components-loader.js.map +1 -0
  110. package/lib/vue2/components.d.ts +5 -1
  111. package/lib/vue2/components.js +141 -224
  112. package/lib/vue2/components.js.map +1 -1
  113. package/lib/vue2/index.d.ts +0 -2
  114. package/lib/vue2/index.js +1 -22
  115. package/lib/vue2/index.js.map +1 -1
  116. package/lib/vue2/vue-component-lib/utils.d.ts +7 -3
  117. package/lib/vue2/vue-component-lib/utils.js +42 -25
  118. package/lib/vue2/vue-component-lib/utils.js.map +1 -1
  119. package/lib/vue3/components-loader.d.ts +2 -0
  120. package/lib/vue3/components-loader.js +13 -0
  121. package/lib/vue3/components-loader.js.map +1 -0
  122. package/lib/vue3/components.d.ts +5 -1
  123. package/lib/vue3/components.js +82 -77
  124. package/lib/vue3/components.js.map +1 -1
  125. package/lib/vue3/index.d.ts +0 -2
  126. package/lib/vue3/index.js +1 -14
  127. package/lib/vue3/index.js.map +1 -1
  128. package/lib/vue3/vue-component-lib/utils.js +11 -4
  129. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  130. package/package.json +11 -8
  131. package/types/Ad.d.ts +2 -31
  132. package/types/AdCustom.d.ts +0 -4
  133. package/types/AnimationVideo.d.ts +0 -9
  134. package/types/AnimationView.d.ts +0 -6
  135. package/types/ArCamera.d.ts +0 -7
  136. package/types/Audio.d.ts +0 -18
  137. package/types/AwemeData.d.ts +0 -6
  138. package/types/Button.d.ts +3 -106
  139. package/types/Camera.d.ts +0 -28
  140. package/types/Canvas.d.ts +2 -17
  141. package/types/ChannelLive.d.ts +0 -2
  142. package/types/ChannelVideo.d.ts +0 -6
  143. package/types/Checkbox.d.ts +1 -8
  144. package/types/CheckboxGroup.d.ts +0 -2
  145. package/types/CommentDetail.d.ts +4 -10
  146. package/types/CommentList.d.ts +4 -20
  147. package/types/ContactButton.d.ts +0 -7
  148. package/types/CoverImage.d.ts +0 -11
  149. package/types/CoverView.d.ts +0 -26
  150. package/types/Editor.d.ts +0 -10
  151. package/types/FollowSwan.d.ts +0 -3
  152. package/types/Form.d.ts +1 -9
  153. package/types/FunctionalPageNavigator.d.ts +0 -11
  154. package/types/GridView.d.ts +37 -0
  155. package/types/Icon.d.ts +0 -14
  156. package/types/Image.d.ts +0 -31
  157. package/types/InlinePaymentPanel.d.ts +0 -9
  158. package/types/Input.d.ts +0 -62
  159. package/types/Label.d.ts +3 -2
  160. package/types/Lifestyle.d.ts +0 -3
  161. package/types/Like.d.ts +0 -17
  162. package/types/ListView.d.ts +12 -0
  163. package/types/LivePlayer.d.ts +1 -58
  164. package/types/LivePusher.d.ts +0 -77
  165. package/types/Login.d.ts +0 -5
  166. package/types/Lottie.d.ts +0 -16
  167. package/types/Map.d.ts +19 -136
  168. package/types/MatchMedia.d.ts +0 -7
  169. package/types/MovableArea.d.ts +0 -1
  170. package/types/MovableView.d.ts +0 -35
  171. package/types/NavigationBar.d.ts +0 -6
  172. package/types/Navigator.d.ts +0 -27
  173. package/types/OfficialAccount.d.ts +0 -12
  174. package/types/OpenData.d.ts +0 -20
  175. package/types/PageContainer.d.ts +0 -21
  176. package/types/PageMeta.d.ts +0 -16
  177. package/types/Picker.d.ts +17 -45
  178. package/types/PickerView.d.ts +1 -12
  179. package/types/Progress.d.ts +0 -13
  180. package/types/Radio.d.ts +1 -8
  181. package/types/RadioGroup.d.ts +0 -2
  182. package/types/RichText.d.ts +1 -22
  183. package/types/RootPortal.d.ts +1 -2
  184. package/types/RtcRoom.d.ts +0 -16
  185. package/types/RtcRoomItem.d.ts +0 -3
  186. package/types/ScrollView.d.ts +43 -46
  187. package/types/ShareElement.d.ts +2 -7
  188. package/types/Slider.d.ts +0 -19
  189. package/types/StickyHeader.d.ts +12 -0
  190. package/types/StickySection.d.ts +18 -0
  191. package/types/Swiper.d.ts +0 -44
  192. package/types/SwiperItem.d.ts +0 -2
  193. package/types/Switch.d.ts +2 -11
  194. package/types/TabItem.d.ts +0 -4
  195. package/types/Tabs.d.ts +0 -8
  196. package/types/Text.d.ts +0 -7
  197. package/types/Textarea.d.ts +2 -38
  198. package/types/Video.d.ts +1 -112
  199. package/types/View.d.ts +0 -25
  200. package/types/VoipRoom.d.ts +0 -6
  201. package/types/WebView.d.ts +0 -6
  202. package/types/index.d.ts +4 -0
  203. package/types/index.vue3.d.ts +8 -0
  204. package/dist/taro-components/p-0895120a.system.entry.js +0 -1
  205. package/dist/taro-components/p-0aaf66d2.entry.js +0 -1
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
package/types/Camera.d.ts CHANGED
@@ -6,58 +6,48 @@ interface CameraProps extends StandardProps {
6
6
  * @supported weapp, alipay, tt, qq, jd, rn
7
7
  */
8
8
  mode?: keyof CameraProps.Mode
9
-
10
9
  /** 分辨率,不支持动态修改
11
10
  * @default "medium"
12
11
  * @supported weapp, tt
13
12
  */
14
13
  resolution?: keyof CameraProps.Resolution
15
-
16
14
  /** 摄像头朝向
17
15
  * @default "back"
18
16
  * @supported weapp, alipay, swan, tt, qq, jd, rn
19
17
  */
20
18
  devicePosition?: keyof CameraProps.DevicePosition
21
-
22
19
  /** 闪光灯
23
20
  * @default "auto"
24
21
  * @supported weapp, alipay, swan, tt, qq, jd, rn
25
22
  */
26
23
  flash?: keyof CameraProps.Flash
27
-
28
24
  /** 指定期望的相机帧数据尺寸
29
25
  * @default "medium"
30
26
  * @supported weapp, alipay, tt
31
27
  */
32
28
  frameSize?: keyof CameraProps.FrameSize
33
-
34
29
  /** 相机拍照,录制的分辨率。
35
30
  * @supported alipay
36
31
  * @default "720P"
37
32
  */
38
33
  outputDimension?: '360P' | '540P' | '720P' | '1080P' | 'max'
39
-
40
34
  /** 摄像头在非正常终止时触发,
41
35
  * 如退出后台等情况
42
36
  * @supported weapp, alipay, swan, tt, qq, jd, rn
43
37
  */
44
38
  onStop?: CommonEventFunction
45
-
46
39
  /** 用户不允许使用摄像头时触发
47
40
  * @supported weapp, alipay, swan, tt, qq, jd, rn
48
41
  */
49
42
  onError?: CommonEventFunction
50
-
51
43
  /** 相机初始化完成时触发
52
44
  * @supported weapp, tt, rn
53
45
  */
54
46
  onInitDone?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
55
-
56
47
  /** 相机初始化成功时触发。
57
48
  * @supported alipay
58
49
  */
59
50
  onReady?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
60
-
61
51
  /** 在成功识别到一维码时触发,
62
52
  * 仅在 mode="scanCode" 时生效
63
53
  * @supported weapp, alipay, tt, qq, rn
@@ -69,55 +59,42 @@ declare namespace CameraProps {
69
59
  interface Mode {
70
60
  /** 相机模式 */
71
61
  normal
72
-
73
62
  /** 扫码模式 */
74
63
  scanCode
75
64
  }
76
-
77
65
  /** resolution 的合法值 */
78
66
  interface Resolution {
79
67
  /** 低 */
80
68
  low
81
-
82
69
  /** 中 */
83
70
  medium
84
-
85
71
  /** 高 */
86
72
  high
87
73
  }
88
-
89
74
  /** device-position 的合法值 */
90
75
  interface DevicePosition {
91
76
  /** 前置 */
92
77
  front
93
-
94
78
  /** 后置 */
95
79
  back
96
80
  }
97
-
98
81
  /** flash 的合法值 */
99
82
  interface Flash {
100
83
  /** 自动 */
101
84
  auto
102
-
103
85
  /** 打开 */
104
86
  on
105
-
106
87
  /** 关闭 */
107
88
  off
108
-
109
89
  /** 常亮 */
110
90
  torch
111
91
  }
112
-
113
92
  /** frame-size 的合法值 */
114
93
  interface FrameSize {
115
94
  /** 小尺寸帧数据 */
116
95
  small
117
-
118
96
  /** 中尺寸帧数据 */
119
97
  medium
120
-
121
98
  /** 大尺寸帧数据 */
122
99
  large
123
100
  }
@@ -128,25 +105,20 @@ declare namespace CameraProps {
128
105
  interface onScanCodeEventDetail {
129
106
  /** 字符集 */
130
107
  charSet: string
131
-
132
108
  /** 原始数据
133
109
  * @supported weapp
134
110
  */
135
111
  rawData: string
136
-
137
112
  /** 码类型 */
138
113
  type: string
139
-
140
114
  /** 识别结果 */
141
115
  result: string
142
-
143
116
  /** 识别结果(完整)
144
117
  * @supported alipay
145
118
  */
146
119
  fullResult: string
147
120
  }
148
121
  }
149
-
150
122
  /** 系统相机
151
123
  * @classification media
152
124
  * @supported weapp, alipay, swan, tt, qq, jd, rn, harmony