@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
@@ -5,38 +5,31 @@ interface MatchMediaProps extends StandardProps {
5
5
  * @supported weapp, alipay
6
6
  */
7
7
  minWidth?: number
8
-
9
8
  /** 页面最大宽度( px 为单位)
10
9
  * @supported weapp, alipay
11
10
  */
12
11
  maxWidth?: number
13
-
14
12
  /** 页面宽度( px 为单位)
15
13
  * @supported weapp, alipay
16
14
  */
17
15
  width?: number
18
-
19
16
  /** 页面最小高度( px 为单位)
20
17
  * @supported weapp, alipay
21
18
  */
22
19
  minHeight?: number
23
-
24
20
  /** 页面最大高度( px 为单位)
25
21
  * @supported weapp, alipay
26
22
  */
27
23
  maxHeight?: number
28
-
29
24
  /** 页面高度( px 为单位)
30
25
  * @supported weapp, alipay
31
26
  */
32
27
  height?: number
33
-
34
28
  /** 屏幕方向( landscape 或 portrait )
35
29
  * @supported weapp, alipay
36
30
  */
37
31
  orientation?: string
38
32
  }
39
-
40
33
  /** media query 匹配检测节点。可以指定一组 media query 规则,满足时,这个节点才会被展示。
41
34
  * 通过这个节点可以实现“页面宽高在某个范围时才展示某个区域”这样的效果。
42
35
  * @supported weapp, alipay
@@ -7,7 +7,6 @@ interface MovableAreaProps extends StandardProps {
7
7
  */
8
8
  scaleArea?: boolean
9
9
  }
10
-
11
10
  /** movable-view 的可移动区域
12
11
  * @classification viewContainer
13
12
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
@@ -6,143 +6,117 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
6
6
  * @supported weapp, alipay, swan, tt, qq, h5, rn
7
7
  */
8
8
  direction?: 'all' | 'vertical' | 'horizontal' | 'none'
9
-
10
9
  /** movable-view 是否带有惯性
11
10
  * @default false
12
11
  * @supported weapp, alipay, swan, tt, qq, h5
13
12
  */
14
13
  inertia?: boolean
15
-
16
14
  /** 超过可移动区域后,movable-view 是否还可以移动
17
15
  * @default false
18
16
  * @supported weapp, alipay, swan, tt, qq, h5
19
17
  */
20
18
  outOfBounds?: boolean
21
-
22
19
  /** 定义 x 轴方向的偏移,如果 x 的值不在可移动范围内,会自动移动到可移动范围;改变 x 的值会触发动画
23
20
  * @supported weapp, alipay, swan, tt, qq, h5, rn
24
21
  */
25
22
  x?: number | string
26
-
27
23
  /** 定义 y 轴方向的偏移,如果 y 的值不在可移动范围内,会自动移动到可移动范围;改变 y 的值会触发动画
28
24
  * @supported weapp, alipay, swan, tt, qq, h5, rn
29
25
  */
30
26
  y?: number | string
31
-
32
27
  /** 阻尼系数,用于控制x或y改变时的动画和过界回弹的动画,值越大移动越快
33
28
  * @default 20
34
29
  * @supported weapp, alipay, swan, tt, qq, h5
35
30
  */
36
31
  damping?: number
37
-
38
32
  /** 摩擦系数,用于控制惯性滑动的动画,值越大摩擦力越大,滑动越快停止;必须大于 0,否则会被设置成默认值
39
33
  * @default 2
40
34
  * @supported weapp, alipay, swan, tt, qq, h5
41
35
  */
42
36
  friction?: number
43
-
44
37
  /** 是否禁用
45
38
  * @default false
46
39
  * @supported weapp, alipay, swan, tt, qq, h5, rn
47
40
  */
48
41
  disabled?: boolean
49
-
50
42
  /** 是否支持双指缩放,默认缩放手势生效区域是在 movable-view 内
51
43
  * @default false
52
44
  * @supported weapp, alipay, swan, tt, qq, h5
53
45
  */
54
46
  scale?: boolean
