@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
@@ -8,10 +8,10 @@
8
8
  </view>
9
9
  </template>
10
10
  <script>
11
- import { uniComponent } from '../common/src/index';
12
- import transition from '../mixins/transition';
13
11
  import { prefix } from '../common/config';
12
+ import { uniComponent } from '../common/src/index';
14
13
  import tools from '../common/utils.wxs';
14
+ import transition from '../mixins/transition';
15
15
 
16
16
 
17
17
  const name = `${prefix}-transition`;
@@ -36,7 +36,7 @@ t-class-right-item-label | \-
36
36
  ### CSS Variables
37
37
 
38
38
  The component provides the following CSS variables, which can be used to customize styles.
39
- Name | Default Value | Description
39
+ Name | Default Value | Description
40
40
  -- | -- | --
41
41
  --td-tree-bg-color | @bg-color-container | -
42
42
  --td-tree-colum-text-color | @text-color-primary | -
@@ -68,7 +68,7 @@ t-class-right-item-label | 右侧第一列子项标签样式类
68
68
  ### CSS Variables
69
69
 
70
70
  组件提供了下列 CSS 变量,可用于自定义样式。
71
- 名称 | 默认值 | 描述
71
+ 名称 | 默认值 | 描述
72
72
  -- | -- | --
73
73
  --td-tree-bg-color | @bg-color-container | -
74
74
  --td-tree-colum-text-color | @text-color-primary | -
@@ -105,22 +105,27 @@
105
105
  </view>
106
106
  </template>
107
107
  <script>
108
- import TRadio from '../radio/radio';
109
- import TRadioGroup from '../radio-group/radio-group';
110
108
  import TCheckbox from '../checkbox/checkbox';
111
109
  import TCheckboxGroup from '../checkbox-group/checkbox-group';
112
- import TSideBar from '../side-bar/side-bar';
113
- import TSideBarItem from '../side-bar-item/side-bar-item';
114
- import TScrollView from '../scroll-view/scroll-view.vue';
115
110
 
116
- import { uniComponent } from '../common/src/index';
117
- import { isDef } from '../common/validator';
118
111
  import { prefix } from '../common/config';
112
+ import { uniComponent } from '../common/src/index';
119
113
  import { getTreeDepth, coalesce, nextTick } from '../common/utils';
120
- import props from './props';
114
+
121
115
  import tools from '../common/utils.wxs';
122
- import { getTreeClass } from './computed.js';
116
+ import { isDef } from '../common/validator';
117
+
118
+
123
119
  import { canUseVirtualHost } from '../common/version';
120
+ import TRadio from '../radio/radio';
121
+ import TRadioGroup from '../radio-group/radio-group';
122
+ import TScrollView from '../scroll-view/scroll-view.vue';
123
+ import TSideBar from '../side-bar/side-bar';
124
+ import TSideBarItem from '../side-bar-item/side-bar-item';
125
+
126
+ import { getTreeClass } from './computed.js';
127
+
128
+ import props from './props';
124
129
 
125
130
  const name = `${prefix}-tree-select`;
126
131
 
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdActionSheetProps } from '../action-sheet/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type ActionSheetProps = ExtractNonOnProps<TdActionSheetProps>;
5
5
  export type ActionSheetEmits = TransformEventHandlers<TdActionSheetProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdAvatarGroupProps } from '../avatar-group/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type AvatarGroupProps = ExtractNonOnProps<TdAvatarGroupProps>;
5
5
  export type AvatarGroupEmits = TransformEventHandlers<TdAvatarGroupProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdAvatarProps } from '../avatar/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type AvatarProps = ExtractNonOnProps<TdAvatarProps>;
5
5
  export type AvatarEmits = TransformEventHandlers<TdAvatarProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdBackTopProps } from '../back-top/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type BackTopProps = ExtractNonOnProps<TdBackTopProps>;
5
5
  export type BackTopEmits = TransformEventHandlers<TdBackTopProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdBadgeProps } from '../badge/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type BadgeProps = ExtractNonOnProps<TdBadgeProps>;
5
5
  export type BadgeEmits = TransformEventHandlers<TdBadgeProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdButtonProps } from '../button/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type ButtonProps = ExtractNonOnProps<TdButtonProps>;
5
5
  export type ButtonEmits = TransformEventHandlers<TdButtonProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCalendarProps } from '../calendar/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CalendarProps = ExtractNonOnProps<TdCalendarProps>;
