@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
@@ -3,12 +3,11 @@ import { StandardProps } from './common'
3
3
  interface RootPortalProps extends StandardProps {
4
4
  /**
5
5
  * 是否从页面中脱离出来
6
- * @supported weapp
6
+ * @supported weapp, alipay
7
7
  * @default true
8
8
  */
9
9
  enable?: boolean
10
10
  }
11
-
12
11
  /** root-portal
13
12
  * 使整个子树从页面中脱离出来,类似于在 CSS 中使用 fixed position 的效果。主要用于制作弹窗、弹出层等。
14
13
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/root-portal.html
@@ -5,96 +5,80 @@ interface RtcRoomProps extends StandardProps {
5
5
  * @supported swan
6
6
  */
7
7
  id?: string
8
-
9
8
  /** 是否开启摄像头
10
9
  * @supported swan
11
10
  * @default true
12
11
  */
13
12
  enableCamera?: boolean
14
-
15
13
  /** 是否开启摄像头自动对焦
16
14
  * @supported swan
17
15
  * @default true
18
16
  */
19
17
  enableAutoFocus?: boolean
20
-
21
18
  /** 是否支持双手滑动调整摄像头聚焦
22
19
  * @supported swan
23
20
  * @default false
24
21
  */
25
22
  enableZoom?: boolean
26
-
27
23
  /** 设置前置还是后置摄像头,有效值:front、back
28
24
  * @supported swan
29
25
  * @default "front"
30
26
  */
31
27
  devicePosition?: 'front' | 'back'
32
-
33
28
  /** 是否开启麦克风
34
29
  * @supported swan
35
30
  * @default true
36
31
  */
37
32
  enableMic?: boolean
38
-
39
33
  /** 是否开启音频自动增益
40
34
  * @supported swan
41
35
  * @default false
42
36
  */
43
37
  enableAgc?: boolean
44
-
45
38
  /** 是否开启音频噪声抑制
46
39
  * @supported swan
47
40
  * @default false
48
41
  */
49
42
  enableAns?: boolean
50
-
51
43
  /** 最大码率
52
44
  * @supported swan
53
45
  * @default 900
54
46
  */
55
47
  bitrate?: number
56
-
57
48
  /** 视频分辨率宽
58
49
  * @supported swan
59
50
  * @default 360
60
51
  */
61
52
  videoWidth?: number
62
-
63
53
  /** 视频分辨率高
64
54
  * @supported swan
65
55
  * @default 640
66
56
  */
67
57
  videoHeight?: number
68
-
69
58
  /** 设置远端看到的画面的镜像效果,该属性的变化不会影响到本地画面,仅影响远端看到的画面效果
70
59
  * @supported swan
71
60
  * @default false
72
61
  */
73
62
  enableRemoteMirror?: boolean
74
-
75
63
  /** 设置本地摄像头预览画面的镜像效果,有效值:auto、enable、disable
76
64
  * @supported swan
77
65
  * @default "auto"
78
66
  */
79
67
  localMirror?: 'auto' | 'enable' | 'disable'
80
-
81
68
  /** 设置声音输出方式,有效值:speaker、ear
82
69
  * @supported swan
83
70
  * @default "speaker"
84
71
  */
85
72
  soundMode?: 'speaker' | 'ear'
86
-
87
73
  /** 房间状态变化事件,参考下方状态码,detail = { code, msg, userInfo }
88
74
  * @supported swan
89
75
  */
90
76
  onStateChange?: CommonEventFunction
91
-
92
77
  /** 错误事件。参考下方错误码,detail = { errMsg, errCode }
93
78
  * @supported swan
94
79
  */
95
80
  onError?: CommonEventFunction
96
81
  }
97
-
98
82
  /** 实时音视频通话房间
99
83
  * @classification media
100
84
  * @supported swan
@@ -5,18 +5,15 @@ interface RtcRoomItemProps extends StandardProps {
5
5
  * @supported swan
6
6
  */
7
7
  id?: string
8
-
9
8
  /** 指定 item 展示本地 / 远端画面,有效值:local、remote ,不可动态变更
10
9
  * @supported swan
11
10
  */
12
11
  type?: string
13
-
14
12
  /** item 展示画面的用户 id
15
13
  * @supported swan
16
14
  */
17
15
  userId?: number
18
16
  }