55
-
56
47
  /** 定义缩放倍数最小值
57
48
  * @default 0.5
58
49
  * @supported weapp, alipay, swan, tt, qq, h5
59
50
  */
60
51
  scaleMin?: number
61
-
62
52
  /** 定义缩放倍数最大值
63
53
  * @default 10
64
54
  * @supported weapp, alipay, swan, tt, qq, h5
65
55
  */
66
56
  scaleMax?: number
67
-
68
57
  /** 定义缩放倍数,取值范围为 0.5 - 10
69
58
  * @default 1
70
59
  * @supported weapp, alipay, swan, tt, qq, h5
71
60
  */
72
61
  scaleValue?: number
73
-
74
62
  /** 是否使用动画
75
63
  * @default true
76
64
  * @supported weapp, alipay, swan, tt, qq, h5
77
65
  */
78
66
  animation?: boolean
79
-
80
67
  /** 拖动过程中触发的事件
81
68
  * @supported weapp, alipay, swan, tt, qq
82
69
  */
83
70
  onChange?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
84
-
85
71
  /** 拖动结束触发的事件
86
72
  * @supported alipay
87
73
  */
88
74
  onChangeEnd?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
89
-
90
75
  /** 开始拖动时触发
91
76
  * @supported rn
92
77
  */
93
78
  onDragStart?: CommonEventFunction
94
-
95
79
  /** 拖动结束时触发
96
80
  * @supported rn
97
81
  */
98
82
  onDragEnd?: CommonEventFunction
99
-
100
83
  /** 缩放过程中触发的事件
101
84
  * @supported weapp, alipay, swan, tt, qq, h5
102
85
  */
103
86
  onScale?: CommonEventFunction<MovableViewProps.onScaleEventDetail>
104
-
105
87
  /** 触摸动作开始,事件会向父节点传递。
106
88
  * @supported alipay
107
89
  */
108
90
  onTouchStart?: CommonEventFunction
109
-
110
91
  /** 触摸动作开始,事件仅作用于组件,不向父节点传递。
111
92
  * @supported alipay
112
93
  */
113
94
  onTouchMove?: CommonEventFunction
114
-
115
95
  /** 手指触摸动作结束
116
96
  * @supported alipay, h5
117
97
  * @h5 此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理
118
98
  */
119
99
  onTouchEnd?: TouchEventFunction
120
-
121
100
  /** 触摸动作被打断,如来电提醒、弹窗。
122
101
  * @supported alipay
123
102
  */
124
103
  onTouchCancel?: CommonEventFunction
125
-
126
104
  /** 初次手指触摸后移动为横向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
127
105
  * @supported weapp, swan, tt, h5
128
106
  */
129
107
  onHTouchMove?: TouchEventFunction
130
-
131
108
  /** 初次手指触摸后移动为纵向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
132
109
  * @supported weapp, swan, tt, h5
133
110
  */
134
111
  onVTouchMove?: TouchEventFunction
135
-
136
112
  /** 触摸移动事件,事件仅作用于组件,不向父节点传递。
137
113
  * @supported alipay
138
114
  */
139
115
  catchTouchStart?: CommonEventFunction
140
-
141
116
  /** 触摸移动事件,事件仅作用于组件,不向父节点传递。
142
117
  * @supported alipay
143
118
  */
144
119
  catchTouchMove?: CommonEventFunction
145
-
146
120
  /** 触摸动作结束,事件仅作用于组件,不向父节点传递。
147
121
  * @supported alipay
148
122
  */
