@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
@@ -22,7 +22,7 @@
22
22
  aria-role="button"
23
23
  :aria-label="dataCurrent === item ? '已选中' + item : ''"
24
24
  >
25
- {{ getFirstCharacter(item) }}
25
+ {{ getFirstCharacter(item, showFullIndex) }}
26
26
  </view>
27
27
 
28
28
  <view
@@ -38,14 +38,17 @@
38
38
  </template>
39
39
  <script>
40
40
 
41
- import { uniComponent } from '../common/src/index';
42
41
  import { prefix } from '../common/config';
43
- import props from './props';
42
+ import { ParentMixin, RELATION_MAP } from '../common/relation';
43
+ import { uniComponent } from '../common/src/index';
44
+
45
+
44
46
  import { getRect, throttle, systemInfo } from '../common/utils';
45
- import pageScrollMixin from '../mixins/page-scroll';
46
47
  import tools from '../common/utils.wxs';
48
+ import pageScrollMixin from '../mixins/page-scroll';
49
+
47
50
  import { getFirstCharacter } from './computed.js';
48
- import { ParentMixin, RELATION_MAP } from '../common/relation';
51
+ import props from './props';
49
52
 
50
53
 
51
54
  const name = `${prefix}-indexes`;
@@ -17,6 +17,11 @@ export default {
17
17
  indexList: {
18
18
  type: Array,
19
19
  },
20
+ /** 索引是否完整展示 */
21
+ showFullIndex: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
20
25
  /** 索引是否吸顶,默认为true */
21
26
  sticky: {
22
27
  type: Boolean,
@@ -17,6 +17,11 @@ export interface TdIndexesProps {
17
17
  * 索引字符列表。不传默认 `A-Z`
18
18
  */
19
19
  indexList?: Array<string | number>;
20
+ /**
21
+ * 索引是否完整展示
22
+ * @default false
23
+ */
24
+ showFullIndex?: Boolean;
20
25
  /**
21
26
  * 索引是否吸顶,默认为true
22
27
  * @default true
@@ -11,7 +11,7 @@ index | String / Number | - | \- | N
11
11
  ### CSS Variables
12
12
 
13
13
  The component provides the following CSS variables, which can be used to customize styles.
14
- Name | Default Value | Description
14
+ Name | Default Value | Description
15
15
  -- | -- | --
16
16
  --td-indexes-anchor-active-bg-color | @bg-color-container | -
17
17
  --td-indexes-anchor-active-color | @brand-color | -
@@ -15,7 +15,7 @@ t-class | 根节点样式类
15
15
  ### CSS Variables
16
16
 
17
17
  组件提供了下列 CSS 变量,可用于自定义样式。
18
- 名称 | 默认值 | 描述
18
+ 名称 | 默认值 | 描述
19
19
  -- | -- | --
20
20
  --td-indexes-anchor-active-bg-color | @bg-color-container | -
21
21
  --td-indexes-anchor-active-color | @brand-color | -
@@ -20,11 +20,13 @@
20
20
  </view>
21
21
  </template>
22
22
  <script>
23
- import { uniComponent } from '../common/src/index';
24
23
  import { prefix } from '../common/config';
25
- import props from './props';
26
- import tools from '../common/utils.wxs';
27
24
  import { ChildrenMixin, RELATION_MAP } from '../common/relation';
25
+ import { uniComponent } from '../common/src/index';
26
+
27
+ import tools from '../common/utils.wxs';
28
+
29
+ import props from './props';
28
30
 
29
31
 
30
32
  const name = `${prefix}-indexes-anchor`;
@@ -93,7 +93,7 @@ t-class-tips | \-
93
93
  ### CSS Variables
94
94
 
95
95
  The component provides the following CSS variables, which can be used to customize styles.
96
- Name | Default Value | Description
96
+ Name | Default Value | Description
97
97
  -- | -- | --
98
98
  --td-input-align-items | center | -
99
99
  --td-input-bg-color | @bg-color-container | -
@@ -164,7 +164,7 @@ t-class-tips | 提示样式类
164
164
  ### CSS Variables
165
165
 
166
166
  组件提供了下列 CSS 变量,可用于自定义样式。
167
- 名称 | 默认值 | 描述
167
+ 名称 | 默认值 | 描述
168
168
  -- | -- | --
169
169
  --td-input-align-items | center | -
170
170
  --td-input-bg-color | @bg-color-container | -
@@ -143,15 +143,16 @@
143
143
  </view>
144
144
  </template>
145
145
  <script>
146
- import TIcon from '../icon/icon';
147
- import { uniComponent } from '../common/src/index';
148
146
  import { prefix } from '../common/config';
149
- import props from './props';
147
+ import { RELATION_MAP } from '../common/relation/parent-map';
148
+ import { uniComponent } from '../common/src/index';
150
149
  import { getCharacterLength, calcIcon, coalesce, nextTick } from '../common/utils';
150
+ import tools from '../common/utils.wxs';
151
151
  import { isDef } from '../common/validator';
152
+ import TIcon from '../icon/icon';
153
+
152
154
  import { getInputClass } from './computed.js';
153
- import tools from '../common/utils.wxs';
154
- import { RELATION_MAP } from '../common/relation/parent-map';
155
+ import props from './props';
155
156
 
156
157
 
157
158
  const name = `${prefix}-input`;
@@ -304,8 +305,8 @@ export default {
304
305
  },
305
306
 
306
307
  emitChange(data) {
307
- this.$emit('change', data);
308
308
  this.$emit('update:value', data.value);
309
+ this.$emit('change', data);
309
310
  },
310
311
 
311
312
  onFocus(e) {
@@ -344,8 +345,9 @@ export default {
344
345
  },
345
346
 
346
347
  clearInput(e) {
348
+ this.updateValue('');
349
+ this.emitChange({ value: this.dataValue });
347
350
  this.$emit('clear', e.detail);
348
- this.dataValue = '';
349
351
  },
350
352
 
351
353
  onKeyboardHeightChange(e) {
@@ -48,7 +48,7 @@ t-class-suffix-icon | \-
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-link-danger-active-color | @error-color-active | -
54
54
  --td-link-danger-color | @error-color | -
@@ -98,7 +98,7 @@ t-class-suffix-icon | 后置图标样式类
98
98
  ### CSS Variables
99
99
 
100
100
  组件提供了下列 CSS 变量,可用于自定义样式。
101
- 名称 | 默认值 | 描述
101
+ 名称 | 默认值 | 描述
102
102
  -- | -- | --
103
103
  --td-link-danger-active-color | @error-color-active | -
104
104
  --td-link-danger-color | @error-color | -
@@ -72,12 +72,15 @@
72
72
  </view>
73
73
  </template>
74
74
  <script>
75
- import TIcon from '../icon/icon';
76
- import { uniComponent } from '../common/src/index';
77
75
  import { prefix } from '../common/config';
78
- import props from './props';
76
+ import { uniComponent } from '../common/src/index';
77
+
78
+
79
79
  import { calcIcon, coalesce } from '../common/utils';
80
80
  import tools from '../common/utils.wxs';
81
+ import TIcon from '../icon/icon';
82
+
83
+ import props from './props';
81
84
 
82
85
 
83
86
  const name = `${prefix}-link`;
@@ -40,7 +40,7 @@ t-class-text | \-
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-loading-color | @brand-color | -
46
46
  --td-loading-full-bg-color | rgba(255, 255, 255, 0.6) | -
@@ -89,7 +89,7 @@ t-class-text | 文本样式类
89
89
  ### CSS Variables
90
90
 
91
91
  组件提供了下列 CSS 变量,可用于自定义样式。
92
- 名称 | 默认值 | 描述
92
+ 名称 | 默认值 | 描述
93
93
  -- | -- | --
94
94
  --td-loading-color | @brand-color | -
95
95
  --td-loading-full-bg-color | rgba(255, 255, 255, 0.6) | -
@@ -88,11 +88,13 @@
88
88
  </view>
89
89
  </template>
90
90
  <script>
91
- import { uniComponent } from '../common/src/index';
92
91
  import { prefix } from '../common/config';
93
- import props from './props';
92
+ import { uniComponent } from '../common/src/index';
93
+
94
94
  import tools from '../common/utils.wxs';
95
95
 
96
+ import props from './props';
97
+
96
98
 
97
99
  const name = `${prefix}-loading`;
98
100
 
@@ -1,6 +1,7 @@
1
- import { MessageType } from './message.interface';
2
1
  import { getInstance } from '../common/utils';
3
2
 
3
+ import { MessageType } from './message.interface';
4
+
4
5
 
5
6
  const showMessage = function (options, theme = MessageType.info) {
6
7
  const { context, selector = '#t-message', ...otherOptions } = options;
@@ -34,12 +34,13 @@
34
34
  </template>
35
35
 
36
36
  <script>
37
- import TMessageItem from '../message-item/message-item.vue';
38
- import { uniComponent } from '../common/src/index';
39
37
  import { prefix } from '../common/config';
38
+ import { uniComponent } from '../common/src/index';
39
+ import { unitConvert } from '../common/utils';
40
+ import TMessageItem from '../message-item/message-item.vue';
41
+
40
42
  import { MessageType } from './message.interface';
41
43
  import props from './props';
42
- import { unitConvert } from '../common/utils';
43
44
 
44
45
 
45
46
  const SHOW_DURATION = 400;
@@ -1,5 +1,5 @@
1
- import { MessageType } from '../message/message.interface';
2
1
  import { getInstance } from '../common/utils';
2
+ import { MessageType } from '../message/message.interface';
3
3
 
4
4
 
5
5
  const showMessage = function (options, theme = MessageType.info) {
@@ -89,16 +89,18 @@
89
89
  </view>
90
90
  </template>
91
91
  <script>
92
- import TIcon from '../icon/icon';
93
- import TLink from '../link/link';
94
- import { uniComponent } from '../common/src/index';
95
92
  import { prefix } from '../common/config';
93
+ import { uniComponent } from '../common/src/index';
96
94
  import { getRect, unitConvert, calcIcon } from '../common/utils';
97
- import { isObject } from '../common/validator';
98
95
  import tools from '../common/utils.wxs';
99
- import { getMessageStyles } from './computed.js';
96
+ import { isObject } from '../common/validator';
97
+ import TIcon from '../icon/icon';
98
+ import TLink from '../link/link';
99
+
100
100
  import { messageDefaultData } from '../message/config';
101
101
 
102
+ import { getMessageStyles } from './computed.js';
103
+
102
104
 
103
105
  const SHOW_DURATION = 400;
104
106
  const name = `${prefix}-message`;
@@ -1,5 +1,5 @@
1
- import { getCurrentPage } from '../common/utils';
2
1
  import Bus from '../common/bus';
2
+ import { getCurrentPage } from '../common/utils';
3
3
 
4
4
  const overflowScrollReg = /scroll|auto|overlay/i;
5
5
 
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * 提供子组件从 config-provider 获取全局配置的能力
3
3
  */
4
- import { getComponentLocale, useConfig } from '../config-provider/use-config';
5
4
  import { toCamel } from '../common/utils';
5
+ import { getComponentLocale, useConfig } from '../config-provider/use-config';
6
6
  import defaultLocale from '../locale/zh_CN';
7
7
 
8
8
  export default function usingConfig(options) {
@@ -25,7 +25,7 @@ const useCustomNavbarBehavior = {
25
25
  const { statusBarHeight } = systemInfo;
26
26
  let distance = 0;
27
27
  // #ifndef H5
28
- // #ifndef APP-PLUS
28
+ // #ifndef APP
29
29
  const menuButton = uni.getMenuButtonBoundingClientRect();
30
30
  distance = menuButton.top + menuButton.bottom - statusBarHeight;
31
31
  // #endif
@@ -57,7 +57,7 @@ t-class-title | \-
57
57
  ### CSS Variables
58
58
 
59
59
  The component provides the following CSS variables, which can be used to customize styles.
60
- Name | Default Value | Description
60
+ Name | Default Value | Description
61
61
  -- | -- | --
62
62
  --td-navbar-padding-top | 20px | -
63
63
  --td-navbar-right | 95px | -
@@ -45,7 +45,7 @@ import TNavbar from '@tdesign/uniapp/navbar/navbar.vue';
45
45
 
46
46
  #### 高度说明
47
47
 
48
- `navbar` 组件可由 `--td-navbar-height` 控制。在 H5 或 APP-PLUS 平台下,`--td-navbar-height` 变量需要业务自己设置,小程序平台则会根据 `statusBarHeight` 等变量计算得到。
48
+ `navbar` 组件可由 `--td-navbar-height` 控制。在 H5 或 APP 平台下,`--td-navbar-height` 变量需要业务自己设置,小程序平台则会根据 `statusBarHeight` 等变量计算得到。
49
49
 
50
50
  ## API
51
51
 
@@ -104,7 +104,7 @@ t-class-title | 标题样式类
104
104
  ### CSS Variables
105
105
 
106
106
  组件提供了下列 CSS 变量,可用于自定义样式。
107
- 名称 | 默认值 | 描述
107
+ 名称 | 默认值 | 描述
108
108
  -- | -- | --
109
109
  --td-navbar-padding-top | 20px | -
110
110
  --td-navbar-right | 95px | -
@@ -47,12 +47,13 @@
47
47
  </view>
48
48
  </template>
49
49
  <script>
50
- import TIcon from '../icon/icon';
50
+ import { prefix } from '../common/config';
51
51
  import { uniComponent } from '../common/src/index';
52
52
  import { getRect, getWindowInfo } from '../common/utils';
53
- import { prefix } from '../common/config';
54
- import props from './props';
55
53
  import tools from '../common/utils.wxs';
54
+ import TIcon from '../icon/icon';
55
+
56
+ import props from './props';
56
57
 
57
58
 
58
59
  const name = `${prefix}-navbar`;
@@ -176,7 +177,7 @@ export default {
176
177
  '--td-navbar-capsule-width': `${iMenuRect.width}px`, // 胶囊宽度
177
178
  '--td-navbar-height': `${(iMenuRect.top - windowInfo.statusBarHeight) * 2 + iMenuRect.height}px`,
178
179
  };
179
- // #ifdef H5 || APP-PLUS
180
+ // #ifdef H5 || APP
180
181
  delete iBoxStyle['--td-navbar-height'];
181
182
  // #endif
182
183
 
@@ -47,7 +47,7 @@ t-class-suffix-icon | \-
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-notice-bar-error-bg-color | @error-color-1 | -
53
53
  --td-notice-bar-error-color | @error-color | -
@@ -103,7 +103,7 @@ t-class-suffix-icon | 后置图标样式类
103
103
  ### CSS Variables
104
104
 
105
105
  组件提供了下列 CSS 变量,可用于自定义样式。
106
- 名称 | 默认值 | 描述
106
+ 名称 | 默认值 | 描述
107
107
  -- | -- | --
108
108
  --td-notice-bar-error-bg-color | @error-color-1 | -
109
109
  --td-notice-bar-error-color | @error-color | -
@@ -102,12 +102,13 @@
102
102
  </view>
103
103
  </template>
104
104
  <script>
105
- import TIcon from '../icon/icon.vue';
105
+ import { prefix } from '../common/config';
106
106
  import { uniComponent } from '../common/src/index';
107
107
  import { getRect, getAnimationFrame, calcIcon } from '../common/utils';
108
- import props from './props';
109
- import { prefix } from '../common/config';
110
108
  import tools from '../common/utils.wxs';
109
+ import TIcon from '../icon/icon.vue';
110
+
111
+ import props from './props';
111
112
 
112
113
 
113
114
  const name = `${prefix}-notice-bar`;
@@ -28,7 +28,7 @@ name | Description
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-overlay-bg-color | @mask-active | -
34
34
  --td-overlay-transition-duration | 300ms | -
@@ -50,7 +50,7 @@ click | `(context: { visible: boolean })` | 点击遮罩时触发
50
50
  ### CSS Variables
51
51
 
52
52
  组件提供了下列 CSS 变量,可用于自定义样式。
53
- 名称 | 默认值 | 描述
53
+ 名称 | 默认值 | 描述
54
54
  -- | -- | --
55
55
  --td-overlay-bg-color | @mask-active | -
56
56
  --td-overlay-transition-duration | 300ms | -
@@ -37,12 +37,15 @@
37
37
  </view>
38
38
  </template>
39
39
  <script>
40
- import { uniComponent } from '../common/src/index';
41
40
  import { prefix } from '../common/config';
42
- import props from './props';
41
+ import { uniComponent } from '../common/src/index';
42
+
43
+ import tools from '../common/utils.wxs';
43
44
  import transition from '../mixins/transition';
45
+
44
46
  import useCustomNavbar from '../mixins/using-custom-navbar';
45
- import tools from '../common/utils.wxs';
47
+
48
+ import props from './props';
46
49
 
47
50
 
48
51
  const name = `${prefix}-overlay`;
@@ -59,7 +59,7 @@ label-suffix-index | \-
59
59
  ### CSS Variables
60
60
 
61
61
  The component provides the following CSS variables, which can be used to customize styles.
62
- Name | Default Value | Description
62
+ Name | Default Value | Description
63
63
  -- | -- | --
64
64
  --td-picker-bg-color | @bg-color-container | -
65
65
  --td-picker-border-radius | 24rpx | -
@@ -96,7 +96,7 @@ label-suffix-index | 列表子项后置插槽,用于自定义标签文本之
96
96
  ### CSS Variables
97
97
 
98
98
  组件提供了下列 CSS 变量,可用于自定义样式。
99
- 名称 | 默认值 | 描述
99
+ 名称 | 默认值 | 描述
100
100
  -- | -- | --
101
101
  --td-picker-bg-color | @bg-color-container | -
102
102
  --td-picker-border-radius | 24rpx | -
@@ -26,7 +26,7 @@
26
26
  :class="classPrefix + '__cancel ' + tClassCancel"
27
27
  @click="onCancel"
28
28
  >
29
- {{ globalConfig.cancel }}
29
+ {{ cancelBtn === true ? globalConfig.cancel : cancelBtn }}
30
30
  </view>
31
31
  <view :class="classPrefix + '__title ' + tClassTitle">
32
32
  {{ title }}
@@ -36,7 +36,7 @@
36
36
  :class="classPrefix + '__confirm ' + tClassConfirm"
37
37
  @click="onConfirm"
38
38
  >
39
- {{ globalConfig.confirm }}
39
+ {{ confirmBtn === true ? globalConfig.confirm : confirmBtn }}
40
40
  </view>
41
41
  </view>
42
42
  <slot name="header" />
@@ -72,7 +72,7 @@
72
72
  :class="classPrefix + '__cancel ' + tClassCancel"
73
73
  @click="onCancel"
74
74
  >
75
- {{ globalConfig.cancel }}
75
+ {{ cancelBtn === true ? globalConfig.cancel : cancelBtn }}
76
76
  </view>
77
77
  <view :class="classPrefix + '__title ' + tClassTitle">
78
78
  {{ title }}
@@ -82,7 +82,7 @@
82
82
  :class="classPrefix + '__confirm ' + tClassConfirm"
83
83
  @click="onConfirm"
84
84
  >
85
- {{ globalConfig.confirm }}
85
+ {{ confirmBtn === true ? globalConfig.confirm : confirmBtn }}
86
86
  </view>
87
87
  </view>
88
88
  <slot name="header" />
@@ -105,16 +105,18 @@
105
105
  </view>
106
106
  </template>
107
107
  <script>
108
- import TPopup from '../popup/popup';
108
+ import { prefix } from '../common/config';
109
+
110
+ import { ParentMixin, RELATION_MAP } from '../common/relation';
109
111
  import { uniComponent } from '../common/src/index';
110
112
  import { coalesce } from '../common/utils';
111
- import { prefix } from '../common/config';
112
- import props from './props';
113
- import useCustomNavbar from '../mixins/using-custom-navbar';
114
113
  import tools from '../common/utils.wxs';
115
- import { ParentMixin, RELATION_MAP } from '../common/relation';
116
114
 
117
115
  import usingConfig from '../mixins/using-config';
116
+ import useCustomNavbar from '../mixins/using-custom-navbar';
117
+ import TPopup from '../popup/popup';
118
+
119
+ import props from './props';
118
120
  const componentName = 'picker';
119
121
  const name = `${prefix}-${componentName}`;
120
122
 
@@ -18,7 +18,7 @@ label-suffix--[index] | \-
18
18
  ### CSS Variables
19
19
 
20
20
  The component provides the following CSS variables, which can be used to customize styles.
21
- Name | Default Value | Description
21
+ Name | Default Value | Description
22
22
  -- | -- | --
23
23
  --td-picker-item-active-color | @text-color-primary | -
24
24
  --td-picker-item-color | @text-color-secondary | -
@@ -18,7 +18,7 @@ label-suffix--[index] | 列表子项后置插槽,用于自定义标签文本
18
18
  ### CSS Variables
19
19
 
20
20
  组件提供了下列 CSS 变量,可用于自定义样式。
21
- 名称 | 默认值 | 描述
21
+ 名称 | 默认值 | 描述
22
22
  -- | -- | --
23
23
  --td-picker-item-active-color | @text-color-primary | -
24
24
  --td-picker-item-color | @text-color-secondary | -
@@ -71,13 +71,14 @@
71
71
  </template>
72
72
 
73
73
  <script>
74
- import TIcon from '../icon/icon.vue';
75
- import { uniComponent } from '../common/src/index';
76
74
  import { prefix } from '../common/config';
77
- import props from './props';
78
- import tools from '../common/utils.wxs';
79
- import { nextTick } from '../common/utils';
80
75
  import { ChildrenMixin, RELATION_MAP } from '../common/relation';
76
+ import { uniComponent } from '../common/src/index';
77
+ import { nextTick } from '../common/utils';
78
+ import tools from '../common/utils.wxs';
79
+ import TIcon from '../icon/icon.vue';
80
+
81
+ import props from './props';
81
82
 
82
83
 
83
84
  const name = `${prefix}-picker-item`;
@@ -38,7 +38,7 @@ t-class-content | \-
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-popover-brand-bg-color | @primary-color-1 | -
44
44
  --td-popover-brand-color | @primary-color-7 | -
@@ -70,7 +70,7 @@ t-class-content | 内容样式类
70
70
  ### CSS Variables
71
71
 
72
72
  组件提供了下列 CSS 变量,可用于自定义样式。
73
- 名称 | 默认值 | 描述
73
+ 名称 | 默认值 | 描述
74
74
  -- | -- | --
75
75
  --td-popover-brand-bg-color | @primary-color-1 | -
76
76
  --td-popover-brand-color | @primary-color-7 | -
@@ -37,14 +37,17 @@
37
37
  </template>
38
38
 
39
39
  <script>
40
- import TOverlay from '../overlay/overlay';
41
- import { getWindowInfo } from '../common/wechat';
42
- import { uniComponent } from '../common/src/index';
43
40
  import { prefix } from '../common/config';
44
- import props from './props';
41
+ import { uniComponent } from '../common/src/index';
42
+
43
+
45
44
  import { debounce, nextTick, coalesce } from '../common/utils';
46
- import { transitionMixins } from '../mixins/transition';
45
+ import { getWindowInfo } from '../common/wechat';
47
46
  import pageScrollMixin from '../mixins/page-scroll';
47
+ import { transitionMixins } from '../mixins/transition';
48
+ import TOverlay from '../overlay/overlay';
49
+
50
+ import props from './props';
48
51
 
49
52
  delete props.visible;
50
53
 
@@ -44,7 +44,7 @@ t-class-content | \-
44
44
  ### CSS Variables
45
45
 
46
46
  The component provides the following CSS variables, which can be used to customize styles.
47
- Name | Default Value | Description
47
+ Name | Default Value | Description
48
48
  -- | -- | --
49
49
  --td-popup-bg-color | @bg-color-container | -
50
50
  --td-popup-border-radius | @radius-extraLarge | -
@@ -75,7 +75,7 @@ t-class-content | 内容样式类
75
75
  ### CSS Variables
76
76
 
77
77
  组件提供了下列 CSS 变量,可用于自定义样式。
78
- 名称 | 默认值 | 描述
78
+ 名称 | 默认值 | 描述
79
79
  -- | -- | --
80
80
  --td-popup-bg-color | @bg-color-container | -
81
81
  --td-popup-border-radius | @radius-extraLarge | -