@tdesign/uniapp 0.8.1 → 0.9.1

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 (287) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/action-sheet/README.en-US.md +4 -3
  3. package/dist/action-sheet/README.md +4 -3
  4. package/dist/action-sheet/action-sheet.vue +16 -12
  5. package/dist/action-sheet/computed.js +1 -1
  6. package/dist/action-sheet/props.ts +5 -0
  7. package/dist/action-sheet/type.ts +6 -1
  8. package/dist/avatar/README.en-US.md +1 -1
  9. package/dist/avatar/README.md +1 -1
  10. package/dist/avatar/avatar.vue +10 -9
  11. package/dist/avatar-group/avatar-group.vue +4 -4
  12. package/dist/back-top/README.en-US.md +1 -1
  13. package/dist/back-top/README.md +1 -1
  14. package/dist/back-top/back-top.vue +5 -4
  15. package/dist/badge/README.en-US.md +2 -1
  16. package/dist/badge/README.md +2 -1
  17. package/dist/badge/badge.css +1 -1
  18. package/dist/badge/badge.vue +4 -2
  19. package/dist/button/README.en-US.md +1 -1
  20. package/dist/button/README.md +1 -1
  21. package/dist/button/button.vue +17 -11
  22. package/dist/calendar/README.en-US.md +1 -1
  23. package/dist/calendar/README.md +1 -1
  24. package/dist/calendar/calendar-header.vue +2 -1
  25. package/dist/calendar/calendar.vue +15 -9
  26. package/dist/calendar/template.vue +12 -9
  27. package/dist/cascader/README.en-US.md +1 -1
  28. package/dist/cascader/README.md +1 -1
  29. package/dist/cascader/cascader.vue +8 -8
  30. package/dist/cell/README.en-US.md +1 -1
  31. package/dist/cell/README.md +1 -1
  32. package/dist/cell/cell.vue +34 -36
  33. package/dist/cell-group/cell-group.vue +5 -3
  34. package/dist/check-tag/check-tag.vue +6 -3
  35. package/dist/checkbox/README.en-US.md +1 -1
  36. package/dist/checkbox/README.md +1 -1
  37. package/dist/checkbox/checkbox.vue +5 -4
  38. package/dist/checkbox-group/checkbox-group.vue +5 -3
  39. package/dist/col/col.vue +7 -3
  40. package/dist/collapse/README.en-US.md +1 -1
  41. package/dist/collapse/README.md +1 -1
  42. package/dist/collapse/collapse.vue +6 -4
  43. package/dist/collapse-panel/collapse-panel.vue +15 -6
  44. package/dist/color-picker/README.en-US.md +1 -1
  45. package/dist/color-picker/README.md +1 -1
  46. package/dist/color-picker/color-picker.vue +9 -7
  47. package/dist/color-picker/template.vue +2 -1
  48. package/dist/common/canvas/index.js +1 -1
  49. package/dist/common/shared/color-picker/color.js +1 -0
  50. package/dist/common/src/instantiationDecorator.js +1 -1
  51. package/dist/common/style/theme/index-light.css +282 -0
  52. package/dist/common/style/theme/index-light.less +9 -0
  53. package/dist/common/style/theme/raw/_components-light.less +8 -0
  54. package/dist/common/style/theme/raw/_light-only.less +181 -0
  55. package/dist/common/version.js +1 -1
  56. package/dist/config-provider/config-provider.vue +3 -1
  57. package/dist/count-down/README.en-US.md +1 -1
  58. package/dist/count-down/README.md +1 -1
  59. package/dist/count-down/count-down.vue +5 -3
  60. package/dist/date-time-picker/README.en-US.md +1 -1
  61. package/dist/date-time-picker/README.md +1 -1
  62. package/dist/date-time-picker/date-time-picker.vue +8 -6
  63. package/dist/date-time-picker/locale/dayjs.js +6 -6
  64. package/dist/demo-navbar/demo-navbar.vue +1 -1
  65. package/dist/dialog/README.en-US.md +1 -1
  66. package/dist/dialog/README.md +1 -1
  67. package/dist/dialog/dialog.vue +10 -7
  68. package/dist/dialog/index.js +2 -1
  69. package/dist/divider/README.en-US.md +1 -1
  70. package/dist/divider/README.md +1 -1
  71. package/dist/divider/divider.vue +4 -2
  72. package/dist/draggable/draggable.vue +5 -2
  73. package/dist/drawer/README.en-US.md +1 -1
  74. package/dist/drawer/README.md +1 -1
  75. package/dist/drawer/drawer.vue +7 -5
  76. package/dist/dropdown-item/dropdown-item.vue +16 -11
  77. package/dist/dropdown-menu/README.en-US.md +1 -1
  78. package/dist/dropdown-menu/README.md +1 -1
  79. package/dist/dropdown-menu/dropdown-menu.vue +11 -9
  80. package/dist/empty/README.en-US.md +1 -1
  81. package/dist/empty/README.md +1 -1
  82. package/dist/empty/empty.vue +5 -4
  83. package/dist/fab/README.en-US.md +1 -1
  84. package/dist/fab/README.md +1 -1
  85. package/dist/fab/fab.vue +9 -6
  86. package/dist/fab/props.ts +1 -1
  87. package/dist/fab/type.ts +1 -1
  88. package/dist/footer/README.en-US.md +1 -1
  89. package/dist/footer/README.md +1 -1
  90. package/dist/footer/footer.vue +8 -7
  91. package/dist/form/README.en-US.md +3 -1
  92. package/dist/form/README.md +3 -1
  93. package/dist/form/form.vue +4 -2
  94. package/dist/form/props.ts +9 -0
  95. package/dist/form/type.ts +5 -0
  96. package/dist/form-item/README.en-US.md +2 -1
  97. package/dist/form-item/README.md +2 -1
  98. package/dist/form-item/form-item.css +2 -2
  99. package/dist/form-item/form-item.vue +36 -27
  100. package/dist/form-item/props.ts +8 -0
  101. package/dist/form-item/type.ts +4 -0
  102. package/dist/grid/README.en-US.md +1 -1
  103. package/dist/grid/README.md +1 -1
  104. package/dist/grid/grid.vue +4 -3
  105. package/dist/grid-item/README.en-US.md +1 -1
  106. package/dist/grid-item/README.md +1 -1
  107. package/dist/grid-item/grid-item.vue +8 -6
  108. package/dist/guide/README.en-US.md +1 -1
  109. package/dist/guide/README.md +1 -1
  110. package/dist/guide/guide.vue +8 -7
  111. package/dist/icon/icon.vue +5 -2
  112. package/dist/image/README.en-US.md +1 -1
  113. package/dist/image/README.md +1 -1
  114. package/dist/image/image.vue +6 -5
  115. package/dist/image-viewer/README.en-US.md +4 -3
  116. package/dist/image-viewer/README.md +4 -3
  117. package/dist/image-viewer/image-viewer.css +12 -0
  118. package/dist/image-viewer/image-viewer.vue +84 -21
  119. package/dist/image-viewer/props.ts +5 -0
  120. package/dist/image-viewer/type.ts +6 -1
  121. package/dist/indexes/README.en-US.md +1 -1
  122. package/dist/indexes/README.md +1 -1
  123. package/dist/indexes/computed.js +6 -2
  124. package/dist/indexes/indexes.css +7 -2
  125. package/dist/indexes/indexes.vue +8 -5
  126. package/dist/indexes/props.ts +5 -0
  127. package/dist/indexes/type.ts +5 -0
  128. package/dist/indexes-anchor/README.en-US.md +1 -1
  129. package/dist/indexes-anchor/README.md +1 -1
  130. package/dist/indexes-anchor/indexes-anchor.vue +5 -3
  131. package/dist/input/README.en-US.md +1 -1
  132. package/dist/input/README.md +1 -1
  133. package/dist/input/input.vue +9 -7
  134. package/dist/link/README.en-US.md +1 -1
  135. package/dist/link/README.md +1 -1
  136. package/dist/link/link.vue +6 -3
  137. package/dist/loading/README.en-US.md +1 -1
  138. package/dist/loading/README.md +1 -1
  139. package/dist/loading/loading.vue +4 -2
  140. package/dist/message/index.js +2 -1
  141. package/dist/message/message.vue +4 -3
  142. package/dist/message-item/index.js +1 -1
  143. package/dist/message-item/message-item.vue +7 -5
  144. package/dist/mixins/page-scroll.js +1 -1
  145. package/dist/mixins/using-config.js +1 -1
  146. package/dist/mixins/using-custom-navbar.js +1 -1
  147. package/dist/navbar/README.en-US.md +1 -1
  148. package/dist/navbar/README.md +2 -2
  149. package/dist/navbar/navbar.vue +5 -4
  150. package/dist/notice-bar/README.en-US.md +1 -1
  151. package/dist/notice-bar/README.md +1 -1
  152. package/dist/notice-bar/notice-bar.vue +4 -3
  153. package/dist/overlay/README.en-US.md +1 -1
  154. package/dist/overlay/README.md +1 -1
  155. package/dist/overlay/overlay.vue +6 -3
  156. package/dist/picker/README.en-US.md +1 -1
  157. package/dist/picker/README.md +1 -1
  158. package/dist/picker/picker.vue +11 -9
  159. package/dist/picker-item/README.en-US.md +1 -1
  160. package/dist/picker-item/README.md +1 -1
  161. package/dist/picker-item/picker-item.vue +6 -5
  162. package/dist/popover/README.en-US.md +1 -1
  163. package/dist/popover/README.md +1 -1
  164. package/dist/popover/popover.vue +8 -5
  165. package/dist/popup/README.en-US.md +1 -1
  166. package/dist/popup/README.md +1 -1
  167. package/dist/popup/popup.vue +8 -5
  168. package/dist/progress/README.en-US.md +1 -1
  169. package/dist/progress/README.md +1 -1
  170. package/dist/progress/progress.vue +5 -4
  171. package/dist/pull-down-refresh/README.en-US.md +1 -1
  172. package/dist/pull-down-refresh/README.md +1 -1
  173. package/dist/pull-down-refresh/pull-down-refresh.vue +7 -5
  174. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +8 -7
  175. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +2 -1
  176. package/dist/qrcode/qrcode.vue +5 -3
  177. package/dist/radio/README.en-US.md +1 -1
  178. package/dist/radio/README.md +1 -1
  179. package/dist/radio/radio.vue +5 -4
  180. package/dist/radio-group/radio-group.vue +5 -4
  181. package/dist/rate/README.en-US.md +1 -1
  182. package/dist/rate/README.md +1 -1
  183. package/dist/rate/rate.vue +8 -5
  184. package/dist/result/README.en-US.md +1 -1
  185. package/dist/result/README.md +1 -1
  186. package/dist/result/result.vue +5 -4
  187. package/dist/row/row.vue +7 -3
  188. package/dist/scroll-view/scroll-view.vue +1 -1
  189. package/dist/search/README.en-US.md +1 -1
  190. package/dist/search/README.md +1 -1
  191. package/dist/search/search.css +5 -0
  192. package/dist/search/search.vue +21 -21
  193. package/dist/segmented/README.en-US.md +42 -0
  194. package/dist/segmented/README.md +75 -0
  195. package/dist/segmented/props.ts +31 -0
  196. package/dist/segmented/segmented.css +66 -0
  197. package/dist/segmented/segmented.vue +177 -0
  198. package/dist/segmented/type.ts +41 -0
  199. package/dist/side-bar/README.en-US.md +1 -1
  200. package/dist/side-bar/README.md +1 -1
  201. package/dist/side-bar/side-bar.vue +5 -3
  202. package/dist/side-bar-item/side-bar-item.vue +7 -6
  203. package/dist/skeleton/README.en-US.md +1 -1
  204. package/dist/skeleton/README.md +1 -1
  205. package/dist/skeleton/skeleton.vue +6 -3
  206. package/dist/slider/README.en-US.md +1 -1
  207. package/dist/slider/README.md +1 -1
  208. package/dist/slider/slider.vue +7 -5
  209. package/dist/step-item/step-item.vue +5 -4
  210. package/dist/stepper/README.en-US.md +1 -1
  211. package/dist/stepper/README.md +1 -1
  212. package/dist/stepper/stepper.vue +5 -3
  213. package/dist/steps/README.en-US.md +1 -1
  214. package/dist/steps/README.md +1 -1
  215. package/dist/steps/steps.vue +5 -3
  216. package/dist/sticky/sticky.vue +4 -3
  217. package/dist/swipe-cell/swipe-cell.vue +7 -5
  218. package/dist/swiper/README.en-US.md +1 -1
  219. package/dist/swiper/README.md +1 -1
  220. package/dist/swiper/swiper.vue +7 -5
  221. package/dist/swiper-nav/swiper-nav.vue +6 -3
  222. package/dist/switch/README.en-US.md +1 -1
  223. package/dist/switch/README.md +1 -1
  224. package/dist/switch/switch.vue +5 -4
  225. package/dist/tab-bar/README.en-US.md +1 -1
  226. package/dist/tab-bar/README.md +1 -1
  227. package/dist/tab-bar/tab-bar.vue +5 -3
  228. package/dist/tab-bar-item/tab-bar-item.vue +10 -10
  229. package/dist/tab-panel/tab-panel.vue +5 -3
  230. package/dist/table/README.en-US.md +72 -0
  231. package/dist/table/README.md +117 -0
  232. package/dist/table/base-table-props.ts +105 -0
  233. package/dist/table/props.ts +94 -0
  234. package/dist/table/table.css +251 -0
  235. package/dist/table/table.vue +582 -0
  236. package/dist/table/type.ts +180 -0
  237. package/dist/tabs/README.en-US.md +1 -1
  238. package/dist/tabs/README.md +1 -1
  239. package/dist/tabs/tabs.css +4 -0
  240. package/dist/tabs/tabs.vue +11 -9
  241. package/dist/tag/README.en-US.md +1 -1
  242. package/dist/tag/README.md +1 -1
  243. package/dist/tag/tag.vue +6 -3
  244. package/dist/textarea/README.en-US.md +1 -1
  245. package/dist/textarea/README.md +1 -1
  246. package/dist/textarea/textarea.vue +6 -3
  247. package/dist/theme-light.css +282 -0
  248. package/dist/theme-light.css.d.ts +2 -0
  249. package/dist/theme-light.less +1 -0
  250. package/dist/theme-light.less.d.ts +2 -0
  251. package/dist/toast/README.en-US.md +1 -1
  252. package/dist/toast/README.md +1 -1
  253. package/dist/toast/toast.vue +8 -7
  254. package/dist/transition/transition.vue +2 -2
  255. package/dist/tree-select/README.en-US.md +1 -1
  256. package/dist/tree-select/README.md +1 -1
  257. package/dist/tree-select/tree-select.vue +14 -9
  258. package/dist/types/action-sheet.d.ts +1 -1
  259. package/dist/types/avatar-group.d.ts +1 -1
  260. package/dist/types/avatar.d.ts +1 -1
  261. package/dist/types/back-top.d.ts +1 -1
  262. package/dist/types/badge.d.ts +1 -1
  263. package/dist/types/button.d.ts +1 -1
  264. package/dist/types/calendar.d.ts +1 -1
  265. package/dist/types/cascader.d.ts +1 -1
  266. package/dist/types/cell-group.d.ts +1 -1
  267. package/dist/types/cell.d.ts +1 -1
  268. package/dist/types/check-tag.d.ts +1 -1
  269. package/dist/types/checkbox-group.d.ts +1 -1
  270. package/dist/types/checkbox.d.ts +1 -1
  271. package/dist/types/col.d.ts +1 -1
  272. package/dist/types/collapse-panel.d.ts +1 -1
  273. package/dist/types/collapse.d.ts +1 -1
  274. package/dist/types/color-picker.d.ts +1 -1
  275. package/dist/types/index.d.ts +2 -0
  276. package/dist/types/segmented.d.ts +7 -0
  277. package/dist/types/table.d.ts +7 -0
  278. package/dist/upload/README.en-US.md +1 -1
  279. package/dist/upload/README.md +1 -1
  280. package/dist/upload/upload.vue +32 -32
  281. package/dist/watermark/README.en-US.md +1 -1
  282. package/dist/watermark/README.md +1 -1
  283. package/dist/watermark/utils/generateBase64Url.js +6 -6
  284. package/dist/watermark/watermark.vue +4 -3
  285. package/global.d.ts +2 -0
  286. package/package.json +33 -9
  287. package/{dist/script → script}/postinstall.js +18 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,37 @@ toc: false
