@tdesign/uniapp 0.9.0 → 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 (258) hide show
  1. package/CHANGELOG.md +17 -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 +1 -1
  16. package/dist/badge/README.md +1 -1
  17. package/dist/badge/badge.vue +4 -2
  18. package/dist/button/README.en-US.md +1 -1
  19. package/dist/button/README.md +1 -1
  20. package/dist/button/button.vue +12 -11
  21. package/dist/calendar/README.en-US.md +1 -1
  22. package/dist/calendar/README.md +1 -1
  23. package/dist/calendar/calendar-header.vue +2 -1
  24. package/dist/calendar/calendar.vue +9 -7
  25. package/dist/calendar/template.vue +12 -9
  26. package/dist/cascader/README.en-US.md +1 -1
  27. package/dist/cascader/README.md +1 -1
  28. package/dist/cascader/cascader.vue +8 -8
  29. package/dist/cell/README.en-US.md +1 -1
  30. package/dist/cell/README.md +1 -1
  31. package/dist/cell/cell.vue +34 -36
  32. package/dist/cell-group/cell-group.vue +5 -3
  33. package/dist/check-tag/check-tag.vue +6 -3
  34. package/dist/checkbox/README.en-US.md +1 -1
  35. package/dist/checkbox/README.md +1 -1
  36. package/dist/checkbox/checkbox.vue +5 -4
  37. package/dist/checkbox-group/checkbox-group.vue +5 -3
  38. package/dist/col/col.vue +7 -3
  39. package/dist/collapse/README.en-US.md +1 -1
  40. package/dist/collapse/README.md +1 -1
  41. package/dist/collapse/collapse.vue +6 -4
  42. package/dist/collapse-panel/collapse-panel.vue +15 -6
  43. package/dist/color-picker/README.en-US.md +1 -1
  44. package/dist/color-picker/README.md +1 -1
  45. package/dist/color-picker/color-picker.vue +9 -7
  46. package/dist/color-picker/template.vue +2 -1
  47. package/dist/common/canvas/index.js +1 -1
  48. package/dist/common/shared/color-picker/color.js +1 -0
  49. package/dist/common/src/instantiationDecorator.js +1 -1
  50. package/dist/common/version.js +1 -1
  51. package/dist/config-provider/config-provider.vue +3 -1
  52. package/dist/count-down/README.en-US.md +1 -1
  53. package/dist/count-down/README.md +1 -1
  54. package/dist/count-down/count-down.vue +5 -3
  55. package/dist/date-time-picker/README.en-US.md +1 -1
  56. package/dist/date-time-picker/README.md +1 -1
  57. package/dist/date-time-picker/date-time-picker.vue +8 -6
  58. package/dist/date-time-picker/locale/dayjs.js +6 -6
  59. package/dist/demo-navbar/demo-navbar.vue +1 -1
  60. package/dist/dialog/README.en-US.md +1 -1
  61. package/dist/dialog/README.md +1 -1
  62. package/dist/dialog/dialog.vue +10 -7
  63. package/dist/dialog/index.js +2 -1
  64. package/dist/divider/README.en-US.md +1 -1
  65. package/dist/divider/README.md +1 -1
  66. package/dist/divider/divider.vue +4 -2
  67. package/dist/draggable/draggable.vue +5 -2
  68. package/dist/drawer/README.en-US.md +1 -1
  69. package/dist/drawer/README.md +1 -1
  70. package/dist/drawer/drawer.vue +7 -5
  71. package/dist/dropdown-item/dropdown-item.vue +14 -11
  72. package/dist/dropdown-menu/README.en-US.md +1 -1
  73. package/dist/dropdown-menu/README.md +1 -1
  74. package/dist/dropdown-menu/dropdown-menu.vue +10 -8
  75. package/dist/empty/README.en-US.md +1 -1
  76. package/dist/empty/README.md +1 -1
  77. package/dist/empty/empty.vue +5 -4
  78. package/dist/fab/README.en-US.md +1 -1
  79. package/dist/fab/README.md +1 -1
  80. package/dist/fab/fab.vue +7 -4
  81. package/dist/footer/README.en-US.md +1 -1
  82. package/dist/footer/README.md +1 -1
  83. package/dist/footer/footer.vue +8 -7
  84. package/dist/form/README.en-US.md +3 -1
  85. package/dist/form/README.md +3 -1
  86. package/dist/form/form.vue +4 -2
  87. package/dist/form/props.ts +9 -0
  88. package/dist/form/type.ts +5 -0
  89. package/dist/form-item/README.en-US.md +2 -1
  90. package/dist/form-item/README.md +2 -1
  91. package/dist/form-item/form-item.vue +8 -6
  92. package/dist/form-item/props.ts +8 -0
  93. package/dist/form-item/type.ts +4 -0
  94. package/dist/grid/README.en-US.md +1 -1
  95. package/dist/grid/README.md +1 -1
  96. package/dist/grid/grid.vue +4 -3
  97. package/dist/grid-item/README.en-US.md +1 -1
  98. package/dist/grid-item/README.md +1 -1
  99. package/dist/grid-item/grid-item.vue +8 -6
  100. package/dist/guide/README.en-US.md +1 -1
  101. package/dist/guide/README.md +1 -1
  102. package/dist/guide/guide.vue +8 -7
  103. package/dist/icon/icon.vue +5 -2
  104. package/dist/image/README.en-US.md +1 -1
  105. package/dist/image/README.md +1 -1
  106. package/dist/image/image.vue +6 -5
  107. package/dist/image-viewer/README.en-US.md +4 -3
  108. package/dist/image-viewer/README.md +4 -3
  109. package/dist/image-viewer/image-viewer.css +12 -0
  110. package/dist/image-viewer/image-viewer.vue +84 -21
  111. package/dist/image-viewer/props.ts +5 -0
  112. package/dist/image-viewer/type.ts +6 -1
  113. package/dist/indexes/README.en-US.md +1 -1
  114. package/dist/indexes/README.md +1 -1
  115. package/dist/indexes/indexes.vue +7 -4
  116. package/dist/indexes-anchor/README.en-US.md +1 -1
  117. package/dist/indexes-anchor/README.md +1 -1
  118. package/dist/indexes-anchor/indexes-anchor.vue +5 -3
  119. package/dist/input/README.en-US.md +1 -1
  120. package/dist/input/README.md +1 -1
  121. package/dist/input/input.vue +1 -1
  122. package/dist/link/README.en-US.md +1 -1
  123. package/dist/link/README.md +1 -1
  124. package/dist/link/link.vue +6 -3
  125. package/dist/loading/README.en-US.md +1 -1
  126. package/dist/loading/README.md +1 -1
  127. package/dist/loading/loading.vue +4 -2
  128. package/dist/message/index.js +2 -1
  129. package/dist/message/message.vue +4 -3
  130. package/dist/message-item/index.js +1 -1
  131. package/dist/message-item/message-item.vue +7 -5
  132. package/dist/mixins/page-scroll.js +1 -1
  133. package/dist/mixins/using-config.js +1 -1
  134. package/dist/mixins/using-custom-navbar.js +1 -1
  135. package/dist/navbar/README.en-US.md +1 -1
  136. package/dist/navbar/README.md +2 -2
  137. package/dist/navbar/navbar.vue +5 -4
  138. package/dist/notice-bar/README.en-US.md +1 -1
  139. package/dist/notice-bar/README.md +1 -1
  140. package/dist/notice-bar/notice-bar.vue +4 -3
  141. package/dist/overlay/README.en-US.md +1 -1
  142. package/dist/overlay/README.md +1 -1
  143. package/dist/overlay/overlay.vue +6 -3
  144. package/dist/picker/README.en-US.md +1 -1
  145. package/dist/picker/README.md +1 -1
  146. package/dist/picker/picker.vue +11 -9
  147. package/dist/picker-item/README.en-US.md +1 -1
  148. package/dist/picker-item/README.md +1 -1
  149. package/dist/picker-item/picker-item.vue +6 -5
  150. package/dist/popover/README.en-US.md +1 -1
  151. package/dist/popover/README.md +1 -1
  152. package/dist/popover/popover.vue +8 -5
  153. package/dist/popup/README.en-US.md +1 -1
  154. package/dist/popup/README.md +1 -1
  155. package/dist/popup/popup.vue +8 -5
  156. package/dist/progress/README.en-US.md +1 -1
  157. package/dist/progress/README.md +1 -1
  158. package/dist/progress/progress.vue +5 -4
  159. package/dist/pull-down-refresh/README.en-US.md +1 -1
  160. package/dist/pull-down-refresh/README.md +1 -1
  161. package/dist/pull-down-refresh/pull-down-refresh.vue +7 -5
  162. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +8 -7
  163. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +2 -1
  164. package/dist/qrcode/qrcode.vue +5 -3
  165. package/dist/radio/README.en-US.md +1 -1
  166. package/dist/radio/README.md +1 -1
  167. package/dist/radio/radio.vue +5 -4
  168. package/dist/radio-group/radio-group.vue +5 -4
  169. package/dist/rate/README.en-US.md +1 -1
  170. package/dist/rate/README.md +1 -1
  171. package/dist/rate/rate.vue +8 -5
  172. package/dist/result/README.en-US.md +1 -1
  173. package/dist/result/README.md +1 -1
  174. package/dist/result/result.vue +5 -4
  175. package/dist/row/row.vue +7 -3
  176. package/dist/scroll-view/scroll-view.vue +1 -1
  177. package/dist/search/README.en-US.md +1 -1
  178. package/dist/search/README.md +1 -1
  179. package/dist/search/search.vue +14 -9
  180. package/dist/segmented/README.en-US.md +1 -1
  181. package/dist/segmented/README.md +1 -1
  182. package/dist/segmented/segmented.vue +6 -3
  183. package/dist/side-bar/README.en-US.md +1 -1
  184. package/dist/side-bar/README.md +1 -1
  185. package/dist/side-bar/side-bar.vue +5 -3
  186. package/dist/side-bar-item/side-bar-item.vue +7 -6
  187. package/dist/skeleton/README.en-US.md +1 -1
  188. package/dist/skeleton/README.md +1 -1
  189. package/dist/skeleton/skeleton.vue +6 -3
  190. package/dist/slider/README.en-US.md +1 -1
  191. package/dist/slider/README.md +1 -1
  192. package/dist/slider/slider.vue +7 -5
  193. package/dist/step-item/step-item.vue +5 -4
  194. package/dist/stepper/README.en-US.md +1 -1
  195. package/dist/stepper/README.md +1 -1
  196. package/dist/stepper/stepper.vue +5 -3
  197. package/dist/steps/README.en-US.md +1 -1
  198. package/dist/steps/README.md +1 -1
  199. package/dist/steps/steps.vue +5 -3
  200. package/dist/sticky/sticky.vue +4 -3
  201. package/dist/swipe-cell/swipe-cell.vue +7 -5
  202. package/dist/swiper/README.en-US.md +1 -1
  203. package/dist/swiper/README.md +1 -1
  204. package/dist/swiper/swiper.vue +7 -5
  205. package/dist/swiper-nav/swiper-nav.vue +6 -3
  206. package/dist/switch/README.en-US.md +1 -1
  207. package/dist/switch/README.md +1 -1
  208. package/dist/switch/switch.vue +5 -4
  209. package/dist/tab-bar/README.en-US.md +1 -1
  210. package/dist/tab-bar/README.md +1 -1
  211. package/dist/tab-bar/tab-bar.vue +5 -3
  212. package/dist/tab-bar-item/tab-bar-item.vue +6 -4
  213. package/dist/tab-panel/tab-panel.vue +5 -3
  214. package/dist/table/README.en-US.md +4 -4
  215. package/dist/table/README.md +4 -4
  216. package/dist/table/table.css +2 -2
  217. package/dist/table/table.vue +38 -7
  218. package/dist/tabs/README.en-US.md +1 -1
  219. package/dist/tabs/README.md +1 -1
  220. package/dist/tabs/tabs.vue +11 -9
  221. package/dist/tag/README.en-US.md +1 -1
  222. package/dist/tag/README.md +1 -1
  223. package/dist/tag/tag.vue +6 -3
  224. package/dist/textarea/README.en-US.md +1 -1
  225. package/dist/textarea/README.md +1 -1
  226. package/dist/textarea/textarea.vue +6 -3
  227. package/dist/toast/README.en-US.md +1 -1
  228. package/dist/toast/README.md +1 -1
  229. package/dist/toast/toast.vue +8 -7
  230. package/dist/transition/transition.vue +2 -2
  231. package/dist/tree-select/README.en-US.md +1 -1
  232. package/dist/tree-select/README.md +1 -1
  233. package/dist/tree-select/tree-select.vue +14 -9
  234. package/dist/types/action-sheet.d.ts +1 -1
  235. package/dist/types/avatar-group.d.ts +1 -1
  236. package/dist/types/avatar.d.ts +1 -1
  237. package/dist/types/back-top.d.ts +1 -1
  238. package/dist/types/badge.d.ts +1 -1
  239. package/dist/types/button.d.ts +1 -1
  240. package/dist/types/calendar.d.ts +1 -1
  241. package/dist/types/cascader.d.ts +1 -1
  242. package/dist/types/cell-group.d.ts +1 -1
  243. package/dist/types/cell.d.ts +1 -1
  244. package/dist/types/check-tag.d.ts +1 -1
  245. package/dist/types/checkbox-group.d.ts +1 -1
  246. package/dist/types/checkbox.d.ts +1 -1
  247. package/dist/types/col.d.ts +1 -1
  248. package/dist/types/collapse-panel.d.ts +1 -1
  249. package/dist/types/collapse.d.ts +1 -1
  250. package/dist/types/color-picker.d.ts +1 -1
  251. package/dist/upload/README.en-US.md +1 -1
  252. package/dist/upload/README.md +1 -1
  253. package/dist/upload/upload.vue +32 -32
  254. package/dist/watermark/README.en-US.md +1 -1
  255. package/dist/watermark/README.md +1 -1
  256. package/dist/watermark/utils/generateBase64Url.js +6 -6
  257. package/dist/watermark/watermark.vue +4 -3
  258. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ 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