19
-
20
17
  /** 实时音视频通话画面
21
18
  * @classification media
22
19
  * @supported swan
@@ -7,222 +7,224 @@ interface ScrollViewProps extends StandardProps {
7
7
  * @rn 二选一
8
8
  */
9
9
  scrollX?: boolean
10
-
11
10
  /** 允许纵向滚动
12
11
  * @default false
13
12
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
14
13
  * @rn 二选一
15
14
  */
16
15
  scrollY?: boolean
17
-
18
16
  /** 距顶部/左边多远时(单位px),触发 scrolltoupper 事件
19
17
  * @default 50
20
18
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
21
19
  */
22
20
  upperThreshold?: number
23
-
24
21
  /** 距底部/右边多远时(单位px),触发 scrolltolower 事件
25
22
  * @default 50
26
23
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
27
24
  */
28
25
  lowerThreshold?: number
29
-
30
26
  /** 设置竖向滚动条位置
31
27
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
32
28
  */
33
29
  scrollTop?: number
34
-
35
30
  /** 设置横向滚动条位置
36
31
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
37
32
  */
38
33
  scrollLeft?: number
39
-
40
34
  /** 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
41
35
  * @supported weapp, alipay, swan, tt, qq, jd, h5
42
36
  */
43
37
  scrollIntoView?: string
44
-
45
38
  /** 在设置滚动条位置时使用动画过渡
46
39
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
47
40
  * @default false
48
41
  */
49
42
  scrollWithAnimation?: boolean
50
-
51
43
  /** iOS 点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向
52
44
  * @supported weapp, alipay, swan, qq, jd, rn
53
45
  * @default false
54
46
  */
55
47
  enableBackToTop?: boolean
56
-
57
48
  /** 启用 flexbox 布局。开启后,当前节点声明了 `display: flex` 就会成为 flex container,并作用于其孩子节点。
58
49
  * @supported weapp
59
50
  * @default false
60
51
  */
61
52
  enableFlex?: boolean
62
-
63
53
  /** 开启 scroll anchoring 特性,即控制滚动位置不随内容变化而抖动,仅在 iOS 下生效,安卓下可参考 CSS `overflow-anchor` 属性。
64
54
  * @supported weapp
65
55
  * @default false
66
56
  */
67
57
  scrollAnchoring?: boolean
68
-
69
58
  /** 开启自定义下拉刷新
70
59
  * @supported weapp
71
60
  * @default false
72
61
  */
73
62
  refresherEnabled?: boolean
74
-
75
63
  /** 设置自定义下拉刷新阈值
76
64
  * @supported weapp
77
65
  * @default 45
78
66
  */
79
67
  refresherThreshold?: number
80
-
81
68
  /** 设置自定义下拉刷新默认样式,支持设置 `black | white | none`, none 表示不使用默认样式
82
69
  * @supported weapp
83
70
  * @default 'black'
84
71
  */
85
72
  refresherDefaultStyle?: string
86
-
87
73
  /** 设置自定义下拉刷新区域背景颜色
88
74
  * @supported weapp
89
75
  * @default '#FFF'
90
76
  */
91
77
  refresherBackground?: string
92
-
93
78
  /** 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
94
79
  * @supported weapp
95
80
  * @default false
96
81
  */
97
82
  refresherTriggered?: boolean
98
-
99
83
  /** 启用 scroll-view 增强特性
100
84
  * @supported weapp
101
85
  * @default false
102
86
  */
103
87
  enhanced?: boolean
104
-
105
88
  /** iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效)
106
89
  * @supported weapp
107
90
  * @default true
108
91
  */
109
92
  bounces?: boolean
110
-
111
93
  /** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
112
94
  * @supported weapp
113
95
  * @default true
114
96
  */
115
97
  showScrollbar?: boolean
116
-
117
98
  /** 分页滑动效果 (同时开启 enhanced 属性后生效)
118
99
  * @supported weapp
119
100
  * @default false
120
101
  */
121
102
  pagingEnabled?: boolean
122
-
123
103
  /** boolean false 滑动减速速率控制 (同时开启 enhanced 属性后生效)
124
104
  * @supported weapp
125
105
  * @default false
126
106
  */
127
107
  fastDeceleration?: boolean
128
-
129
108
  /** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
130
109
  * @supported alipay
131
110
  */
132
111
  scrollAnimationDuration?: string