@@ -153,41 +127,32 @@ declare namespace MovableViewProps {
153
127
  interface TChangeSource {
154
128
  /** 拖动 */
155
129
  touch
156
-
157
130
  /** 超出移动范围 */
158
131
  'touch-out-of-bounds'
159
-
160
132
  /** 超出移动范围后的回弹 */
161
133
  'out-of-bounds'
162
-
163
134
  /** 惯性 */
164
135
  friction
165
-
166
136
  /** setData */
167
137
  ''
168
138
  }
169
139
  interface onChangeEventDetail {
170
140
  /** X 坐标 */
171
141
  x: number
172
-
173
142
  /** Y 坐标 */
174
143
  y: number
175
-
176
144
  /** 触发事件 */
177
145
  source: keyof MovableViewProps.TChangeSource
178
146
  }
179
147
  interface onScaleEventDetail {
180
148
  /** X 坐标 */
181
149
  x: number
182
-
183
150
  /** Y 坐标 */
184
151
  y: number
185
-
186
152
  /** 缩放比例 */
187
153
  scale: number
188
154
  }
189
155
  }
190
-
191
156
  /** 可移动的视图容器,在页面中可以拖拽滑动。movable-view 必须在 movable-area 组件中,并且必须是直接子节点,否则不能移动。
192
157
  * @classification viewContainer
193
158
  * @supported weapp, alipay, swan, tt, qq, h5, rn
@@ -5,35 +5,29 @@ interface NavigationBarProps extends StandardProps {
5
5
  * @supported weapp
6
6
  */
7
7
  title?: string
8
-
9
8
  /** 是否在导航条显示 loading 加载提示
10
9
  * @supported weapp
11
10
  */
12
11
  loading?: boolean
13
-
14
12
  /** 导航条前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
15
13
  * @supported weapp
16
14
  */
17
15
  frontColor?: string
18
-
19
16
  /** 导航条背景颜色值,有效值为十六进制颜色
20
17
  * @supported weapp
21
18
  */
22
19
  backgroundColor?: string
23
-
24
20
  /** 改变导航栏颜色时的动画时长,默认为 0 (即没有动画效果)
25
21
  * @default 0
26
22
  * @supported weapp
27
23
  */
28
24
  colorAnimationDuration?: string
29
-
30
25
  /** 改变导航栏颜色时的动画方式,支持 linear 、 easeIn 、 easeOut 和 easeInOut
31
26
  * @default "linear"
32
27
  * @supported weapp
33
28
  */
34
29
  colorAnimationTimingFunc?: 'linear' | 'easeIn' | 'easeOut' | 'easeInOut'
35
30
  }
36
-
37
31
  /** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。
38
32
  * 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。
39
33
  * @classification navig
@@ -6,87 +6,71 @@ interface NavigatorProps extends StandardProps {
6
6
  * @supported weapp, swan, qq
7
7
  */
8
8
  target?: keyof NavigatorProps.Target
9
-
10
9
  /** 当前小程序内的跳转链接
11
10
  * @supported weapp, alipay, swan, tt, qq, jd, h5
12
11
  */
13
12
  url?: string
14
-
15
13
  /** 跳转方式
16
14
  * @default "navigate"
17
15
  * @supported weapp, alipay, swan, tt, qq, jd, h5
18
16
  */
19
17
  openType?: keyof NavigatorProps.OpenType
20
-
21
18
  /** 当 open-type 为 'navigateBack' 时有效,表示回退的层数
22
19
  * @supported weapp, swan, tt, qq, jd, h5
23
20
  */
24
21
  delta?: number
25
-
26
22
  /** 当 `target="miniProgram"` 时有效,要打开的小程序 appId
27
23
  * @supported weapp, swan, qq
28
24
  */
29
25
  appId?: string
30
-
31
26
  /** 当 `target="miniProgram"` 时有效,打开的页面路径,如果为空则打开首页
32
27
  * @supported weapp, swan, qq
33
28
  */
34
29
  path?: string
35
-
36
30
  /** 当 `target="miniProgram"` 时有效,需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch()`,`App.onShow()` 中获取到这份数据.
37
31
  * @supported weapp, swan, qq
38
32
  */
39
33
  extraData?: object
40
-
41
34
  /** 当 `target="miniProgram"` 时有效,要打开的小程序版本
42
35
  * @supported weapp, swan, qq
43
36
  */
44
37
  version?: keyof NavigatorProps.Version
45
-
46
38
  /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
47
39
  * @default "navigator-hover"
