@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.
- package/CHANGELOG.md +21 -0
- package/README.md +31 -1
- package/dist/action-sheet/action-sheet.vue +3 -5
- package/dist/avatar/avatar.vue +6 -6
- package/dist/avatar-group/avatar-group.vue +1 -3
- package/dist/back-top/back-top.vue +13 -15
- package/dist/badge/badge.vue +1 -3
- package/dist/button/button.vue +16 -15
- package/dist/calendar/README.en-US.md +1 -0
- package/dist/calendar/README.md +1 -0
- package/dist/calendar/calendar-header.vue +1 -3
- package/dist/calendar/calendar.vue +28 -19
- package/dist/calendar/props.ts +5 -0
- package/dist/calendar/template.vue +1 -3
- package/dist/calendar/type.ts +6 -0
- package/dist/cascader/cascader.vue +1 -3
- package/dist/cell/cell.vue +51 -35
- package/dist/cell-group/cell-group.vue +1 -3
- package/dist/check-tag/check-tag.vue +12 -15
- package/dist/checkbox/README.en-US.md +6 -6
- package/dist/checkbox/README.md +5 -5
- package/dist/checkbox/checkbox.vue +13 -15
- package/dist/checkbox/type.ts +3 -1
- package/dist/checkbox-group/type.ts +2 -0
- package/dist/col/col.vue +1 -3
- package/dist/collapse/collapse.vue +1 -3
- package/dist/collapse-panel/collapse-panel.vue +1 -3
- package/dist/color-picker/color-picker.vue +2 -4
- package/dist/color-picker/template.vue +1 -3
- package/dist/common/src/instantiationDecorator.js +6 -0
- package/dist/common/style/theme/index.css +52 -56
- package/dist/count-down/count-down.vue +2 -4
- package/dist/date-time-picker/date-time-picker.vue +1 -3
- package/dist/dialog/dialog.vue +72 -73
- package/dist/divider/divider.vue +1 -3
- package/dist/draggable/draggable.vue +1 -3
- package/dist/drawer/drawer.vue +1 -3
- package/dist/dropdown-item/dropdown-item.vue +1 -3
- package/dist/dropdown-menu/dropdown-menu.vue +12 -14
- package/dist/empty/empty.vue +1 -3
- package/dist/fab/fab.vue +1 -3
- package/dist/footer/footer.vue +1 -3
- package/dist/form/form.vue +1 -3
- package/dist/form-item/form-item.css +16 -11
- package/dist/form-item/form-item.vue +2 -7
- package/dist/grid/grid.vue +1 -3
- package/dist/grid-item/grid-item.vue +1 -3
- package/dist/guide/content.vue +1 -3
- package/dist/guide/guide.vue +3 -8
- package/dist/icon/icon.vue +1 -3
- package/dist/image/image.vue +1 -3
- package/dist/image-viewer/image-viewer.vue +27 -30
- package/dist/indexes/indexes.vue +5 -7
- package/dist/indexes-anchor/indexes-anchor.vue +1 -3
- package/dist/input/input.vue +31 -31
- package/dist/link/link.vue +25 -26
- package/dist/loading/loading.vue +2 -2
- package/dist/message/index.d.ts +1 -1
- package/dist/message/message.interface.ts +2 -1
- package/dist/message-item/message-item.vue +34 -36
- package/dist/mixins/page-scroll.js +1 -1
- package/dist/navbar/navbar.vue +46 -33
- package/dist/notice-bar/notice-bar.vue +24 -26
- package/dist/overlay/overlay.vue +5 -7
- package/dist/picker/picker.vue +3 -4
- package/dist/picker-item/picker-item.vue +2 -4
- package/dist/popover/popover.vue +1 -3
- package/dist/popup/popup.vue +1 -3
- package/dist/progress/progress.vue +1 -3
- package/dist/pull-down-refresh/pull-down-refresh.vue +13 -15
- package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +1 -3
- package/dist/qrcode/components/qrcode-status/qrcode-status.vue +1 -3
- package/dist/qrcode/qrcode.vue +1 -3
- package/dist/radio/radio.vue +17 -19
- package/dist/rate/rate.vue +1 -3
- package/dist/result/result.vue +1 -3
- package/dist/row/row.vue +1 -3
- package/dist/search/search.vue +8 -3
- package/dist/side-bar/side-bar.vue +1 -3
- package/dist/side-bar-item/side-bar-item.vue +12 -15
- package/dist/skeleton/skeleton.vue +2 -4
- package/dist/slider/slider.vue +1 -3
- package/dist/step-item/step-item.vue +1 -3
- package/dist/stepper/stepper.vue +1 -3
- package/dist/steps/steps.vue +1 -2
- package/dist/sticky/sticky.vue +1 -3
- package/dist/swipe-cell/swipe-cell.vue +2 -5
- package/dist/swiper/swiper.vue +1 -3
- package/dist/swiper-nav/swiper-nav.vue +1 -3
- package/dist/switch/switch.vue +1 -3
- package/dist/tab-bar/tab-bar.vue +2 -1
- package/dist/tab-bar-item/tab-bar-item.vue +22 -25
- package/dist/tab-panel/tab-panel.vue +1 -3
- package/dist/tabs/tabs.vue +1 -2
- package/dist/tag/tag.vue +23 -26
- package/dist/textarea/textarea.vue +1 -3
- package/dist/toast/toast.vue +12 -14
- package/dist/transition/transition.vue +1 -3
- package/dist/tree-select/tree-select.vue +6 -9
- package/dist/upload/upload.vue +1 -3
- package/dist/watermark/watermark.vue +1 -2
- package/package.json +3 -1
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
:class="classPrefix + '__icon'"
|
|
10
10
|
>
|
|
11
11
|
<block
|
|
12
|
-
v-if="
|
|
12
|
+
v-if="innerIcon"
|
|
13
13
|
name="icon"
|
|
14
14
|
>
|
|
15
15
|
<t-icon
|
|
16
|
-
:custom-style="
|
|
16
|
+
:custom-style="innerIcon.style || ''"
|
|
17
17
|
:t-class="prefix + '-icon'"
|
|
18
|
-
:prefix="
|
|
19
|
-
:name="
|
|
20
|
-
:size="
|
|
21
|
-
:color="
|
|
22
|
-
:aria-hidden="!!
|
|
23
|
-
:aria-label="
|
|
24
|
-
:aria-role="
|
|
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
|
-
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
68
|
-
default-value | Array | - | uncontrolled property。Typescript
|
|
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
|
|
package/dist/checkbox/README.md
CHANGED
|
@@ -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[]
|
|
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/
|
|
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 }
|
|
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/
|
|
123
|
-
default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/
|
|
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',
|
|
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="
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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 {
|
|
213
|
+
const { iDisabled, readonly, contentDisabled } = this;
|
|
214
214
|
const { target } = e.currentTarget.dataset;
|
|
215
215
|
|
|
216
|
-
if (
|
|
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.
|
|
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>
|
package/dist/checkbox/type.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface TdCheckboxProps {
|
|
|
43
43
|
* 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标
|
|
44
44
|
* @default 'circle'
|
|
45
45
|
*/
|
|
46
|
-
icon?:
|
|
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
|
@@ -234,7 +234,7 @@ export default uniComponent({
|
|
|
234
234
|
}, 33);
|
|
235
235
|
this.debouncedUpdateEleRect = debounce(e => this.updateEleRect(e), 150);
|
|
236
236
|
},
|
|
237
|
-
|
|
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>
|
|
@@ -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:
|
|
148
|
-
|
|
149
|
-
|
|
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:
|
|
347
|
-
--td-font-size-link-medium:
|
|
348
|
-
--td-font-size-link-large:
|
|
349
|
-
--td-font-size-mark-extraSmall:
|
|
350
|
-
--td-font-size-mark-small:
|
|
351
|
-
--td-font-size-mark-medium:
|
|
352
|
-
--td-font-size-mark-large:
|
|
353
|
-
--td-font-size-body-extraSmall:
|
|
354
|
-
--td-font-size-body-small:
|
|
355
|
-
--td-font-size-body-medium:
|
|
356
|
-
--td-font-size-body-large:
|
|
357
|
-
--td-font-size-title-small:
|
|
358
|
-
--td-font-size-title-medium:
|
|
359
|
-
--td-font-size-title-large:
|
|
360
|
-
--td-font-size-title-extraLarge:
|
|
361
|
-
--td-font-size-headline-small:
|
|
362
|
-
--td-font-size-headline-medium:
|
|
363
|
-
--td-font-size-headline-large:
|
|
364
|
-
--td-font-size-display-medium:
|
|
365
|
-
--td-font-size-display-large:
|
|
366
|
-
|
|
367
|
-
--td-line-height-link-small:
|
|
368
|
-
--td-line-height-link-medium:
|
|
369
|
-
--td-line-height-link-large:
|
|
370
|
-
--td-line-height-mark-extraSmall:
|
|
371
|
-
--td-line-height-mark-small:
|
|
372
|
-
--td-line-height-mark-medium:
|
|
373
|
-
--td-line-height-mark-large:
|
|
374
|
-
--td-line-height-body-extraSmall:
|
|
375
|
-
--td-line-height-body-small:
|
|
376
|
-
--td-line-height-body-medium:
|
|
377
|
-
--td-line-height-body-large:
|
|
378
|
-
--td-line-height-title-small:
|
|
379
|
-
--td-line-height-title-medium:
|
|
380
|
-
--td-line-height-title-large:
|
|
381
|
-
--td-line-height-title-extraLarge:
|
|
382
|
-
--td-line-height-headline-small:
|
|
383
|
-
--td-line-height-headline-medium:
|
|
384
|
-
--td-line-height-headline-large:
|
|
385
|
-
--td-line-height-display-medium:
|
|
386
|
-
--td-line-height-display-large:
|
|
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:
|
|
433
|
-
--td-spacer-1:
|
|
434
|
-
--td-spacer-2:
|
|
435
|
-
--td-spacer-3:
|
|
436
|
-
--td-spacer-4:
|
|
437
|
-
--td-spacer-5:
|
|
438
|
-
--td-spacer-6:
|
|
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
|
-
|
|
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>
|