@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
@@ -216,19 +216,22 @@
216
216
  </t-popup>
217
217
  </template>
218
218
  <script>
219
- import TPopup from '../popup/popup';
220
- import TIcon from '../icon/icon';
221
219
  import TButton from '../button/button';
222
- import { uniComponent } from '../common/src/index';
223
220
  import { prefix } from '../common/config';
224
- import props from './props';
221
+
222
+ import { getFunctionalMixin } from '../common/functional/mixin';
223
+ import { uniComponent } from '../common/src/index';
225
224
  import { toCamel, coalesce, toPascal } from '../common/utils';
225
+ import tools from '../common/utils.wxs';
226
226
  import { isObject } from '../common/validator';
227
+ import { canUseVirtualHost } from '../common/version';
228
+ import TIcon from '../icon/icon';
227
229
  import useCustomNavbar from '../mixins/using-custom-navbar';
228
- import tools from '../common/utils.wxs';
230
+ import TPopup from '../popup/popup';
231
+
229
232
  import { getActionClass } from './computed.js';
230
- import { getFunctionalMixin } from '../common/functional/mixin';
231
- import { canUseVirtualHost } from '../common/version';
233
+
234
+ import props from './props';
232
235
 
233
236
  const name = `${prefix}-dialog`;
234
237
 
@@ -1,6 +1,7 @@
1
- import props from './props';
2
1
  import { getInstance } from '../common/utils';
3
2
 
3
+ import props from './props';
4
+
4
5
 