+
8
25
  ## 🌈 0.9.0 `2026-05-08`
9
26
 
10
27
  ### 🚀 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 | -
@@ -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 | -
@@ -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 | -
@@ -79,13 +79,14 @@
79
79
  </button>
80
80
  </template>
81
81
  <script>
82
- import TIcon from '../icon/icon';
83
- import TLoading from '../loading/loading';
84
- import { uniComponent } from '../common/src/index';
85
82
  import { prefix } from '../common/config';
86
- import props from './props';
83
+ import { uniComponent } from '../common/src/index';
87
84
  import { calcIcon, addUnit } from '../common/utils';
88
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';
89
90
 
90
91
 
91
92
  const name = `${prefix}-button`;
@@ -127,10 +128,10 @@ export default {
127
128
  return {};
128
129
  }
129
130
  const fontSize = {
130
- 'extra-small': 'var(--td-button-extra-small-icon-font-size, 18px)',
131
- small: 'var(--td-button-small-icon-font-size, 18px)',
132
- medium: 'var(--td-button-medium-icon-font-size, 20px)',
133
- 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)',
134
135
  };
135
136
 
136
137
  return tools._style([
@@ -138,7 +139,7 @@ export default {
138
139
  fontSize: this.innerIcon.size
139
140
  ? addUnit(this.innerIcon.size)
140
141
  : fontSize[this.size || 'medium'],
141
- borderRadius: 'var(--td-button-icon-border-radius, 4px)',
142
+ borderRadius: 'var(--td-button-icon-border-radius, 8rpx)',
142
143
  },
143
144
  this.innerIcon.style || '',
144
145
  ]);