48
40
  * @supported weapp, alipay, swan, tt, qq, jd, h5
49
41
  */
50
42
  hoverClass?: string
51
-
52
43
  /** 指定是否阻止本节点的祖先节点出现点击态
53
44
  * @default false
54
45
  * @supported weapp, swan, tt, qq, jd
55
46
  */
56
47
  hoverStopPropagation?: boolean
57
-
58
48
  /** 按住后多久出现点击态,单位毫秒
59
49
  * @default 50
60
50
  * @supported weapp, alipay, swan, tt, qq, jd
61
51
  */
62
52
  hoverStartTime?: number
63
-
64
53
  /** 手指松开后点击态保留时间,单位毫秒
65
54
  * @default 600
66
55
  * @supported weapp, alipay, swan, tt, qq, jd
67
56
  */
68
57
  hoverStayTime?: number
69
-
70
58
  /** 当target="miniProgram"时有效,当传递该参数后,可以不传 app-id 和 path。链接可以通过【小程序菜单】->【复制链接】获取。
71
59
  * @supported weapp
72
60
  */
73
61
  shortLink?: string
74
-
75
62
  /** 无障碍访问,(属性)元素的额外描述
76
63
  * @supported qq
77
64
  */
78
65
  ariaLabel?: string
79
-
80
66
  /** 当 `target="miniProgram"` 时有效,跳转小程序成功
81
67
  * @supported weapp, swan, qq, h5
82
68
  */
83
69
  onSuccess?: CommonEventFunction
84
-
85
70
  /** 当 `target="miniProgram"` 时有效,跳转小程序失败
86
71
  * @supported weapp, swan, qq, h5
87
72
  */
88
73
  onFail?: CommonEventFunction
89
-
90
74
  /** 当 `target="miniProgram"` 时有效,跳转小程序完成
91
75
  * @supported weapp, swan, qq, h5
92
76
  */
@@ -97,45 +81,34 @@ declare namespace NavigatorProps {
97
81
  interface Target {
98
82
  /** 当前小程序 */
99
83
  self
100
-
101
84
  /** 其它小程序 */
102
85
  miniProgram
103
86
  }
104
-
105
87
  /** open-type 的合法值 */
106
88
  interface OpenType {
107
89
  /** 对应 Taro.navigateTo 或 Taro.navigateToMiniProgram 的功能 */
108
90
  navigate
109
-
110
91
  /** 对应 Taro.redirectTo 的功能 */
111
92
  redirect
112
-
113
93
  /** 对应 Taro.switchTab 的功能 */
114
94
  switchTab
115
-
116
95
  /** 对应 Taro.reLaunch 的功能 */
117
96
  reLaunch
118
-
119
97
  /** 对应 Taro.navigateBack 的功能 */
120
98
  navigateBack
121
-
122
99
  /** 退出小程序,`target="miniProgram"` 时生效 */
123
100
  exit
124
101
  }
125
-
126
102
  /** version 的合法值 */
127
103
  interface Version {
128
104
  /** 开发版 */
129
105
  develop
130
-
131
106
  /** 体验版 */
132
107
  trial
133
-
134
108
  /** 正式版,仅在当前小程序为开发版或体验版时此参数有效;如果当前小程序是正式版,则打开的小程序必定是正式版。 */
135
109
  release
136
110
  }
137
111
  }
138
-
139
112
  /** 页面链接
140
113
  * @classification navig
141
114
  * @supported weapp, alipay, swan, tt, qq, jd, harmony, h5
@@ -5,7 +5,6 @@ interface OfficialAccountProps extends StandardProps {
5
5
  * @supported weapp
6
6
  */
7
7
  onLoad?: CommonEventFunction<OfficialAccountProps.Detail>
8
-
9
8
  /** 组件加载失败时触发
10
9
  * @supported weapp
11
10
  */