5
6
  const defaultOptions = {
6
7
  actions: [],
@@ -28,7 +28,7 @@ t-class-content | \-
28
28
  ### CSS Variables
29
29
 
30
30
  The component provides the following CSS variables, which can be used to customize styles.
31
- Name | Default Value | Description
31
+ Name | Default Value | Description
32
32
  -- | -- | --
33
33
  --td-divider-border-width | 2rpx | -
34
34
  --td-divider-color | @bg-color-component | -
@@ -54,7 +54,7 @@ t-class-content | 内容样式类
54
54
  ### CSS Variables
55
55
 
56
56
  组件提供了下列 CSS 变量,可用于自定义样式。
57
- 名称 | 默认值 | 描述
57
+ 名称 | 默认值 | 描述
58
58
  -- | -- | --
59
59
  --td-divider-border-width | 2rpx | -
60
60
  --td-divider-color | @bg-color-component | -
@@ -26,11 +26,13 @@
26
26
  </view>
27
27
  </template>
28
28
  <script>
29
- import { uniComponent } from '../common/src/index';
30
29
  import { prefix } from '../common/config';
31
- import props from './props';
30
+ import { uniComponent } from '../common/src/index';
31
+
32
32
  import tools from '../common/utils.wxs';
33
33
 
34
+ import props from './props';
35
+
34
36
 
35
37
  const name = `${prefix}-divider`;
36
38
 
@@ -10,12 +10,15 @@
10
10
  </view>
11
11
  </template>
12
12
  <script>
13
- import { uniComponent } from '../common/src/index';
14
13
  import { prefix } from '../common/config';
15
- import props from './props';
14
+ import { uniComponent } from '../common/src/index';
15
+
16
+
16
17
  import { getRect, getWindowInfo } from '../common/utils';
17
18
  import tools from '../common/utils.wxs';
18
19
 
20
+ import props from './props';
21
+
19
22
 
20
23
  const name = `${prefix}-draggable`;
21
24
 
@@ -38,7 +38,7 @@ title | \-
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-drawer-bg-color | @bg-color-container | -
44
44
  --td-drawer-border-color | @border-level-1-color | -
@@ -66,7 +66,7 @@ title | 自定义 `title` 显示内容
66
66
  ### CSS Variables
67
67
 
68
68
  组件提供了下列 CSS 变量,可用于自定义样式。
69
- 名称 | 默认值 | 描述
69
+ 名称 | 默认值 | 描述
70
70
  -- | -- | --
71
71
  --td-drawer-bg-color | @bg-color-container | -
72
72
  --td-drawer-border-color | @border-level-1-color | -
@@ -62,14 +62,16 @@
62
62
  </view>
63
63
  </template>
64
64
  <script>
65
- import TPopup from '../popup/popup';
66
- import TIcon from '../icon/icon';
67
- import { uniComponent } from '../common/src/index';
68
65
  import { prefix } from '../common/config';
66
+ import { uniComponent } from '../common/src/index';
69
67
  import { coalesce } from '../common/utils';
70
- import props from './props';
71
- import useCustomNavbar from '../mixins/using-custom-navbar';
68
+
72
69
  import tools from '../common/utils.wxs';
70
+ import TIcon from '../icon/icon';
71
+ import useCustomNavbar from '../mixins/using-custom-navbar';
72
+ import TPopup from '../popup/popup';
73
+
74
+ import props from './props';
73
75
 
74
76
 
75
77
  const name = `${prefix}-drawer`;
@@ -117,21 +117,24 @@
117
117
  </template>
118
118
  <script>
119
119
  import TButton from '../button/button';
120
- import TRadio from '../radio/radio';
121
- import TRadioGroup from '../radio-group/radio-group';
122
120
  import TCheckbox from '../checkbox/checkbox';
123
121
  import TCheckboxGroup from '../checkbox-group/checkbox-group';
124
- import TPopup from '../popup/popup';
125
122
 
126
- import { uniComponent } from '../common/src/index';
127
123
  import { prefix } from '../common/config';
124
+
125
+ import { ChildrenMixin, RELATION_MAP } from '../common/relation';
126
+ import { uniComponent } from '../common/src/index';
128
127
  import { coalesce, getRect, getWindowInfo } from '../common/utils';
129
- import props from './props';
130
- import menuProps from '../dropdown-menu/props';
131
128
  import tools from '../common/utils.wxs';
132
- import { getStyles } from './computed';
133
- import { ChildrenMixin, RELATION_MAP } from '../common/relation';
134
129
  import { canUseVirtualHost } from '../common/version';
130
+ import menuProps from '../dropdown-menu/props';
131
+ import TPopup from '../popup/popup';
132
+ import TRadio from '../radio/radio';
133
+ import TRadioGroup from '../radio-group/radio-group';
134
+
135
+ import { getStyles } from './computed';
136
+
137
+ import props from './props';
135
138
 
136
139
 
137
140
  const name = `${prefix}-dropdown-item`;
@@ -224,7 +227,7 @@ export default {
224
227
  boxSizing: 'border-box',
225
228
 
226
229
  display: 'grid',
227
- gridGap: '0px',
230
+ gridGap: '0',
228
231
 
229
232
  gridTemplateColumns: `repeat(${this.optionsColumns}, 1fr)`,
230
233
  },
@@ -238,10 +241,10 @@ export default {
238
241
  boxSizing: 'border-box',
239
242
 
240
243
  display: 'grid',
241
- gridGap: '12px',
244
+ gridGap: '24rpx',
242
245
 
243
246
  gridTemplateColumns: `repeat(${this.optionsColumns}, 1fr)`,
244
- padding: '16px',
247
+ padding: '32rpx',
245
248
  },
246
249
  ]);
247
250
  },
@@ -82,7 +82,7 @@ t-class-footer | \-
82
82
  ### CSS Variables
83
83
 
84
84
  The component provides the following CSS variables, which can be used to customize styles.
85
- Name | Default Value | Description
85
+ Name | Default Value | Description
86
86
  -- | -- | --
87
87
  --td-dropdown-menu-active-color | @brand-color | -
88
88
  --td-dropdown-menu-bg-color | @bg-color-container | -
@@ -112,7 +112,7 @@ t-class-footer | 底部样式类
112
112
  ### CSS Variables
113
113
 
