vdesign-ui 0.1.20 → 0.1.21
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/package.json +1 -1
- package/dist/components/actionbar/actionbar-cell/index.vue +0 -34
- package/dist/components/actionbar/index.js +0 -8
- package/dist/components/actionbar/index.vue +0 -39
- package/dist/components/actionbar/style.less +0 -48
- package/dist/components/actions-cell/actions/index.js +0 -7
- package/dist/components/actions-cell/actions/index.vue +0 -76
- package/dist/components/actions-cell/actions/style.less +0 -112
- package/dist/components/actions-cell/index.js +0 -7
- package/dist/components/actions-cell/index.vue +0 -94
- package/dist/components/actions-cell/style.less +0 -39
- package/dist/components/activityviews/index.js +0 -8
- package/dist/components/activityviews/index.vue +0 -140
- package/dist/components/activityviews/style.less +0 -138
- package/dist/components/badge/index.js +0 -8
- package/dist/components/badge/index.vue +0 -49
- package/dist/components/badge/style.less +0 -66
- package/dist/components/button/index.js +0 -8
- package/dist/components/button/index.vue +0 -89
- package/dist/components/button/style.less +0 -563
- package/dist/components/calendar/end.png +0 -0
- package/dist/components/calendar/index-element.vue +0 -84
- package/dist/components/calendar/index.js +0 -8
- package/dist/components/calendar/index.vue +0 -52
- package/dist/components/calendar/start.png +0 -0
- package/dist/components/calendar/style.less +0 -167
- package/dist/components/checkbox/assist.js +0 -34
- package/dist/components/checkbox/checkbox-group/index.js +0 -8
- package/dist/components/checkbox/checkbox-group/index.vue +0 -69
- package/dist/components/checkbox/index.js +0 -8
- package/dist/components/checkbox/index.vue +0 -184
- package/dist/components/checkbox/style.less +0 -291
- package/dist/components/common/state/index.vue +0 -80
- package/dist/components/data-list/index.js +0 -10
- package/dist/components/data-list/index.vue +0 -19
- package/dist/components/data-list/style.less +0 -624
- package/dist/components/datetime-picker/index.js +0 -8
- package/dist/components/datetime-picker/index.vue +0 -37
- package/dist/components/datetime-picker/style.less +0 -24
- package/dist/components/dialog/index.js +0 -8
- package/dist/components/dialog/index.vue +0 -162
- package/dist/components/dialog/overlay-manager.js +0 -18
- package/dist/components/dialog/style.less +0 -132
- package/dist/components/divider/index.js +0 -8
- package/dist/components/divider/index.vue +0 -54
- package/dist/components/divider/style.less +0 -92
- package/dist/components/dropdown/index.js +0 -8
- package/dist/components/dropdown/index.vue +0 -210
- package/dist/components/dropdown/style.less +0 -418
- package/dist/components/empty/404-dark.png +0 -0
- package/dist/components/empty/404.png +0 -0
- package/dist/components/empty/index.js +0 -8
- package/dist/components/empty/index.vue +0 -95
- package/dist/components/empty/network-dark.png +0 -0
- package/dist/components/empty/network.png +0 -0
- package/dist/components/empty/nodata-dark.png +0 -0
- package/dist/components/empty/nodata.png +0 -0
- package/dist/components/empty/style.less +0 -60
- package/dist/components/footer/index.js +0 -7
- package/dist/components/footer/index.vue +0 -29
- package/dist/components/footer/style.less +0 -22
- package/dist/components/footnav/footnav-item/index.js +0 -7
- package/dist/components/footnav/footnav-item/index.vue +0 -75
- package/dist/components/footnav/footnav-item/style.less +0 -39
- package/dist/components/footnav/index.js +0 -7
- package/dist/components/footnav/index.vue +0 -97
- package/dist/components/footnav/style.less +0 -23
- package/dist/components/form/index.js +0 -7
- package/dist/components/form/index.vue +0 -12
- package/dist/components/headnav/index.js +0 -7
- package/dist/components/headnav/index.vue +0 -163
- package/dist/components/headnav/style.less +0 -245
- package/dist/components/icon/font/iconfont.css +0 -1050
- package/dist/components/icon/font/iconfont.js +0 -2
- package/dist/components/icon/index.js +0 -9
- package/dist/components/icon/index.vue +0 -46
- package/dist/components/icon/style.less +0 -44
- package/dist/components/input/calcTextareaHeight.js +0 -266
- package/dist/components/input/index.js +0 -8
- package/dist/components/input/index.vue +0 -343
- package/dist/components/input/password/index.js +0 -8
- package/dist/components/input/password/index.vue +0 -60
- package/dist/components/input/search/index.js +0 -8
- package/dist/components/input/search/index.vue +0 -66
- package/dist/components/input/stepper/index.js +0 -8
- package/dist/components/input/stepper/index.vue +0 -136
- package/dist/components/input/style.less +0 -497
- package/dist/components/list/index.js +0 -8
- package/dist/components/list/index.vue +0 -159
- package/dist/components/list/style.less +0 -292
- package/dist/components/loading/index.js +0 -7
- package/dist/components/loading/index.vue +0 -53
- package/dist/components/loading/loading.png +0 -0
- package/dist/components/loading/refresh.png +0 -0
- package/dist/components/loading/style.less +0 -48
- package/dist/components/mixins/clickoutside.js +0 -81
- package/dist/components/mixins/dom.js +0 -41
- package/dist/components/mixins/languageMixin.js +0 -38
- package/dist/components/mixins/outlineConfigPlugin.js +0 -40
- package/dist/components/mixins/router-link.js +0 -23
- package/dist/components/mixins/themeMixin.js +0 -29
- package/dist/components/noticebar/index.js +0 -8
- package/dist/components/noticebar/index.vue +0 -247
- package/dist/components/noticebar/style.less +0 -332
- package/dist/components/overlay/index.js +0 -8
- package/dist/components/overlay/index.vue +0 -161
- package/dist/components/overlay/style.less +0 -23
- package/dist/components/pagebreak/index.js +0 -7
- package/dist/components/pagebreak/index.vue +0 -60
- package/dist/components/pagebreak/style.less +0 -43
- package/dist/components/popover/index.js +0 -8
- package/dist/components/popover/index.vue +0 -99
- package/dist/components/popover/style.less +0 -346
- package/dist/components/popover/vue-popover.vue +0 -314
- package/dist/components/radio/assist.js +0 -34
- package/dist/components/radio/index.js +0 -8
- package/dist/components/radio/index.vue +0 -159
- package/dist/components/radio/radio-group/index.vue +0 -70
- package/dist/components/radio/style.less +0 -297
- package/dist/components/result/completed-dark.png +0 -0
- package/dist/components/result/completed.png +0 -0
- package/dist/components/result/error-dark.png +0 -0
- package/dist/components/result/error.png +0 -0
- package/dist/components/result/index.js +0 -8
- package/dist/components/result/index.vue +0 -75
- package/dist/components/result/style.less +0 -42
- package/dist/components/result/wait-dark.png +0 -0
- package/dist/components/result/wait.png +0 -0
- package/dist/components/selector/index.js +0 -8
- package/dist/components/selector/index.vue +0 -124
- package/dist/components/selector/style.less +0 -474
- package/dist/components/skeleton/index.js +0 -7
- package/dist/components/skeleton/index.vue +0 -142
- package/dist/components/skeleton/style.less +0 -192
- package/dist/components/slider/draggable.js +0 -49
- package/dist/components/slider/index.js +0 -7
- package/dist/components/slider/index.vue +0 -173
- package/dist/components/slider/style.less +0 -96
- package/dist/components/slider/utils.js +0 -60
- package/dist/components/step/index.js +0 -7
- package/dist/components/step/index.vue +0 -48
- package/dist/components/step/style.less +0 -59
- package/dist/components/step-item/index.js +0 -7
- package/dist/components/step-item/index.vue +0 -117
- package/dist/components/step-item/style.less +0 -361
- package/dist/components/style/index.vue +0 -42
- package/dist/components/switch/index.js +0 -8
- package/dist/components/switch/index.vue +0 -72
- package/dist/components/switch/style.less +0 -56
- package/dist/components/tabs/index.js +0 -8
- package/dist/components/tabs/index.vue +0 -145
- package/dist/components/tabs/style.less +0 -385
- package/dist/components/tabs/tab/index.vue +0 -56
- package/dist/components/tag/index.js +0 -7
- package/dist/components/tag/index.vue +0 -50
- package/dist/components/tag/style.less +0 -211
- package/dist/components/title/index.js +0 -8
- package/dist/components/title/index.vue +0 -92
- package/dist/components/title/style.less +0 -188
- package/dist/components/toast/index.js +0 -80
- package/dist/components/toast/index.vue +0 -44
- package/dist/components/toast/style.less +0 -55
- package/dist/components/transition/index.js +0 -8
- package/dist/components/transition/index.vue +0 -13
- package/dist/components/transition/style.less +0 -208
- package/dist/components/upload/index.js +0 -7
- package/dist/components/upload/index.vue +0 -224
- package/dist/components/upload/style.less +0 -156
- package/dist/demo.html +0 -10
- package/dist/img/404-dark.775df5bb.png +0 -0
- package/dist/img/completed-dark.4183a8a8.png +0 -0
- package/dist/img/error-dark.b80857da.png +0 -0
- package/dist/img/network-dark.11a147bb.png +0 -0
- package/dist/img/nodata-dark.b0ea0e39.png +0 -0
- package/dist/img/wait-dark.6aa28731.png +0 -0
- package/dist/locale/ar.js +0 -98
- package/dist/locale/en.js +0 -98
- package/dist/locale/zh.js +0 -98
- package/dist/token.css +0 -2982
- package/dist/vdesign-ui.common.js +0 -27204
- package/dist/vdesign-ui.css +0 -1
- package/dist/vdesign-ui.umd.js +0 -27214
- package/dist/vdesign-ui.umd.min.js +0 -32
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="tabClasses">
|
|
3
|
-
<slot />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: 'vd-tab',
|
|
10
|
-
props: {
|
|
11
|
-
name: [String, Number],
|
|
12
|
-
title: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
arrow: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
show: false,
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
watch: {
|
|
27
|
-
title() {
|
|
28
|
-
this.updateNav();
|
|
29
|
-
},
|
|
30
|
-
name() {
|
|
31
|
-
this.updateNav();
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
computed: {
|
|
35
|
-
tabClasses() {
|
|
36
|
-
return {
|
|
37
|
-
'vd-tab': true,
|
|
38
|
-
'vd-tab-active': this.show,
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
computedName() {
|
|
42
|
-
return this.name ?? this.$parent.getTabs().indexOf(this);
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
updateNav() {
|
|
47
|
-
this.$parent.updateNav();
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
mounted() {
|
|
51
|
-
this.updateNav();
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style lang="less"></style>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- {{text}} 改成v-html -->
|
|
3
|
-
<div class="vd-tag" :class="classes">
|
|
4
|
-
<slot>{{ text }}</slot>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
const prefixCls = 'vd-tag'
|
|
10
|
-
export default {
|
|
11
|
-
name: 'vd-tag',
|
|
12
|
-
props: {
|
|
13
|
-
text: String,
|
|
14
|
-
type: {
|
|
15
|
-
type: String,
|
|
16
|
-
// white、dark、blue、cyan、green、olive、yellow、orange、red、pink、purple
|
|
17
|
-
default: ''
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
type: String,
|
|
21
|
-
},
|
|
22
|
-
borders: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
},
|
|
25
|
-
plain: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
computed: {
|
|
31
|
-
classes() {
|
|
32
|
-
const classes = {
|
|
33
|
-
[`${prefixCls}--${this.size}`]: this.size,
|
|
34
|
-
[`${prefixCls}--${this.type}`]: this.type,
|
|
35
|
-
[`${prefixCls}--${this.type}__border`]: this.borders,
|
|
36
|
-
[`${prefixCls}--plain`]: this.plain
|
|
37
|
-
};
|
|
38
|
-
if (this.borders) {
|
|
39
|
-
classes['vd-hairline--surround'] = true;
|
|
40
|
-
}
|
|
41
|
-
return classes
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="less">
|
|
49
|
-
@import './style.less';
|
|
50
|
-
</style>
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
@tag-prefix-cls: vd-tag;
|
|
2
|
-
|
|
3
|
-
.@{tag-prefix-cls}{
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
border-radius: calc(var(--radius-tag-bg) * 1px);
|
|
7
|
-
padding: 0 calc(var(--spacing-tag-padding_y) * 1px);
|
|
8
|
-
|
|
9
|
-
&--small{
|
|
10
|
-
font-size: calc(var(--en-single-f-b-s-fontSize) * 1px);
|
|
11
|
-
font-weight: var(--en-single-f-b-s-fontWeight);
|
|
12
|
-
height: calc(var(--height-tag-s) * 1px);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&--large{
|
|
16
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
17
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
18
|
-
height: calc(var(--height-tag-m) * 1px);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
&--white{
|
|
24
|
-
color: var(--color-tag-default-text);
|
|
25
|
-
background-color: var(--color-tag-default-bg);
|
|
26
|
-
|
|
27
|
-
&__border{
|
|
28
|
-
background-color:transparent;
|
|
29
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
30
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
31
|
-
color: var(--color-tag-default_border-text);
|
|
32
|
-
&::after{
|
|
33
|
-
border-color: var(--color-tag-default-border);
|
|
34
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&--dark{
|
|
40
|
-
color: var(--color-tag-dark-text);
|
|
41
|
-
background-color: var(--color-tag-dark-bg);
|
|
42
|
-
|
|
43
|
-
&__border{
|
|
44
|
-
background-color:transparent;
|
|
45
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
46
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
47
|
-
color: var(--color-tag-dark_border-text);
|
|
48
|
-
&::after{
|
|
49
|
-
border-color: var(--color-tag-dark-border);
|
|
50
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&--blue{
|
|
57
|
-
color: var(--color-tag-blue-text);
|
|
58
|
-
background-color: var(--color-tag-blue-bg);
|
|
59
|
-
|
|
60
|
-
&__border{
|
|
61
|
-
background-color:transparent;
|
|
62
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
63
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
64
|
-
&::after{
|
|
65
|
-
border-color: var(--color-tag-blue-border);
|
|
66
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&--cyan{
|
|
73
|
-
color: var(--color-tag-cyan-text);
|
|
74
|
-
background-color: var(--color-tag-cyan-bg);
|
|
75
|
-
|
|
76
|
-
&__border{
|
|
77
|
-
background-color:transparent;
|
|
78
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
79
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
80
|
-
&::after{
|
|
81
|
-
border-color: var(--color-tag-cyan-border);
|
|
82
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
&--green{
|
|
91
|
-
color: var(--color-tag-green-text);
|
|
92
|
-
background-color: var(--color-tag-green-bg);
|
|
93
|
-
|
|
94
|
-
&__border{
|
|
95
|
-
background-color:transparent;
|
|
96
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
97
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
98
|
-
&::after{
|
|
99
|
-
border-color: var(--color-tag-green-border);
|
|
100
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&--olive{
|
|
108
|
-
color: var(--color-tag-olive-text);
|
|
109
|
-
background-color: var(--color-tag-olive-bg);
|
|
110
|
-
|
|
111
|
-
&__border{
|
|
112
|
-
background-color:transparent;
|
|
113
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
114
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
115
|
-
&::after{
|
|
116
|
-
border-color: var(--color-tag-olive-border);
|
|
117
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
&--yellow{
|
|
126
|
-
color: var(--color-tag-yellow-text);
|
|
127
|
-
background-color: var(--color-tag-yellow-bg);
|
|
128
|
-
|
|
129
|
-
&__border{
|
|
130
|
-
background-color:transparent;
|
|
131
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
132
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
133
|
-
&::after{
|
|
134
|
-
border-color: var(--color-tag-yellow-border);
|
|
135
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&--orange{
|
|
143
|
-
color: var(--color-tag-orange-text);
|
|
144
|
-
background-color: var(--color-tag-orange-bg);
|
|
145
|
-
|
|
146
|
-
&__border{
|
|
147
|
-
background-color:transparent;
|
|
148
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
149
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
150
|
-
&::after{
|
|
151
|
-
border-color: var(--color-tag-orange-border);
|
|
152
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&--red{
|
|
159
|
-
color: var(--color-tag-red-text);
|
|
160
|
-
background-color: var(--color-tag-red-bg);
|
|
161
|
-
|
|
162
|
-
&__border{
|
|
163
|
-
background-color:transparent;
|
|
164
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
165
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
166
|
-
&::after{
|
|
167
|
-
border-color: var(--color-tag-red-border);
|
|
168
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&--pink{
|
|
175
|
-
color: var(--color-tag-pink-text);
|
|
176
|
-
background-color: var(--color-tag-pink-bg);
|
|
177
|
-
|
|
178
|
-
&__border{
|
|
179
|
-
background-color:transparent;
|
|
180
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
181
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
182
|
-
&::after{
|
|
183
|
-
border-color: var(--color-tag-pink-border);
|
|
184
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
&--purple{
|
|
192
|
-
color: var(--color-tag-purple-text);
|
|
193
|
-
background-color: var(--color-tag-purple-bg);
|
|
194
|
-
|
|
195
|
-
&__border{
|
|
196
|
-
background-color:transparent;
|
|
197
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
198
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
199
|
-
&::after{
|
|
200
|
-
border-color: var(--color-tag-purple-border);
|
|
201
|
-
border-radius: calc(var(--radius-tag-bg) * 2px);
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
&--plain {
|
|
208
|
-
background-color:transparent;
|
|
209
|
-
padding: 0;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="['vd-title', wrapClasses]" @click="handleClick">
|
|
3
|
-
<div class="vd-title--left">
|
|
4
|
-
<div class="vd-title-content">
|
|
5
|
-
<vd-icon v-if="leftIcon" :name="leftIcon" :svg="leftSvg" :class="leftIconClasses"></vd-icon>
|
|
6
|
-
<span :class="['vd-title-inner__title', innerTitleClasses]">{{ title }}</span>
|
|
7
|
-
<vd-icon v-if="rightIcon" :name="rightIcon" :svg="rightSvg" :class="rightIconClasses"></vd-icon>
|
|
8
|
-
</div>
|
|
9
|
-
<p v-if="subText" :class="['vd-title__subtext', subTextClasses]">{{ subText }}</p>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="vd-title--right" v-if="guideText || arrow || $slots.right">
|
|
12
|
-
<slot name="right">
|
|
13
|
-
<span v-if="guideText" :class="textRightClasses">{{ guideText }}</span>
|
|
14
|
-
<vd-icon v-if="arrow" class="vd-title-arrow" name="ar_icon_nav_back"></vd-icon>
|
|
15
|
-
</slot>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
<script>
|
|
20
|
-
const prefixCls = 'vd-title';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'vd-title',
|
|
24
|
-
props: {
|
|
25
|
-
title: String,
|
|
26
|
-
leftIcon: String,
|
|
27
|
-
rightIcon: String,
|
|
28
|
-
arrow: Boolean,
|
|
29
|
-
subText: String,
|
|
30
|
-
guideText: String,
|
|
31
|
-
type: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: 'primary'
|
|
34
|
-
},
|
|
35
|
-
leftSvg: Boolean,
|
|
36
|
-
rightSvg: Boolean,
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
computed: {
|
|
45
|
-
wrapClasses() {
|
|
46
|
-
return {
|
|
47
|
-
[`${prefixCls}-${this.type}`]: this.type,
|
|
48
|
-
[`${prefixCls}-${this.type}-double`]: this.subText,
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
leftIconClasses() {
|
|
53
|
-
return {
|
|
54
|
-
[`${prefixCls}-${this.type}__icon--left`]: this.type
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
innerTitleClasses() {
|
|
59
|
-
return {
|
|
60
|
-
[`${prefixCls}-${this.type}__title`]: this.type
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
subTextClasses() {
|
|
65
|
-
return {
|
|
66
|
-
[`${prefixCls}-${this.type}__subtext`]: this.type
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
rightIconClasses() {
|
|
70
|
-
return {
|
|
71
|
-
[`${prefixCls}-${this.type}__icon--right`]: this.type
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
textRightClasses() {
|
|
75
|
-
return {
|
|
76
|
-
[`${prefixCls}-${this.type}__text--right`]: this.type
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
handleClick() {
|
|
82
|
-
if (this.arrow) {
|
|
83
|
-
this.$emit('next');
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<style lang="less">
|
|
91
|
-
@import './style.less';
|
|
92
|
-
</style>
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
@title-prefix-cls: vd-title;
|
|
3
|
-
|
|
4
|
-
.@{title-prefix-cls} {
|
|
5
|
-
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
padding-inline-start: calc(var(--spacing-title-padding_left) * 1px);
|
|
10
|
-
padding-inline-end: calc(var(--spacing-title-padding_right) * 1px);
|
|
11
|
-
background-color: var(--bg-color-1);
|
|
12
|
-
|
|
13
|
-
// &--left{
|
|
14
|
-
// display: flex;
|
|
15
|
-
// flex-direction: column;
|
|
16
|
-
// }
|
|
17
|
-
|
|
18
|
-
&--right{
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-content{
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-inner__title{
|
|
29
|
-
color: var(--color-title-head);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&__subtext{
|
|
33
|
-
margin-block-start: calc(var(--spacing-title-subtitle-margin_top) * 1px);
|
|
34
|
-
color: var(--color-title-text);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&-arrow{
|
|
38
|
-
color:var(--color-title-icon_arrow);
|
|
39
|
-
font-size: calc(var(--icon-title-arrow) * 1px);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&-primary{
|
|
43
|
-
|
|
44
|
-
height: calc(var(--height-title-primary) * 1px);
|
|
45
|
-
|
|
46
|
-
&__icon--left{
|
|
47
|
-
margin-inline-end: calc(var(--spacing-title-primary_icon-margin_y) * 1px);
|
|
48
|
-
font-size: calc(var(--icon-title-primary) * 1px);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__icon--right{
|
|
52
|
-
margin-inline-start: calc(var(--spacing-title-primary_icon-margin_y) * 1px);
|
|
53
|
-
font-size: calc(var(--icon-title-primary) * 1px);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&__title{
|
|
57
|
-
font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);
|
|
58
|
-
font-weight: var(--en-single-f-f-b-fontWeight);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&__text--right{
|
|
62
|
-
margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
|
|
63
|
-
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
64
|
-
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
65
|
-
color: var(--color-title-text);
|
|
66
|
-
}
|
|
67
|
-
&__subtext{
|
|
68
|
-
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
69
|
-
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&-secondary {
|
|
74
|
-
|
|
75
|
-
height: calc(var(--height-title-secondary) * 1px);
|
|
76
|
-
|
|
77
|
-
&__icon--left{
|
|
78
|
-
margin-inline-end: calc(var(--spacing-title-secondary_icon-margin_y) * 1px);
|
|
79
|
-
font-size: calc(var(--icon-title-secondary) * 1px);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&__icon--right{
|
|
83
|
-
margin-inline-start: calc(var(--spacing-title-secondary_icon-margin_y) * 1px);
|
|
84
|
-
font-size: calc(var(--icon-title-secondary) * 1px);
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&__title{
|
|
89
|
-
font-size: calc(var(--en-single-f-e-s-fontSize) * 1px);
|
|
90
|
-
font-weight: var(--en-single-f-e-s-fontWeight);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&__text--right{
|
|
94
|
-
margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
|
|
95
|
-
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
96
|
-
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
97
|
-
color: var(--color-title-text);
|
|
98
|
-
}
|
|
99
|
-
&__subtext{
|
|
100
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
101
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&-tertiary {
|
|
106
|
-
height: calc(var(--height-title-tertiary) * 1px);
|
|
107
|
-
|
|
108
|
-
&__icon--left{
|
|
109
|
-
margin-inline-end: calc(var(--spacing-title-tertiary_icon-margin_y) * 1px);
|
|
110
|
-
font-size: calc(var(--icon-title-tertiary) * 1px);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&__icon--right{
|
|
114
|
-
margin-inline-start: calc(var(--spacing-title-tertiary_icon-margin_y) * 1px);
|
|
115
|
-
font-size: calc(var(--icon-title-tertiary) * 1px);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&__title{
|
|
119
|
-
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
120
|
-
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&__text--right{
|
|
124
|
-
margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
|
|
125
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
126
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
127
|
-
color: var(--color-title-text);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&__subtext{
|
|
131
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
132
|
-
font-weight: var(--en-single-f-b-r-fontSize);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&-quaternary {
|
|
137
|
-
height: calc(var(--height-title-quaternary) * 1px);
|
|
138
|
-
|
|
139
|
-
&__icon--left{
|
|
140
|
-
margin-inline-end: calc(var(--spacing-title-quaternary_icon-margin_y) * 1px);
|
|
141
|
-
font-size: calc(var(--icon-title-quaternary) * 1px);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&__icon--right{
|
|
145
|
-
margin-inline-start: calc(var(--spacing-title-quaternary_icon-margin_y) * 1px);
|
|
146
|
-
font-size: calc(var(--icon-title-quaternary) * 1px);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&__title{
|
|
150
|
-
font-size: calc(var(--en-single-f-c-s-fontSize) * 1px);
|
|
151
|
-
font-weight: var(--en-single-f-c-s-fontWeight);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&__text--right{
|
|
155
|
-
margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
|
|
156
|
-
font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
|
|
157
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
158
|
-
color: var(--color-title-text);
|
|
159
|
-
}
|
|
160
|
-
&__subtext{
|
|
161
|
-
font-size: calc(var(--en-single-f-a-r-fontSize) * 1px);
|
|
162
|
-
font-weight: var(--en-single-f-a-r-fontSize);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&-label{
|
|
167
|
-
padding-inline-start: 0;
|
|
168
|
-
padding-inline-end: 0;
|
|
169
|
-
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
170
|
-
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&-primary-double {
|
|
174
|
-
height: calc(var(--height-title-primary_double) * 1px);
|
|
175
|
-
}
|
|
176
|
-
&-secondary-double {
|
|
177
|
-
height: calc(var(--height-title-secondary_double) * 1px);
|
|
178
|
-
}
|
|
179
|
-
&-tertiary-double {
|
|
180
|
-
height: calc(var(--height-title-tertiary_double) * 1px);
|
|
181
|
-
}
|
|
182
|
-
&-quaternary-double {
|
|
183
|
-
height: calc(var(--height-title-quaternary_double) * 1px);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import VdToast from './index.vue'
|
|
3
|
-
let timer = null
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 使用新类继承 VUE 扩展组件
|
|
7
|
-
*/
|
|
8
|
-
class Toast extends Vue.extend(VdToast) {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super()
|
|
11
|
-
const type = Object.prototype.toString.call(options)
|
|
12
|
-
/**
|
|
13
|
-
* 赋值虚拟节点
|
|
14
|
-
*/
|
|
15
|
-
this.vm = this.$mount()
|
|
16
|
-
/**
|
|
17
|
-
* 判断 options 类型
|
|
18
|
-
*/
|
|
19
|
-
if (type === '[object String]' || type === '[object Number]') {
|
|
20
|
-
this.message = options
|
|
21
|
-
} else if (type === '[object Object]') {
|
|
22
|
-
/**
|
|
23
|
-
* 循环遍历,设置该类属性
|
|
24
|
-
*/
|
|
25
|
-
Object.keys(options).forEach(elem => {
|
|
26
|
-
this[elem] = options[elem]
|
|
27
|
-
})
|
|
28
|
-
} else {
|
|
29
|
-
/**
|
|
30
|
-
* 抛出错误
|
|
31
|
-
*/
|
|
32
|
-
throw new Error(`${JSON.stringify(options)} is not Number, String or Object`)
|
|
33
|
-
}
|
|
34
|
-
this.init()
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 初始化方法
|
|
39
|
-
*/
|
|
40
|
-
init() {
|
|
41
|
-
/**
|
|
42
|
-
* 把虚拟 DOM 插入到真实 DOM 树中
|
|
43
|
-
*/
|
|
44
|
-
document.body.appendChild(this.vm.$el)
|
|
45
|
-
this.start()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 开始此组件
|
|
50
|
-
*/
|
|
51
|
-
start() {
|
|
52
|
-
clearTimeout(timer)
|
|
53
|
-
/**
|
|
54
|
-
* 在挂载真实 DOM 树后显示过渡效果
|
|
55
|
-
*/
|
|
56
|
-
timer = setTimeout(() => {
|
|
57
|
-
this.isShow = true
|
|
58
|
-
this.end()
|
|
59
|
-
}, 100)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 结束此组件
|
|
64
|
-
*/
|
|
65
|
-
end() {
|
|
66
|
-
/**
|
|
67
|
-
* 关闭过渡效果之后移除真实 DOM 树节点
|
|
68
|
-
*/
|
|
69
|
-
setTimeout(() => {
|
|
70
|
-
this.isShow = false
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
document.body.removeChild(this.vm.$el)
|
|
73
|
-
}, 500)
|
|
74
|
-
}, this.duration)
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const GetToast = options => new Toast(options)
|
|
79
|
-
|
|
80
|
-
export default GetToast
|