5
5
  export type CalendarEmits = TransformEventHandlers<TdCalendarProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCascaderProps } from '../cascader/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CascaderProps = ExtractNonOnProps<TdCascaderProps>;
5
5
  export type CascaderEmits = TransformEventHandlers<TdCascaderProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCellGroupProps } from '../cell-group/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CellGroupProps = ExtractNonOnProps<TdCellGroupProps>;
5
5
  export type CellGroupEmits = TransformEventHandlers<TdCellGroupProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCellProps } from '../cell/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CellProps = ExtractNonOnProps<TdCellProps>;
5
5
  export type CellEmits = TransformEventHandlers<TdCellProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCheckTagProps } from '../check-tag/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CheckTagProps = ExtractNonOnProps<TdCheckTagProps>;
5
5
  export type CheckTagEmits = TransformEventHandlers<TdCheckTagProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCheckboxGroupProps } from '../checkbox-group/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CheckboxGroupProps = ExtractNonOnProps<TdCheckboxGroupProps>;
5
5
  export type CheckboxGroupEmits = TransformEventHandlers<TdCheckboxGroupProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCheckboxProps } from '../checkbox/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CheckboxProps = ExtractNonOnProps<TdCheckboxProps>;
5
5
  export type CheckboxEmits = TransformEventHandlers<TdCheckboxProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdColProps } from '../col/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type ColProps = ExtractNonOnProps<TdColProps>;
5
5
  export type ColEmits = TransformEventHandlers<TdColProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCollapsePanelProps } from '../collapse-panel/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CollapsePanelProps = ExtractNonOnProps<TdCollapsePanelProps>;
5
5
  export type CollapsePanelEmits = TransformEventHandlers<TdCollapsePanelProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdCollapseProps } from '../collapse/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type CollapseProps = ExtractNonOnProps<TdCollapseProps>;
5
5
  export type CollapseEmits = TransformEventHandlers<TdCollapseProps, true>;
@@ -1,5 +1,5 @@
1
- import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
1
  import type { TdColorPickerProps } from '../color-picker/type';
2
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
3
3
 
4
4
  export type ColorPickerProps = ExtractNonOnProps<TdColorPickerProps>;
5
5
  export type ColorPickerEmits = TransformEventHandlers<TdColorPickerProps, true>;
@@ -55,6 +55,7 @@ export * from '../rate/type';
55
55
  export * from '../result/type';
56
56
  export * from '../row/type';
57
57
  export * from '../search/type';
58
+ export * from '../segmented/type';
58
59
  export * from '../side-bar/type';
59
60
  export * from '../side-bar-item/type';
60
61
  export * from '../skeleton/type';
@@ -70,6 +71,7 @@ export * from '../switch/type';
70
71
  export * from '../tab-bar/type';
71
72
  export * from '../tab-bar-item/type';
72
73
  export * from '../tab-panel/type';
74
+ export * from '../table/type';
73
75
  export * from '../tabs/type';
74
76
  export * from '../tag/type';
75
77
  export * from '../textarea/type';
@@ -0,0 +1,7 @@
1
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
+ import type { TdSegmentedProps } from '../segmented/type';
3
+
4
+ export type SegmentedProps = ExtractNonOnProps<TdSegmentedProps>;
5
+ export type SegmentedEmits = TransformEventHandlers<TdSegmentedProps, true>;
6
+ declare const SegmentedComponent: import('vue').DefineComponent<SegmentedProps, {}, {}, {}, {}, {}, {}, SegmentedEmits, any>;
7
+ export default SegmentedComponent;
@@ -0,0 +1,7 @@
1
+ import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2
+ import type { TdTableProps } from '../table/type';
3
+
4
+ export type TableProps = ExtractNonOnProps<TdTableProps>;
5
+ export type TableEmits = TransformEventHandlers<TdTableProps, true>;
6
+ declare const TableComponent: import('vue').DefineComponent<TableProps, {}, {}, {}, {}, {}, {}, TableEmits, any>;
7
+ export default TableComponent;
@@ -48,7 +48,7 @@ add-content | \-
48
48
  ### CSS Variables
49
49
 
50
50
  The component provides the following CSS variables, which can be used to customize styles.