114
114
  组件提供了下列 CSS 变量,可用于自定义样式。
115
- 名称 | 默认值 | 描述
115
+ 名称 | 默认值 | 描述
116
116
  -- | -- | --
117
117
  --td-dropdown-menu-active-color | @brand-color | -
118
118
  --td-dropdown-menu-bg-color | @bg-color-container | -
@@ -43,15 +43,17 @@
43
43
  </view>
44
44
  </template>
45
45
  <script>
46
- import TIcon from '../icon/icon';
47
- import { uniComponent } from '../common/src/index';
48
46
  import { prefix } from '../common/config';
49
- import props from './props';
47
+
48
+ import { parseEventDynamicCode } from '../common/event/dynamic';
49
+ import { ParentMixin, RELATION_MAP } from '../common/relation';
50
+ import { uniComponent } from '../common/src/index';
50
51
  import { calcIcon } from '../common/utils';
51
52
  import tools from '../common/utils.wxs';
52
- import { ParentMixin, RELATION_MAP } from '../common/relation';
53
- import { parseEventDynamicCode } from '../common/event/dynamic';
54
53
  import { canUseVirtualHost } from '../common/version';
54
+ import TIcon from '../icon/icon';
55
+
56
+ import props from './props';
55
57
 
56
58
 
57
59
  const name = `${prefix}-dropdown-menu`;
