@tdesign/uniapp 0.7.1 → 0.7.3

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 (102) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +31 -1
  3. package/dist/action-sheet/action-sheet.vue +3 -5
  4. package/dist/avatar/avatar.vue +6 -6
  5. package/dist/avatar-group/avatar-group.vue +1 -3
  6. package/dist/back-top/back-top.vue +13 -15
  7. package/dist/badge/badge.vue +1 -3
  8. package/dist/button/button.vue +16 -15
  9. package/dist/calendar/README.en-US.md +1 -0
  10. package/dist/calendar/README.md +1 -0
  11. package/dist/calendar/calendar-header.vue +1 -3
  12. package/dist/calendar/calendar.vue +28 -19
  13. package/dist/calendar/props.ts +5 -0
  14. package/dist/calendar/template.vue +1 -3
  15. package/dist/calendar/type.ts +6 -0
  16. package/dist/cascader/cascader.vue +1 -3
  17. package/dist/cell/cell.vue +51 -35
  18. package/dist/cell-group/cell-group.vue +1 -3
  19. package/dist/check-tag/check-tag.vue +12 -15
  20. package/dist/checkbox/README.en-US.md +6 -6
  21. package/dist/checkbox/README.md +5 -5
  22. package/dist/checkbox/checkbox.vue +13 -15
  23. package/dist/checkbox/type.ts +3 -1
  24. package/dist/checkbox-group/type.ts +2 -0
  25. package/dist/col/col.vue +1 -3
  26. package/dist/collapse/collapse.vue +1 -3
  27. package/dist/collapse-panel/collapse-panel.vue +1 -3
  28. package/dist/color-picker/color-picker.vue +2 -4
  29. package/dist/color-picker/template.vue +1 -3
  30. package/dist/common/src/instantiationDecorator.js +6 -0
  31. package/dist/common/style/theme/index.css +52 -56
  32. package/dist/count-down/count-down.vue +2 -4
  33. package/dist/date-time-picker/date-time-picker.vue +1 -3
  34. package/dist/dialog/dialog.vue +72 -73
  35. package/dist/divider/divider.vue +1 -3
  36. package/dist/draggable/draggable.vue +1 -3
  37. package/dist/drawer/drawer.vue +1 -3
  38. package/dist/dropdown-item/dropdown-item.vue +1 -3
  39. package/dist/dropdown-menu/dropdown-menu.vue +12 -14
  40. package/dist/empty/empty.vue +1 -3
  41. package/dist/fab/fab.vue +1 -3
  42. package/dist/footer/footer.vue +1 -3
  43. package/dist/form/form.vue +1 -3
  44. package/dist/form-item/form-item.css +16 -11
  45. package/dist/form-item/form-item.vue +2 -7
  46. package/dist/grid/grid.vue +1 -3
  47. package/dist/grid-item/grid-item.vue +1 -3
  48. package/dist/guide/content.vue +1 -3
  49. package/dist/guide/guide.vue +3 -8
  50. package/dist/icon/icon.vue +1 -3
  51. package/dist/image/image.vue +1 -3
  52. package/dist/image-viewer/image-viewer.vue +27 -30
  53. package/dist/indexes/indexes.vue +5 -7
  54. package/dist/indexes-anchor/indexes-anchor.vue +1 -3
  55. package/dist/input/input.vue +31 -31
  56. package/dist/link/link.vue +25 -26
  57. package/dist/loading/loading.vue +2 -2
  58. package/dist/message/index.d.ts +1 -1
  59. package/dist/message/message.interface.ts +2 -1
  60. package/dist/message-item/message-item.vue +34 -36
  61. package/dist/mixins/page-scroll.js +1 -1
  62. package/dist/navbar/navbar.vue +46 -33
  63. package/dist/notice-bar/notice-bar.vue +24 -26
  64. package/dist/overlay/overlay.vue +5 -7
  65. package/dist/picker/picker.vue +3 -4
  66. package/dist/picker-item/picker-item.vue +2 -4
  67. package/dist/popover/popover.vue +1 -3
  68. package/dist/popup/popup.vue +1 -3
  69. package/dist/progress/progress.vue +1 -3
  70. package/dist/pull-down-refresh/pull-down-refresh.vue +13 -15
  71. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +1 -3
  72. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +1 -3
  73. package/dist/qrcode/qrcode.vue +1 -3
  74. package/dist/radio/radio.vue +17 -19
  75. package/dist/rate/rate.vue +1 -3
  76. package/dist/result/result.vue +1 -3
  77. package/dist/row/row.vue +1 -3
  78. package/dist/search/search.vue +8 -3
  79. package/dist/side-bar/side-bar.vue +1 -3
  80. package/dist/side-bar-item/side-bar-item.vue +12 -15
  81. package/dist/skeleton/skeleton.vue +2 -4
  82. package/dist/slider/slider.vue +1 -3
  83. package/dist/step-item/step-item.vue +1 -3
  84. package/dist/stepper/stepper.vue +1 -3
  85. package/dist/steps/steps.vue +1 -2
  86. package/dist/sticky/sticky.vue +1 -3
  87. package/dist/swipe-cell/swipe-cell.vue +2 -5
  88. package/dist/swiper/swiper.vue +1 -3
  89. package/dist/swiper-nav/swiper-nav.vue +1 -3
  90. package/dist/switch/switch.vue +1 -3
  91. package/dist/tab-bar/tab-bar.vue +2 -1
  92. package/dist/tab-bar-item/tab-bar-item.vue +22 -25
  93. package/dist/tab-panel/tab-panel.vue +1 -3
  94. package/dist/tabs/tabs.vue +1 -2
  95. package/dist/tag/tag.vue +23 -26
  96. package/dist/textarea/textarea.vue +1 -3
  97. package/dist/toast/toast.vue +12 -14
  98. package/dist/transition/transition.vue +1 -3
  99. package/dist/tree-select/tree-select.vue +6 -9
  100. package/dist/upload/upload.vue +1 -3
  101. package/dist/watermark/watermark.vue +1 -2
  102. package/package.json +3 -1