51
- Name | Default Value | Description
51
+ Name | Default Value | Description
52
52
  -- | -- | --
53
53
  --td-upload-add-bg-color | @bg-color-secondarycontainer | -
54
54
  --td-upload-add-color | @text-color-placeholder | -
@@ -103,7 +103,7 @@ add-content | 自定义 `add-content` 显示内容
103
103
  ### CSS Variables
104
104
 
105
105
  组件提供了下列 CSS 变量,可用于自定义样式。
106
- 名称 | 默认值 | 描述
106
+ 名称 | 默认值 | 描述
107
107
  -- | -- | --
108
108
  --td-upload-add-bg-color | @bg-color-secondarycontainer | -
109
109
  --td-upload-add-color | @text-color-placeholder | -
@@ -49,14 +49,14 @@
49
49
  :autoplay="false"
50
50
  objectFit="contain"
51
51
  :data-file="file"
52
- @click.stop="onFileClick"
52
+ @click.stop="(e) => onFileClick(e, {file, index})"
53
53
  />
54
54
  <view
55
55
  v-if="file.status && file.status != 'done'"
56
56
  :class="classPrefix + '__progress-mask'"
57
57
  :data-index="index"
58
58
  :data-file="file"
59
- @click.stop="onFileClick"
59
+ @click.stop="(e) => onFileClick(e, {file, index})"
60
60
  >
61
61
  <block v-if="file.status == 'loading'">
62
62
  <t-icon
@@ -88,7 +88,7 @@
88
88
  :data-index="index"
89
89
  aria-role="button"
90
90
  aria-label="删除"
91
- @click.stop="onDelete"
91
+ @click.stop="(e) => onDelete(e, {index})"
92
92
  >
93
93
  <t-icon
94
94
  name="close"
@@ -177,14 +177,14 @@
177
177
  :autoplay="false"
178
178
  objectFit="contain"
179
179
  :data-file="file"
180
- @click.stop="onFileClick"
180
+ @click.stop="(e) => onFileClick(e, {file, index})"
181
181
  />
182
182
  <view
183
183
  v-if="file.status && file.status != 'done'"
184
184
  :class="classPrefix + '__progress-mask'"
185
185
  :data-index="index"
186
186
  :data-file="file"
187
- @click.stop="onFileClick"
187
+ @click.stop="(e) => onFileClick(e, {file, index})"
188
188
  >
189
189
  <block v-if="file.status == 'loading'">
190
190
  <t-icon
@@ -217,7 +217,7 @@
217
217
  :data-url="file.url"
218
218
  aria-role="button"
219
219
  aria-label="删除"
220
- @click.stop="onDelete"
220
+ @click.stop="(e) => onDelete(e, {index})"
221
221
  >
222
222
  <t-icon
223
223
  name="close"
@@ -264,20 +264,19 @@
264
264
  </view>
265
265
  </template>
266
266
  <script>
267
+ import { prefix } from '../common/config';
268
+ import { parseEventDynamicCode } from '../common/event/dynamic';
269
+ import { uniComponent } from '../common/src/index';
270
+ import { isOverSize, coalesce, isWxWork, isPC } from '../common/utils';
271
+ import tools from '../common/utils.wxs';
272
+ import { isObject } from '../common/validator';
267
273
  import TGrid from '../grid/grid';
268
274
  import TGridItem from '../grid-item/grid-item';
269
275
  import TIcon from '../icon/icon';
270
276
  import TImage from '../image/image';