@@ -166,8 +168,8 @@ export default {
166
168
  <style scoped src="./dropdown-menu.css"></style>
167
169
  <style scoped>
168
170
  :deep(.t-dropdown-menu__icon) {
169
- font-size: var(--td-dropdown-menu-icon-size, 20px);
170
- padding: 2px;
171
+ font-size: var(--td-dropdown-menu-icon-size, 48rpx);
172
+ padding: 4rpx;
171
173
  box-sizing: border-box;
172
174
  transition: transform 240ms ease;
173
175
  }
@@ -175,6 +177,6 @@ export default {
175
177
  transform: rotate(180deg);
176
178
  }
177
179
  :deep(.t-dropdown-menu__icon):not(:empty) {
178
- margin-left: 4px;
180
+ margin-left: 8rpx;
179
181
  }
180
182
  </style>
@@ -30,7 +30,7 @@ t-class-image | \-
30
30
  ### CSS Variables
31
31
 
32
32
  The component provides the following CSS variables, which can be used to customize styles.
33
- Name | Default Value | Description
33
+ Name | Default Value | Description
34
34
  -- | -- | --
35
35
  --td-empty-action-margin-top | @spacer-4 | -
36
36
  --td-empty-description-color | @text-color-placeholder | -
@@ -62,7 +62,7 @@ t-class-image | 图片样式类
62
62
  ### CSS Variables
63
63
 
64
64
  组件提供了下列 CSS 变量,可用于自定义样式。
65
- 名称 | 默认值 | 描述
65
+ 名称 | 默认值 | 描述
66
66
  -- | -- | --
67
67
  --td-empty-action-margin-top | @spacer-4 | -
68
68
  --td-empty-description-color | @text-color-placeholder | -
@@ -60,14 +60,15 @@
60
60
  </view>
61
61
  </template>
62
62
  <script>
63
- import TIcon from '../icon/icon';
64
- import TImage from '../image/image';
65
- import { uniComponent } from '../common/src/index';
66
- import props from './props';
67
63
  import { prefix } from '../common/config';
64
+ import { uniComponent } from '../common/src/index';
68
65
  import { setIcon } from '../common/utils';
69
66
  import tools from '../common/utils.wxs';
70
67
  import { canUseVirtualHost } from '../common/version';
68
+ import TIcon from '../icon/icon';
69
+ import TImage from '../image/image';
70
+
71
+ import props from './props';
71
72
 
72
73
 
73
74
  const name = `${prefix}-empty`;
@@ -32,6 +32,6 @@ name | Description
32
32
  ### CSS Variables
33
33
 
34
34
  The component provides the following CSS variables, which can be used to customize styles.
35
- Name | Default Value | Description
35
+ Name | Default Value | Description
36
36
  -- | -- | --
37
37
  --td-fab-shadow | @shadow-2 | -
@@ -78,6 +78,6 @@ drag-start | `(context: { e: TouchEvent })` | 开始拖拽时触发
78
78
  ### CSS Variables
79
79
 
80
80
  组件提供了下列 CSS 变量,可用于自定义样式。
81
- 名称 | 默认值 | 描述
81
+ 名称 | 默认值 | 描述
82
82
  -- | -- | --
83
83
  --td-fab-shadow | @shadow-2 | -
package/dist/fab/fab.vue CHANGED
@@ -115,13 +115,16 @@
115
115
 
116
116
  <script>
117
117
  import TButton from '../button/button';
118
- import TDraggable from '../draggable/draggable.vue';
119
- import { uniComponent } from '../common/src/index';
120
118
  import { prefix } from '../common/config';
121
- import props from './props';
122
- import useCustomNavbar from '../mixins/using-custom-navbar';
119
+ import { uniComponent } from '../common/src/index';
120
+
121
+
123
122
  import { unitConvert, getWindowInfo, calcIcon } from '../common/utils';
124
123
  import tools from '../common/utils.wxs';
124
+ import TDraggable from '../draggable/draggable.vue';
125
+ import useCustomNavbar from '../mixins/using-custom-navbar';
126
+
127
+ import props from './props';
125
128
 
126
129
  const name = `${prefix}-fab`;
127
130
 
@@ -17,7 +17,7 @@ theme | String | 'text' | `deprecated`。options: text/logo | N
17
17
  ### CSS Variables
18
18
 
19
19
  The component provides the following CSS variables, which can be used to customize styles.
20
- Name | Default Value | Description
20
+ Name | Default Value | Description
21
21
  -- | -- | --
22
22
  --td-footer-link-color | @brand-color | -
23
23
  --td-footer-link-dividing-line-color | @text-color-placeholder | -
@@ -47,7 +47,7 @@ theme | String | 'text' | 已废弃。页脚展示类型。可选项:text/logo
47
47
  ### CSS Variables
48
48
 
49
49
  组件提供了下列 CSS 变量,可用于自定义样式。
50
- 名称 | 默认值 | 描述
50
+ 名称 | 默认值 | 描述
51
51
  -- | -- | --
52
52
  --td-footer-link-color | @brand-color | -
53
53
  --td-footer-link-dividing-line-color | @text-color-placeholder | -
@@ -63,11 +63,12 @@
63
63
  </view>
64
64
  </template>
65
65
  <script>
66
- import TImage from '../image/image';
67
- import { uniComponent } from '../common/src/index';
68
66
  import { prefix } from '../common/config';
69
- import props from './props';
67
+ import { uniComponent } from '../common/src/index';
70
68
  import tools from '../common/utils.wxs';
69
+ import TImage from '../image/image';
70
+
71
+ import props from './props';
71
72
 
72
73
 
73
74
  const name = `${prefix}-footer`;
@@ -98,14 +99,14 @@ export default {
98
99
  computed: {
99
100
  iconCustomStyle() {
100
101
  return tools._style({
101
- width: 'var(--td-footer-logo-icon-width, 24px)',
102
- height: 'var(--td-footer-logo-icon-height, 24px)',
103
- marginRight: 'var(--td-footer-logo-icon-margin-right, var(--td-spacer, 8px))',
102
+ width: 'var(--td-footer-logo-icon-width, 48rpx)',
103
+ height: 'var(--td-footer-logo-icon-height, 48rpx)',
104
+ marginRight: 'var(--td-footer-logo-icon-margin-right, var(--td-spacer, 16rpx))',
104
105
  });
105
106
  },
106
107
  titleUrlCustomStyle() {
107
108
  return tools._style({
108
- width: 'var(--td-footer-logo-title-url-width, 128px)',
109
+ width: 'var(--td-footer-logo-title-url-width, 256rpx)',
109
110
  });
110
111
  },
111
112
  },
@@ -22,6 +22,7 @@ name | type | default | description | required
22
22
  -- | -- | -- | -- | --
23
23
  custom-style | Object | - | CSS(Cascading Style Sheets) | N
24
24
  colon | Boolean | false | \- | N
25
+ content-align | String | left | options: left/right | N
25
26
  data | Object | {} | Typescript: `FormData` | N
26
27
  error-message | Object | - | Typescript: `FormErrorMessage` | N
27
28
  label-align | String | right | options: left/right/top | N
@@ -59,6 +60,7 @@ name | type | default | description | required
59
60
  -- | -- | -- | -- | --
60
61
  custom-style | Object | - | CSS(Cascading Style Sheets) | N
61
62
  arrow | Boolean | false | \- | N
63
+ content-align | String | - | options: left/right | N
62
64
  help | String | - | \- | N
63
65
  label | String | '' | \- | N
64
66
  label-align | String | - | options: left/right/top | N
@@ -120,7 +122,7 @@ whitespace | String | - | \- | N
120
122
  ### CSS Variables
121
123
 
122
124
  The component provides the following CSS variables, which can be used to customize styles.
123
- Name | Default Value | Description
125
+ Name | Default Value | Description
124
126
  -- | -- | --
125
127
  --td-form-bg-color | @bg-color-container | -
126
128
  --td-form-item-border-color | @component-stroke | -
@@ -33,6 +33,7 @@ import TFormItem from '@tdesign/uniapp/form-item/form-item.vue';
33
33
  -- | -- | -- | -- | --
34
34
  custom-style | Object | - | 自定义样式 | N
35
35
  colon | Boolean | false | 是否在表单标签字段右侧显示冒号 | N
36
+ content-align | String | left | 表单内容对齐方式:左对齐、右对齐。可选项:left/right | N
36
37
  data | Object | {} | 表单数据。TS 类型:`FormData` | N
37
38
  error-message | Object | - | 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }`。TS 类型:`FormErrorMessage` | N
38
39
  label-align | String | right | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。可选项:left/right/top | N
@@ -70,6 +71,7 @@ validate | `(params?: FormValidateParams)` | `Promise<FormValidateResult<FormDat
70
71
  -- | -- | -- | -- | --
71
72
  custom-style | Object | - | 自定义样式 | N
72
73
  arrow | Boolean | false | 是否显示右侧箭头 | N
74
+ content-align | String | - | 表单内容对齐方式:左对齐、右对齐,优先级高于 Form.contentAlign。可选项:left/right | N
73
75
  help | String | - | 表单项说明内容 | N
74
76
  label | String | '' | 字段标签名称 | N
75
77
  label-align | String | - | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign。可选项:left/right/top | N
@@ -131,7 +133,7 @@ whitespace | String | - | 值为空格校验不通过时表单项显示文案,
131
133
  ### CSS Variables
132
134
 
133
135
  组件提供了下列 CSS 变量,可用于自定义样式。
134
- 名称 | 默认值 | 描述
136
+ 名称 | 默认值 | 描述
135
137
  -- | -- | --
136
138
  --td-form-bg-color | @bg-color-container | -
137
139
  --td-form-item-border-color | @component-stroke | -
@@ -8,13 +8,15 @@
8
8
  </template>
9
9
  <script>
10
10
 
11
- import { uniComponent } from '../common/src/index';
12
11
  import { prefix } from '../common/config';
13
- import props from './props';
12
+
14
13
  import { ParentMixin, RELATION_MAP } from '../common/relation';
14
+ import { uniComponent } from '../common/src/index';
15
15
  import { coalesce } from '../common/utils';
16
16
  import tools from '../common/utils.wxs';
17
17
 
18
+ import props from './props';
19
+
18
20
  const name = `${prefix}-form`;
19
21
 
20
22
  const needValidate = (name, fields) => {
@@ -8,6 +8,15 @@ import type { TdFormProps } from './type';
8
8
  export default {
9
9
  /** 是否在表单标签字段右侧显示冒号 */
10
10
  colon: Boolean,
11
+ /** 表单内容对齐方式:左对齐、右对齐 */
12
+ contentAlign: {
13
+ type: String,
14
+ default: 'left' as TdFormProps['contentAlign'],
15
+ validator(val: TdFormProps['contentAlign']): boolean {
16
+ if (!val) return true;
17
+ return ['left', 'right'].includes(val);
18
+ },
19
+ },
11
20
  /** 表单数据 */
12
21
  data: {
13
22
  type: Object,
package/dist/form/type.ts CHANGED
@@ -14,6 +14,11 @@ export interface TdFormProps<FormData extends Data = Data> {
14
14
  * @default false
15
15
  */
16
16
  colon?: boolean;
17
+ /**
18
+ * 表单内容对齐方式:左对齐、右对齐
19
+ * @default left
20
+ */
21
+ contentAlign?: 'left' | 'right';
17
22
  /**
18
23
  * 表单数据
19
24
  * @default {}
@@ -8,6 +8,7 @@ name | type | default | description | required
8
8
  -- | -- | -- | -- | --
9
9
  custom-style | Object | - | CSS(Cascading Style Sheets) | N
10
10
  arrow | Boolean | false | \- | N
11
+ content-align | String | - | options: left/right | N
11
12
  help | String | - | \- | N
12
13
  label | String | '' | \- | N
13
14
  label-align | String | - | options: left/right/top | N
@@ -27,7 +28,7 @@ label | \-
27
28
  ### CSS Variables
28
29
 
29
30
  The component provides the following CSS variables, which can be used to customize styles.
30
- Name | Default Value | Description
31
+ Name | Default Value | Description
31
32
  -- | -- | --
32
33
  --td-form-item-border-color | @component-stroke | -
33
34
  --td-form-item-border-left-space | @form-item-vertical-padding | -
@@ -8,6 +8,7 @@
8
8
  -- | -- | -- | -- | --
9
9
  custom-style | Object | - | 自定义样式 | N
10
10
  arrow | Boolean | false | 是否显示右侧箭头 | N
11
+ content-align | String | - | 表单内容对齐方式:左对齐、右对齐,优先级高于 Form.contentAlign。可选项:left/right | N
11
12
  help | String | - | 表单项说明内容 | N
12
13
  label | String | '' | 字段标签名称 | N
13
14
  label-align | String | - | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign。可选项:left/right/top | N
@@ -27,7 +28,7 @@ label | 自定义 `label` 显示内容
27
28
  ### CSS Variables
28
29
 
29
30
  组件提供了下列 CSS 变量,可用于自定义样式。
30
- 名称 | 默认值 | 描述
31
+ 名称 | 默认值 | 描述
31
32
  -- | -- | --
32
33
  --td-form-item-border-color | @component-stroke | -
33
34
  --td-form-item-border-left-space | @form-item-vertical-padding | -
@@ -60,16 +60,18 @@
60
60
  </view>
61
61
  </template>
62
62
  <script>
63
- import { uniComponent } from '../common/src/index';
64
- import { getRect } from '../common/utils';
65
63
  import { prefix } from '../common/config';
66
- import props from './props';
67
- import { validateRules, ValidateStatus } from './form-model';
68
- import TIcon from '../icon/icon.vue';
64
+
69
65
  import { ChildrenMixin, RELATION_MAP } from '../common/relation';
66
+ import { uniComponent } from '../common/src/index';
67
+ import { getRect } from '../common/utils';
70
68
  import tools from '../common/utils.wxs';
71
- import usingConfig from '../mixins/using-config';
72
69
  import { isNumeric } from '../common/validator';
70
+ import TIcon from '../icon/icon.vue';
71
+ import usingConfig from '../mixins/using-config';
72
+
73
+ import { validateRules, ValidateStatus } from './form-model';
74
+ import props from './props';
73
75
 
74
76
  const parentComponentName = 'form';
75
77
  const componentName = 'form-item';
@@ -8,6 +8,14 @@ import type { TdFormItemProps } from './type';
8
8
  export default {
9
9
  /** 是否显示右侧箭头 */
10
10
  arrow: Boolean,
11
+ /** 表单内容对齐方式:左对齐、右对齐,优先级高于 Form.contentAlign */
12
+ contentAlign: {
13
+ type: String,
14
+ validator(val: TdFormItemProps['contentAlign']): boolean {
15
+ if (!val) return true;
16
+ return ['left', 'right'].includes(val);
17
+ },
18
+ },
11
19
  /** 表单项说明内容 */
12
20
  help: {
13
21
  type: String,
@@ -12,6 +12,10 @@ export interface TdFormItemProps {
12
12
  * @default false
13
13
  */
14
14
  arrow?: boolean;
15
+ /**
16
+ * 表单内容对齐方式:左对齐、右对齐,优先级高于 Form.contentAlign
17
+ */
18
+ contentAlign?: 'left' | 'right';
15
19
  /**
16
20
  * 表单项说明内容
17
21
  */
@@ -70,7 +70,7 @@ t-class-text | \-
70
70
  ### CSS Variables
71
71
 
72
72
  The component provides the following CSS variables, which can be used to customize styles.
73
- Name | Default Value | Description
73
+ Name | Default Value | Description
74
74
  -- | -- | --
75
75
  --td-grid-bg-color | @bg-color-container | -
76
76
  --td-grid-card-radius | @radius-large | -
@@ -123,7 +123,7 @@ t-class-text | 文本样式类
123
123
  ### CSS Variables
124
124
 
125
125
  组件提供了下列 CSS 变量,可用于自定义样式。
126
- 名称 | 默认值 | 描述
126
+ 名称 | 默认值 | 描述
127
127
  -- | -- | --
128
128
  --td-grid-bg-color | @bg-color-container | -
129
129
  --td-grid-card-radius | @radius-large | -
@@ -22,12 +22,13 @@
22
22
  </view>
23
23
  </template>
24
24
  <script>
25
- import { uniComponent } from '../common/src/index';
26
25
  import { prefix } from '../common/config';
26
+ import { ParentMixin, RELATION_MAP } from '../common/relation';
27
+ import { uniComponent } from '../common/src/index';
28
+ import tools from '../common/utils.wxs';
27
29
  import { isObject } from '../common/validator';
30
+
28
31
  import props from './props';
29
- import tools from '../common/utils.wxs';
30
- import { ParentMixin, RELATION_MAP } from '../common/relation';
31
32
 
32
33
 
33
34
  const name = `${prefix}-grid`;
@@ -45,7 +45,7 @@ t-class-text | \-
45
45
  ### CSS Variables
46
46
 
47
47
  The component provides the following CSS variables, which can be used to customize styles.
48
- Name | Default Value | Description
48
+ Name | Default Value | Description
49
49
  -- | -- | --
50
50
  --td-grid-item-bg-color | @bg-color-container | -
51
51
  --td-grid-item-description-color | @text-color-placeholder | -
@@ -45,7 +45,7 @@ t-class-text | 文本样式类
45
45
  ### CSS Variables
46
46
 
47
47
  组件提供了下列 CSS 变量,可用于自定义样式。
48
- 名称 | 默认值 | 描述
48
+ 名称 | 默认值 | 描述
49
49
  -- | -- | --
50
50
  --td-grid-item-bg-color | @bg-color-container | -
51
51
  --td-grid-item-description-color | @text-color-placeholder | -