@@ -16,42 +15,31 @@ declare namespace OfficialAccountProps {
16
15
  interface Detail {
17
16
  /** 状态码 */
18
17
  status: number
19
-
20
18
  /** 错误信息 */
21
19
  errMsg: string
22
20
  }
23
-
24
21
  /** status 有效值 */
25
22
  interface Status {
26
23
  /** 网络错误 */
27
24
  '-2'
28
-
29
25
  /** 数据解析错误 */
30
26
  '-1'
31
-
32
27
  /** 加载成功 */
33
28
  0
34
-
35
29
  /** 小程序关注公众号功能被封禁 */
36
30
  1
37
-
38
31
  /** 关联公众号被封禁 */
39
32
  2
40
-
41
33
  /** 关联关系解除或未选中关联公众号 */
42
34
  3
43
-
44
35
  /** 未开启关注公众号功能 */
45
36
  4
46
-
47
37
  /** 场景值错误 */
48
38
  5
49
-
50
39
  /** 重复创建 */
51
40
  6
52
41
  }
53
42
  }
54
-
55
43
  /** 公众号关注组件。当用户扫小程序码打开小程序时,开发者可在小程序内配置公众号关注组件,方便用户快捷关注公众号,可嵌套在原生组件内。
56
44
  *
57
45
  * Tips
@@ -5,48 +5,39 @@ interface OpenDataProps extends StandardProps {
5
5
  * @supported weapp, swan, tt, qq
6
6
  */
7
7
  type: keyof OpenDataProps.Type
8
-
9
8
  /** 当 type="groupName" 时生效, 群id
10
9
  * @supported weapp
11
10
  */
12
11
  openGid?: string
13
-
14
12
  /** 当 type="user*" 时生效,以哪种语言展示 userInfo
15
13
  * @default "en"
16
14
  * @supported weapp, qq
17
15
  */
18
16
  lang?: keyof OpenDataProps.Lang
19
-
20
17
  /** 数据为空时的默认文案
21
18
  * @supported weapp, tt
22
19
  */
23
20
  defaultText?: string
24
-
25
21
  /** 用户头像为空时的默认图片,支持相对路径和网络图片路径
26
22
  * @supported weapp, tt
27
23
  */
28
24
  defaultAvatar?: string
29
-
30
25
  /** 当数据为空且未设置默认值时,是否显示官方默认值
31
26
  * @supported tt
32
27
  */
33
28
  useEmptyValue?: string
34
-
35
29
  /** 当 type=groupCloudStorage 时有效,群分享对应的 shareTicket
36
30
  * @supported qq
37
31
  */
38
32
  shareTicket?: string
39
-
40
33
  /** 当 type=*CloudStorage 时有效,指定要拉取的 key 列表
41
34
  * @supported qq
42
35
  */
43
36
  keyList?: string
44
-
45
37
  /** 当 type=*CloudStorage 时有效,从主域透传给开放数据域的数据,会自动注入到自定义开放数据域组件的 properties 中
46
38
  * @supported qq
47
39
  */
48
40
  componentData?: string
49
-
50
41
  /** 群名称或用户信息为空时触发
51
42
  * @supported weapp, tt, qq
52
43
  */
@@ -57,42 +48,31 @@ declare namespace OpenDataProps {
57
48
  interface Type {
58
49
  /** 拉取群名称 */
59
50
  groupName
60
-
61
51
  /** 用户昵称 */
62
52
  userNickName
63
-
64
53
  /** 用户头像 */
65
54
  userAvatarUrl
66
-
67
55
  /** 用户性别 */
68
56
  userGender
69
-
70
57
  /** 用户所在城市 */
71
58
  userCity
72
-
73
59
  /** 用户所在省份 */
74
60
  userProvince
75
-
76
61
  /** 用户所在国家 */
77
62
  userCountry
78
-
79
63
  /** 用户的语言 */
80
64
  userLanguage
81
65
  }
82
-
83
66
  /** lang 的合法值 */
84
67
  interface Lang {
85
68
  /** 英文 */
86
69
  en
87
-
88
70
  /** 简体中文 */
89
71
  zh_CN
90
-
91
72
  /** 繁体中文 */
92
73
  zh_TW
93
74
  }
94
75
  }