271
- import { uniComponent } from '../common/src/index';
272
- import props from './props';
273
- import { prefix } from '../common/config';
274
- import { isOverSize, coalesce, isWxWork, isPC } from '../common/utils';
275
- import { isObject } from '../common/validator';
276
- import tools from '../common/utils.wxs';
277
- import {
278
- getWrapperAriaRole,
279
- getWrapperAriaLabel,
280
- } from './upload.computed.js';
277
+
278
+ import usingConfig from '../mixins/using-config';
279
+
281
280
  import {
282
281
  longPress,
283
282
  touchMove,
@@ -285,10 +284,15 @@ import {
285
284
  baseDataObserver,
286
285
  listObserver,
287
286
  } from './drag.computed.js';
288
- import { parseEventDynamicCode } from '../common/event/dynamic';
287
+ import props from './props';
288
+
289
+
290
+ import {
291
+ getWrapperAriaRole,
292
+ getWrapperAriaLabel,
293
+ } from './upload.computed.js';
289
294
 
290
295
 
291
- import usingConfig from '../mixins/using-config';
292
296
  const componentName = 'upload';
293
297
  const name = `${prefix}-${componentName}`;
294
298
 
@@ -424,8 +428,7 @@ export default {
424
428
  this.$emit('fail', err);
425
429
  },
426
430
 
427
- onFileClick(e) {
428
- const { file, index } = e.currentTarget.dataset;
431
+ onFileClick(e, { file, index }) {
429
432
  this.$emit('click', { index, file });
430
433
  },
431
434
 
@@ -473,8 +476,7 @@ export default {
473
476
  return false;
474
477
  },
475
478
 
476
- onDelete(e) {
477
- const { index } = e.currentTarget.dataset;
479
+ onDelete(e, { index }) {
478
480
  this.deleteHandle(index);
479
481
  },
480
482
 
@@ -545,7 +547,7 @@ export default {
545
547
  const { classPrefix, rows, column } = this;
546
548
 
547
549
  let query;
548
- // #ifdef H5 || APP-PLUS
550
+ // #ifdef H5 || APP
549
551
  query = uni.createSelectorQuery().in(this);
550
552
  // #endif
551
553
  if (!query) {
@@ -555,7 +557,7 @@ export default {
555
557
 
556
558
  let selectorGridItem;
557
559
  let selectorGrid;
558
- // #ifdef H5 || APP-PLUS
560
+ // #ifdef H5 || APP
559
561
  selectorGridItem = '.t-grid-item';
560
562
  selectorGrid = '.t-grid';
561
563
  // #endif
@@ -608,22 +610,21 @@ export default {
608
610
  return previewMediaSources;
609
611
  },
610
612
 
611
- onPreview(e) {
612
- this.onFileClick(e);
613
+ onPreview(e, { file, index }) {
614
+ this.onFileClick(e, { file, index });
613
615
  const { preview } = this;
614
616
 
615
617
  if (!preview) return;
616
618
 
617
619
  const usePreviewMedia = this.customFiles.some(file => file.type === 'video');
618
620
  if (usePreviewMedia) {
619
- this.onPreviewMedia(e);
621
+ this.onPreviewMedia({ index });
620
622
  } else {
621
- this.onPreviewImage(e);
623
+ this.onPreviewImage({ index });
622
624
  }
623
625
  },
624
626
 
625
- onPreviewImage(e) {
626
- const { index } = e.currentTarget.dataset;
627
+ onPreviewImage({ index }) {
627
628
  const urls = this.customFiles.filter(file => file.percent !== -1).map(file => file.url);
628
629
  const current = this.customFiles[index]?.url;
629
630
  uni.previewImage({
@@ -635,8 +636,7 @@ export default {
635
636
  });
636
637
  },
637
638
 
638
- onPreviewMedia(e) {
639
- const { index: current } = e.currentTarget.dataset;
639
+ onPreviewMedia({ index: current }) {
640
640
  const sources = this.getPreviewMediaSources();
641
641
  uni.previewMedia({
642
642
  sources,
@@ -51,7 +51,7 @@ url | String | - | \- | N
51
51
  ### CSS Variables
52
52
 
53
53
  The component provides the following CSS variables, which can be used to customize styles.
54
- Name | Default Value | Description
54
+ Name | Default Value | Description
55
55
  -- | -- | --
56
56
  --watermark-left-0 | --watermark-left-0 | -
57
57
  --watermark-left-25 | --watermark-left-25 | -
@@ -105,7 +105,7 @@ url | String | - | 水印图片源地址,为了显示清楚,建议导出 2
105
105
  ### CSS Variables
106
106
 
107
107
  组件提供了下列 CSS 变量,可用于自定义样式。
108
- 名称 | 默认值 | 描述
108
+ 名称 | 默认值 | 描述
109
109
  -- | -- | --
110
110
  --watermark-left-0 | --watermark-left-0 | -
111
111
  --watermark-left-25 | --watermark-left-25 | -
@@ -106,7 +106,7 @@ export default async function generateBase64Url(
106
106
  ctx.globalAlpha = alpha;
107
107
 
108
108
  // h5需要全局缩放
109
- // #ifdef H5 || APP-PLUS
109
+ // #ifdef H5 || APP
110
110
  ctx.scale(1 / ratio, 1 / ratio);
111
111
  // #endif
112
112
 
@@ -152,7 +152,7 @@ export default async function generateBase64Url(
152
152
 
153
153
  // TODO:其他技术栈修复了「灰度效果只影响图片,不影响文字」的bug,因为小程序不能创建临时canvas,暂时没有想到比较优雅的解决方案
154
154
  if (isGrayscale) {
155
- // #ifdef APP-PLUS
155
+ // #ifdef APP
156
156
  ctx.drawImage(
157
157
  img,
158
158
  offsetX,
@@ -162,7 +162,7 @@ export default async function generateBase64Url(
162
162
  );
163
163
  // #endif
164
164
 
165
- // #ifndef APP-PLUS
165
+ // #ifndef APP
166
166
  ctx.drawImage(
167
167
  img,
168
168
  offsetX,
@@ -189,7 +189,7 @@ export default async function generateBase64Url(
189
189
  y: 0,
190
190
  });
191
191
  } else {
192
- // #ifdef APP-PLUS
192
+ // #ifdef APP
193
193
  ctx.drawImage(
194
194
  img,
195
195
  offsetX,
@@ -199,7 +199,7 @@ export default async function generateBase64Url(
199
199
  );
200
200
  // #endif
201
201
 
202
- // #ifndef APP-PLUS
202
+ // #ifndef APP
203
203
  ctx.drawImage(
204
204
  img,
205
205
  offsetX,
@@ -257,7 +257,7 @@ export default async function generateBase64Url(
257
257
  );
258
258
  }
259
259
  }
260
- // #ifdef APP-PLUS
260
+ // #ifdef APP
261
261
  ctx.draw();
262
262
  // #endif
263
263
 
@@ -22,11 +22,12 @@
22
22
  </template>
23
23
 
24
24
  <script>
25
- import tools from '../common/utils.wxs';
26
- import watermarkProps from './props';
27
25
  import { prefix } from '../common/config';
28
26
  import { uniComponent } from '../common/src/index';
29
27
  import { appBaseInfo, nextTick } from '../common/utils';
28
+ import tools from '../common/utils.wxs';
29
+
30
+ import watermarkProps from './props';
30
31
  import generateBase64Url from './utils/generateBase64Url';
31
32
  import randomMovingStyle from './utils/randomMovingStyle';
32
33
 
@@ -57,7 +58,7 @@ export default {
57
58
  let result = 'width: 100px; height: 100px;';
58
59
  let shouldHide = true;
59
60
 
60
- // #ifdef APP-PLUS || MP-ALIPAY
61
+ // #ifdef APP || MP-ALIPAY
61
62
  if (!this.initialed) {
62
63
  shouldHide = false;
63
64
  }
package/global.d.ts CHANGED
@@ -58,6 +58,7 @@ declare module 'vue' {
58
58
  TResult: typeof import('@tdesign/uniapp/result/result.vue').default;
59
59
  TRow: typeof import('@tdesign/uniapp/row/row.vue').default;
60
60
  TSearch: typeof import('@tdesign/uniapp/search/search.vue').default;
61
+ TSegmented: typeof import('@tdesign/uniapp/segmented/segmented.vue').default;
61
62
  TSideBar: typeof import('@tdesign/uniapp/side-bar/side-bar.vue').default;
62
63
  TSideBarItem: typeof import('@tdesign/uniapp/side-bar-item/side-bar-item.vue').default;
63
64
  TSkeleton: typeof import('@tdesign/uniapp/skeleton/skeleton.vue').default;
@@ -73,6 +74,7 @@ declare module 'vue' {
73
74
  TTabBar: typeof import('@tdesign/uniapp/tab-bar/tab-bar.vue').default;
74
75
  TTabBarItem: typeof import('@tdesign/uniapp/tab-bar-item/tab-bar-item.vue').default;
75
76
  TTabPanel: typeof import('@tdesign/uniapp/tab-panel/tab-panel.vue').default;
77
+ TTable: typeof import('@tdesign/uniapp/table/table.vue').default;
76
78
  TTabs: typeof import('@tdesign/uniapp/tabs/tabs.vue').default;
77
79
  TTag: typeof import('@tdesign/uniapp/tag/tag.vue').default;
78
80
  TTextarea: typeof import('@tdesign/uniapp/textarea/textarea.vue').default;