@tarojs/components 3.4.0-beta.2 → 3.4.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 (96) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-components.cjs.js +1 -1
  3. package/dist/cjs/taro-input-core.cjs.entry.js +26 -18
  4. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +12 -3
  5. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +3 -3
  6. package/dist/cjs/taro-tabbar.cjs.entry.js +3 -2
  7. package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -3
  8. package/dist/collection/components/input/input.js +41 -24
  9. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +11 -2
  10. package/dist/collection/components/pull-to-refresh/style/index.css +1 -0
  11. package/dist/collection/components/scroll-view/scroll-view.js +3 -3
  12. package/dist/collection/components/tabbar/style/index.css +1 -1
  13. package/dist/collection/components/tabbar/tabbar.js +2 -1
  14. package/dist/collection/components/textarea/textarea.js +3 -3
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/taro-components.js +1 -1
  17. package/dist/esm/taro-input-core.entry.js +26 -18
  18. package/dist/esm/taro-pull-to-refresh.entry.js +12 -3
  19. package/dist/esm/taro-scroll-view-core.entry.js +3 -3
  20. package/dist/esm/taro-tabbar.entry.js +3 -2
  21. package/dist/esm/taro-textarea-core.entry.js +3 -3
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/taro-components.js +1 -1
  24. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  25. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  26. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  27. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  28. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  29. package/dist/taro-components/p-19c46f62.system.entry.js +1 -0
  30. package/dist/taro-components/p-2b0d5c90.system.entry.js +1 -0
  31. package/dist/taro-components/{p-627a5064.system.entry.js → p-2dc57c71.system.entry.js} +1 -1
  32. package/dist/taro-components/p-33ee636a.system.js +1 -1
  33. package/dist/taro-components/p-4e54216b.entry.js +1 -0
  34. package/dist/taro-components/{p-12ae0a33.entry.js → p-63ff7fa7.entry.js} +1 -1
  35. package/dist/taro-components/p-71e14298.entry.js +1 -0
  36. package/dist/taro-components/p-8486c251.system.entry.js +1 -0
  37. package/dist/taro-components/{p-dd34408a.entry.js → p-a345ba40.entry.js} +1 -1
  38. package/dist/taro-components/{p-6965567d.entry.js → p-cc818a13.entry.js} +1 -1
  39. package/dist/taro-components/{p-13c1404f.system.entry.js → p-fd0d1168.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.css +1 -1
  41. package/dist/taro-components/taro-components.esm.js +1 -1
  42. package/dist/types/components/input/input.d.ts +3 -3
  43. package/dist/types/components/textarea/textarea.d.ts +1 -1
  44. package/dist/types/components.d.ts +1 -0
  45. package/dist-h5/vue/components/picker.js +2 -1
  46. package/package.json +3 -3
  47. package/types/Ad.d.ts +22 -10
  48. package/types/Audio.d.ts +25 -5
  49. package/types/Button.d.ts +96 -23
  50. package/types/Camera.d.ts +11 -11
  51. package/types/Canvas.d.ts +14 -1
  52. package/types/Checkbox.d.ts +65 -1
  53. package/types/CoverImage.d.ts +48 -6
  54. package/types/CoverView.d.ts +51 -8
  55. package/types/Editor.d.ts +57 -0
  56. package/types/Form.d.ts +33 -2
  57. package/types/FunctionalPageNavigator.d.ts +4 -4
  58. package/types/Icon.d.ts +17 -1
  59. package/types/Image.d.ts +24 -4
  60. package/types/Input.d.ts +66 -5
  61. package/types/KeyboardAccessory.d.ts +2 -1
  62. package/types/Label.d.ts +18 -4
  63. package/types/LivePlayer.d.ts +15 -9
  64. package/types/LivePusher.d.ts +21 -15
  65. package/types/Map.d.ts +59 -5
  66. package/types/MatchMedia.d.ts +24 -5
  67. package/types/MovableArea.d.ts +9 -3
  68. package/types/MovableView.d.ts +20 -6
  69. package/types/Navigator.d.ts +7 -7
  70. package/types/OfficialAccount.d.ts +4 -10
  71. package/types/OpenData.d.ts +11 -5
  72. package/types/PageContainer.d.ts +8 -2
  73. package/types/Picker.d.ts +64 -1
  74. package/types/PickerView.d.ts +66 -2
  75. package/types/PickerViewColumn.d.ts +1 -1
  76. package/types/Progress.d.ts +12 -1
  77. package/types/Radio.d.ts +77 -1
  78. package/types/RichText.d.ts +33 -1
  79. package/types/ScrollView.d.ts +91 -9
  80. package/types/ShareElement.d.ts +1 -1
  81. package/types/Slider.d.ts +14 -1
  82. package/types/Swiper.d.ts +26 -1
  83. package/types/SwiperItem.d.ts +28 -3
  84. package/types/Switch.d.ts +21 -3
  85. package/types/Text.d.ts +38 -1
  86. package/types/Textarea.d.ts +17 -1
  87. package/types/Video.d.ts +50 -30
  88. package/types/View.d.ts +33 -1
  89. package/types/VoipRoom.d.ts +10 -11
  90. package/types/WebView.d.ts +7 -1
  91. package/types/common.d.ts +1 -1
  92. package/dist/taro-components/p-04818461.system.entry.js +0 -1
  93. package/dist/taro-components/p-12638ebc.system.entry.js +0 -1
  94. package/dist/taro-components/p-56618f09.entry.js +0 -1
  95. package/dist/taro-components/p-66237ac0.entry.js +0 -1
  96. package/dist/taro-components/p-665e8461.system.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import { StandardProps, CommonEventFunction, netStatus } from './common'
2
+ import { StandardProps, CommonEventFunction, NetStatus } from './common'
3
3
 
4
4
  interface LivePlayerProps extends StandardProps {
5
5
  /** 音视频地址。目前仅支持 flv, rtmp 格式
@@ -11,7 +11,7 @@ interface LivePlayerProps extends StandardProps {
11
11
  * @default "live"
12
12
  * @supported weapp
13
13
  */
14
- mode?: keyof LivePlayerProps.mode
14
+ mode?: keyof LivePlayerProps.Mode
15
15
 
16
16
  /** 自动播放
17
17
  * @default false
@@ -29,7 +29,7 @@ interface LivePlayerProps extends StandardProps {
29
29
  * @default "vertical"
30
30
  * @supported weapp
31
31
  */
32
- orientation?: keyof LivePlayerProps.orientation
32
+ orientation?: keyof LivePlayerProps.Orientation
33
33
 
34
34
  /** 填充模式
35
35
  * @default "contain"
@@ -112,14 +112,14 @@ interface LivePlayerProps extends StandardProps {
112
112
 
113
113
  declare namespace LivePlayerProps {
114
114
  /** mode 的合法值 */
115
- interface mode {
115
+ interface Mode {
116
116
  /** 直播 */
117
117
  live
118
118
  /** 实时通话,该模式时延更低 */
119
119
  RTC
120
120
  }
121
121
  /** orientation 的合法值 */
122
- interface orientation {
122
+ interface Orientation {
123
123
  /** 竖直 */
124
124
  vertical
125
125
  /** 水平 */
@@ -151,10 +151,10 @@ declare namespace LivePlayerProps {
151
151
  fullScreen: number | boolean
152
152
  }
153
153
  interface onNetStatusEventDetail {
154
- info: netStatus
154
+ info: NetStatus
155
155
  }
156
156
  /** 状态码 */
157
- interface status {
157
+ interface Status {
158
158
  /** 已经连接服务器 */
159
159
  2001
160
160
  /** 已经连接 RTMP 服务器,开始拉流 */
@@ -205,11 +205,11 @@ declare namespace LivePlayerProps {
205
205
  }
206
206
 
207
207
  /** 实时音视频播放。相关api:Taro.createLivePlayerContext
208
- *
208
+ *
209
209
  * 需要先通过类目审核,再在小程序管理后台,“设置”-“接口设置”中自助开通该组件权限。
210
210
  * @classification media
211
211
  * @supported weapp
212
- * @example
212
+ * @example_react
213
213
  * ```tsx
214
214
  * class App extends Components {
215
215
  * render () {
@@ -219,6 +219,12 @@ declare namespace LivePlayerProps {
219
219
  * }
220
220
  * }
221
221
  * ```
222
+ * @example_vue
223
+ * ```html
224
+ * <template>
225
+ * <live-player src="url" mode="live" :autoplay="true" />
226
+ * </template>
227
+ * ```
222
228
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/live-player.html
223
229
  */
224
230
  declare const LivePlayer: ComponentType<LivePlayerProps>
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import { StandardProps, CommonEventFunction, netStatus } from './common'
2
+ import { StandardProps, CommonEventFunction, NetStatus } from './common'
3
3
 
4
4
  /** 实时音视频录制。
5
5
  * 需要用户授权 scope.camera、scope.record
@@ -46,7 +46,7 @@ interface LivePusherProps extends StandardProps {
46
46
  * @default "vertical"
47
47
  * @supported weapp
48
48
  */
49
- orientation?: keyof LivePusherProps.orientation
49
+ orientation?: keyof LivePusherProps.Orientation
50
50
 
51
51
  /** 美颜,取值范围 0-9 ,0 表示关闭
52
52
  * @default 0
@@ -131,13 +131,13 @@ interface LivePusherProps extends StandardProps {
131
131
  * @default "auto"
132
132
  * @supported weapp
133
133
  */
134
- localMirror?: keyof LivePusherProps.localMirror
134
+ localMirror?: keyof LivePusherProps.LocalMirror
135
135
 
136
136
  /** 音频混响类型
137
137
  * @default 0
138
138
  * @supported weapp
139
139
  */
140
- audioReverbType?: keyof LivePusherProps.audioReverbType
140
+ audioReverbType?: keyof LivePusherProps.AudioReverbType
141
141
 
142
142
  /** 开启或关闭麦克风
143
143
  * @default true
@@ -161,7 +161,7 @@ interface LivePusherProps extends StandardProps {
161
161
  * @default "voicecall"
162
162
  * @supported weapp
163
163
  */
164
- audioVolumeType?: keyof LivePusherProps.audioVolumeType
164
+ audioVolumeType?: keyof LivePusherProps.AudioVolumeType
165
165
 
166
166
  /** 上推的视频流的分辨率宽度
167
167
  * @default 360
@@ -179,13 +179,13 @@ interface LivePusherProps extends StandardProps {
179
179
  * @default smooth
180
180
  * @supported weapp
181
181
  */
182
- beautyStyle?: keyof LivePusherProps.beautyStyleType
182
+ beautyStyle?: keyof LivePusherProps.BeautyStyleType
183
183
 
184
184
  /** 设置色彩滤镜
185
185
  * @default standard
186
186
  * @supported weapp
187
187
  */
188
- filter?: keyof LivePusherProps.filterType
188
+ filter?: keyof LivePusherProps.FilterType
189
189
 
190
190
  /** 状态变化事件,detail = {code}
191
191
  * @supported weapp
@@ -225,14 +225,14 @@ interface LivePusherProps extends StandardProps {
225
225
 
226
226
  declare namespace LivePusherProps {
227
227
  /** orientation 的合法值 */
228
- interface orientation {
228
+ interface Orientation {
229
229
  /** 竖直 */
230
230
  vertical
231
231
  /** 水平 */
232
232
  horizontal
233
233
  }
234
234
  /** localMirror 的合法值 */
235
- interface localMirror {
235
+ interface LocalMirror {
236
236
  /** 前置摄像头镜像,后置摄像头不镜像 */
237
237
  auto
238
238
  /** 前后置摄像头均镜像 */
@@ -241,7 +241,7 @@ declare namespace LivePusherProps {
241
241
  disable
242
242
  }
243
243
  /** audioReverbType 的合法值 */
244
- interface audioReverbType {
244
+ interface AudioReverbType {
245
245
  /** 关闭 */
246
246
  0
247
247
  /** KTV */
@@ -260,21 +260,21 @@ declare namespace LivePusherProps {
260
260
  7
261
261
  }
262
262
  /** audioVolumeType 的合法值 */
263
- interface audioVolumeType {
263
+ interface AudioVolumeType {
264
264
  /** 媒体音量 */
265
265
  media
266
266
  /** 通话音量 */
267
267
  voicecall
268
268
  }
269
269
  /** beautyStyleType 的合法值 */
270
- interface beautyStyleType {
270
+ interface BeautyStyleType {
271
271
  /** 光滑美颜 */
272
272
  smooth
273
273
  /** 自然美颜 */
274
274
  nature
275
275
  }
276
276
  /** filterType 的合法值 */
277
- interface filterType {
277
+ interface FilterType {
278
278
  /** 标准 */
279
279
  standard
280
280
  /** 粉嫩 */
@@ -304,7 +304,7 @@ declare namespace LivePusherProps {
304
304
  }
305
305
  interface onNetstatusEventDetail {
306
306
  /** 网络状态 */
307
- info: netStatus
307
+ info: NetStatus
308
308
  }
309
309
  interface onErrorEventDetail {
310
310
  /** 错误信息 */
@@ -324,7 +324,7 @@ declare namespace LivePusherProps {
324
324
  * 需要先通过类目审核,再在小程序管理后台,「开发」-「接口设置」中自助开通该组件权限。
325
325
  * @classification media
326
326
  * @supported weapp
327
- * @example
327
+ * @example_react
328
328
  * ```tsx
329
329
  * class App extends Components {
330
330
  * render () {
@@ -334,6 +334,12 @@ declare namespace LivePusherProps {
334
334
  * }
335
335
  * }
336
336
  * ```
337
+ * @example_vue
338
+ * ```html
339
+ * <template>
340
+ * <live-pusher url="url" mode="RTC" :autopush="true" />
341
+ * </template>
342
+ * ```
337
343
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/live-pusher.html
338
344
  */
339
345
  declare const LivePusher: ComponentType<LivePusherProps>
package/types/Map.d.ts CHANGED
@@ -499,14 +499,14 @@ declare namespace MapProps {
499
499
  end
500
500
  }
501
501
 
502
- interface causedByBegin {
502
+ interface CausedByBegin {
503
503
  /** 手势触发 */
504
504
  gesture
505
505
  /** 接口触发 */
506
506
  update
507
507
  }
508
508
 
509
- interface causedByEnd {
509
+ interface CausedByEnd {
510
510
  /** 拖动导致 */
511
511
  drag
512
512
  /** 缩放导致 */
@@ -523,7 +523,7 @@ declare namespace MapProps {
523
523
  /** 导致视野变化的原因
524
524
  * @remarks 有效值为 gesture(手势触发)、update(接口触发或调用更新接口导致)、drag(拖动导致)、scale(缩放导致)
525
525
  */
526
- causedBy: keyof (T extends 'begin' ? RegionChangeDetail.causedByBegin : RegionChangeDetail.causedByEnd)
526
+ causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
527
527
  /** 视野改变详情 */
528
528
  detail: regionChangeDetail<RegionChangeDetail.type>
529
529
  }
@@ -532,7 +532,7 @@ declare namespace MapProps {
532
532
  rotate: number
533
533
  /** 倾斜角度 */
534
534
  skew: number
535
- causedBy: keyof (T extends 'begin' ? RegionChangeDetail.causedByBegin : RegionChangeDetail.causedByEnd)
535
+ causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
536
536
  type: T | string
537
537
  scale: number
538
538
  centerLocation: point
@@ -551,7 +551,7 @@ declare namespace MapProps {
551
551
  /** 地图。相关api Taro.createMapContext。
552
552
  * @classification maps
553
553
  * @supported weapp, alipay, swan
554
- * @example
554
+ * @example_react
555
555
  * ```tsx
556
556
  * class App extends Component {
557
557
  * onTap () {}
@@ -562,6 +562,60 @@ declare namespace MapProps {
562
562
  * }
563
563
  * }
564
564
  * ```
565
+ * @example_vue
566
+ * ```html
567
+ * <template>
568
+ * <map
569
+ * id="map"
570
+ * style="width: 100%; height: 300px;"
571
+ * longitude="113.324520"
572
+ * latitude="23.099994"
573
+ * scale="14"
574
+ * :markers="markers"
575
+ * :polyline="polyline"
576
+ * :show-location="true"
577
+ * `@regionchange="regionchange"
578
+ * `@markertap="markertap"
579
+ * />
580
+ * </template>
581
+ *
582
+ * <script>
583
+ * export default {
584
+ * data() {
585
+ * return {
586
+ * markers: [{
587
+ * iconPath: "https://avatars2.githubusercontent.com/u/1782542?s=460&u=d20514a52100ed1f82282bcfca6f49052793c889&v=4",
588
+ * id: 0,
589
+ * latitude: 23.099994,
590
+ * longitude: 113.324520,
591
+ * width: 50,
592
+ * height: 50
593
+ * }],
594
+ * polyline: [{
595
+ * points: [{
596
+ * longitude: 113.3245211,
597
+ * latitude: 23.10229
598
+ * }, {
599
+ * longitude: 113.324520,
600
+ * latitude: 23.21229
601
+ * }],
602
+ * color:"#FF0000DD",
603
+ * width: 2,
604
+ * dottedLine: true
605
+ * }]
606
+ * }
607
+ * },
608
+ * methods: {
609
+ * regionchange(e) {
610
+ * console.log(e.type)
611
+ * },
612
+ * markertap(e) {
613
+ * console.log("markertap:", e.detail.markerId)
614
+ * }
615
+ * }
616
+ * }
617
+ * </script>
618
+ * ```
565
619
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/map.html#map
566
620
  */
567
621
  declare const Map: ComponentType<MapProps>
@@ -40,20 +40,39 @@ interface MatchMediaProps extends StandardProps {
40
40
 
41
41
  /** media query 匹配检测节点。可以指定一组 media query 规则,满足时,这个节点才会被展示。
42
42
  * 通过这个节点可以实现“页面宽高在某个范围时才展示某个区域”这样的效果。
43
- * 基础库 2.11.1 开始支持。
44
43
  * @supported weapp
45
- * @example
44
+ * @classification viewContainer
45
+ * @example_react
46
46
  * ```tsx
47
47
  * class App extends Components {
48
48
  * render () {
49
49
  * return (
50
- * <MatchMedia minWidth='400'>
51
- <View>title</View>
52
- </MatchMedia>
50
+ * <View>
51
+ * <MatchMedia minWidth="300" maxWidth="600">
52
+ * <view>当页面宽度在 300 ~ 500 px 之间时展示这里</view>
53
+ * </MatchMedia>
54
+ * <MatchMedia minHeight="400" orientation="landscape">
55
+ * <view>当页面高度不小于 400 px 且屏幕方向为纵向时展示这里</view>
56
+ * </MatchMedia>
57
+ * </View>
53
58
  * )
54
59
  * }
55
60
  * }
56
61
  * ```
62
+ * @example_vue
63
+ * ```html
64
+ * <template>
65
+ * <view class="components-page">
66
+ * <match-media min-width="300" max-width="500">
67
+ * <view>当页面宽度在 300 ~ 500 px 之间时展示这里</view>
68
+ * </match-media>
69
+ * <match-media min-height="400" orientation="landscape">
70
+ * <view>当页面高度不小于 400 px 且屏幕方向为纵向时展示这里</view>
71
+ * </match-media>
72
+ * </view>
73
+ * </template>
74
+ * ```
75
+ * @see https://developers.weixin.qq.com/miniprogram/dev/component/match-media.html
57
76
  */
58
77
  declare const MatchMedia: ComponentType<MatchMediaProps>
59
78
 
@@ -11,19 +11,25 @@ interface MovableAreaProps extends StandardProps {
11
11
 
12
12
  /** movable-view 的可移动区域
13
13
  * @classification viewContainer
14
- * @supported weapp
15
- * @example
14
+ * @supported weapp, rn
15
+ * @example_react
16
16
  * ```tsx
17
17
  * class App extends Components {
18
18
  * render () {
19
19
  * return (
20
20
  * <MovableArea style='height: 200px; width: 200px; background: red;'>
21
- * <MovableView style='height: 50px; width: 50px; background: blue;' direction='all'></MovableView>
21
+ * <MovableView style='height: 50px; width: 50px; background: blue;' direction='all'>旅行的意义</MovableView>
22
22
  * </MovableArea>
23
23
  * )
24
24
  * }
25
25
  * }
26
26
  * ```
27
+ * @example_vue
28
+ * ```html
29
+ * <movable-area style='height: 200px; width: 200px; background: red;'>
30
+ * <movable-view style='height: 50px; width: 50px; background: blue;' direction='all'>在路上</movable-view>
31
+ * </movable-area>
32
+ * ```
27
33
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/movable-area.html
28
34
  */
29
35
  declare const MovableArea: ComponentType<MovableAreaProps>
@@ -4,7 +4,7 @@ import { StandardProps, CommonEventFunction, TouchEventFunction } from './common
4
4
  interface MovableViewProps extends Omit<StandardProps, 'animation'> {
5
5
  /** movable-view 的移动方向,属性值有`all`、`vertical`、`horizontal`、`none`
6
6
  * @default none
7
- * @supported weapp
7
+ * @supported weapp, rn
8
8
  */
9
9
  direction?: 'all' | 'vertical' | 'horizontal' | 'none'
10
10
 
@@ -21,12 +21,12 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
21
21
  outOfBounds?: boolean
22
22
 
23
23
  /** 定义 x 轴方向的偏移,如果 x 的值不在可移动范围内,会自动移动到可移动范围;改变 x 的值会触发动画
24
- * @supported weapp
24
+ * @supported weapp, rn
25
25
  */
26
26
  x?: number | string
27
27
 
28
28
  /** 定义 y 轴方向的偏移,如果 y 的值不在可移动范围内,会自动移动到可移动范围;改变 y 的值会触发动画
29
- * @supported weapp
29
+ * @supported weapp, rn
30
30
  */
31
31
  y?: number | string
32
32
 
@@ -44,7 +44,7 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
44
44
 
45
45
  /** 是否禁用
46
46
  * @default false
47
- * @supported weapp
47
+ * @supported weapp, rn
48
48
  */
49
49
  disabled?: boolean
50
50
 
@@ -97,6 +97,14 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
97
97
  * @supported weapp
98
98
  */
99
99
  onVTouchMove?: TouchEventFunction
100
+ /** 开始拖动时触发
101
+ * @supported rn
102
+ */
103
+ onDragStart?: CommonEventFunction
104
+ /** 拖动结束时触发
105
+ * @supported rn
106
+ */
107
+ onDragEnd?: CommonEventFunction
100
108
  }
101
109
 
102
110
  declare namespace MovableViewProps {
@@ -135,8 +143,8 @@ declare namespace MovableViewProps {
135
143
 
136
144
  /** 可移动的视图容器,在页面中可以拖拽滑动。movable-view 必须在 movable-area 组件中,并且必须是直接子节点,否则不能移动。
137
145
  * @classification viewContainer
138
- * @supported weapp, swan, alipay
139
- * @example
146
+ * @supported weapp, swan, alipay, rn
147
+ * @example_react
140
148
  * ```tsx
141
149
  * class App extends Components {
142
150
  * render () {
@@ -148,6 +156,12 @@ declare namespace MovableViewProps {
148
156
  * }
149
157
  * }
150
158
  * ```
159
+ * @example_vue
160
+ * ```html
161
+ * <movable-area style='height: 200px; width: 200px; background: red;'>
162
+ * <movable-view style='height: 50px; width: 50px; background: blue;' direction='all'>带我走</movable-view>
163
+ * </movable-area>
164
+ * ```
151
165
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/movable-view.html
152
166
  */
153
167
  declare const MovableView: ComponentType<MovableViewProps>
@@ -6,7 +6,7 @@ interface NavigatorProps extends StandardProps {
6
6
  * @default "self"
7
7
  * @supported weapp, swan
8
8
  */
9
- target?: keyof NavigatorProps.target
9
+ target?: keyof NavigatorProps.Target
10
10
 
11
11
  /** 当前小程序内的跳转链接
12
12
  * @supported weapp, swan, alipay, tt
@@ -17,7 +17,7 @@ interface NavigatorProps extends StandardProps {
17
17
  * @default "navigate"
18
18
  * @supported weapp, swan, alipay, tt
19
19
  */
20
- openType?: keyof NavigatorProps.openType
20
+ openType?: keyof NavigatorProps.OpenType
21
21
 
22
22
  /** 当 open-type 为 'navigateBack' 时有效,表示回退的层数
23
23
  * @supported weapp, swan, tt
@@ -42,7 +42,7 @@ interface NavigatorProps extends StandardProps {
42
42
  /** 当 `target="miniProgram"` 时有效,要打开的小程序版本
43
43
  * @supported weapp, swan
44
44
  */
45
- version?: keyof NavigatorProps.version
45
+ version?: keyof NavigatorProps.Version
46
46
 
47
47
  /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
48
48
  * @default "navigator-hover"
@@ -86,17 +86,17 @@ interface NavigatorProps extends StandardProps {
86
86
 
87
87
  declare namespace NavigatorProps {
88
88
  /** target 的合法值 */
89
- interface target {
89
+ interface Target {
90
90
  /** 当前小程序 */
91
91
  self
92
92
  /** 其它小程序 */
93
93
  miniProgram
94
94
  }
95
95
  /** open-type 的合法值 */
96
- interface openType {
96
+ interface OpenType {
97
97
  /** 对应 Taro.navigateTo 或 Taro.navigateToMiniProgram 的功能 */
98
98
  navigate
99
- /** 对应 Taro.redirectTo 的功能 */
99
+ /** 对应 Taro.redirectTo 的功能 */
100
100
  redirect
101
101
  /** 对应 Taro.switchTab 的功能 */
102
102
  switchTab
@@ -108,7 +108,7 @@ declare namespace NavigatorProps {
108
108
  exit
109
109
  }
110
110
  /** version 的合法值 */
111
- interface version {
111
+ interface Version {
112
112
  /** 开发版 */
113
113
  develop
114
114
  /** 体验版 */
@@ -5,24 +5,24 @@ interface OfficialAccountProps extends StandardProps {
5
5
  /** 组件加载成功时触发
6
6
  * @supported weapp
7
7
  */
8
- onLoad?: CommonEventFunction<OfficialAccountProps.detail>
8
+ onLoad?: CommonEventFunction<OfficialAccountProps.Detail>
9
9
 
10
10
  /** 组件加载失败时触发
11
11
  * @supported weapp
12
12
  */
13
- onError?: CommonEventFunction<OfficialAccountProps.detail>
13
+ onError?: CommonEventFunction<OfficialAccountProps.Detail>
14
14
  }
15
15
 
16
16
  declare namespace OfficialAccountProps {
17
17
  /** detail 对象 */
18
- interface detail {
18
+ interface Detail {
19
19
  /** 状态码 */
20
20
  status: number
21
21
  /** 错误信息 */
22
22
  errMsg: string
23
23
  }
24
24
  /** status 有效值 */
25
- interface status {
25
+ interface Status {
26
26
  /** 网络错误 */
27
27
  '-2'
28
28
  /** 数据解析错误 */
@@ -54,12 +54,6 @@ declare namespace OfficialAccountProps {
54
54
  * 当小程序从扫小程序码场景(场景值1047,场景值1124)打开时
55
55
  * 当小程序从聊天顶部场景(场景值1089)中的「最近使用」内打开时,若小程序之前未被销毁,则该组件保持上一次打开小程序时的状态
56
56
  * 当从其他小程序返回小程序(场景值1038)时,若小程序之前未被销毁,则该组件保持上一次打开小程序时的状态
57
- * 为便于开发者调试,基础库 2.7.3 版本起开发版小程序增加以下场景展示公众号组件:
58
- *
59
- * 开发版小程序从扫二维码(场景值 1011)打开 — 体验版小程序打开
60
- * 组件限定最小宽度为 300px,高度为定值 84px。
61
- *
62
- * 每个页面只能配置一个该组件。
63
57
  * @classification open
64
58
  * @supported weapp
65
59
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/official-account.html
@@ -5,7 +5,7 @@ interface OpenDataProps extends StandardProps {
5
5
  /** 开放数据类型
6
6
  * @supported weapp
7
7
  */
8
- type: keyof OpenDataProps.type
8
+ type: keyof OpenDataProps.Type
9
9
  /** 当 type="groupName" 时生效, 群id
10
10
  * @supported weapp
11
11
  */
@@ -14,7 +14,7 @@ interface OpenDataProps extends StandardProps {
14
14
  * @default "en"
15
15
  * @supported weapp
16
16
  */
17
- lang?: keyof OpenDataProps.lang
17
+ lang?: keyof OpenDataProps.Lang
18
18
 
19
19
  /** 数据为空时的默认文案
20
20
  * @supported weapp
@@ -34,7 +34,7 @@ interface OpenDataProps extends StandardProps {
34
34
 
35
35
  declare namespace OpenDataProps {
36
36
  /** type 的合法值 */
37
- interface type {
37
+ interface Type {
38
38
  /** 拉取群名称 */
39
39
  groupName
40
40
  /** 用户昵称 */
@@ -53,7 +53,7 @@ declare namespace OpenDataProps {
53
53
  userLanguage
54
54
  }
55
55
  /** lang 的合法值 */
56
- interface lang {
56
+ interface Lang {
57
57
  /** 英文 */
58
58
  en
59
59
  /** 简体中文 */
@@ -66,7 +66,7 @@ declare namespace OpenDataProps {
66
66
  /** 用于展示微信开放的数据
67
67
  * @classification open
68
68
  * @supported weapp
69
- * @example
69
+ * @example_react
70
70
  * ```tsx
71
71
  * class App extends Component {
72
72
  * render () {
@@ -76,6 +76,12 @@ declare namespace OpenDataProps {
76
76
  * }
77
77
  * }
78
78
  * ```
79
+ * @example_vue
80
+ * ```html
81
+ * <template>
82
+ * <open-data type="userAvatarUrl" />
83
+ * </template>
84
+ * ```
79
85
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
80
86
  */
81
87
  declare const OpenData: ComponentType<OpenDataProps>
@@ -30,7 +30,7 @@ interface PageContainerProps extends StandardProps {
30
30
  * @default bottom
31
31
  * @supported weapp
32
32
  */
33
- position?: keyof PageContainerProps.position
33
+ position?: keyof PageContainerProps.Position
34
34
 
35
35
  /** 是否显示圆角
36
36
  * @default false
@@ -91,10 +91,15 @@ interface PageContainerProps extends StandardProps {
91
91
  }
92
92
 
93
93
  declare namespace PageContainerProps {
94
- interface position {
94
+ /** 弹出位置 */
95
+ interface Position {
96
+ /** 上方弹出 */
95
97
  top
98
+ /** 下方弹出 */
96
99
  bottom
100
+ /** 左边弹出 */
97
101
  left
102
+ /** 右边弹出 */
98
103
  right
99
104
  }
100
105
  }
@@ -108,6 +113,7 @@ declare namespace PageContainerProps {
108
113
  * 1. tip: 当前页面最多只有 1 个容器,若已存在容器的情况下,无法增加新的容器
109
114
  * 2. tip: wx.navigateBack 无法在页面栈顶调用,此时没有上一级页面
110
115
  * @classification viewContainer
116
+ * @supported weapp
111
117
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html
112
118
  */
113
119
  declare const PageContainer: ComponentType<PageContainerProps>