vdesign-ui 0.1.8 → 0.1.10
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/actionbar/actionbar-cell/index.vue +34 -0
- package/dist/components/actionbar/index.js +8 -0
- package/dist/components/actionbar/index.vue +39 -0
- package/dist/components/actionbar/style.less +48 -0
- package/dist/components/actions-cell/actions/index.js +7 -0
- package/dist/components/actions-cell/actions/index.vue +67 -0
- package/dist/components/actions-cell/actions/style.less +75 -0
- package/dist/components/actions-cell/index.js +7 -0
- package/dist/components/actions-cell/index.vue +94 -0
- package/dist/components/actions-cell/style.less +39 -0
- package/dist/components/activityviews/index.js +8 -0
- package/dist/components/activityviews/index.vue +110 -0
- package/dist/components/activityviews/style.less +146 -0
- package/dist/components/badge/index.js +8 -0
- package/dist/components/badge/index.vue +49 -0
- package/dist/components/badge/style.less +66 -0
- package/dist/components/button/index.js +8 -0
- package/dist/components/button/index.vue +89 -0
- package/dist/components/button/style.less +563 -0
- package/dist/components/calendar/end.png +0 -0
- package/dist/components/calendar/index-element.vue +84 -0
- package/dist/components/calendar/index.js +8 -0
- package/dist/components/calendar/index.vue +52 -0
- package/dist/components/calendar/start.png +0 -0
- package/dist/components/calendar/style.less +167 -0
- package/dist/components/checkbox/assist.js +34 -0
- package/dist/components/checkbox/checkbox-group/index.js +8 -0
- package/dist/components/checkbox/checkbox-group/index.vue +69 -0
- package/dist/components/checkbox/index.js +8 -0
- package/dist/components/checkbox/index.vue +184 -0
- package/dist/components/checkbox/style.less +289 -0
- package/dist/components/common/state/index.vue +80 -0
- package/dist/components/data-list/index.js +10 -0
- package/dist/components/data-list/index.vue +19 -0
- package/dist/components/data-list/style.less +624 -0
- package/dist/components/datetime-picker/index.js +8 -0
- package/dist/components/datetime-picker/index.vue +37 -0
- package/dist/components/datetime-picker/style.less +25 -0
- package/dist/components/dialog/index copy.vue +112 -0
- package/dist/components/dialog/index.js +8 -0
- package/dist/components/dialog/index.vue +111 -0
- package/dist/components/dialog/style.less +122 -0
- package/dist/components/divider/index.js +8 -0
- package/dist/components/divider/index.vue +54 -0
- package/dist/components/divider/style.less +92 -0
- package/dist/components/dropdown/index.js +8 -0
- package/dist/components/dropdown/index.vue +210 -0
- package/dist/components/dropdown/style.less +402 -0
- package/dist/components/empty/empty-404.png +0 -0
- package/dist/components/empty/empty-img.png +0 -0
- package/dist/components/empty/empty-network.png +0 -0
- package/dist/components/empty/index.js +8 -0
- package/dist/components/empty/index.vue +65 -0
- package/dist/components/empty/style.less +53 -0
- package/dist/components/footer/index.js +7 -0
- package/dist/components/footer/index.vue +29 -0
- package/dist/components/footer/style.less +22 -0
- package/dist/components/footnav/footnav-item/index.js +7 -0
- package/dist/components/footnav/footnav-item/index.vue +75 -0
- package/dist/components/footnav/footnav-item/style.less +38 -0
- package/dist/components/footnav/index.js +7 -0
- package/dist/components/footnav/index.vue +82 -0
- package/dist/components/footnav/style.less +22 -0
- package/dist/components/form/index.js +7 -0
- package/dist/components/form/index.vue +12 -0
- package/dist/components/headnav/index.js +7 -0
- package/dist/components/headnav/index.vue +139 -0
- package/dist/components/headnav/style.less +232 -0
- package/dist/components/icon/font/iconfont.css +817 -0
- package/dist/components/icon/font/iconfont.js +2 -0
- package/dist/components/icon/index.js +9 -0
- package/dist/components/icon/index.vue +46 -0
- package/dist/components/icon/style.less +44 -0
- package/dist/components/input/calcTextareaHeight.js +266 -0
- package/dist/components/input/index.js +8 -0
- package/dist/components/input/index.vue +338 -0
- package/dist/components/input/password/index.js +8 -0
- package/dist/components/input/password/index.vue +60 -0
- package/dist/components/input/search/index.js +8 -0
- package/dist/components/input/search/index.vue +64 -0
- package/dist/components/input/stepper/index.js +8 -0
- package/dist/components/input/stepper/index.vue +136 -0
- package/dist/components/input/style.less +482 -0
- package/dist/components/list/index.js +8 -0
- package/dist/components/list/index.vue +159 -0
- package/dist/components/list/style.less +290 -0
- package/dist/components/loading/index.js +7 -0
- package/dist/components/loading/index.vue +53 -0
- package/dist/components/loading/loading.png +0 -0
- package/dist/components/loading/refresh.png +0 -0
- package/dist/components/loading/style.less +48 -0
- package/dist/components/mixins/clickoutside.js +81 -0
- package/dist/components/mixins/dom.js +41 -0
- package/dist/components/mixins/languageMixin.js +38 -0
- package/dist/components/mixins/outlineConfigPlugin.js +40 -0
- package/dist/components/mixins/router-link.js +23 -0
- package/dist/components/noticebar/index.js +8 -0
- package/dist/components/noticebar/index.vue +246 -0
- package/dist/components/noticebar/style.less +309 -0
- package/dist/components/overlay/index.js +8 -0
- package/dist/components/overlay/index.vue +161 -0
- package/dist/components/overlay/style.less +23 -0
- package/dist/components/pagebreak/index.js +7 -0
- package/dist/components/pagebreak/index.vue +60 -0
- package/dist/components/pagebreak/style.less +43 -0
- package/dist/components/popover/index.js +8 -0
- package/dist/components/popover/index.vue +99 -0
- package/dist/components/popover/style.less +349 -0
- package/dist/components/popover/vue-popover.vue +314 -0
- package/dist/components/radio/assist.js +34 -0
- package/dist/components/radio/index.js +8 -0
- package/dist/components/radio/index.vue +159 -0
- package/dist/components/radio/radio-group/index.vue +70 -0
- package/dist/components/radio/style.less +297 -0
- package/dist/components/result/completed.png +0 -0
- package/dist/components/result/error.png +0 -0
- package/dist/components/result/index.js +8 -0
- package/dist/components/result/index.vue +47 -0
- package/dist/components/result/style.less +42 -0
- package/dist/components/result/wait.png +0 -0
- package/dist/components/selector/index.js +8 -0
- package/dist/components/selector/index.vue +124 -0
- package/dist/components/selector/style.less +474 -0
- package/dist/components/skeleton/index.js +7 -0
- package/dist/components/skeleton/index.vue +134 -0
- package/dist/components/skeleton/style.less +192 -0
- package/dist/components/slider/draggable.js +49 -0
- package/dist/components/slider/index.js +7 -0
- package/dist/components/slider/index.vue +173 -0
- package/dist/components/slider/style.less +95 -0
- package/dist/components/slider/utils.js +60 -0
- package/dist/components/step/index.js +7 -0
- package/dist/components/step/index.vue +48 -0
- package/dist/components/step/style.less +59 -0
- package/dist/components/step-item/index.js +7 -0
- package/dist/components/step-item/index.vue +89 -0
- package/dist/components/step-item/style.less +361 -0
- package/dist/components/style/index.vue +42 -0
- package/dist/components/switch/index.js +8 -0
- package/dist/components/switch/index.vue +72 -0
- package/dist/components/switch/style.less +54 -0
- package/dist/components/tabs/index.js +8 -0
- package/dist/components/tabs/index.vue +185 -0
- package/dist/components/tabs/style.less +383 -0
- package/dist/components/tabs/tab/index.vue +52 -0
- package/dist/components/tag/index.js +7 -0
- package/dist/components/tag/index.vue +50 -0
- package/dist/components/tag/style.less +211 -0
- package/dist/components/title/index.js +8 -0
- package/dist/components/title/index.vue +92 -0
- package/dist/components/title/style.less +188 -0
- package/dist/components/toast/index.js +80 -0
- package/dist/components/toast/index.vue +44 -0
- package/dist/components/toast/style.less +55 -0
- package/dist/components/transition/index.js +8 -0
- package/dist/components/transition/index.vue +13 -0
- package/dist/components/transition/style.less +208 -0
- package/dist/components/upload/index.js +7 -0
- package/dist/components/upload/index.vue +224 -0
- package/dist/components/upload/style.less +156 -0
- package/dist/vdesign-ui.common.js +214 -268
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +214 -268
- package/dist/vdesign-ui.umd.min.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-dialog-wrap" v-if="visible">
|
|
3
|
+
<div v-if="visible && overlay" @click="close">
|
|
4
|
+
<vd-overlay></vd-overlay>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="vd-dialog" :class="`vd-dialog--${className}`">
|
|
7
|
+
<header class="vd-dialog__header" :class="{ 'vd-dialog__header--img': imgs }">
|
|
8
|
+
<div class="vd-dialog__header--img-content" v-if="imgs">
|
|
9
|
+
<slot name="imgs"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="vd-dialog__title">{{ title }}</div>
|
|
12
|
+
</header>
|
|
13
|
+
<div class="vd-dialog__content">
|
|
14
|
+
<div class="vd-dialog__message" :class="{ 'vd-dialog__message--head': !title }" v-if="message">{{
|
|
15
|
+
message
|
|
16
|
+
}}</div>
|
|
17
|
+
<slot name="content"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
<!-- 这个地方需要加v-if判断吗 -->
|
|
20
|
+
<footer class="vd-dialog__footer">
|
|
21
|
+
<div class="vd-dialog__btns" v-if="btns">
|
|
22
|
+
<vd-button type="tertiary_grey" size="large" @click="cancel">{{ cancelButtonText ||
|
|
23
|
+
$t("alert.cancel") }}</vd-button>
|
|
24
|
+
<vd-button type="large" @click="confirm">{{ confirmButtonText || $t("alert.confirm") }} </vd-button>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="vd-dialog__btn" v-if="btn">
|
|
27
|
+
<vd-button type="large" @click="confirm" block>{{ confirmButtonText || $t("alert.confirm")
|
|
28
|
+
}}</vd-button>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="vd-dialog__btns--text" v-if="btnsText">
|
|
31
|
+
<vd-button type="tertiary" size="large" @click="cancel">{{ cancelButtonText || $t("alert.cancel")
|
|
32
|
+
}}</vd-button>
|
|
33
|
+
<vd-button type="primary_text" size="large" @click="confirm">{{ confirmButtonText ||
|
|
34
|
+
$t("alert.confirm") }}</vd-button>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="vd-dialog__btn--text-block" v-if="btnTextBlock">
|
|
37
|
+
<vd-button type="primary_text" size="large" block @click="confirm">{{ confirmButtonText ||
|
|
38
|
+
$t("alert.confirm") }}</vd-button>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="vd-dialog__btns-block" v-if="btnsBlock">
|
|
41
|
+
<vd-button type="primary" block size="large" @click="confirm">{{ confirmButtonText ||
|
|
42
|
+
$t("alert.confirm") }}</vd-button>
|
|
43
|
+
<vd-button type="primary_text" block size="large" @click="cancel">{{ cancelButtonText ||
|
|
44
|
+
$t("alert.cancel") }}</vd-button>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="vd-dialog__btns--text" v-if="extraBtn">
|
|
47
|
+
<slot name="footerBtn"></slot>
|
|
48
|
+
</div>
|
|
49
|
+
</footer>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
// const prefixCls = 'vd-dialog';
|
|
56
|
+
|
|
57
|
+
export default {
|
|
58
|
+
name: 'vd-dialog',
|
|
59
|
+
props: {
|
|
60
|
+
value: Boolean,
|
|
61
|
+
btns: Boolean,
|
|
62
|
+
btnsBlock: Boolean,
|
|
63
|
+
btn: Boolean,
|
|
64
|
+
btnsText: Boolean,
|
|
65
|
+
btnTextBlock: Boolean,
|
|
66
|
+
imgs: Boolean,
|
|
67
|
+
message: String,
|
|
68
|
+
title: String,
|
|
69
|
+
className: String,
|
|
70
|
+
overlay: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
extraBtn: Boolean,
|
|
75
|
+
confirmButtonText: String,
|
|
76
|
+
cancelButtonText: String,
|
|
77
|
+
},
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
visible: this.value,
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
watch: {
|
|
84
|
+
value(val) {
|
|
85
|
+
this.visible = val;
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
computed: {
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
close() {
|
|
92
|
+
this.visible = false;
|
|
93
|
+
this.$emit('input', false);
|
|
94
|
+
},
|
|
95
|
+
cancel() {
|
|
96
|
+
this.close(); // 调用 close 方法关闭对话框
|
|
97
|
+
// 触发取消事件,让父组件知道用户点击了取消
|
|
98
|
+
this.$emit('cancel');
|
|
99
|
+
},
|
|
100
|
+
// handleMask () {
|
|
101
|
+
// this.close();
|
|
102
|
+
// },
|
|
103
|
+
confirm() {
|
|
104
|
+
this.$emit('confirm');
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style lang="less">
|
|
111
|
+
@import './style.less';
|
|
112
|
+
</style>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-dialog-wrap" v-if="visible">
|
|
3
|
+
<div class="vd-overlay" v-if="visible && overlay" @click="close()"></div>
|
|
4
|
+
<div class="vd-dialog" :class="`vd-dialog--${className}`">
|
|
5
|
+
<header class="vd-dialog__header" :class="{ 'vd-dialog__header--img': $slots.imgs }">
|
|
6
|
+
<div class="vd-dialog__header--img-content" v-if="$slots.imgs">
|
|
7
|
+
<slot name="imgs"></slot>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="vd-dialog__title">{{ title }}</div>
|
|
10
|
+
</header>
|
|
11
|
+
<div class="vd-dialog__content">
|
|
12
|
+
<div class="vd-dialog__message" :class="{ 'vd-dialog__message--head': !title }" v-if="message">{{
|
|
13
|
+
message
|
|
14
|
+
}}</div>
|
|
15
|
+
<slot name="content"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
<footer class="vd-dialog__footer">
|
|
18
|
+
<div class="vd-dialog__btns" v-if="btns">
|
|
19
|
+
<vd-button type="tertiary_grey" size="large" @click="cancel">{{ cancelButtonText ||
|
|
20
|
+
$t("alert.cancel") }}</vd-button>
|
|
21
|
+
<vd-button type="large" @click="confirm">{{ confirmButtonText || $t("alert.confirm") }} </vd-button>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="vd-dialog__btn" v-if="btn">
|
|
24
|
+
<vd-button type="large" @click="confirm" block>{{ confirmButtonText || $t("alert.confirm")
|
|
25
|
+
}}</vd-button>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="vd-dialog__btns--text" v-if="btnsText">
|
|
28
|
+
<vd-button type="tertiary" size="large" @click="cancel">{{ cancelButtonText || $t("alert.cancel")
|
|
29
|
+
}}</vd-button>
|
|
30
|
+
<vd-button type="primary_text" size="large" @click="confirm">{{ confirmButtonText ||
|
|
31
|
+
$t("alert.confirm") }}</vd-button>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="vd-dialog__btn--text-block" v-if="btnTextBlock">
|
|
34
|
+
<vd-button type="primary_text" size="large" block @click="confirm">{{ confirmButtonText ||
|
|
35
|
+
$t("alert.confirm") }}</vd-button>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="vd-dialog__btns-block" v-if="btnsBlock">
|
|
38
|
+
<vd-button type="primary" block size="large" @click="confirm">{{ confirmButtonText ||
|
|
39
|
+
$t("alert.confirm") }}</vd-button>
|
|
40
|
+
<vd-button type="primary_text" block size="large" @click="cancel">{{ cancelButtonText ||
|
|
41
|
+
$t("alert.cancel") }}</vd-button>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="vd-dialog__btns--text" v-if="$slots['extra-btn']">
|
|
44
|
+
<slot name="extra-btn"></slot>
|
|
45
|
+
</div>
|
|
46
|
+
</footer>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
export default {
|
|
53
|
+
name: 'vd-dialog',
|
|
54
|
+
props: {
|
|
55
|
+
value: Boolean,
|
|
56
|
+
btns: Boolean,
|
|
57
|
+
btnsBlock: Boolean,
|
|
58
|
+
btn: Boolean,
|
|
59
|
+
btnsText: Boolean,
|
|
60
|
+
btnTextBlock: Boolean,
|
|
61
|
+
message: String,
|
|
62
|
+
title: String,
|
|
63
|
+
className: String,
|
|
64
|
+
overlay: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
confirmButtonText: String,
|
|
69
|
+
cancelButtonText: String,
|
|
70
|
+
closeOnMask: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
// visible: this.value,
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
watch: {
|
|
81
|
+
// value(val) {
|
|
82
|
+
// this.visible = val;
|
|
83
|
+
// },
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
visible(){
|
|
87
|
+
return this.value
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
close(force = false) {
|
|
92
|
+
// this.visible = false;
|
|
93
|
+
if (force || this.closeOnMask) {
|
|
94
|
+
this.$emit('input', false);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
cancel() {
|
|
98
|
+
this.close(true); // 调用 close 方法关闭对话框
|
|
99
|
+
// 触发取消事件,让父组件知道用户点击了取消
|
|
100
|
+
this.$emit('cancel');
|
|
101
|
+
},
|
|
102
|
+
confirm() {
|
|
103
|
+
this.$emit('confirm');
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style lang="less">
|
|
110
|
+
@import './style.less';
|
|
111
|
+
</style>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
|
|
2
|
+
@dialog-prefix-cls: vd-dialog;
|
|
3
|
+
|
|
4
|
+
.@{dialog-prefix-cls}{
|
|
5
|
+
position: absolute;
|
|
6
|
+
left: 50%;
|
|
7
|
+
top: 50%;
|
|
8
|
+
z-index: 2111;
|
|
9
|
+
transform: translate(-50%,-50%);
|
|
10
|
+
width: 279px;
|
|
11
|
+
background-color:var(--color-dialog-bg);
|
|
12
|
+
border-radius: calc(var(--radius-dialog-content) * 1px);
|
|
13
|
+
padding-inline-start: calc(var(--spacing-dialog-padding_left) * 1px);
|
|
14
|
+
padding-inline-end: calc(var(--spacing-dialog-padding_right) * 1px);
|
|
15
|
+
|
|
16
|
+
::-webkit-scrollbar{width:3px;}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
&__header{
|
|
20
|
+
padding-block-start: calc(var(--spacing-dialog-padding_top) * 1px);
|
|
21
|
+
|
|
22
|
+
&--img{
|
|
23
|
+
padding-block-start: calc(var(--spacing-dialog-icon-padding_top) * 1px);
|
|
24
|
+
&-content{
|
|
25
|
+
text-align: center;
|
|
26
|
+
margin-block-end: calc(var(--spacing-dialog-icon_title-margin_top) * 1px);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__title{
|
|
33
|
+
text-align: center;
|
|
34
|
+
font-size: calc(var(--en-multi-f-e-s-fontSize) * 1px);
|
|
35
|
+
font-weight: var(--en-multi-f-e-s-fontWeight);
|
|
36
|
+
line-height: calc(var(--en-multi-f-e-s-lineHeight) * 1px);
|
|
37
|
+
color:var(--color-dialog-title);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__message{
|
|
41
|
+
text-align: center;
|
|
42
|
+
overflow-y: auto;
|
|
43
|
+
min-height: calc(var(--height-dialog-super_small) * 1px);
|
|
44
|
+
max-height: calc(var(--height-dialog-super_large) * 1px);
|
|
45
|
+
margin-block-start: calc(var(--spacing-dialog-title-margin_bottom) * 1px);
|
|
46
|
+
font-size: calc(var(--en-multi-f-d-r-fontSize) * 1px);
|
|
47
|
+
font-weight: var(--en-multi-f-d-r-fontWeight);
|
|
48
|
+
line-height: calc(var(--en-multi-f-d-r-lineHeight) * 1px);
|
|
49
|
+
color: var(--color-dialog-text);
|
|
50
|
+
|
|
51
|
+
&--head{
|
|
52
|
+
margin-block-start: 0;
|
|
53
|
+
color: var(--color-dialog-title);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__footer{
|
|
58
|
+
margin-block-start: calc(var(--spacing-dialog-button-margin_top) * 1px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__btns{
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
padding-block-end: calc(var(--spacing-dialog-padding_bottom) * 1px);
|
|
65
|
+
|
|
66
|
+
button{
|
|
67
|
+
flex: 1;
|
|
68
|
+
}
|
|
69
|
+
button+button{
|
|
70
|
+
margin-inline-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__btn{
|
|
75
|
+
padding-block-end: calc(var(--spacing-dialog-padding_bottom) * 1px);
|
|
76
|
+
padding-inline-start: calc(var(--spacing-dialog-button_single-margin_left) * 1px);
|
|
77
|
+
padding-inline-end: calc(var(--spacing-dialog-button_single-margin_right) * 1px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__btns--text{
|
|
81
|
+
display: flex;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
84
|
+
|
|
85
|
+
button{
|
|
86
|
+
flex: 1;
|
|
87
|
+
}
|
|
88
|
+
button+button{
|
|
89
|
+
margin-inline-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__btn--text-block{
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__btns-block{
|
|
100
|
+
|
|
101
|
+
padding-block-end: calc(var(--spacing-dialog-button_text-padding_bottom) * 1px);
|
|
102
|
+
|
|
103
|
+
button{
|
|
104
|
+
flex: 1;
|
|
105
|
+
}
|
|
106
|
+
button+button{
|
|
107
|
+
margin-block-start: calc(var(--spacing-dialog-button_double-margin_mid) * 1px);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.vd-overlay {
|
|
114
|
+
position: fixed;
|
|
115
|
+
top: 0;
|
|
116
|
+
left: 0;
|
|
117
|
+
z-index: 2001;
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 100%;
|
|
120
|
+
background-color: var(--color-dialog-mask_bg);
|
|
121
|
+
}
|
|
122
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-divider" :class="wrapClasses">
|
|
3
|
+
<span v-if="hasSlot" class="vd-divider__text">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</span>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
const prefixCls = 'vd-divider';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'vd-divider',
|
|
14
|
+
props: {
|
|
15
|
+
hairline: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
direction: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'horizontal',
|
|
22
|
+
validator: value => ['horizontal', 'vertical'].includes(value)
|
|
23
|
+
},
|
|
24
|
+
type: String,
|
|
25
|
+
contentPosition: String,
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
hasSlot() {
|
|
34
|
+
return this.$slots.default;
|
|
35
|
+
},
|
|
36
|
+
wrapClasses() {
|
|
37
|
+
return [
|
|
38
|
+
`${prefixCls}--${this.direction}`,
|
|
39
|
+
{
|
|
40
|
+
[`${prefixCls}-with-text--${this.contentPosition}`]: this.contentPosition,
|
|
41
|
+
[`${prefixCls}--hairline`]: this.hairline,
|
|
42
|
+
[`${prefixCls}--${this.type}`]: this.type,
|
|
43
|
+
[`${prefixCls}-with-text`]: this.hasSlot
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="less">
|
|
53
|
+
@import './style.less';
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@divider-prefix-cls: vd-divider;
|
|
2
|
+
|
|
3
|
+
.@{divider-prefix-cls} {
|
|
4
|
+
|
|
5
|
+
&--hairline::before,
|
|
6
|
+
&--hairline::after {
|
|
7
|
+
transform: scaleY(0.5);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&--horizontal {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-style: solid;
|
|
14
|
+
border-width: 0;
|
|
15
|
+
|
|
16
|
+
&::before {
|
|
17
|
+
content: '';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&::before,
|
|
21
|
+
&::after {
|
|
22
|
+
display: block;
|
|
23
|
+
flex: 1;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
height: 1px;
|
|
26
|
+
border-color: inherit;
|
|
27
|
+
border-style: inherit;
|
|
28
|
+
border-width: 1px 0 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--vertical {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
|
|
36
|
+
&.@{divider-prefix-cls}--hairline {
|
|
37
|
+
|
|
38
|
+
&::before {
|
|
39
|
+
transform: scale(0.5, 1);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::before {
|
|
44
|
+
content: '';
|
|
45
|
+
display: block;
|
|
46
|
+
width: 1px;
|
|
47
|
+
height: 1em;
|
|
48
|
+
background-color: var(--divider-color-default-1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.@{divider-prefix-cls}--large {
|
|
52
|
+
&::before {
|
|
53
|
+
background-color: var(--divider-color-default-2);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--hairline {
|
|
59
|
+
border-color: var(--divider-color-default-1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--large {
|
|
63
|
+
border-color: var(--divider-color-default-2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
&-with-text {
|
|
68
|
+
&::after {
|
|
69
|
+
content: '';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&--left {
|
|
73
|
+
&::before {
|
|
74
|
+
max-width: 20%;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--right {
|
|
79
|
+
&::after {
|
|
80
|
+
max-width: 20%;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
&__text {
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
color: rgba(0, 0, 0, 0.3);
|
|
90
|
+
margin: 0 calc(var(--spacing-tight) * 1px);
|
|
91
|
+
}
|
|
92
|
+
}
|