133
-
134
112
  /** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
135
113
  * @supported alipay
136
114
  * @default false
137
115
  */
138
116
  trapScroll?: string
139
-
140
117
  /** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
141
118
  * @supported alipay
142
119
  */
143
120
  disableLowerScroll?: string
144
-
145
121
  /** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
146
122
  * @supported alipay
147
123
  */
148
124
  disableUpperScroll?: string
149
-
150
125
  /** 无障碍访问,(属性)元素的额外描述
151
126
  * @supported qq
152
127
  */
153
128
  ariaLabel?: string
154
-
155
129
  /** 开启 passive 特性,能优化一定的滚动性能
156
130
  * @supported weapp
157
131
  * @default false
158
132
  */
159
133
  enablePassive?: string
160
-
134
+ /** 渲染模式
135
+ * list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
136
+ * custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件
137
+ * @supported weapp
138
+ * @default 'list'
139
+ */
140
+ type: 'list' | 'custom'
141
+ /** 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。
142
+ * @supported weapp
143
+ * @default false
144
+ */
145
+ reverse?: boolean
146
+ /** 指定视口外渲染区域的距离,默认情况下视口外节点不渲染。指定 cache-extent 可优化滚动体验和加载速度,但会提高内存占用且影响首屏速度,可按需启用。
147
+ * @supported weapp
148
+ */
149
+ cacheExtent?: number
150
+ /** 只 scroll-into-view 到 cacheExtent 以内的目标节点,性能更佳
151
+ * @supported weapp
152
+ * @default false
153
+ */
154
+ scrollIntoViewWithinExtent?: boolean
155
+ /** 指定 scroll-into-view 目标节点在视口内的位置。
156
+ * start - 目标节点显示在视口开始处
157
+ * center - 目标节点显示在视口中间
158
+ * end - 目标节点显示在视口结束处
159
+ * nearest - 目标节点在就近的视口边缘显示,若节点已在视口内则不触发滚动
160
+ * @supported weapp
161
+ * @default 'start'
162
+ */
163
+ scrollIntoViewAlignment?: 'start' | 'center' | 'end' | 'nearest'
161
164
  /** 滚动到顶部/左边,会触发 scrolltoupper 事件
162
165
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
163
166
  */
164
167
  onScrollToUpper?: CommonEventFunction
165
-
166
168
  /** 滚动到底部/右边,会触发 scrolltolower 事件
167
169
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
168
170
  */
169
171
  onScrollToLower?: CommonEventFunction
170
-
171
172
  /** 滚动时触发
172
173
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
173
174
  */
174
175
  onScroll?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>
175
-
176
+ /** 滚动开始事件
177
+ * @supported weapp
178
+ */
179
+ onScrollStart?:BaseEventOrigFunction<ScrollViewProps.onScrollDetail>
180
+ /** 滚动结束事件
181
+ * @supported weapp
182
+ */
183
+ onScrollEnd?:BaseEventOrigFunction<ScrollViewProps.onScrollDetail>
176
184
  /** 自定义下拉刷新控件被下拉
177
185
  * @supported weapp
178
186
  */
179
187
  onRefresherPulling?: CommonEventFunction
180
-
181
188
  /** 自定义下拉刷新被触发
182
189
  * @supported weapp
183
190
  */
184
191
  onRefresherRefresh?: CommonEventFunction
185
-
186
192
  /** 自定义下拉刷新被复位
187
193
  * @supported weapp
188
194
  */
189
195
  onRefresherRestore?: CommonEventFunction
190
-
191
196
  /** 自定义下拉刷新被中止
192
197
  * @supported weapp
193
198
  */
194
199
  onRefresherAbort?: CommonEventFunction
195
-
200
+ /** 自定义下拉刷新即将触发刷新(拖动超过 refresher-threshold 时)的事件
201
+ * @supported weapp
202
+ */
203
+ onRefresherWillRefresh?: CommonEventFunction
196
204
  /** 滑动开始事件 (同时开启 enhanced 属性后生效)
197
205
  * @supported weapp
198
206
  */
199
207
  onDragStart?: CommonEventFunction<ScrollViewProps.onDragDetail>
200
-
201
208
  /** 滑动事件 (同时开启 enhanced 属性后生效)
202
209
  * @supported weapp
203
210
  */
204
211
  onDragging?: CommonEventFunction<ScrollViewProps.onDragDetail>
