vdesign-ui 0.1.24 → 0.2.0
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/dist/components/activityviews/index.vue +14 -12
- package/dist/components/button/index.vue +1 -1
- package/dist/components/checkbox/checkbox-group/index.vue +2 -1
- package/dist/components/checkbox/index.vue +19 -20
- package/dist/components/dialog/index.vue +15 -11
- package/dist/components/dropdown/index.vue +43 -31
- package/dist/components/empty/404-dark.png +0 -0
- package/dist/components/empty/404.png +0 -0
- package/dist/components/empty/index.vue +30 -2
- package/dist/components/empty/network-dark.png +0 -0
- package/dist/components/empty/network.png +0 -0
- package/dist/components/empty/nocoupons-dark.png +0 -0
- package/dist/components/empty/nocoupons.png +0 -0
- package/dist/components/empty/nodata-dark.png +0 -0
- package/dist/components/empty/nodata.png +0 -0
- package/dist/components/empty/nomargin-dark.png +0 -0
- package/dist/components/empty/nomargin.png +0 -0
- package/dist/components/empty/nonotice-dark.png +0 -0
- package/dist/components/empty/nonotice.png +0 -0
- package/dist/components/empty/noocomments-dark.png +0 -0
- package/dist/components/empty/noocomments.png +0 -0
- package/dist/components/empty/noorders-dark.png +0 -0
- package/dist/components/empty/noorders.png +0 -0
- package/dist/components/empty/noposition-dark.png +0 -0
- package/dist/components/empty/noposition.png +0 -0
- package/dist/components/empty/nosearch-dark.png +0 -0
- package/dist/components/empty/nosearch.png +0 -0
- package/dist/components/empty/style.less +4 -0
- package/dist/components/footer/index.vue +5 -1
- package/dist/components/footnav/footnav-item/index.vue +11 -42
- package/dist/components/footnav/index.vue +29 -33
- package/dist/components/headnav/index.vue +55 -37
- package/dist/components/headnav/style.less +0 -9
- package/dist/components/icon/font/iconfont.css +62 -952
- package/dist/components/icon/font/iconfont.js +5 -1
- package/dist/components/icon/index.vue +26 -18
- package/dist/components/input/calcTextareaHeight.js +36 -140
- package/dist/components/input/index.vue +107 -109
- package/dist/components/input/search/index.vue +18 -22
- package/dist/components/input/stepper/index.vue +32 -26
- package/dist/components/input/style.less +20 -33
- package/dist/components/list/index.vue +57 -69
- package/dist/components/list/style.less +20 -92
- package/dist/components/loading/img_status_loading_white_ani.svg +155 -0
- package/dist/components/loading/img_status_refresh_ani.svg +158 -0
- package/dist/components/loading/index.vue +28 -11
- package/dist/components/loading/style.less +1 -1
- package/dist/components/mixins/clickoutside.js +81 -81
- package/dist/components/mixins/outlineConfigPlugin.js +11 -6
- package/dist/components/noticebar/index.vue +9 -4
- package/dist/components/pagebreak/index.vue +21 -14
- package/dist/components/radio/index.vue +164 -135
- package/dist/components/radio/radio-group/index.vue +40 -52
- package/dist/components/result/index.vue +1 -2
- package/dist/components/selector/index.vue +49 -31
- package/dist/components/selector/style.less +14 -0
- package/dist/components/step-item/index.vue +2 -2
- package/dist/components/tabs/index.vue +55 -32
- package/dist/components/tabs/tab/index.vue +13 -16
- package/dist/components/tag/index.vue +18 -4
- package/dist/components/tag/style.less +2 -2
- package/dist/components/title/index.vue +11 -8
- package/dist/components/title/style.less +6 -0
- package/dist/img/img_status_loading_white_ani.b56fcfae.svg +155 -0
- package/dist/img/img_status_refresh_ani.d0e59f12.svg +158 -0
- package/dist/token.css +8 -0
- package/dist/vdesign-ui.common.js +1481 -1354
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +1481 -1354
- package/dist/vdesign-ui.umd.min.js +3 -3
- package/package.json +1 -1
- package/dist/components/loading/loading.png +0 -0
- package/dist/components/loading/refresh.png +0 -0
- package/dist/img/404-dark.775df5bb.png +0 -0
- package/dist/img/network-dark.11a147bb.png +0 -0
- package/dist/img/nodata-dark.b0ea0e39.png +0 -0
|
@@ -6,19 +6,15 @@
|
|
|
6
6
|
<vd-icon name="icon_nav_search"></vd-icon>
|
|
7
7
|
</slot>
|
|
8
8
|
</span>
|
|
9
|
-
<!-- <input :type="type" :class="inputClasses" :placeholder="placeholder"> -->
|
|
10
9
|
<vd-input
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
v-on="inputListeners"
|
|
12
|
+
:value="value"
|
|
13
|
+
:type="type"
|
|
14
|
+
:clearable="clearable"
|
|
15
|
+
form="search"
|
|
16
|
+
:hairline="false"
|
|
15
17
|
></vd-input>
|
|
16
|
-
<span v-if="suffix || $slots.suffix" class="vd-search__suffix">
|
|
17
|
-
<slot name="suffix">
|
|
18
|
-
<vd-icon v-if="suffix" name="icon_btn_clean"></vd-icon>
|
|
19
|
-
</slot>
|
|
20
|
-
</span>
|
|
21
|
-
|
|
22
18
|
</div>
|
|
23
19
|
<span class="vd-search__action" v-if="$slots.default">
|
|
24
20
|
<slot></slot>
|
|
@@ -27,20 +23,22 @@
|
|
|
27
23
|
</template>
|
|
28
24
|
|
|
29
25
|
<script>
|
|
30
|
-
const prefixCls = 'vd-search';
|
|
31
26
|
export default {
|
|
32
27
|
name: 'vd-search',
|
|
33
28
|
inheritAttrs: false,
|
|
34
29
|
props: {
|
|
30
|
+
value: [String, Number],
|
|
35
31
|
type: {
|
|
36
32
|
type: String,
|
|
37
33
|
default: 'text'
|
|
38
34
|
},
|
|
39
|
-
|
|
35
|
+
clearable: {
|
|
40
36
|
type: Boolean,
|
|
37
|
+
default: false,
|
|
41
38
|
},
|
|
42
|
-
|
|
39
|
+
prefix: {
|
|
43
40
|
type: Boolean,
|
|
41
|
+
default: true, // 默认显示前缀图标
|
|
44
42
|
},
|
|
45
43
|
},
|
|
46
44
|
data() {
|
|
@@ -48,19 +46,17 @@ export default {
|
|
|
48
46
|
}
|
|
49
47
|
},
|
|
50
48
|
computed: {
|
|
51
|
-
|
|
52
|
-
return [
|
|
53
|
-
`${prefixCls}__control`
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
listeners() {
|
|
49
|
+
inputListeners() {
|
|
57
50
|
return {
|
|
58
51
|
...this.$listeners,
|
|
52
|
+
input: this.onInput,
|
|
59
53
|
};
|
|
60
|
-
}
|
|
54
|
+
},
|
|
61
55
|
},
|
|
62
56
|
methods: {
|
|
63
|
-
|
|
57
|
+
onInput(value) {
|
|
58
|
+
this.$emit('input', value);
|
|
59
|
+
},
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
62
|
</script>
|
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
<div class="vd-stepper" :class="wrapClasses">
|
|
3
3
|
<vd-button v-if="!position" :class="minusButtonClass" icon="icon_btn_reduce" size="small"
|
|
4
4
|
@click="onChange('minus')"></vd-button>
|
|
5
|
-
<input
|
|
6
|
-
|
|
5
|
+
<input
|
|
6
|
+
type="number"
|
|
7
|
+
:class="inputClasses"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
:value="currentValue"
|
|
10
|
+
:placeholder="placeholder"
|
|
11
|
+
@input="onInput"
|
|
12
|
+
@blur="onBlur"
|
|
13
|
+
>
|
|
7
14
|
<vd-button v-if="position === 'right'" class="vd-stepper__minus" icon="icon_btn_reduce" size="small"
|
|
8
15
|
@click="onChange('minus')"></vd-button>
|
|
9
16
|
<vd-button :class="plusButtonClass" icon="icon_btn_add" size="small"
|
|
@@ -21,7 +28,7 @@ export default {
|
|
|
21
28
|
props: {
|
|
22
29
|
value: null,
|
|
23
30
|
integer: Boolean,
|
|
24
|
-
position:
|
|
31
|
+
position: String,
|
|
25
32
|
inputCenter: Boolean,
|
|
26
33
|
disabled: Boolean,
|
|
27
34
|
theme: String,
|
|
@@ -37,16 +44,21 @@ export default {
|
|
|
37
44
|
type: [String, Number],
|
|
38
45
|
default: 1
|
|
39
46
|
},
|
|
40
|
-
placeholder:String
|
|
47
|
+
placeholder: String
|
|
41
48
|
},
|
|
42
49
|
data() {
|
|
43
|
-
|
|
44
|
-
if (
|
|
45
|
-
this
|
|
50
|
+
let value;
|
|
51
|
+
if (this.isDef(this.value)) {
|
|
52
|
+
value = this.range(this.value);
|
|
53
|
+
if (value !== this.value) {
|
|
54
|
+
this.$emit('input', value);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
value = '';
|
|
46
58
|
}
|
|
47
59
|
return {
|
|
48
60
|
currentValue: value,
|
|
49
|
-
}
|
|
61
|
+
};
|
|
50
62
|
},
|
|
51
63
|
computed: {
|
|
52
64
|
inputClasses() {
|
|
@@ -60,7 +72,6 @@ export default {
|
|
|
60
72
|
[`${prefixCls}--disabled`]: this.disabled,
|
|
61
73
|
[`${prefixCls}--${this.theme}`]: this.theme,
|
|
62
74
|
[`${prefixCls}--center`]: this.inputCenter
|
|
63
|
-
|
|
64
75
|
}
|
|
65
76
|
]
|
|
66
77
|
},
|
|
@@ -72,13 +83,6 @@ export default {
|
|
|
72
83
|
const hairlineClass = this.language === 'ar' ? 'vd-hairline--right' : 'vd-hairline--left';
|
|
73
84
|
return `vd-stepper__plus ${hairlineClass}`;
|
|
74
85
|
}
|
|
75
|
-
// minusDisabled() {
|
|
76
|
-
// return this.disabled || this.currentValue <= this.min;
|
|
77
|
-
// },
|
|
78
|
-
|
|
79
|
-
// plusDisabled() {
|
|
80
|
-
// return this.disabled || this.currentValue >= this.max;
|
|
81
|
-
// }
|
|
82
86
|
},
|
|
83
87
|
watch: {
|
|
84
88
|
value(val) {
|
|
@@ -86,7 +90,6 @@ export default {
|
|
|
86
90
|
this.currentValue = this.format(val);
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
|
-
|
|
90
93
|
currentValue(val) {
|
|
91
94
|
this.$emit('input', val);
|
|
92
95
|
this.$emit('change', val);
|
|
@@ -94,36 +97,39 @@ export default {
|
|
|
94
97
|
},
|
|
95
98
|
methods: {
|
|
96
99
|
format(value) {
|
|
100
|
+
if (value === '' || value === null || value === undefined) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
97
103
|
value = String(value).replace(/[^0-9.-]/g, '');
|
|
98
|
-
return
|
|
104
|
+
return this.integer ? Math.floor(value) : +value;
|
|
99
105
|
},
|
|
100
|
-
|
|
101
106
|
// limit value range
|
|
102
107
|
range(value) {
|
|
103
|
-
|
|
108
|
+
value = this.format(value);
|
|
109
|
+
if (value === '') {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
return Math.max(Math.min(this.max, value), this.min);
|
|
104
113
|
},
|
|
105
|
-
|
|
106
114
|
onInput(event) {
|
|
107
115
|
const { value } = event.target;
|
|
108
116
|
const formatted = this.format(value);
|
|
109
|
-
if (
|
|
117
|
+
if (value !== String(formatted)) {
|
|
110
118
|
event.target.value = formatted;
|
|
111
119
|
}
|
|
112
120
|
this.currentValue = formatted;
|
|
113
121
|
},
|
|
114
|
-
|
|
115
122
|
onChange(type) {
|
|
116
123
|
if (this[`${type}Disabled`]) {
|
|
117
124
|
this.$emit('overlimit', type);
|
|
118
125
|
return;
|
|
119
126
|
}
|
|
120
127
|
const diff = type === 'minus' ? -this.step : +this.step;
|
|
121
|
-
|
|
128
|
+
let value = this.currentValue === '' ? 0 : this.currentValue;
|
|
129
|
+
value = Math.round((value + diff) * 100) / 100;
|
|
122
130
|
this.currentValue = this.range(value);
|
|
123
|
-
|
|
124
131
|
this.$emit(type);
|
|
125
132
|
},
|
|
126
|
-
|
|
127
133
|
onBlur(event) {
|
|
128
134
|
this.currentValue = this.range(this.currentValue);
|
|
129
135
|
this.$emit('blur', event);
|
|
@@ -106,16 +106,19 @@
|
|
|
106
106
|
padding-block-start: calc(var(--spacing-input-textarea-padding_x) * 1px);
|
|
107
107
|
padding-block-end: calc(var(--spacing-input-textarea-padding_x) * 1px);
|
|
108
108
|
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
109
|
-
|
|
110
|
-
.@{input-prefix-cls}__word-limit {
|
|
111
|
-
text-align: end;
|
|
112
|
-
color: var(--color-input-text-default);
|
|
113
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
114
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
115
|
-
margin-block-start: calc(var(--spacing-input-textarea_text-margin_down) * 1px);
|
|
116
109
|
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
.@{input-prefix-cls}-form__right{
|
|
111
|
+
display: block;
|
|
112
|
+
.@{input-prefix-cls}__word-limit {
|
|
113
|
+
text-align: end;
|
|
114
|
+
color: var(--color-input-text-default);
|
|
115
|
+
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
116
|
+
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
117
|
+
margin-block-start: calc(var(--spacing-input-textarea_text-margin_down) * 1px);
|
|
118
|
+
|
|
119
|
+
&--error {
|
|
120
|
+
color: var(--color-input-text-wrong);
|
|
121
|
+
}
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
124
|
|
|
@@ -132,20 +135,19 @@
|
|
|
132
135
|
color: var(--color-input-text-active);
|
|
133
136
|
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
134
137
|
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
135
|
-
// margin-inline-end: calc(var(--spacing-input-form_divider-margin_y) * 1px);
|
|
136
138
|
padding-inline-end: calc(var(--spacing-input-form_divider-margin_y) * 1px);
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
&__right {
|
|
140
142
|
display: inline-flex;
|
|
141
143
|
align-items: center;
|
|
142
|
-
|
|
143
144
|
.@{input-prefix-cls}__word-limit {
|
|
144
145
|
text-align: end;
|
|
145
146
|
color: var(--color-input-text-default);
|
|
146
147
|
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
147
148
|
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
148
|
-
margin-block-start: 0;
|
|
149
|
+
// margin-block-start: 0;
|
|
150
|
+
margin-inline-start: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
|
|
149
151
|
|
|
150
152
|
&--error {
|
|
151
153
|
color: var(--color-input-text-wrong);
|
|
@@ -155,7 +157,7 @@
|
|
|
155
157
|
|
|
156
158
|
&__suffix {
|
|
157
159
|
margin-inline-start: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
|
|
158
|
-
margin-inline-end: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
|
|
160
|
+
// margin-inline-end: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
|
|
159
161
|
color: var(--color-input-text-active);
|
|
160
162
|
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
161
163
|
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
@@ -240,9 +242,10 @@
|
|
|
240
242
|
|
|
241
243
|
.@{input-prefix-cls} {
|
|
242
244
|
&-search{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
padding-inline-start: 0;
|
|
246
|
+
padding-inline-end: 0;
|
|
247
|
+
flex: 1;
|
|
248
|
+
}
|
|
246
249
|
}
|
|
247
250
|
|
|
248
251
|
|
|
@@ -266,21 +269,18 @@
|
|
|
266
269
|
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
267
270
|
caret-color: var(--color-input-cursor);
|
|
268
271
|
|
|
269
|
-
|
|
270
272
|
&::-webkit-input-placeholder {
|
|
271
273
|
color: var(--color-input-text-default);
|
|
272
274
|
font-size: calc(var(--en-single-f-d-r-fontSize) * 1px);
|
|
273
275
|
font-weight: var(--en-single-f-d-r-fontWeight);
|
|
274
276
|
}
|
|
275
277
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
&__prefix {
|
|
282
282
|
display: flex;
|
|
283
|
-
|
|
283
|
+
padding-inline-end: calc(var(--spacing-input-suffix_icon-margin_y)* 1px);
|
|
284
284
|
.vd-iconfont {
|
|
285
285
|
vertical-align: middle;
|
|
286
286
|
color: var(--text-color-h3);
|
|
@@ -288,19 +288,6 @@
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
&__suffix {
|
|
292
|
-
margin-inline-start: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
|
|
293
|
-
color: var(--color-input-text-active);
|
|
294
|
-
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
295
|
-
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
296
|
-
|
|
297
|
-
.vd-iconfont {
|
|
298
|
-
vertical-align: middle;
|
|
299
|
-
color: var(--text-color-h3);
|
|
300
|
-
font-size: calc(var(--icon-input-clean) * 1px);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
291
|
&__action {
|
|
305
292
|
margin-inline-start: calc(var(--spacing-input-search_cancel-margin_left) * 1px);
|
|
306
293
|
display: flex;
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="vd-list" :class="wrapClasses" @click="
|
|
2
|
+
<div class="vd-list" :class="wrapClasses" @click="handleToggleActive">
|
|
3
|
+
<!-- 左侧内容区域 -->
|
|
3
4
|
<div class="vd-list--left" :class="listLeftClasses">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<div v-if="extraSlot">
|
|
7
|
-
<slot></slot>
|
|
8
|
-
</div>
|
|
5
|
+
<!-- 通用列表和勾选列表自定义左侧图标 距离右边12px-->
|
|
6
|
+
<vd-icon v-if="icon" :name="icon" size="large" :class="iconClasses"></vd-icon>
|
|
9
7
|
<div class="vd-list-content" :class="contentClasses">
|
|
10
|
-
|
|
11
|
-
<span class="vd-
|
|
12
|
-
|
|
13
|
-
<p class="vd-
|
|
8
|
+
<!-- 标题 -->
|
|
9
|
+
<span class="vd-multi-ellipsis--l2" :class="innerTitleClasses">{{ title }}</span>
|
|
10
|
+
<!-- 通用列表副文本 -->
|
|
11
|
+
<p class="vd-multi-ellipsis--l2" :class="subtitleClasses" v-if="subtitle">{{ subtitle }}
|
|
14
12
|
</p>
|
|
15
13
|
</div>
|
|
14
|
+
<!-- 信息列表右侧图标 -->
|
|
15
|
+
<vd-icon v-if="statusIcon" :name="statusIcon" size="small" :class="statusIconClasses"></vd-icon>
|
|
16
|
+
<!-- 勾选列表 额外插槽 -->
|
|
17
|
+
<slot name="left"></slot>
|
|
16
18
|
</div>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
<!-- 右侧内容区域 -->
|
|
20
|
+
<div class="vd-list--right" v-if="guideText || arrowIcon || isActive || $slots.switch">
|
|
21
|
+
<!-- 信息列表右侧自定义图标 -->
|
|
22
|
+
<vd-icon class="vd-list__icon--extra" size="small" v-if="actionIcon" :name="actionIcon"></vd-icon>
|
|
23
|
+
<!-- 通用列表徽标插槽 左间距12 -->
|
|
24
|
+
<span class="vd-list-common__badge" v-if="showBadge || $slots.badge">
|
|
25
|
+
<slot name="badge">
|
|
26
|
+
<vd-badge is-dot></vd-badge>
|
|
27
|
+
</slot>
|
|
28
|
+
</span>
|
|
29
|
+
<!-- 右侧文本 -->
|
|
30
|
+
<div v-if="guideText" :class="textRightClasses">
|
|
24
31
|
<p>{{ guideText }}</p>
|
|
25
32
|
<p v-if="mulText" class="vd-list__multext">{{ mulText }}</p>
|
|
33
|
+
</div>
|
|
34
|
+
<!-- 右箭头 左间距4 设计师没有提供默认图标,不设置默认值-->
|
|
35
|
+
<span v-if="arrowIcon" class="vd-list__arrow" @click="$emit('next')">
|
|
36
|
+
<vd-icon :name="arrowIcon" size="small"></vd-icon>
|
|
26
37
|
</span>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</span>
|
|
30
|
-
<!-- <span v-if="activeSelect" class="vd-list-check__select"> -->
|
|
31
|
-
<vd-icon v-if="activeSelect" class="vd-list-check__select" name="icon_btn_singleslt"
|
|
38
|
+
<!-- 勾选列表选择图标 左间距12-->
|
|
39
|
+
<vd-icon v-if="isActive" class="vd-list-check__select" name="icon_btn_singleslt"
|
|
32
40
|
color="#1BC47D"></vd-icon>
|
|
33
|
-
<!--
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<slot></slot>
|
|
41
|
+
<!-- 通用列表自定义插槽 左间距8 -->
|
|
42
|
+
<span v-if="$slots.switch" class="vd-list__switch">
|
|
43
|
+
<slot name="switch"></slot>
|
|
37
44
|
</span>
|
|
38
45
|
</div>
|
|
39
46
|
</div>
|
|
@@ -44,33 +51,21 @@ const prefixCls = 'vd-list';
|
|
|
44
51
|
export default {
|
|
45
52
|
name: 'vd-list',
|
|
46
53
|
props: {
|
|
47
|
-
title: String,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
rightSvg: Boolean,
|
|
60
|
-
cusSvg: Boolean,
|
|
61
|
-
leftCusSvg: Boolean,
|
|
62
|
-
arrowNext: String,
|
|
63
|
-
badge: Boolean,
|
|
64
|
-
curSlot: Boolean,
|
|
65
|
-
divider: Boolean,
|
|
66
|
-
extraSlot: Boolean,
|
|
67
|
-
fontSize: {
|
|
68
|
-
type: [String, Number],
|
|
69
|
-
},
|
|
54
|
+
title: String, // 标题文本
|
|
55
|
+
icon: String, // 主图标(左侧文字前)
|
|
56
|
+
statusIcon:String, // 状态图标(左侧文字后)
|
|
57
|
+
actionIcon: String, // 动作图标(右侧)
|
|
58
|
+
subtitle: String, // 左侧副文本
|
|
59
|
+
guideText: String, // 右侧引导文本
|
|
60
|
+
mulText: String, // 右侧额外文本
|
|
61
|
+
isActive: Boolean, // 是否激活选择状态
|
|
62
|
+
type: String, // 列表项类型 信息列表四个尺寸 L(56固定)\M(48自适应)\S(40自适应)\XS(32自适应) common(通用列表) check(勾选列表)
|
|
63
|
+
arrowIcon: String, // 右箭头图标名称
|
|
64
|
+
showBadge : Boolean, // 是否显示徽标,默认是 小点
|
|
65
|
+
divider: Boolean, // 是否显示分割线
|
|
70
66
|
},
|
|
71
67
|
data() {
|
|
72
68
|
return {
|
|
73
|
-
name: ""
|
|
74
69
|
};
|
|
75
70
|
},
|
|
76
71
|
computed: {
|
|
@@ -78,55 +73,48 @@ export default {
|
|
|
78
73
|
return [
|
|
79
74
|
{
|
|
80
75
|
[`${prefixCls}-${this.type}`]: this.type,
|
|
81
|
-
[`${prefixCls}-${this.type}--active`]: this.
|
|
82
|
-
[`${prefixCls}-${this.type}-double`]: this.subText,
|
|
76
|
+
[`${prefixCls}-${this.type}--active`]: this.isActive,
|
|
83
77
|
'vd-hairline--bottom': this.divider,
|
|
84
78
|
}
|
|
85
79
|
];
|
|
86
80
|
},
|
|
87
|
-
|
|
81
|
+
listLeftClasses() {
|
|
88
82
|
return [
|
|
89
83
|
{
|
|
90
|
-
[`${prefixCls}
|
|
84
|
+
[`${prefixCls}-common--left`]: this.type
|
|
91
85
|
}
|
|
92
86
|
];
|
|
93
87
|
},
|
|
94
|
-
|
|
88
|
+
iconClasses() {
|
|
95
89
|
return [
|
|
96
90
|
{
|
|
97
91
|
[`${prefixCls}-${this.type}__icon--leftcus`]: this.type
|
|
98
92
|
}
|
|
99
93
|
];
|
|
100
94
|
},
|
|
101
|
-
listLeftClasses() {
|
|
102
|
-
return [
|
|
103
|
-
{
|
|
104
|
-
[`${prefixCls}-common--left`]: this.type
|
|
105
|
-
}
|
|
106
|
-
];
|
|
107
|
-
},
|
|
108
95
|
contentClasses() {
|
|
109
96
|
return [
|
|
110
97
|
{
|
|
111
|
-
[`${prefixCls}-content-${this.type}`]: this.type
|
|
98
|
+
[`${prefixCls}-content-${this.type}`]: this.type === 'common',
|
|
112
99
|
}
|
|
113
100
|
];
|
|
114
101
|
},
|
|
115
102
|
innerTitleClasses() {
|
|
116
103
|
return [
|
|
117
104
|
{
|
|
118
|
-
[`${prefixCls}-${this.type}__title`]: this.type
|
|
105
|
+
[`${prefixCls}-${this.type}__title`]: this.type,
|
|
106
|
+
[`${prefixCls}-${this.type}__title--with-subtitle`] : this.subtitle
|
|
119
107
|
}
|
|
120
108
|
];
|
|
121
109
|
},
|
|
122
|
-
|
|
110
|
+
subtitleClasses() {
|
|
123
111
|
return [
|
|
124
112
|
{
|
|
125
|
-
[`${prefixCls}-${this.type}
|
|
113
|
+
[`${prefixCls}-${this.type}__subtitle`]: this.type
|
|
126
114
|
}
|
|
127
115
|
];
|
|
128
116
|
},
|
|
129
|
-
|
|
117
|
+
statusIconClasses() {
|
|
130
118
|
return [
|
|
131
119
|
{
|
|
132
120
|
[`${prefixCls}-${this.type}__icon--right`]: this.type
|
|
@@ -144,8 +132,8 @@ export default {
|
|
|
144
132
|
mounted() {
|
|
145
133
|
},
|
|
146
134
|
methods: {
|
|
147
|
-
|
|
148
|
-
this.$emit('toggle-active', !this.
|
|
135
|
+
handleToggleActive() {
|
|
136
|
+
this.$emit('toggle-active', !this.isActive);
|
|
149
137
|
}
|
|
150
138
|
},
|
|
151
139
|
watch: {
|