5
5
  docClass: timeline
6
6
  ---
7
7
 
8
+ ## 🌈 0.9.1 `2026-06-12`
9
+
10
+ ### 🚀 Features
11
+
12
+ - `ActionSheet`: 新增 `preventScrollThrough` 属性 @novlan1 ([#4506](https://github.com/Tencent/tdesign-miniprogram/pull/4506))
13
+ - `Form`: 新增 `contentAlign` 属性,支持配置表单内容对齐方式 @novlan1 ([#4506](https://github.com/Tencent/tdesign-miniprogram/pull/4506))
14
+ - `ImageViewer`: 新增 `maxZoom` 属性,支持缩放 @novlan1 ([#4506](https://github.com/Tencent/tdesign-miniprogram/pull/4506))
15
+ - `Search`: 支持 `v-model` 语法糖写法 @Kriac ([#4459](https://github.com/Tencent/tdesign-miniprogram/pull/4459))
16
+
17
+ ### 🐞 Bug Fixes
18
+
19
+ - `Button`: 修复图标尺寸变量错误问题 @novlan1 ([#4506](https://github.com/Tencent/tdesign-miniprogram/pull/4506))
20
+ - `Input`: 将 `change` 事件放在值更新之后 @Kriac ([#4443](https://github.com/Tencent/tdesign-miniprogram/pull/4443))
21
+ - `Picker`: 修复按钮自定义文案无效 @liweijie0812 ([#4480](https://github.com/Tencent/tdesign-miniprogram/pull/4480))
22
+ - `Table`: 修复列配置中的类名选项无效的问题 @betavs ([#4500](https://github.com/Tencent/tdesign-miniprogram/pull/4500))
23
+ - `Upload`: 修复预览图片不是当前问题 @novlan1 ([#4473](https://github.com/Tencent/tdesign-miniprogram/pull/4473))
24
+
25
+ ## 🌈 0.9.0 `2026-05-08`
26
+
27
+ ### 🚀 Features
28
+
29
+ - `Table`: 新增 `Table` 表格组件 @novlan1 ([#4397](https://github.com/Tencent/tdesign-miniprogram/pull/4397))
30
+ - `Segmented`: 新增 `Segmented` 分段控制器组件 @novlan1 ([#4413](https://github.com/Tencent/tdesign-miniprogram/pull/4413))
31
+
32
+ ### 🐞 Bug Fixes
33
+
34
+ - `Calendar`: 修复 `type` 为 `range` 时,未滚动到目标位置的问题 @novlan1 ([#4413](https://github.com/Tencent/tdesign-miniprogram/pull/4413))
35
+ - `DropdownMenu`: 修复 `label` 回显错误问题 @novlan1 ([#4413](https://github.com/Tencent/tdesign-miniprogram/pull/4413))
36
+ - `Input`: 修复 input clearable 点击后没有及时更新双向绑定的问题 @Kriac ([#4420](https://github.com/Tencent/tdesign-miniprogram/pull/4420))
37
+ - `TabBar`: 修复 `badgeProps` 属性中的 `color` 和 `shape` 字段无效 @liweijie0812 ([#4427](https://github.com/Tencent/tdesign-miniprogram/pull/4427))
38
+
8
39
  ## 🌈 0.8.1 `2026-04-09`
9
40
 
10
41
  ### 🚀 Features
@@ -13,12 +13,13 @@ count | Number | 8 | \- | N
13
13
  description | String | - | \- | N
14
14
  items | Array | [] | Typescript: `Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| object; suffixIcon?: string \| object }`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
15
15
  popup-props | Object | {} | Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
16
+ prevent-scroll-through | Boolean | true | \- | N
16
17
  show-cancel | Boolean | true | \- | N
17
18
  show-overlay | Boolean | true | \- | N
18
19
  theme | String | list | options: list/grid | N
19
20
  using-custom-navbar | Boolean | false | \- | N
20
- visible | Boolean | false | `v-model:visible` is supported | N
21
- default-visible | Boolean | false | uncontrolled property | N
21
+ visible | Boolean | false | `v-model:visible` is supported。Typescript: `boolean \| null` | N
22
+ default-visible | Boolean | false | uncontrolled property。Typescript: `boolean \| null` | N
22
23
 
23
24
  ### ActionSheet Events
24
25
 
@@ -45,7 +46,7 @@ t-class-content | \-
45
46
  ### CSS Variables
46
47
 
47
48
  The component provides the following CSS variables, which can be used to customize styles.
48
- Name | Default Value | Description
49
+ Name | Default Value | Description
49
50
  -- | -- | --
50
51
  --td-action-sheet-border-color | @component-stroke | -
51
52
  --td-action-sheet-border-radius | @radius-extraLarge | -
@@ -89,12 +89,13 @@ count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有
89
89
  description | String | - | 动作面板描述文字 | N
90
90
  items | Array | [] | 菜单项。TS 类型:`Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| object; suffixIcon?: string \| object }`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
91
91
  popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
92
+ prevent-scroll-through | Boolean | true | 防止滚动穿透,即不允许点击和滚动 | N
92
93
  show-cancel | Boolean | true | 是否显示取消按钮 | N
93
94
  show-overlay | Boolean | true | 是否显示遮罩层 | N
94
95
  theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
95
96
  using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
96
- visible | Boolean | false | 显示与隐藏。支持语法糖 `v-model:visible` | N
97
- default-visible | Boolean | false | 显示与隐藏。非受控属性 | N
97
+ visible | Boolean | false | 显示与隐藏。支持语法糖 `v-model:visible`。TS 类型:`boolean \| null` | N
98
+ default-visible | Boolean | false | 显示与隐藏。非受控属性。TS 类型:`boolean \| null` | N
98
99
 
99
100
  ### ActionSheet Events
100
101
 
@@ -121,7 +122,7 @@ t-class-content | 内容样式类
121
122
  ### CSS Variables
122
123
 
123
124
  组件提供了下列 CSS 变量,可用于自定义样式。
124
- 名称 | 默认值 | 描述
125
+ 名称 | 默认值 | 描述
125
126
  -- | -- | --
126
127
  --td-action-sheet-border-color | @component-stroke | -
127
128
  --td-action-sheet-border-radius | @radius-extraLarge | -
@@ -10,6 +10,7 @@
10
10
  :using-custom-navbar="dataUsingCustomNavbar"
11
11
  :custom-navbar-height="customNavbarHeight"
12
12
  :show-overlay="dataShowOverlay"
13
+ :prevent-scroll-through="dataPreventScrollThrough"
13
14
  :z-index="(dataPopupProps && dataPopupProps.zIndex) || defaultPopUpzIndex"
14
15
  :overlay-props="(dataPopupProps && dataPopupProps.overlayProps) || defaultOverlayProps"
15
16
  @visible-change="onPopupVisibleChange"
@@ -173,20 +174,22 @@
173
174
  </view>
174
175
  </template>
175
176
  <script>
176
- import TIcon from '../icon/icon';
177
- import TPopup from '../popup/popup';
178
- import TGrid from '../grid/grid';
179
- import TGridItem from '../grid-item/grid-item';
180
- import { chunk } from '../common/utils';
181
- import { uniComponent } from '../common/src/index';
182
177
  import { prefix } from '../common/config';
183
- import { actionSheetTheme } from './show';
184
- import props from './props';
185
- import useCustomNavbar from '../mixins/using-custom-navbar';
186
- import tools from '../common/utils.wxs';
178
+
187
179
  import { getFunctionalMixin } from '../common/functional/mixin';
180
+ import { uniComponent } from '../common/src/index';
181
+ import { chunk } from '../common/utils';
182
+ import tools from '../common/utils.wxs';
183
+ import TGrid from '../grid/grid';
184
+ import TGridItem from '../grid-item/grid-item';
185
+ import TIcon from '../icon/icon';
188
186
  import usingConfig from '../mixins/using-config';
187
+ import useCustomNavbar from '../mixins/using-custom-navbar';
188
+ import TPopup from '../popup/popup';
189
+
189
190
  import { getIconData } from './computed';
191
+ import props from './props';
192
+ import { actionSheetTheme } from './show';
190
193
 
191
194
  const componentName = 'action-sheet';
192
195
  const name = `${prefix}-${componentName}`;
@@ -246,10 +249,10 @@ export default {
246
249
  ]);
247
250
  },
248
251
  iconCustomStyle() {
249
- return 'margin-right: 8px;';
252
+ return 'margin-right: 16rpx;';
250
253
  },
251
254
  suffixIconCustomStyle() {
252
- return 'margin-right: 8px;margin-left: auto;';
255
+ return 'margin-right: 16rpx;margin-left: auto;';
253
256
  },
254
257
  gridStyle() {
255
258
  return `${this.heightStyle}padding-bottom: 48rpx;`;
@@ -300,6 +303,7 @@ export default {
300
303
  'description',
301
304
  'items',
302
305
  'popupProps',
306
+ 'preventScrollThrough',
303
307
  'showCancel',
304
308
  'showOverlay',
305
309
  'theme',
@@ -13,7 +13,7 @@ export const getListThemeItemClass = function (props) {
13
13
 
14
14
  export const getIconData = function (icon) {
15
15
  if (utils.isString(icon)) {
16
- return { name: icon };
16
+ return { name: icon, size: '48rpx' };
17
17
  }
18
18
 
19
19
  if (utils.isNoEmptyObj(icon)) {
@@ -40,6 +40,11 @@ export default {
40
40
  type: Object,
41
41
  default: () => ({}),
42
42
  },
43
+ /** 防止滚动穿透,即不允许点击和滚动 */
44
+ preventScrollThrough: {
45
+ type: Boolean,
46
+ default: true,
47
+ },
43
48
  /** 是否显示取消按钮 */
44
49
  showCancel: {
45
50
  type: Boolean,
@@ -37,6 +37,11 @@ export interface TdActionSheetProps {
37
37
  * @default {}
38
38
  */
39
39
  popupProps?: PopupProps;
40
+ /**
41
+ * 防止滚动穿透,即不允许点击和滚动
42
+ * @default true
43
+ */
44
+ preventScrollThrough?: boolean;
40
45
  /**
41
46
  * 是否显示取消按钮
42
47
  * @default true
@@ -66,7 +71,7 @@ export interface TdActionSheetProps {
66
71
  * 显示与隐藏,非受控属性
67
72
  * @default false
68
73
  */
69
- defaultVisible?: boolean;
74
+ defaultVisible?: boolean | null;
70
75
  /**
71
76
  * 点击取消按钮时触发
72
77
  */
@@ -75,7 +75,7 @@ t-class-image | \-
75
75
  ### CSS Variables
76
76
 
77
77
  The component provides the following CSS variables, which can be used to customize styles.
78
- Name | Default Value | Description
78
+ Name | Default Value | Description
79
79
  -- | -- | --
80
80
  --td-avatar-group-init-z-index | @avatar-group-init-zIndex | -
81
81
  --td-avatar-group-line-spacing | 4rpx | -
@@ -127,7 +127,7 @@ t-class-image | 图片样式类
127
127
  ### CSS Variables
128
128
 
129
129
  组件提供了下列 CSS 变量,可用于自定义样式。
130
- 名称 | 默认值 | 描述
130
+ 名称 | 默认值 | 描述
131
131
  -- | -- | --
132
132
  --td-avatar-group-init-z-index | @avatar-group-init-zIndex | -
133
133
  --td-avatar-group-line-spacing | 4rpx | -
@@ -51,6 +51,7 @@
51
51
  name="icon"
52
52
  >
53
53
  <t-icon
54
+ :custom-style="iconCustomStyle"
54
55
  :t-class="classPrefix + '__icon ' + classPrefix + '__icon--' + (iconData.activeIdx == iconData.index ? 'active ' : ' ') + tClassIcon"
55
56
  :prefix="iconData.prefix"
56
57
  :name="iconName || iconData.name"
@@ -59,7 +60,6 @@
59
60
  :aria-hidden="!!iconData.ariaHidden"
60
61
  :aria-label="iconData.ariaLabel"
61
62
  :aria-role="iconData.ariaRole"
62
- :custom-style="iconCustomStyle"
63
63
  @click="iconData.click || ''"
64
64
  />
65
65
  </block>
@@ -77,16 +77,17 @@
77
77
  </view>
78
78
  </template>
79
79
  <script>
80
- import TIcon from '../icon/icon';
81
80
  import TBadge from '../badge/badge';
82
- import TImage from '../image/image';
83
- import { uniComponent } from '../common/src/index';
84
81
  import { prefix } from '../common/config';
85
- import avatarProps from './props';
82
+ import { ChildrenMixin, RELATION_MAP } from '../common/relation';
83
+ import { uniComponent } from '../common/src/index';
86
84
  import { setIcon, systemInfo, addUnit } from '../common/utils';
87
85
  import tools from '../common/utils.wxs';
86
+ import TIcon from '../icon/icon';
87
+ import TImage from '../image/image';
88
+
88
89
  import * as utils from './computed.js';
89
- import { ChildrenMixin, RELATION_MAP } from '../common/relation';
90
+ import avatarProps from './props';
90
91
 
91
92
 
92
93
  const name = `${prefix}-avatar`;
@@ -136,9 +137,9 @@ export default {
136
137
  computed: {
137
138
  iconCustomStyle() {
138
139
  const fontSize = {
139
- small: 'var(--td-avatar-icon-small-font-size, 20px)',
140
- medium: 'var(--td-avatar-icon-medium-font-size, 24px)',
141
- large: 'var(--td-avatar-icon-large-font-size, 32px)',
140
+ small: 'var(--td-avatar-icon-small-font-size, 40rpx)',
141
+ medium: 'var(--td-avatar-icon-medium-font-size, 48rpx)',
142
+ large: 'var(--td-avatar-icon-large-font-size, 64rpx)',
142
143
  };
143
144
 
144
145
  return tools._style([
@@ -27,12 +27,12 @@
27
27
  </template>
28
28
  <script>
29
29
  import TAvatar from '../avatar/avatar';
30
- import { uniComponent } from '../common/src/index';
31
30
  import { prefix } from '../common/config';
32
- import avatarGroupProps from './props';
33
-
34
- import tools from '../common/utils.wxs';
35
31
  import { ParentMixin, RELATION_MAP } from '../common/relation';
32
+ import { uniComponent } from '../common/src/index';
33
+ import tools from '../common/utils.wxs';
34
+
35
+ import avatarGroupProps from './props';
36
36
 
37
37
 
38
38
  const name = `${prefix}-avatar-group`;
@@ -38,7 +38,7 @@ t-class-text | \-
38
38
  ### CSS Variables
39
39
 
40
40
  The component provides the following CSS variables, which can be used to customize styles.
41
- Name | Default Value | Description
41
+ Name | Default Value | Description
42
42
  -- | -- | --
43
43
  --td-back-top-half-round-border-radius | @radius-round | -
44
44
  --td-back-top-round-bg-color | @bg-color-container | -
@@ -58,7 +58,7 @@ t-class-text | 文本样式类
58
58
  ### CSS Variables
59
59
 
60
60
  组件提供了下列 CSS 变量,可用于自定义样式。
61
- 名称 | 默认值 | 描述
61
+ 名称 | 默认值 | 描述
62
62
  -- | -- | --
63
63
  --td-back-top-half-round-border-radius | @radius-round | -
64
64
  --td-back-top-round-bg-color | @bg-color-container | -
@@ -39,13 +39,14 @@
39
39
  </view>
40
40
  </template>
41
41
  <script>
42
- import TIcon from '../icon/icon';
43
- import { uniComponent } from '../common/src/index';
44
42
  import { prefix } from '../common/config';
45
- import props from './props';
43
+ import { ChildrenMixin, RELATION_MAP } from '../common/relation';
44
+ import { uniComponent } from '../common/src/index';
46
45
  import { calcIcon } from '../common/utils';
47
46
  import tools from '../common/utils.wxs';
48
- import { ChildrenMixin, RELATION_MAP } from '../common/relation';
47
+ import TIcon from '../icon/icon';
48
+
49
+ import props from './props';
49
50
 
50
51
 
51
52
  const name = `${prefix}-back-top`;
@@ -35,7 +35,7 @@ t-class-count | \-
35
35
  ### CSS Variables
36
36
 
37
37
  The component provides the following CSS variables, which can be used to customize styles.
38
- Name | Default Value | Description
38
+ Name | Default Value | Description
39
39
  -- | -- | --
40
40
  --td-badge-basic-height | 32rpx | -
41
41
  --td-badge-basic-padding | 8rpx | -
@@ -44,6 +44,7 @@ Name | Default Value | Description
44
44
  --td-badge-border-radius | 4rpx | -
45
45
  --td-badge-bubble-border-radius | 20rpx 20rpx 20rpx 1px | -
46
46
  --td-badge-content-text-color | @text-color-primary | -
47
+ --td-badge-content-text-font | @font-body-large | -
47
48
  --td-badge-dot-size | 16rpx | -
48
49
  --td-badge-font | @font-mark-extraSmall | -
49
50
  --td-badge-large-font | @font-mark-small | -
@@ -68,7 +68,7 @@ t-class-count | 计数样式类
68
68
  ### CSS Variables
69
69
 
70
70
  组件提供了下列 CSS 变量,可用于自定义样式。
71
- 名称 | 默认值 | 描述
71
+ 名称 | 默认值 | 描述
72
72
  -- | -- | --
73
73
  --td-badge-basic-height | 32rpx | -
74
74
  --td-badge-basic-padding | 8rpx | -
@@ -77,6 +77,7 @@ t-class-count | 计数样式类
77
77
  --td-badge-border-radius | 4rpx | -
78
78
  --td-badge-bubble-border-radius | 20rpx 20rpx 20rpx 1px | -
79
79
  --td-badge-content-text-color | @text-color-primary | -
80
+ --td-badge-content-text-font | @font-body-large | -
80
81
  --td-badge-dot-size | 16rpx | -
81
82
  --td-badge-font | @font-mark-extraSmall | -
82
83
  --td-badge-large-font | @font-mark-small | -
@@ -132,7 +132,7 @@
132
132
  }
133
133
  .t-badge__content-text {
134
134
  display: block;
135
- font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
135
+ font: var(--td-badge-content-text-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
136
136
  color: var(--td-badge-content-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
137
137
  }
138
138
  .t-badge__count:empty {
@@ -57,9 +57,10 @@
57
57
  </view>
58
58
  </template>
59
59
  <script>
60
- import { uniComponent } from '../common/src/index';
61
60
  import { prefix } from '../common/config';
62
- import props from './props';
61
+ import { uniComponent } from '../common/src/index';
62
+
63
+
63
64
  import { uniqueFactory, getRect } from '../common/utils';
64
65
  import tools from '../common/utils.wxs';
65
66
 
@@ -69,6 +70,7 @@ import {
69
70
  getBadgeInnerClass,
70
71
  isShowBadge,
71
72
  } from './computed.js';
73
+ import props from './props';
72
74
 
73
75
 
74
76
  const name = `${prefix}-badge`;
@@ -138,7 +138,7 @@ t-class-loading | class name of loading
138
138
  ### CSS Variables
139
139
 
140
140
  The component provides the following CSS variables, which can be used to customize styles.
141
- Name | Default Value | Description
141
+ Name | Default Value | Description
142
142
  -- | -- | --
143
143
  --td-button-border-radius | @radius-default | -
144
144
  --td-button-border-width | 4rpx | -
@@ -131,7 +131,7 @@ t-class-loading | 加载样式类
131
131
  ### CSS Variables
132
132
 
133
133
  组件提供了下列 CSS 变量,可用于自定义样式。
134
- 名称 | 默认值 | 描述
134
+ 名称 | 默认值 | 描述
135
135
  -- | -- | --
136
136
  --td-button-border-radius | @radius-default | -
137
137
  --td-button-border-width | 4rpx | -
@@ -20,6 +20,7 @@
20
20
  :send-message-img="sendMessageImg"
21
21
  :app-parameter="appParameter"
22
22
  :show-message-card="showMessageCard"
23
+ :phone-number-no-quota-toast="phoneNumberNoQuotaToast"
23
24
  :aria-label="ariaLabel"
24
25
  @click.stop.prevent="handleTap"
25
26
  @getuserinfo="getuserinfo"
@@ -30,6 +31,7 @@
30
31
  @launchapp="launchapp"
31
32
  @chooseavatar="chooseavatar"
32
33
  @agreeprivacyauthorization="agreeprivacyauthorization"
34
+ @phoneoneclicklogin="phoneoneclicklogin"
33
35
  >
34
36
  <block
35
37
  v-if="innerIcon"
@@ -77,13 +79,14 @@
77
79
  </button>
78
80
  </template>
79
81
  <script>
80
- import TIcon from '../icon/icon';
81
- import TLoading from '../loading/loading';
82
- import { uniComponent } from '../common/src/index';
83
82
  import { prefix } from '../common/config';
84
- import props from './props';
83
+ import { uniComponent } from '../common/src/index';
85
84
  import { calcIcon, addUnit } from '../common/utils';
86
85
  import tools from '../common/utils.wxs';
86
+ import TIcon from '../icon/icon';
87
+ import TLoading from '../loading/loading';
88
+
89
+ import props from './props';
87
90
 
88
91
 
89
92
  const name = `${prefix}-button`;
@@ -125,10 +128,10 @@ export default {
125
128
  return {};
126
129
  }
127
130
  const fontSize = {
128
- 'extra-small': 'var(--td-button-extra-small-icon-font-size, 18px)',
129
- small: 'var(--td-button-small-icon-font-size, 18px)',
130
- medium: 'var(--td-button-medium-icon-font-size, 20px)',
131
- large: 'var(--td-button-large-icon-font-size, 24px)',
131
+ 'extra-small': 'var(--td-button-extra-small-icon-size, 36rpx)',
132
+ small: 'var(--td-button-small-icon-size, 36rpx)',
133
+ medium: 'var(--td-button-medium-icon-size, 40rpx)',
134
+ large: 'var(--td-button-large-icon-size, 48rpx)',
132
135
  };
133
136
 
134
137
  return tools._style([
@@ -136,7 +139,7 @@ export default {
136
139
  fontSize: this.innerIcon.size
137
140
  ? addUnit(this.innerIcon.size)
138
141
  : fontSize[this.size || 'medium'],
139
- borderRadius: 'var(--td-button-icon-border-radius, 4px)',
142
+ borderRadius: 'var(--td-button-icon-border-radius, 8rpx)',
140
143
  },
141
144
  this.innerIcon.style || '',
142
145
  ]);
@@ -213,6 +216,9 @@ export default {
213
216
  agreeprivacyauthorization(t) {
214
217
  this.$emit('agreeprivacyauthorization', t);
215
218
  },
219
+ phoneoneclicklogin(t) {
220
+ this.$emit('phoneoneclicklogin', t);
221
+ },
216
222
  handleTap(t) {
217
223
  if (this.disabled || this.loading) return;
218
224
  this.$emit('click', t);
@@ -237,10 +243,10 @@ export default {
237
243
 
238
244
  /* #ifdef H5 || MP-WEIXIN */
239
245
  :deep(.t-button__loading) + .t-button__content:not(:empty) {
240
- margin-left: 4px;
246
+ margin-left: 8rpx;
241
247
  }
242
248
  :deep(.t-button__icon) + .t-button__content:not(:empty) {
243
- margin-left: 4px;
249
+ margin-left: 8rpx;
244
250
  }
245
251
  /* #endif */
246
252
 
@@ -47,7 +47,7 @@ title | \-
47
47
  ### CSS Variables
48
48
 
49
49
  The component provides the following CSS variables, which can be used to customize styles.
50
- Name | Default Value | Description
50
+ Name | Default Value | Description
51
51
  -- | -- | --
52
52
  --td-calendar-active-color | @brand-color | -
53
53
  --td-calendar-bg-color | @bg-color-container | -
@@ -99,7 +99,7 @@ title | 标题
99
99
  ### CSS Variables
100
100
 
101
101
  组件提供了下列 CSS 变量,可用于自定义样式。
102
- 名称 | 默认值 | 描述
102
+ 名称 | 默认值 | 描述
103
103
  -- | -- | --
104
104
  --td-calendar-active-color | @brand-color | -
105
105
  --td-calendar-bg-color | @bg-color-container | -
@@ -53,8 +53,9 @@
53
53
  </view>
54
54
  </template>
55
55
  <script>
56
- import TIcon from '../icon/icon.vue';
57
56
  import utils from '../common/utils.wxs';
57
+ import TIcon from '../icon/icon.vue';
58
+
58
59
  import props from './calendar-header.props';
59
60
  import { getMonthTitle } from './computed';
60
61
 
@@ -73,24 +73,26 @@
73
73
  </view>
74
74
  </template>
75
75
  <script>
76
- import TPopup from '../popup/popup';
77
- import CalendarTemplate from './template.vue';
78
76
 
79
- import { uniComponent } from '../common/src/index';
80
77
  import { prefix } from '../common/config';
81
- import { coalesce } from '../common/utils';
82
78
 
83
- import props from './props';
84
79
  import TCalendar from '../common/shared/calendar/index';
85
- import useCustomNavbar from '../mixins/using-custom-navbar';
86
- import { getPrevMonth, getPrevYear, getNextMonth, getNextYear } from './utils';
80
+ import { uniComponent } from '../common/src/index';
81
+ import { coalesce } from '../common/utils';
82
+
87
83
  import tools from '../common/utils.wxs';
88
84
  import usingConfig from '../mixins/using-config';
85
+ import useCustomNavbar from '../mixins/using-custom-navbar';
86
+ import TPopup from '../popup/popup';
87
+
89
88
  import {
90
89
  getMonthTitle,
91
90
  getDateLabel,
92
91
  isDateSelected,
93
92
  } from './computed.js';
93
+ import props from './props';
94
+ import CalendarTemplate from './template.vue';
95
+ import { getPrevMonth, getPrevYear, getNextMonth, getNextYear } from './utils';
94
96
 
95
97
 
96
98
  const componentName = 'calendar';
@@ -224,9 +226,9 @@ export default {
224
226
  dataVisible: {
225
227
  handler(v) {
226
228
  if (v) {
227
- this.onScrollIntoView();
228
229
  this.base.value = this.dataValue;
229
230
  this.calcMonths();
231
+ this.onScrollIntoView();
230
232
  }
231
233
  },
232
234
  immediate: true,
@@ -298,7 +300,11 @@ export default {
298
300
  const date = new Date(Array.isArray(value) ? value[0] : value);
299
301
 
300
302
  if (date) {
301
- this.scrollIntoView = `year_${date.getFullYear()}_month_${date.getMonth()}`;
303
+ // 先置空再赋值,确保 scroll-view 在每次打开时都能响应 scroll-into-view 变化并滚动到目标月份
304
+ this.scrollIntoView = '';
305
+ this.$nextTick(() => {
306
+ this.scrollIntoView = `year_${date.getFullYear()}_month_${date.getMonth()}`;
307
+ });
302
308
  }
303
309
  },
304
310
 
@@ -15,11 +15,11 @@
15
15
  <t-icon
16
16
  v-if="usePopup"
17
17
  name="close"
18
+ :custom-style="closeBtnCustomStyle"
18
19
  :t-class="classPrefix + '__close-btn'"
19
20
  size="48rpx"
20
21
  aria-role="button"
21
22
  aria-label="关闭"
22
- :custom-style="closeBtnCustomStyle"
23
23
  @click="handleClose"
24
24
  />
25
25
  <block
@@ -177,16 +177,19 @@
177
177
  </view>
178
178
  </template>
179
179
  <script>
180
- import TIcon from '../icon/icon.vue';
181
180
  import TButton from '../button/button.vue';
181
+
182
+ import { prefix } from '../common/config';
183
+ import { coalesce } from '../common/utils';
182
184
  import utils from '../common/utils.wxs';
185
+ import TIcon from '../icon/icon.vue';
186
+
187
+ import CalendarHeader from './calendar-header.vue';
183
188
  import {
184
189
  getDateLabel,
185
190
  getMonthTitle,
186
191
  } from './computed.js';
187
- import CalendarHeader from './calendar-header.vue';
188
- import { prefix } from '../common/config';
189
- import { coalesce } from '../common/utils';
192
+
190
193
  import props from './template.props';
191
194
 
192
195
 
@@ -220,10 +223,10 @@ export default {
220
223
  closeBtnCustomStyle() {
221
224
  return utils._style({
222
225
  position: 'absolute',
223
- top: '16px',
224
- right: '16px',
225
- margin: '-12px',
226
- padding: '12px',
226
+ top: '32rpx',
227
+ right: '32rpx',
228
+ margin: '-24rpx',
229
+ padding: '24rpx',
227
230
  color: 'var(--td-calendar-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, .9))))',
228
231
  });
229
232
  },
@@ -40,7 +40,7 @@ title | \-
40
40
  ### CSS Variables
41
41
 
42
42
  The component provides the following CSS variables, which can be used to customize styles.
43
- Name | Default Value | Description
43
+ Name | Default Value | Description
44
44
  -- | -- | --
45
45
  --td-cascader-active-color | @brand-color | -
46
46
  --td-cascader-bg-color | @bg-color-container | -
@@ -82,7 +82,7 @@ title | 自定义 `title` 显示内容
82
82
  ### CSS Variables
83
83
 
84
84
  组件提供了下列 CSS 变量,可用于自定义样式。
85
- 名称 | 默认值 | 描述
85
+ 名称 | 默认值 | 描述
86
86
  -- | -- | --
87
87
  --td-cascader-active-color | @brand-color | -
88
88
  --td-cascader-bg-color | @bg-color-container | -