205
-
206
212
  /** 滑动结束事件 (同时开启 enhanced 属性后生效)
207
213
  * @supported weapp
208
214
  */
209
215
  onDragEnd?: CommonEventFunction<ScrollViewProps.onDragDetail>
210
-
211
216
  /** 触摸动作开始。
212
217
  * @supported alipay
213
218
  */
214
219
  onTouchStart?: CommonEventFunction
215
-
216
220
  /** 触摸后移动。
217
221
  * @supported alipay
218
222
  */
219
223
  onTouchMove?: CommonEventFunction
220
-
221
224
  /** 触摸动作结束。
222
225
  * @supported alipay
223
226
  */
224
227
  onTouchEnd?: CommonEventFunction
225
-
226
228
  /** 触摸动作被打断,如来电提醒、弹窗。
227
229
  * @supported alipay
228
230
  */
@@ -232,30 +234,25 @@ declare namespace ScrollViewProps {
232
234
  interface onScrollDetail {
233
235
  /** 横向滚动条位置 */
234
236
  scrollLeft: number
235
-
236
237
  /** 竖向滚动条位置 */
237
238
  scrollTop: number
238
-
239
239
  /** 滚动条高度 */
240
240
  scrollHeight: number
241
-
242
241
  /** 滚动条宽度 */
243
242
  scrollWidth: number
244
243
  deltaX: number
245
244
  deltaY: number
245
+ isDrag?: boolean
246
246
  }
247
247
  interface onDragDetail {
248
248
  /** 横向滚动条位置 */
249
249
  scrollLeft: number
250
-
251
250
  /** 竖向滚动条位置 */
252
251
  scrollTop: number
253
-
254
252
  /** 滚动速度 */
255
253
  velocity: number
256
254
  }
257
255
  }
258
-
259
256
  /** 可滚动视图区域。使用竖向滚动时,需要给scroll-view一个固定高度,通过 WXSS 设置 height。组件属性的长度单位默认为 px
260
257
  *
261
258
  * Tips:
@@ -5,31 +5,26 @@ interface ShareElementProps extends StandardProps {
5
5
  * @supported weapp
6
6
  */
7
7
  key?: string
8
-
9
8
  /** 映射标记
10
9
  * @supported alipay
11
10
  */
12
11
  name?: string
13
-
14
12
  /** 是否进行动画
15
13
  * @default false
16
14
  * @supported weapp, alipay
17
15
  */
18
16
  transform?: boolean
19
-
20
17
  /** 动画时长,单位毫秒
21
18
  * @default 300
22
19
  * @supported weapp, alipay
23
20
  */
24
21
  duration?: number
25
-
26
22
  /** css缓动函数
27
23
  * @default ease-out
28
24
  * @supported weapp, alipay
29
25
  */
30
26
  easingFunction?: string
31
27
  }
32
-
33
28
  /** 共享元素
34
29
  *
35
30
  * 共享元素是一种动画形式,类似于 [`flutter Hero`](https://flutterchina.club/animations/hero-animations/) 动画,表现为元素像是在页面间穿越一样。该组件需与 [`PageContainer`](/docs/components/viewContainer/page-container) 组件结合使用。
@@ -95,7 +90,7 @@ interface ShareElementProps extends StandardProps {
95
90
  * {
96
91
  * contacts.map((item, index) => (
97
92
  * <View key={item.id} className="contact" onClick={e => showNext(e, index)}>
98
- * <ShareElement duration={300} className="name" mapkey="name" transform={transformIdx === index}>
93
+ * <ShareElement duration={300} className="name" key="name" transform={transformIdx === index}>
99
94
  * {item.name}
100
95
  * </ShareElement>
101
96
  * <View className="list">
@@ -122,7 +117,7 @@ interface ShareElementProps extends StandardProps {
122
117
  * >
123
118
  * <View className="screen screen2">
124
119
  * <View className="contact">
125
- * <ShareElement className="name" mapkey="name" duration={300} transform>
120
+ * <ShareElement className="name" key="name" duration={300} transform>
126
121
  * {contact.name}
127
122
  * </ShareElement>
128
123
  * <View className={`paragraph ${show ? 'enter' : ''}`}>
package/types/Slider.d.ts CHANGED
@@ -6,105 +6,87 @@ interface SliderProps extends StandardProps, FormItemProps {
6
6
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
7
7
  */