@@ -9,19 +9,19 @@
9
9
  :class="classPrefix + '__icon'"
10
10
  >
11
11
  <block
12
- v-if="_icon"
12
+ v-if="innerIcon"
13
13
  name="icon"
14
14
  >
15
15
  <t-icon
16
- :custom-style="_icon.style || ''"
16
+ :custom-style="innerIcon.style || ''"
17
17
  :t-class="prefix + '-icon'"
18
- :prefix="_icon.prefix"
19
- :name="_icon.name"
20
- :size="_icon.size"
21
- :color="_icon.color"
22
- :aria-hidden="!!_icon.ariaHidden"
23
- :aria-label="_icon.ariaLabel"
24
- :aria-role="_icon.ariaRole"
18
+ :prefix="innerIcon.prefix"
19
+ :name="innerIcon.name"
20
+ :size="innerIcon.size"
21
+ :color="innerIcon.color"
22
+ :aria-hidden="!!innerIcon.ariaHidden"
23
+ :aria-label="innerIcon.ariaLabel"
24
+ :aria-role="innerIcon.ariaRole"
25
25
  />
26
26
  </block>
27
27
  <slot name="icon" />
@@ -84,7 +84,7 @@ export default uniComponent({
84
84
  classPrefix: name,
85
85
  className: '',
86
86
  tools,
87
- _icon: null,
87
+ innerIcon: null,
88
88
 
89
89
  dataChecked: coalesce(this.checked, this.defaultChecked),
90
90
  };
@@ -95,7 +95,7 @@ export default uniComponent({
95
95
  dataChecked: 'setClass',
96
96
  icon: {
97
97
  handler(e) {
98
- this._icon = calcIcon(e);
98
+ this.innerIcon = calcIcon(e);
99
99
  },
100
100
  immediate: true,
101
101
  },
@@ -143,7 +143,4 @@ export default uniComponent({
143
143
  });
144
144
 
145
145
  </script>
146
- <style scoped>
147
- @import './check-tag.css';
148
-
149
- </style>
146
+ <style scoped src="./check-tag.css"></style>
@@ -15,7 +15,7 @@ default-checked | Boolean | - | uncontrolled property | N
15
15
  content | String | - | \- | N
16
16
  content-disabled | Boolean | - | \- | N
17
17
  disabled | Boolean | undefined | \- | N
18
- icon | String / Array | 'circle' | Typescript:`'circle' \| 'line' \| 'rectangle' \| string[]` | N
18
+ icon | String / Array | 'circle' | Typescript: `CheckboxIconType` `type CheckboxIconType = 'circle' \| 'line' \| 'rectangle' \| string[];`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox/type.ts) | N
19
19
  indeterminate | Boolean | false | \- | N
20
20
  label | String | - | \- | N
21
21
  max-content-row | Number | 5 | \- | N
@@ -24,7 +24,7 @@ name | String | - | \- | N
24
24
  placement | String | left | options: left/right | N
25
25
  readonly | Boolean | undefined | \- | N
26
26
  relation-key | String | - | \- | N
27
- value | String / Number / Boolean | - | value of checkbox。Typescript:`string \| number \| boolean` | N
27
+ value | String / Number / Boolean | - | value of checkbox。Typescript: `string \| number \| boolean` | N
28
28
 
29
29
  ### Checkbox Events
30
30
 
@@ -58,14 +58,14 @@ name | type | default | description | required
58
58
  custom-style | Object | - | CSS(Cascading Style Sheets) | N
59
59
  borderless | Boolean | false | \- | N
60
60
  disabled | Boolean | undefined | \- | N
61
- keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
61
+ keys | Object | - | Typescript: `KeysType`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
62
62
  max | Number | undefined | \- | N
63
63
  name | String | - | \- | N
64
- options | Array | [] | Typescript:`Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean; checkAll?: true }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
64
+ options | Array | [] | Typescript: `Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean;icon?:CheckboxIconType; checkAll?: true }`,[Checkbox API Documents](./checkbox?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
65
65
  readonly | Boolean | undefined | \- | N
66
66
  relation-key | String | - | \- | N
67
- value | Array | - | `v-model:value` is supported。Typescript:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
68
- default-value | Array | - | uncontrolled property。Typescript:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
67
+ value | Array | - | `v-model:value` is supported。Typescript: `T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
68
+ default-value | Array | - | uncontrolled property。Typescript: `T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
69
69
 
70
70
  ### CheckboxGroup Events
71
71
 
@@ -70,7 +70,7 @@ default-checked | Boolean | - | 是否选中。非受控属性 | N
70
70
  content | String | - | 多选框内容 | N
71
71
  content-disabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N
72
72
  disabled | Boolean | undefined | 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled | N
73
- icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。TS 类型:`'circle' \| 'line' \| 'rectangle' \| string[]` | N
73
+ icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。TS 类型:`CheckboxIconType` `type CheckboxIconType = 'circle' \| 'line' \| 'rectangle' \| string[];`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox/type.ts) | N
74
74
  indeterminate | Boolean | false | 是否为半选 | N
75
75
  label | String | - | 主文案 | N
76
76
  max-content-row | Number | 5 | 内容最大行数限制 | N
@@ -113,14 +113,14 @@ t-class-label | 标签样式类
113
113
  custom-style | Object | - | 自定义样式 | N
114
114
  borderless | Boolean | false | 是否开启无边框模式。优先级低于 Checkbox.borderless | N
115
115
  disabled | Boolean | undefined | 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled | N
116
- keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
116
+ keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
117
117
  max | Number | undefined | 支持最多选中的数量 | N
118
118
  name | String | - | 统一设置内部复选框 HTML 属性 | N
119
- options | Array | [] | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean; checkAll?: true }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
119
+ options | Array | [] | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean;icon?:CheckboxIconType; checkAll?: true }`,[Checkbox API Documents](./checkbox?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
120
120
  readonly | Boolean | undefined | 只读状态 | N
121
121
  relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
122
- value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
123
- default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
122
+ value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
123
+ default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
124
124
 
125
125
  ### CheckboxGroup Events
126
126
 
@@ -2,15 +2,15 @@
2
2
  <view
3
3
  :id="tId"
4
4
  :style="tools._style([customStyle])"
5
- :class="tools.cls(classPrefix, [placement, theme, ['checked', dataChecked], ['block', block], ['disabled', _disabled]]) + ' ' + tClass"
5
+ :class="tools.cls(classPrefix, [placement, theme, ['checked', dataChecked], ['block', block], ['disabled', iDisabled]]) + ' ' + tClass"
6
6
  aria-role="checkbox"
7
7
  :aria-checked="dataChecked ? (dataIndeterminate ? 'mixed' : true) : false"
8
- :aria-disabled="_disabled ? true : false"
8
+ :aria-disabled="iDisabled ? true : false"
9
9
  @click.stop="handleTap"
10
10
  >
11
11
  <view
12
12
  v-if="theme == 'default'"
13
- :class="tools.cls(classPrefix + '__icon', [placement, ['checked', dataChecked], ['disabled', _disabled]]) + ' ' + tClassIcon"
13
+ :class="tools.cls(classPrefix + '__icon', [placement, ['checked', dataChecked], ['disabled', iDisabled]]) + ' ' + tClassIcon"
14
14
  >
15
15
  <slot
16
16
  v-if="icon === 'slot'"
@@ -38,7 +38,7 @@
38
38
  />
39
39
  <view
40
40
  v-else-if="!dataChecked && (icon == 'circle' || icon == 'rectangle')"
41
- :class="tools.cls(classPrefix + '__icon-' + icon, [['disabled', _disabled]])"
41
+ :class="tools.cls(classPrefix + '__icon-' + icon, [['disabled', iDisabled]])"
42
42
  />
43
43
  <view
44
44
  v-if="!dataChecked && icon == 'line'"
@@ -54,7 +54,7 @@
54
54
  <view
55
55
  :class="
56
56
  tools.cls(classPrefix + '__title', [
57
- ['disabled', _disabled],
57
+ ['disabled', iDisabled],
58
58
  ['checked', dataChecked]
59
59
  ]) +
60
60
  ' ' +
@@ -69,7 +69,7 @@
69
69
  <slot name="label" />
70
70
  </view>
71
71
  <view
72
- :class="tools.cls(classPrefix + '__description', [['disabled', _disabled]]) + ' ' + tClassContent"
72
+ :class="tools.cls(classPrefix + '__description', [['disabled', iDisabled]]) + ' ' + tClassContent"
73
73
  :style="'-webkit-line-clamp:' + maxContentRow"
74
74
  >
75
75
  <block v-if="content">
@@ -132,7 +132,7 @@ export default uniComponent({
132
132
  return {
133
133
  prefix,
134
134
  classPrefix: name,
135
- _disabled: false,
135
+ iDisabled: false,
136
136
  tools,
137
137
 
138
138
  dataBorderless: this.borderless,
@@ -166,7 +166,7 @@ export default uniComponent({
166
166
  },
167
167
  disabled: {
168
168
  handler(v) {
169
- this._disabled = v;
169
+ this.iDisabled = v;
170
170
  },
171
171
  immediate: true,
172
172
  },
@@ -183,7 +183,7 @@ export default uniComponent({
183
183
  const valueSet = new Set(value);
184
184
  const checkedFromParent = valueSet.has(this.value);
185
185
  const data = {
186
- _disabled: this.disabled == null ? disabled : this.disabled,
186
+ iDisabled: this.disabled == null ? disabled : this.disabled,
187
187
  };
188
188
 
189
189
  data.dataBorderless = !!(coalesce(this.borderless, borderless));
@@ -210,10 +210,10 @@ export default uniComponent({
210
210
  });
211
211
  },
212
212
  handleTap(e) {
213
- const { _disabled, readonly, contentDisabled } = this;
213
+ const { iDisabled, readonly, contentDisabled } = this;
214
214
  const { target } = e.currentTarget.dataset;
215
215
 
216
- if (_disabled || readonly || (target === 'text' && contentDisabled)) return;
216
+ if (iDisabled || readonly || (target === 'text' && contentDisabled)) return;
217
217
 
218
218
  const { value, label, checkAll, dataIndeterminate } = this;
219
219
  const checked = !this.dataChecked;
@@ -228,11 +228,9 @@ export default uniComponent({
228
228
  },
229
229
 
230
230
  setDisabled(disabled) {
231
- this._disabled = this.disabled || disabled;
231
+ this.iDisabled = this.disabled || disabled;
232
232
  },
233
233
  },
234
234
  });
235
235
  </script>
236
- <style scoped>
237
- @import './checkbox.css';
238
- </style>
236
+ <style scoped src="./checkbox.css"></style>
@@ -43,7 +43,7 @@ export interface TdCheckboxProps {
43
43
  * 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标
44
44
  * @default 'circle'
45
45
  */
46
- icon?: 'circle' | 'line' | 'rectangle' | string[];
46
+ icon?: CheckboxIconType;
47
47
  /**
48
48
  * 是否为半选
49
49
  * @default false
@@ -94,3 +94,5 @@ export interface TdCheckboxProps {
94
94
  context: { value: boolean | number | string; label: boolean | number | string };
95
95
  }) => void;
96
96
  }
97
+
98
+ export type CheckboxIconType = 'circle' | 'line' | 'rectangle' | string[];
@@ -4,6 +4,7 @@
4
4
  * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
5
5
  * */
6
6
 
7
+ import type { CheckboxIconType } from '../checkbox/type';
7
8
  import type { KeysType } from '../common/common';
8
9
 
9
10
  export interface TdCheckboxGroupProps<T = CheckboxGroupValue> {
@@ -66,6 +67,7 @@ export interface CheckboxOptionObj {
66
67
  label?: string;
67
68
  value?: string | number;
68
69
  disabled?: boolean;
70
+ icon?: CheckboxIconType;
69
71
  checkAll?: true;
70
72
  }
71
73
 
package/dist/col/col.vue CHANGED
@@ -46,9 +46,7 @@ export default uniComponent({
46
46
  });
47
47
 
48
48
  </script>
49
- <style scoped>
50
- @import './col.css';
51
- </style>
49
+ <style scoped src="./col.css"></style>
52
50
  <style scoped>
53
51
  .t-col {
54
52
  /* 适配 qq 小程序等 */
@@ -114,6 +114,4 @@ export default uniComponent({
114
114
  },
115
115
  });
116
116
  </script>
117
- <style scoped>
118
- @import './collapse.css';
119
- </style>
117
+ <style scoped src="./collapse.css"></style>
@@ -233,6 +233,4 @@ export default uniComponent({
233
233
  });
234
234
 
235
235
  </script>
236
- <style scoped>
237
- @import './collapse-panel.css';
238
- </style>
236
+ <style scoped src="./collapse-panel.css"></style>
@@ -234,7 +234,7 @@ export default uniComponent({
234
234
  }, 33);
235
235
  this.debouncedUpdateEleRect = debounce(e => this.updateEleRect(e), 150);
236
236
  },
237
- beforeUnMount() {
237
+ beforeUnmount() {
238
238
  clearTimeout(this.timer);
239
239
  },
240
240
  methods: {
@@ -496,6 +496,4 @@ export default uniComponent({
496
496
  });
497
497
 
498
498
  </script>
499
- <style scoped>
500
- @import './color-picker.css';
501
- </style>
499
+ <style scoped src="./color-picker.css"></style>
@@ -193,6 +193,4 @@ export default {
193
193
  };
194
194
  </script>
195
195
 
196
- <style scoped>
197
- @import './color-picker.css';
198
- </style>
196
+ <style scoped src="./color-picker.css"></style>
@@ -80,6 +80,12 @@ export const toComponent = function (options) {
80
80
  });
81
81
  };
82
82
 
83
+ // #ifdef Vue2
84
+ if (options.beforeUnmount) {
85
+ options.beforeDestroy = options.beforeUnmount;
86
+ }
87
+ // #endif
88
+
83
89
  options.methods._trigger = function (evtName, detail, opts) {
84
90
  const target = controlledProps.find(item => item.event === evtName);
85
91
 
@@ -144,9 +144,10 @@
144
144
  --td-component-border: var(--td-gray-color-4);
145
145
 
146
146
  --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
147
- --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
148
- --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%),
149
- 0 8px 10px -5px rgba(0, 0, 0, 8%);
147
+ --td-shadow-2:
148
+ 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
149
+ --td-shadow-3:
150
+ 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%);
150
151
  --td-shadow-4: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
151
152
 
152
153
  --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
@@ -162,7 +163,6 @@
162
163
  }
163
164
  }
164
165
 
165
-
166
166
  /* ./raw/_dark.less */
167
167
  @media (prefers-color-scheme: dark) {
168
168
  /* #ifdef H5 */
@@ -324,7 +324,6 @@
324
324
  }
325
325
  }
326
326
 
327
-
328
327
  /* ./raw/_radius.less */
329
328
  page,
330
329
  .page {
@@ -336,54 +335,53 @@ page,
336
335
  --td-radius-circle: 50%;
337
336
  }
338
337
 
339
-
340
338
  /* ./raw/_font.less */
341
339
  page,
342
340
  .page {
343
341
  --td-font-family: PingFang SC, Microsoft YaHei, Arial Regular;
344
342
  --td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium;
345
343
 
346
- --td-font-size-link-small: 48px;
347
- --td-font-size-link-medium: 56px;
348
- --td-font-size-link-large: 64px;
349
- --td-font-size-mark-extraSmall: 40px;
350
- --td-font-size-mark-small: 48px;
351
- --td-font-size-mark-medium: 56px;
352
- --td-font-size-mark-large: 64px;
353
- --td-font-size-body-extraSmall: 40px;
354
- --td-font-size-body-small: 48px;
355
- --td-font-size-body-medium: 56px;
356
- --td-font-size-body-large: 64px;
357
- --td-font-size-title-small: 56px;
358
- --td-font-size-title-medium: 64px;
359
- --td-font-size-title-large: 72px;
360
- --td-font-size-title-extraLarge: 80px;
361
- --td-font-size-headline-small: 96px;
362
- --td-font-size-headline-medium: 112px;
363
- --td-font-size-headline-large: 144px;
364
- --td-font-size-display-medium: 192px;
365
- --td-font-size-display-large: 256px;
366
-
367
- --td-line-height-link-small: 80px;
368
- --td-line-height-link-medium: 88px;
369
- --td-line-height-link-large: 96px;
370
- --td-line-height-mark-extraSmall: 64px;
371
- --td-line-height-mark-small: 80px;
372
- --td-line-height-mark-medium: 88px;
373
- --td-line-height-mark-large: 96px;
374
- --td-line-height-body-extraSmall: 64px;
375
- --td-line-height-body-small: 80px;
376
- --td-line-height-body-medium: 88px;
377
- --td-line-height-body-large: 96px;
378
- --td-line-height-title-small: 88px;
379
- --td-line-height-title-medium: 96px;
380
- --td-line-height-title-large: 104px;
381
- --td-line-height-title-extraLarge: 112px;
382
- --td-line-height-headline-small: 128px;
383
- --td-line-height-headline-medium: 144px;
384
- --td-line-height-headline-large: 176px;
385
- --td-line-height-display-medium: 224px;
386
- --td-line-height-display-large: 288px;
344
+ --td-font-size-link-small: 12px;
345
+ --td-font-size-link-medium: 14px;
346
+ --td-font-size-link-large: 16px;
347
+ --td-font-size-mark-extraSmall: 10px;
348
+ --td-font-size-mark-small: 12px;
349
+ --td-font-size-mark-medium: 14px;
350
+ --td-font-size-mark-large: 16px;
351
+ --td-font-size-body-extraSmall: 10px;
352
+ --td-font-size-body-small: 12px;
353
+ --td-font-size-body-medium: 14px;
354
+ --td-font-size-body-large: 16px;
355
+ --td-font-size-title-small: 14px;
356
+ --td-font-size-title-medium: 16px;
357
+ --td-font-size-title-large: 18px;
358
+ --td-font-size-title-extraLarge: 20px;
359
+ --td-font-size-headline-small: 24px;
360
+ --td-font-size-headline-medium: 28px;
361
+ --td-font-size-headline-large: 36px;
362
+ --td-font-size-display-medium: 48px;
363
+ --td-font-size-display-large: 64px;
364
+
365
+ --td-line-height-link-small: 20px;
366
+ --td-line-height-link-medium: 22px;
367
+ --td-line-height-link-large: 24px;
368
+ --td-line-height-mark-extraSmall: 16px;
369
+ --td-line-height-mark-small: 20px;
370
+ --td-line-height-mark-medium: 22px;
371
+ --td-line-height-mark-large: 24px;
372
+ --td-line-height-body-extraSmall: 16px;
373
+ --td-line-height-body-small: 20px;
374
+ --td-line-height-body-medium: 22px;
375
+ --td-line-height-body-large: 24px;
376
+ --td-line-height-title-small: 22px;
377
+ --td-line-height-title-medium: 24px;
378
+ --td-line-height-title-large: 26px;
379
+ --td-line-height-title-extraLarge: 28px;
380
+ --td-line-height-headline-small: 32px;
381
+ --td-line-height-headline-medium: 36px;
382
+ --td-line-height-headline-large: 44px;
383
+ --td-line-height-display-medium: 56px;
384
+ --td-line-height-display-large: 72px;
387
385
 
388
386
  --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family);
389
387
  --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family);
@@ -425,20 +423,18 @@ page,
425
423
  --td-font-size-xxl: var(--td-font-size-headline-large);
426
424
  }
427
425
 
428
-
429
426
  /* ./raw/_spacer.less */
430
427
  page,
431
428
  .page {
432
- --td-spacer: 32px;
433
- --td-spacer-1: 48px;
434
- --td-spacer-2: 64px;
435
- --td-spacer-3: 96px;
436
- --td-spacer-4: 128px;
437
- --td-spacer-5: 192px;
438
- --td-spacer-6: 320px;
429
+ --td-spacer: 8px;
430
+ --td-spacer-1: 12px;
431
+ --td-spacer-2: 16px;
432
+ --td-spacer-3: 24px;
433
+ --td-spacer-4: 32px;
434
+ --td-spacer-5: 48px;
435
+ --td-spacer-6: 80px;
439
436
  }
440
437
 
441
-
442
438
  /* ./raw/_components.less */
443
439
  @media (prefers-color-scheme: light) {
444
440
  page,
@@ -83,7 +83,7 @@ export default uniComponent({
83
83
  mounted() {
84
84
 
85
85
  },
86
- beforeUnMount() {
86
+ beforeUnmount() {
87
87
  if (this.timeoutId) {
88
88
  clearTimeout(this.timeoutId);
89
89
  this.timeoutId = null;
@@ -161,6 +161,4 @@ export default uniComponent({
161
161
  },
162
162
  });
163
163
  </script>
164
- <style scoped>
165
- @import './count-down.css';
166
- </style>
164
+ <style scoped src="./count-down.css"></style>
@@ -565,6 +565,4 @@ export default uniComponent({
565
565
 
566
566
  });
567
567
  </script>
568
- <style scoped>
569
- @import './date-time-picker.css';
570
- </style>
568
+ <style scoped src="./date-time-picker.css"></style>