vdesign-ui 0.1.17 → 0.1.18
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/actions-cell/actions/index.vue +14 -6
- package/dist/components/actions-cell/actions/style.less +21 -3
- package/dist/components/activityviews/index.vue +74 -42
- package/dist/components/activityviews/style.less +6 -8
- package/dist/components/checkbox/style.less +6 -4
- package/dist/components/data-list/style.less +7 -7
- package/dist/components/dialog/index.vue +12 -13
- package/dist/components/dialog/style.less +44 -34
- package/dist/components/dropdown/index.vue +1 -1
- package/dist/components/dropdown/style.less +16 -0
- package/dist/components/icon/font/iconfont.css +1041 -817
- package/dist/components/icon/font/iconfont.js +1 -1
- package/dist/components/input/style.less +9 -8
- package/dist/components/mixins/themeMixin.js +29 -0
- package/dist/components/noticebar/index.vue +4 -3
- package/dist/components/noticebar/style.less +23 -0
- package/dist/components/popover/style.less +1 -4
- package/dist/components/result/completed-dark.png +0 -0
- package/dist/components/result/error-dark.png +0 -0
- package/dist/components/result/index.vue +24 -5
- package/dist/components/result/wait-dark.png +0 -0
- package/dist/components/slider/style.less +1 -0
- package/dist/components/step-item/index.vue +40 -12
- package/dist/components/step-item/style.less +6 -6
- package/dist/components/switch/style.less +2 -0
- package/dist/components/tabs/style.less +12 -12
- package/dist/img/completed-dark.4183a8a8.png +0 -0
- package/dist/img/error-dark.b80857da.png +0 -0
- package/dist/img/wait-dark.6aa28731.png +0 -0
- package/dist/token.css +184 -176
- package/dist/vdesign-ui.common.js +376 -270
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +376 -270
- package/dist/vdesign-ui.umd.min.js +3 -3
- package/package.json +3 -3
- package/dist/components/dialog/index copy.vue +0 -112
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="wrapClasses">
|
|
3
3
|
<span class="vd-actions__text" :class="textClasses" v-if="text">{{ text }}</span>
|
|
4
|
-
<vd-icon v-if="icon && type === 'list'" class="vd-actions__icon" :name="icon" :svg="iconSvg"></vd-icon>
|
|
4
|
+
<vd-icon v-if="icon && type === 'list'" class="vd-actions__icon" :class="iconClasses" :name="icon" :svg="iconSvg"></vd-icon>
|
|
5
5
|
<span class="vd-actions__content" :class="contentBg" v-if="icon && type === 'card'">
|
|
6
|
-
<vd-icon class="vd-actions__icon" :name="icon" :svg="iconSvg"></vd-icon>
|
|
6
|
+
<vd-icon class="vd-actions__icon" :class="iconClasses" :name="icon" :svg="iconSvg"></vd-icon>
|
|
7
7
|
</span>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: false,
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
disabled:Boolean,
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
38
38
|
wrapClasses() {
|
|
@@ -40,22 +40,30 @@ export default {
|
|
|
40
40
|
`${prefixCls}`,
|
|
41
41
|
{
|
|
42
42
|
[`${prefixCls}__${this.type}`]: this.type,
|
|
43
|
-
[`${prefixCls}__${this.type}--${this.disbaled}`]: this.disbaled,
|
|
44
43
|
[`${prefixCls}__${this.colors}`]: this.colors,
|
|
44
|
+
[`${prefixCls}__${this.colors}--disabled`]: this.disabled && (this.type ==='list'),
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
contentBg() {
|
|
49
49
|
return [
|
|
50
50
|
{
|
|
51
|
-
[`${prefixCls}__content--${this.backgrounds}`]: this.backgrounds
|
|
51
|
+
[`${prefixCls}__content--${this.backgrounds}`]: this.backgrounds,
|
|
52
|
+
[`${prefixCls}__content--${this.backgrounds}--disabled`]: this.disabled,
|
|
52
53
|
}
|
|
53
54
|
]
|
|
54
55
|
},
|
|
55
56
|
textClasses(){
|
|
56
57
|
return [
|
|
57
58
|
{
|
|
58
|
-
[`${prefixCls}__text
|
|
59
|
+
[`${prefixCls}__text--disabled`]: this.disabled
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
iconClasses(){
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
[`${prefixCls}__icon--disabled`]: this.disabled
|
|
59
67
|
}
|
|
60
68
|
]
|
|
61
69
|
},
|
|
@@ -56,7 +56,11 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.@{actions-prefix-cls}__icon{
|
|
59
|
+
color: var(--color-actions-text);
|
|
59
60
|
font-size: calc(var(--icon-actions-card) * 1px);
|
|
61
|
+
&--disabled{
|
|
62
|
+
color: var(--color-actions-text-disable);
|
|
63
|
+
}
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -65,30 +69,44 @@
|
|
|
65
69
|
font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
|
|
66
70
|
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
67
71
|
&--disabled{
|
|
68
|
-
color: var(--color-actions-text);
|
|
69
|
-
|
|
72
|
+
color: var(--color-actions-text-disable);
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
&__icon{
|
|
74
77
|
font-size: calc(var(--icon-actions-size) * 1px);
|
|
75
|
-
color: var(--color-actions-text
|
|
78
|
+
color: var(--color-actions-text);
|
|
79
|
+
&--disabled{
|
|
80
|
+
color: var(--color-actions-text-disable);
|
|
81
|
+
}
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
&__green{
|
|
79
85
|
background-color: var(--color-actions-bg-green);
|
|
86
|
+
&--disabled{
|
|
87
|
+
background-color: var(--color-actions-bg-green-disable);
|
|
88
|
+
}
|
|
80
89
|
}
|
|
81
90
|
|
|
82
91
|
&__warning{
|
|
83
92
|
background-color: var(--color-actions-bg-warning);
|
|
93
|
+
&--disabled{
|
|
94
|
+
background-color: var(--color-actions-bg-warning-disable);
|
|
95
|
+
}
|
|
84
96
|
}
|
|
85
97
|
|
|
86
98
|
&__blue{
|
|
87
99
|
background-color: var(--color-actions-bg-blue);
|
|
100
|
+
&--disabled{
|
|
101
|
+
background-color: var(--color-actions-bg-blue-disable);
|
|
102
|
+
}
|
|
88
103
|
}
|
|
89
104
|
|
|
90
105
|
&__gray{
|
|
91
106
|
background-color: var(--color-actions-bg-gray);
|
|
107
|
+
&--disabled{
|
|
108
|
+
background-color: var(--color-actions-bg-gray-disable);
|
|
109
|
+
}
|
|
92
110
|
}
|
|
93
111
|
|
|
94
112
|
}
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<div
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="vd-fade">
|
|
4
|
+
<div class="vd-overlay" v-if="overlay && visible" @click="handleMaskClick"></div>
|
|
5
|
+
</transition>
|
|
6
|
+
<transition name="vd-slide-up">
|
|
7
|
+
<div class="vd-activityviews" v-if="visible">
|
|
8
|
+
<div class="vd-activityviews__header" v-if="withHeader">
|
|
9
|
+
<div class="vd-activityviews__wrapper">
|
|
10
|
+
<vd-icon v-if="backDefault" name="icon_nav_back"></vd-icon>
|
|
11
|
+
<div v-if="title" class="vd-activityviews__title">{{ title }}</div>
|
|
12
|
+
<slot name="close">
|
|
13
|
+
<vd-icon v-if="closeIcon" class="vd-activityviews__close" :name="currentCloseIcon" svg
|
|
14
|
+
@click="onCancel"></vd-icon>
|
|
15
|
+
<vd-button v-if="closeBtn" class="vd-activityviews__done" type="primary_text" size="large"
|
|
16
16
|
@click="onCancel">{{ closeBtn }}</vd-button>
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
<p v-if="description" class="vd-activityviews__description">{{ description }}</p>
|
|
20
|
-
</div>
|
|
21
|
-
<div v-if="withBar" class="vd-activityviews__bar"></div>
|
|
22
|
-
<div :class="['vd-activityviews__body', { 'vd-activityviews__body--action': actionSheet }]">
|
|
23
|
-
<div v-if="actionSheet" class="vd-activityviews__action">
|
|
24
|
-
<p v-if="title" class="vd-activityviews__action-title">{{ title }}</p>
|
|
25
|
-
<div class="vd-activityviews__actions">
|
|
26
|
-
<vd-button v-for="(item, index) in actions" block size="large" :type="item.type" :key="index"
|
|
27
|
-
:disabled="item.disabled" @click.stop="onSelect(item)">{{ item.name }}</vd-button>
|
|
17
|
+
</slot>
|
|
28
18
|
</div>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
<p v-if="description" class="vd-activityviews__description">{{ description }}</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="withBar" class="vd-activityviews__bar"></div>
|
|
22
|
+
<div :class="['vd-activityviews__body', { 'vd-activityviews__body--action': actionSheet }]">
|
|
23
|
+
<div v-if="actionSheet" class="vd-activityviews__action">
|
|
24
|
+
<p v-if="title" class="vd-activityviews__action-title">{{ title }}</p>
|
|
25
|
+
<div class="vd-activityviews__actions">
|
|
26
|
+
<vd-button v-for="(item, index) in actions" block size="large" :type="item.type" :key="index"
|
|
27
|
+
:disabled="item.disabled" @click.stop="onSelect(item)">{{ item.name }}</vd-button>
|
|
28
|
+
</div>
|
|
29
|
+
<div v-if="cancelText" class="vd-activityviews__gap"></div>
|
|
30
|
+
<div v-if="cancelText" class="vd-activityviews__cancel" @click="onCancel">
|
|
31
|
+
<vd-button block type="tertiary" size="large">{{ cancelText }}</vd-button>
|
|
32
|
+
</div>
|
|
33
33
|
</div>
|
|
34
|
+
<slot></slot>
|
|
34
35
|
</div>
|
|
35
|
-
<slot v-else></slot>
|
|
36
36
|
</div>
|
|
37
|
-
</
|
|
37
|
+
</transition>
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
+
import { themeMixin } from '@p/components/mixins/themeMixin';
|
|
42
43
|
|
|
43
44
|
export default {
|
|
44
45
|
name: 'vd-activityviews',
|
|
46
|
+
mixins: [themeMixin], // 引入混入
|
|
45
47
|
props: {
|
|
46
48
|
value: Boolean,
|
|
47
49
|
title: String,
|
|
@@ -66,31 +68,35 @@ export default {
|
|
|
66
68
|
type: Boolean,
|
|
67
69
|
default: true
|
|
68
70
|
},
|
|
69
|
-
disabled: Boolean
|
|
71
|
+
disabled: Boolean,
|
|
72
|
+
closeOnOverlay:{
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: true
|
|
75
|
+
},
|
|
70
76
|
},
|
|
71
77
|
data() {
|
|
72
78
|
return {
|
|
73
|
-
visible: this.value
|
|
74
79
|
}
|
|
75
80
|
},
|
|
76
81
|
computed: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
watch: {
|
|
80
|
-
value(newValue) {
|
|
81
|
-
this.visible = newValue;
|
|
82
|
+
visible(){
|
|
83
|
+
return this.value
|
|
82
84
|
},
|
|
83
|
-
|
|
84
|
-
this
|
|
85
|
+
currentCloseIcon() {
|
|
86
|
+
return this.isDarkTheme ? 'icon_btn_dialogclose_dark' : 'icon_btn_dialogclose';
|
|
87
|
+
},
|
|
88
|
+
isDarkTheme() {
|
|
89
|
+
return this.theme === 'dark';
|
|
85
90
|
}
|
|
86
91
|
},
|
|
92
|
+
watch: {
|
|
93
|
+
},
|
|
87
94
|
methods: {
|
|
88
95
|
closeActivity() {
|
|
89
|
-
this.visible = false;
|
|
90
96
|
this.$emit('input', false);
|
|
91
97
|
},
|
|
92
98
|
onCancel() {
|
|
93
|
-
this
|
|
99
|
+
this.closeActivity();
|
|
94
100
|
this.$emit('cancel');
|
|
95
101
|
},
|
|
96
102
|
onSelect(item) {
|
|
@@ -98,10 +104,36 @@ export default {
|
|
|
98
104
|
this.$emit('select', item);
|
|
99
105
|
}
|
|
100
106
|
},
|
|
107
|
+
handleMaskClick() {
|
|
108
|
+
if (this.closeOnOverlay) {
|
|
109
|
+
this.closeActivity();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
mounted() {
|
|
101
114
|
}
|
|
115
|
+
|
|
102
116
|
}
|
|
103
117
|
</script>
|
|
104
118
|
|
|
105
119
|
<style lang="less">
|
|
106
120
|
@import './style.less';
|
|
121
|
+
|
|
122
|
+
.vd-fade-enter-active,
|
|
123
|
+
.vd-fade-leave-active {
|
|
124
|
+
transition: opacity 0.3s;
|
|
125
|
+
}
|
|
126
|
+
.vd-fade-enter,
|
|
127
|
+
.vd-fade-leave-to {
|
|
128
|
+
opacity: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.vd-slide-up-enter-active,
|
|
132
|
+
.vd-slide-up-leave-active {
|
|
133
|
+
transition: transform 0.3s;
|
|
134
|
+
}
|
|
135
|
+
.vd-slide-up-enter,
|
|
136
|
+
.vd-slide-up-leave-to {
|
|
137
|
+
transform: translateY(100%);
|
|
138
|
+
}
|
|
107
139
|
</style>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
@
|
|
2
|
+
@activityviews-prefix-cls: vd-activityviews;
|
|
3
3
|
|
|
4
|
-
.@{
|
|
4
|
+
.@{activityviews-prefix-cls}{
|
|
5
5
|
|
|
6
6
|
::-webkit-scrollbar{width:3px;}
|
|
7
|
-
|
|
8
|
-
position: absolute;
|
|
7
|
+
position: fixed;
|
|
9
8
|
left: 0;
|
|
10
9
|
right: 0;
|
|
11
10
|
bottom: 0;
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
display: flex;
|
|
15
14
|
flex-direction: column;
|
|
16
15
|
max-height: 80%;
|
|
17
|
-
overflow:
|
|
16
|
+
overflow: auto;
|
|
18
17
|
background-color: var(--color-activityviews-bg);
|
|
19
18
|
border-radius: calc(var(--radius-activityviews-title) * 1px) calc(var(--radius-activityviews-title) * 1px) 0 0;
|
|
20
19
|
|
|
@@ -77,13 +76,10 @@
|
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
&__body{
|
|
80
|
-
// background-color: #fff;
|
|
81
79
|
background-color: var(--color-activityviews-bg);
|
|
82
|
-
|
|
83
80
|
height: 80%;
|
|
84
81
|
overflow-y: auto;
|
|
85
82
|
|
|
86
|
-
|
|
87
83
|
&--action{
|
|
88
84
|
overflow: hidden;
|
|
89
85
|
}
|
|
@@ -115,6 +111,7 @@
|
|
|
115
111
|
|
|
116
112
|
.vd-btn{
|
|
117
113
|
border-radius: 0;
|
|
114
|
+
background-color: var(--color-activityviews-bg);
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
|
|
@@ -131,6 +128,7 @@
|
|
|
131
128
|
.vd-btn{
|
|
132
129
|
position: relative;
|
|
133
130
|
border: none;
|
|
131
|
+
background-color: var(--color-activityviews-bg);
|
|
134
132
|
height: calc(var(--height-activityviews-actionsheet) * 1px);
|
|
135
133
|
border-radius: 0;
|
|
136
134
|
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
position: absolute;
|
|
96
96
|
top: 2px;
|
|
97
97
|
left: 5px;
|
|
98
|
-
border: 2px solid
|
|
98
|
+
border: 2px solid var(--bg-color-1);
|
|
99
99
|
border-top: 0;
|
|
100
100
|
border-left: 0;
|
|
101
101
|
transform: rotate(45deg) scale(1);
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
top: 50%;
|
|
158
158
|
transform: translate(-50%, -50%);
|
|
159
159
|
border: 0;
|
|
160
|
-
background-color:
|
|
160
|
+
background-color: var(--bg-color-1);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
&::before{
|
|
@@ -189,7 +189,8 @@
|
|
|
189
189
|
.@{checkbox-button-prefix-cls}__text {
|
|
190
190
|
margin-block-start: calc(var(--spacing-check_radio-check_icon-margin_bottom) * 1px);
|
|
191
191
|
font-size: 12px;
|
|
192
|
-
color: rgba(0, 0, 0, 0.85);
|
|
192
|
+
// color: rgba(0, 0, 0, 0.85);
|
|
193
|
+
color: var(--color-check_radio-radio_button_text-default);
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
}
|
|
@@ -202,7 +203,8 @@
|
|
|
202
203
|
&__description {
|
|
203
204
|
margin-block-start: calc(var(--spacing-check_radio-check_describe-margin_top) * 1px);
|
|
204
205
|
font-size: 11px;
|
|
205
|
-
color: rgba(0, 0, 0, 0.3);
|
|
206
|
+
// color: rgba(0, 0, 0, 0.3);
|
|
207
|
+
color: var(--color-check_radio-check_button_text_describe-default);
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
flex-direction: row;
|
|
16
16
|
flex-wrap: nowrap;
|
|
17
17
|
min-width: fit-content;
|
|
18
|
-
background-color:
|
|
18
|
+
background-color: var(--bg-color-1);
|
|
19
19
|
padding-inline-end: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
20
20
|
padding-inline-start: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
21
21
|
min-height: calc(var(--height-datalist-head) * 1px);
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
flex: none;
|
|
126
126
|
width: calc((var(--width-datalist-head_l) + var(--spacing-datalist-padding_y)) * 1px);
|
|
127
127
|
padding-inline-start: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
128
|
-
background:
|
|
128
|
+
background: var(--bg-color-1);
|
|
129
129
|
z-index: 2;
|
|
130
130
|
|
|
131
131
|
&.vd-datalist-head-item--s {
|
|
@@ -214,11 +214,11 @@
|
|
|
214
214
|
flex-direction: row;
|
|
215
215
|
flex-wrap: nowrap;
|
|
216
216
|
min-width: fit-content;
|
|
217
|
-
background-color:
|
|
217
|
+
background-color: var(--bg-color-1);
|
|
218
218
|
padding-inline-end: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
219
219
|
padding-inline-start: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
220
220
|
min-height: calc(var(--height-datalist-list) * 1px);
|
|
221
|
-
color: var(--color-
|
|
221
|
+
color: var(--text-color-h1);
|
|
222
222
|
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
223
223
|
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
224
224
|
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
flex: none;
|
|
345
345
|
width: calc((var(--width-datalist-list_l) + var(--spacing-datalist-padding_y)) * 1px);
|
|
346
346
|
padding-inline-start: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
347
|
-
background:
|
|
347
|
+
background: var(--bg-color-1);
|
|
348
348
|
z-index: 2;
|
|
349
349
|
|
|
350
350
|
&.vd-datalist-list-item--s {
|
|
@@ -495,10 +495,10 @@
|
|
|
495
495
|
justify-content: space-between;
|
|
496
496
|
align-items: center;
|
|
497
497
|
min-width: fit-content;
|
|
498
|
-
background-color:
|
|
498
|
+
background-color: var(--bg-color-1);
|
|
499
499
|
padding-inline-end: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
500
500
|
padding-inline-start: calc(var(--spacing-datalist-padding_y) * 1px);
|
|
501
|
-
color: var(--color-
|
|
501
|
+
color: var(--text-color-h1);
|
|
502
502
|
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
503
503
|
font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
|
|
504
504
|
height: calc(var(--height-datalist-search_m) * 1px);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vd-dialog-wrap" v-if="visible">
|
|
3
3
|
<div class="vd-overlay" v-if="visible && overlay" @click="close()"></div>
|
|
4
|
-
<div class="vd-dialog" :class="`vd-dialog--${className}`">
|
|
4
|
+
<div class="vd-dialog" :class="className ? `vd-dialog--${className}` : ''">
|
|
5
5
|
<header class="vd-dialog__header" :class="{ 'vd-dialog__header--img': $slots.imgs }">
|
|
6
6
|
<div class="vd-dialog__header--img-content" v-if="$slots.imgs">
|
|
7
7
|
<slot name="imgs"></slot>
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
<div class="vd-dialog__title">{{ title }}</div>
|
|
10
10
|
</header>
|
|
11
11
|
<div class="vd-dialog__content">
|
|
12
|
-
<div class="vd-dialog__message" :class="{ 'vd-dialog__message--head': !title }"
|
|
12
|
+
<div class="vd-dialog__message" :class="{ 'vd-dialog__message--head': !title }"
|
|
13
|
+
v-if="message || $slots.content">
|
|
13
14
|
<slot name="content">{{
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
message
|
|
16
|
+
}}</slot>
|
|
16
17
|
</div>
|
|
17
18
|
</div>
|
|
18
19
|
<footer class="vd-dialog__footer">
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
}}</vd-button>
|
|
27
28
|
</div>
|
|
28
29
|
<div class="vd-dialog__btns--text" v-if="btnsText">
|
|
29
|
-
<vd-button type="
|
|
30
|
+
<vd-button type="tertiary_text" size="large" @click="cancel">{{ cancelButtonText ||
|
|
31
|
+
$t("alert.cancel")
|
|
30
32
|
}}</vd-button>
|
|
31
33
|
<vd-button type="primary_text" size="large" @click="confirm">{{ confirmButtonText ||
|
|
32
34
|
$t("alert.confirm") }}</vd-button>
|
|
@@ -68,30 +70,27 @@ export default {
|
|
|
68
70
|
},
|
|
69
71
|
confirmButtonText: String,
|
|
70
72
|
cancelButtonText: String,
|
|
71
|
-
|
|
73
|
+
closeOnOverlay: {
|
|
72
74
|
type: Boolean,
|
|
73
75
|
default: true
|
|
74
76
|
},
|
|
75
77
|
},
|
|
76
78
|
data() {
|
|
77
79
|
return {
|
|
78
|
-
|
|
80
|
+
|
|
79
81
|
}
|
|
80
82
|
},
|
|
81
83
|
watch: {
|
|
82
|
-
|
|
83
|
-
// this.visible = val;
|
|
84
|
-
// },
|
|
84
|
+
|
|
85
85
|
},
|
|
86
86
|
computed: {
|
|
87
|
-
visible(){
|
|
87
|
+
visible() {
|
|
88
88
|
return this.value
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
methods: {
|
|
92
92
|
close(force = false) {
|
|
93
|
-
|
|
94
|
-
if (force || this.closeOnMask) {
|
|
93
|
+
if (force || this.closeOnOverlay) {
|
|
95
94
|
this.$emit('input', false);
|
|
96
95
|
}
|
|
97
96
|
},
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
|
|
2
1
|
@dialog-prefix-cls: vd-dialog;
|
|
3
2
|
|
|
4
|
-
.@{dialog-prefix-cls}{
|
|
3
|
+
.@{dialog-prefix-cls} {
|
|
5
4
|
position: absolute;
|
|
6
5
|
left: 50%;
|
|
7
6
|
top: 50%;
|
|
8
7
|
z-index: 2111;
|
|
9
|
-
transform: translate(-50
|
|
8
|
+
transform: translate(-50%, -50%);
|
|
10
9
|
width: 279px;
|
|
11
|
-
background-color:var(--color-dialog-bg);
|
|
10
|
+
background-color: var(--color-dialog-bg);
|
|
12
11
|
border-radius: calc(var(--radius-dialog-content) * 1px);
|
|
13
12
|
padding-inline-start: calc(var(--spacing-dialog-padding_left) * 1px);
|
|
14
13
|
padding-inline-end: calc(var(--spacing-dialog-padding_right) * 1px);
|
|
15
14
|
|
|
16
|
-
::-webkit-scrollbar{
|
|
15
|
+
::-webkit-scrollbar {
|
|
16
|
+
width: 3px;
|
|
17
|
+
}
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
&__header{
|
|
20
|
+
&__header {
|
|
20
21
|
padding-block-start: calc(var(--spacing-dialog-padding_top) * 1px);
|
|
21
|
-
|
|
22
|
-
&--img{
|
|
22
|
+
|
|
23
|
+
&--img {
|
|
23
24
|
padding-block-start: calc(var(--spacing-dialog-icon-padding_top) * 1px);
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
&-content {
|
|
25
27
|
text-align: center;
|
|
26
28
|
margin-block-end: calc(var(--spacing-dialog-icon_title-margin_top) * 1px);
|
|
27
29
|
}
|
|
@@ -29,15 +31,15 @@
|
|
|
29
31
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
&__title{
|
|
33
|
-
text-align: center;
|
|
34
|
+
&__title {
|
|
35
|
+
text-align: center;
|
|
34
36
|
font-size: calc(var(--en-multi-f-e-s-fontSize) * 1px);
|
|
35
37
|
font-weight: var(--en-multi-f-e-s-fontWeight);
|
|
36
|
-
line-height:
|
|
37
|
-
color:var(--color-dialog-title);
|
|
38
|
+
line-height: calc(var(--en-multi-f-e-s-lineHeight) * 1px);
|
|
39
|
+
color: var(--color-dialog-title);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
&__message{
|
|
42
|
+
&__message {
|
|
41
43
|
text-align: center;
|
|
42
44
|
overflow-y: auto;
|
|
43
45
|
min-height: calc(var(--height-dialog-super_small) * 1px);
|
|
@@ -45,65 +47,68 @@
|
|
|
45
47
|
margin-block-start: calc(var(--spacing-dialog-title-margin_bottom) * 1px);
|
|
46
48
|
font-size: calc(var(--en-multi-f-d-r-fontSize) * 1px);
|
|
47
49
|
font-weight: var(--en-multi-f-d-r-fontWeight);
|
|
48
|
-
line-height:
|
|
50
|
+
line-height: calc(var(--en-multi-f-d-r-lineHeight) * 1px);
|
|
49
51
|
color: var(--color-dialog-text);
|
|
50
52
|
|
|
51
|
-
&--head{
|
|
53
|
+
&--head {
|
|
52
54
|
margin-block-start: 0;
|
|
53
55
|
color: var(--color-dialog-title);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
&__footer{
|
|
58
|
-
margin-block-start: calc(var(--spacing-dialog-button-margin_top) * 1px);
|
|
59
|
+
&__footer {
|
|
60
|
+
margin-block-start: calc(var(--spacing-dialog-button-margin_top) * 1px);
|
|
59
61
|
}
|
|
60
|
-
|
|
61
|
-
&__btns{
|
|
62
|
+
|
|
63
|
+
&__btns {
|
|
62
64
|
display: flex;
|
|
63
65
|
justify-content: space-between;
|
|
64
66
|
padding-block-end: calc(var(--spacing-dialog-padding_bottom) * 1px);
|
|
65
67
|
|
|
66
|
-
button{
|
|
68
|
+
button {
|
|
67
69
|
flex: 1;
|
|
68
70
|
}
|
|
69
|
-
|
|
71
|
+
|
|
72
|
+
button+button {
|
|
70
73
|
margin-inline-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
&__btn{
|
|
77
|
+
&__btn {
|
|
75
78
|
padding-block-end: calc(var(--spacing-dialog-padding_bottom) * 1px);
|
|
76
79
|
padding-inline-start: calc(var(--spacing-dialog-button_single-margin_left) * 1px);
|
|
77
80
|
padding-inline-end: calc(var(--spacing-dialog-button_single-margin_right) * 1px);
|
|
78
81
|
}
|
|
79
|
-
|
|
80
|
-
&__btns--text{
|
|
82
|
+
|
|
83
|
+
&__btns--text {
|
|
81
84
|
display: flex;
|
|
82
85
|
justify-content: space-between;
|
|
83
86
|
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
84
87
|
|
|
85
|
-
button{
|
|
88
|
+
button {
|
|
86
89
|
flex: 1;
|
|
87
90
|
}
|
|
88
|
-
|
|
91
|
+
|
|
92
|
+
button+button {
|
|
89
93
|
margin-inline-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
90
|
-
}
|
|
94
|
+
}
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
&__btn--text-block{
|
|
97
|
+
&__btn--text-block {
|
|
94
98
|
display: flex;
|
|
95
99
|
justify-content: space-between;
|
|
96
100
|
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
&__btns-block{
|
|
103
|
+
&__btns-block {
|
|
100
104
|
|
|
101
105
|
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
102
106
|
|
|
103
|
-
button{
|
|
107
|
+
button {
|
|
104
108
|
flex: 1;
|
|
105
109
|
}
|
|
106
|
-
|
|
110
|
+
|
|
111
|
+
button+button {
|
|
107
112
|
margin-block-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
108
113
|
}
|
|
109
114
|
}
|
|
@@ -118,5 +123,10 @@
|
|
|
118
123
|
width: 100%;
|
|
119
124
|
height: 100%;
|
|
120
125
|
background-color: var(--color-dialog-mask_bg);
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
html[theme="dark"] {
|
|
129
|
+
.@{dialog-prefix-cls} {
|
|
130
|
+
background: linear-gradient(0deg, var(--bg-color-4) 0%, var(--bg-color-4) 100%), var(--bg-color-1);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
106
106
|
state: {
|
|
107
107
|
type: String,
|
|
108
108
|
default: 'close',
|
|
109
|
-
validator: value => ['open', 'preopen', 'close'].includes(value)
|
|
109
|
+
validator: value => ['open', 'preopen', 'close', 'fusing', 'pre', 'last'].includes(value)
|
|
110
110
|
},
|
|
111
111
|
stateText: {
|
|
112
112
|
type: String,
|