@@ -242,10 +243,10 @@ export default {
242
243
 
243
244
  /* #ifdef H5 || MP-WEIXIN */
244
245
  :deep(.t-button__loading) + .t-button__content:not(:empty) {
245
- margin-left: 4px;
246
+ margin-left: 8rpx;
246
247
  }
247
248
  :deep(.t-button__icon) + .t-button__content:not(:empty) {
248
- margin-left: 4px;
249
+ margin-left: 8rpx;
249
250
  }
250
251
  /* #endif */
251
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';
@@ -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 | -
@@ -132,18 +132,18 @@
132
132
  </view>
133
133
  </template>
134
134
  <script>
135
- import TIcon from '../icon/icon';
136
- import TPopup from '../popup/popup';
137
- import TTabs from '../tabs/tabs';
138
- import TTabPanel from '../tab-panel/tab-panel.vue';
139
- import TRadioGroup from '../radio-group/radio-group';
140
- import { uniComponent } from '../common/src/index';
141
135
  import { prefix } from '../common/config';
142
- import props from './props';
136
+ import { uniComponent } from '../common/src/index';
143
137
  import { getRect, coalesce, nextTick } from '../common/utils';
144
-
145
138
  import tools from '../common/utils.wxs';
139
+ import TIcon from '../icon/icon';
146
140
  import usingConfig from '../mixins/using-config';
141
+ import TPopup from '../popup/popup';
142
+ import TRadioGroup from '../radio-group/radio-group';
143
+ import TTabPanel from '../tab-panel/tab-panel.vue';
144
+ import TTabs from '../tabs/tabs';
145
+
146
+ import props from './props';
147
147
 
148
148
 
149
149
  const componentName = 'cascader';
@@ -83,7 +83,7 @@ t-class-title | \-
83
83
  ### CSS Variables
84
84
 
85
85
  The component provides the following CSS variables, which can be used to customize styles.
86
- Name | Default Value | Description
86
+ Name | Default Value | Description
87
87
  -- | -- | --
88
88
  --td-cell-group-border-color | @component-stroke | -
89
89
  --td-cell-group-title-bg-color | @bg-color-secondarycontainer | -
@@ -116,7 +116,7 @@ t-class-title | 标题样式类
116
116
  ### CSS Variables
117
117
 
118
118
  组件提供了下列 CSS 变量,可用于自定义样式。
119
- 名称 | 默认值 | 描述
119
+ 名称 | 默认值 | 描述
120
120
  -- | -- | --
121
121
  --td-cell-group-border-color | @component-stroke | -
122
122
  --td-cell-group-title-bg-color | @bg-color-secondarycontainer | -