95
-
96
76
  /** 用于展示平台开放的数据
97
77
  * @classification open
98
78
  * @supported weapp, swan, tt, qq
@@ -6,93 +6,76 @@ interface PageContainerProps extends StandardProps {
6
6
  * @supported weapp, alipay, rn
7
7
  */
8
8
  show?: boolean
9
-
10
9
  /** 动画时长,单位毫秒
11
10
  * @default 300
12
11
  * @supported weapp, alipay, rn
13
12
  */
14
13
  duration?: number
15
-
16
14
  /** z-index 层级
17
15
  * @default 100
18
16
  * @supported weapp, alipay
19
17
  */
20
18
  zIndex?: number
21
-
22
19
  /** 是否显示遮罩层
23
20
  * @default true
24
21
  * @supported weapp, alipay, rn
25
22
  */
26
23
  overlay?: boolean
27
-
28
24
  /** 弹出位置,可选值为 top bottom right center
29
25
  * @default bottom
30
26
  * @supported weapp, alipay, rn
31
27
  */
32
28
  position?: keyof PageContainerProps.Position
33
-
34
29
  /** 是否显示圆角
35
30
  * @default false
36
31
  * @supported weapp, alipay, rn
37
32
  */
38
33
  round?: boolean
39
-
40
34
  /** 自定义遮罩层样式
41
35
  * @supported weapp, alipay, rn
42
36
  */
43
37
  overlayStyle?: string
44
-
45
38
  /** 自定义弹出层样式
46
39
  * @supported weapp, alipay, rn
47
40
  */
48
41
  customStyle?: string
49
-
50
42
  /** 是否在下滑一段距离后关闭
51
43
  * @supported weapp, alipay
52
44
  * @default false
53
45
  */
54
46
  closeOnSlideDown?: boolean
55
-
56
47
  /** 进入前触发
57
48
  * @supported weapp, alipay, rn
58
49
  */
59
50
  onBeforeEnter?: CommonEventFunction
60
-
61
51
  /** 进入中触发
62
52
  * @supported weapp, alipay, rn
63
53
  */
64
54
  onEnter?: CommonEventFunction
65
-
66
55
  /** 进入后触发
67
56
  * @supported weapp, alipay, rn
68
57
  */
69
58
  onAfterEnter?: CommonEventFunction
70
-
71
59
  /** 离开前触发
72
60
  * @supported weapp, alipay, rn
73
61
  */
74
62
  onBeforeLeave?: CommonEventFunction
75
-
76
63
  /** 离开中触发
77
64
  * @supported weapp, alipay, rn
78
65
  */
79
66
  onLeave?: CommonEventFunction
80
-
81
67
  /** 离开后触发
82
68
  * @supported weapp, alipay, rn
83
69
  */
84
70
  onAfterLeave?: CommonEventFunction
85
-
86
71
  /** 点击遮罩层时触发
87
72
  * @supported weapp, alipay
88
73
  */
89
74
  onClickOverlay?: CommonEventFunction
90
-
91
75
  /** 进入被打断时触发(通过 a: if 打断时不会触发)。
92
76
  * @supported alipay
93
77
  */
94
78
  onEnterCancelled?: CommonEventFunction
95
-
96
79
  /** 离开被打断时触发(通过 a: if 打断时不会触发)。
97
80
  * @supported alipay
98
81
  */
@@ -103,18 +86,14 @@ declare namespace PageContainerProps {
103
86
  interface Position {
104
87
  /** 上方弹出 */
105
88
  top
106
-
107
89
  /** 下方弹出 */
108
90
  bottom
109
-
110
91
  /** 右边弹出 */
111
92
  right
112
-
113
93
  /** 中央弹出 */
114
94
  center
115
95
  }
116
96
  }
117
-
118
97
  /** 页面容器
119
98
  *
120
99
  * 小程序如果在页面内进行复杂的界面设计(如在页面内弹出半屏的弹窗、在页面内加载一个全屏的子页面等),用户进行返回操作会直接离开当前页面,不符合用户预期,预期应为关闭当前弹出的组件。