8
8
  min?: number
9
-
10
9
  /** 最大值
11
10
  * @default 100
12
11
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
13
12
  */
14
13
  max?: number
15
-
16
14
  /** 步长,取值必须大于 0,并且可被(max - min)整除
17
15
  * @default 1
18
16
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
19
17
  */
20
18
  step?: number
21
-
22
19
  /** 是否禁用
23
20
  * @default false
24
21
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
25
22
  */
26
23
  disabled?: boolean
27
-
28
24
  /** 当前取值
29
25
  * @default 0
30
26
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
31
27
  */
32
28
  value?: number
33
-
34
29
  /** 背景条的颜色(请使用 backgroundColor)
35
30
  * @default "#e9e9e9"
36
31
  * @supported weapp, tt, qq, jd
37
32
  */
38
33
  color?: string
39
-
40
34
  /** 已选择的颜色(请使用 activeColor)
41
35
  * @default "#1aad19"
42
36
  * @supported weapp, tt, qq, jd
43
37
  */
44
38
  selectedColor?: string
45
-
46
39
  /** 已选择的颜色
47
40
  * @default "#1aad19"
48
41
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
49
42
  */
50
43
  activeColor?: string
51
-
52
44
  /** 背景条的颜色
53
45
  * @default "#e9e9e9"
54
46
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
55
47
  */
56
48
  backgroundColor?: string
57
-
58
49
  /** 滑块的大小,取值范围为 12 - 28
59
50
  * @default 28
60
51
  * @supported weapp, swan, tt, qq, jd, h5
61
52
  */
62
53
  blockSize?: number
63
-
64
54
  /** 滑块的颜色
65
55
  * @default "#ffffff"
66
56
  * @supported weapp, swan, tt, qq, jd, h5, rn
67
57
  */
68
58
  blockColor?: string
69
-
70
59
  /** 是否显示当前 value
71
60
  * @default false
72
61
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
73
62
  */
74
63
  showValue?: boolean
75
-
76
64
  /** 组件名字,用于表单提交获取数据。
77
65
  * @supported alipay
78
66
  */
79
67
  name?: string
80
-
81
68
  /** 轨道线条高度。
82
69
  * @default 4
83
70
  * @supported alipay
84
71
  */
85
72
  trackSize?: string
86
-
87
73
  /** 滑块大小。
88
74
  * @default 22
89
75
  * @supported alipay
90
76
  */
91
77
  handleSize?: string
92
-
93
78
  /** 滑块填充色,同 CSS 色值。
94
79
  * @supported alipay
95
80
  */
96
81
  handleColor?: string
97
-
98
82
  /** 无障碍访问,(属性)元素的额外描述
99
83
  * @supported qq
100
84
  */
101
85
  ariaLabel?: string
102
-
103
86
  /** 完成一次拖动后触发的事件
104
87
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
105
88
  */
106
89
  onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
107
-
108
90
  /** 拖动过程中触发的事件
109
91
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
110
92
  */
@@ -115,7 +97,6 @@ declare namespace SliderProps {
115
97
  value
116
98
  }
117
99
  }
118
-
119
100
  /** 滑动选择器
120
101
  * @classification forms
121
102
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
@@ -0,0 +1,12 @@
1
+ import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface StickyHeaderProps extends StandardProps {}
4
+
5
+ /**
6
+ * 吸顶布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。
7
+ * @classification viewContainer
8
+ * @supported weapp
9
+ * @see https://developers.weixin.qq.com/miniprogram/dev/component/sticky-header.html
10
+ */
11
+ declare const StickyHeader: ComponentType<StickyHeaderProps>
12
+ export { StickyHeader, StickyHeaderProps }
@@ -0,0 +1,18 @@
1
+ import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface StickySectionProps extends StandardProps {
4
+ /** 吸顶元素重叠时是否继续上推
5
+ * @supported weapp
6
+ * @default true
7
+ */
8
+ pushPinnedHeader?: boolean
9
+ }
10
+
11
+ /**
12
+ * 吸顶布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点。仅 Skyline 支持。
13
+ * @classification viewContainer
14
+ * @supported weapp
15
+ * @see https://developers.weixin.qq.com/miniprogram/dev/component/sticky-section.html
16
+ */
17
+ declare const StickySection: ComponentType<StickySectionProps>
18
+ export { StickySection, StickySectionProps }