vdesign-ui 0.2.12 → 0.2.13
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/README.md +78 -78
- package/dist/components/actionbar/index.js +8 -8
- package/dist/components/actionbar/index.vue +39 -39
- package/dist/components/actionbar/style.less +44 -44
- package/dist/components/actionbar-cell/index.js +7 -7
- package/dist/components/actionbar-cell/index.vue +38 -38
- package/dist/components/actions/index.js +6 -6
- package/dist/components/actions/index.vue +77 -76
- package/dist/components/actions/style.less +109 -109
- package/dist/components/actions-cell/index.js +6 -6
- package/dist/components/actions-cell/index.vue +94 -94
- package/dist/components/actions-cell/style.less +38 -38
- package/dist/components/activityviews/index.js +8 -8
- package/dist/components/activityviews/index.vue +192 -192
- package/dist/components/activityviews/style.less +151 -151
- package/dist/components/badge/index.js +8 -8
- package/dist/components/badge/index.vue +49 -49
- package/dist/components/badge/style.less +54 -54
- package/dist/components/button/index.js +8 -8
- package/dist/components/button/index.vue +93 -93
- package/dist/components/button/style.less +558 -558
- package/dist/components/calendar/index-element.vue +84 -84
- package/dist/components/calendar/index.js +7 -7
- package/dist/components/calendar/index.vue +52 -52
- package/dist/components/calendar/style.less +138 -138
- package/dist/components/checkbox/index.js +8 -8
- package/dist/components/checkbox/index.vue +161 -161
- package/dist/components/checkbox/style.less +288 -288
- package/dist/components/checkbox-group/index.js +7 -7
- package/dist/components/checkbox-group/index.vue +69 -69
- package/dist/components/common/state/index.vue +33 -33
- package/dist/components/common/state/style.less +47 -47
- package/dist/components/data-list/index.js +10 -10
- package/dist/components/data-list/index.vue +19 -19
- package/dist/components/data-list/style.less +623 -623
- package/dist/components/datetime-picker/index.js +7 -7
- package/dist/components/datetime-picker/index.vue +37 -37
- package/dist/components/datetime-picker/style.less +23 -23
- package/dist/components/dialog/index.js +8 -8
- package/dist/components/dialog/index.vue +164 -164
- package/dist/components/dialog/overlay-manager.js +18 -18
- package/dist/components/dialog/style.less +138 -138
- package/dist/components/divider/index.js +8 -8
- package/dist/components/divider/index.vue +54 -54
- package/dist/components/divider/style.less +92 -92
- package/dist/components/dropdown/index.js +8 -8
- package/dist/components/dropdown/index.vue +218 -218
- package/dist/components/dropdown/style.less +432 -432
- package/dist/components/empty/index.js +8 -8
- package/dist/components/empty/index.vue +138 -138
- package/dist/components/empty/style.less +60 -60
- package/dist/components/footer/index.js +6 -6
- package/dist/components/footer/index.vue +33 -33
- package/dist/components/footer/style.less +20 -20
- package/dist/components/footnav/index.js +6 -6
- package/dist/components/footnav/index.vue +93 -93
- package/dist/components/footnav/style.less +22 -22
- package/dist/components/footnav-item/index.js +6 -6
- package/dist/components/footnav-item/index.vue +50 -50
- package/dist/components/footnav-item/style.less +39 -39
- package/dist/components/form/index.js +6 -6
- package/dist/components/form/index.vue +12 -12
- package/dist/components/headnav/index.js +6 -6
- package/dist/components/headnav/index.vue +185 -185
- package/dist/components/headnav/style.less +231 -231
- package/dist/components/icon/font/iconfont.css +163 -163
- package/dist/components/icon/font/iconfont.js +5 -5
- package/dist/components/icon/index.js +9 -9
- package/dist/components/icon/index.vue +96 -96
- package/dist/components/icon/style.less +44 -44
- package/dist/components/input/calcTextareaHeight.js +162 -162
- package/dist/components/input/index.js +8 -8
- package/dist/components/input/index.vue +345 -345
- package/dist/components/input/style.less +470 -470
- package/dist/components/list/index.js +8 -8
- package/dist/components/list/index.vue +152 -152
- package/dist/components/list/style.less +213 -213
- package/dist/components/loading/index.js +6 -6
- package/dist/components/loading/index.vue +68 -68
- package/dist/components/loading/style.less +53 -53
- package/dist/components/mixins/clickoutside.js +81 -81
- package/dist/components/mixins/dom.js +41 -41
- package/dist/components/mixins/languageMixin.js +41 -41
- package/dist/components/mixins/outlineConfigPlugin.js +45 -45
- package/dist/components/mixins/router-link.js +22 -22
- package/dist/components/mixins/themeMixin.js +43 -43
- package/dist/components/noticebar/index.js +8 -8
- package/dist/components/noticebar/index.vue +258 -258
- package/dist/components/noticebar/style.less +328 -328
- package/dist/components/overlay/index.js +8 -8
- package/dist/components/overlay/index.vue +184 -184
- package/dist/components/overlay/style.less +23 -23
- package/dist/components/pagebreak/index.js +6 -6
- package/dist/components/pagebreak/index.vue +67 -67
- package/dist/components/pagebreak/style.less +41 -41
- package/dist/components/password/index.js +8 -8
- package/dist/components/password/index.vue +60 -60
- package/dist/components/popover/index.js +8 -8
- package/dist/components/popover/index.vue +100 -100
- package/dist/components/popover/style.less +346 -346
- package/dist/components/popover/vue-popover.vue +314 -314
- package/dist/components/popup/index.js +7 -7
- package/dist/components/popup/index.vue +243 -243
- package/dist/components/radio/index.js +8 -8
- package/dist/components/radio/index.vue +184 -184
- package/dist/components/radio/style.less +293 -293
- package/dist/components/radio-group/index.js +6 -6
- package/dist/components/radio-group/index.vue +58 -58
- package/dist/components/result/index.js +8 -8
- package/dist/components/result/index.vue +73 -73
- package/dist/components/result/style.less +43 -43
- package/dist/components/search/index.js +8 -8
- package/dist/components/search/index.vue +66 -66
- package/dist/components/selector/index.js +8 -8
- package/dist/components/selector/index.vue +161 -161
- package/dist/components/selector/style.less +484 -484
- package/dist/components/skeleton/index.js +6 -6
- package/dist/components/skeleton/index.vue +207 -207
- package/dist/components/skeleton/style.less +196 -196
- package/dist/components/slider/draggable.js +49 -49
- package/dist/components/slider/index.js +6 -6
- package/dist/components/slider/index.vue +167 -167
- package/dist/components/slider/style.less +99 -99
- package/dist/components/slider/utils.js +59 -59
- package/dist/components/step/index.js +7 -7
- package/dist/components/step/index.vue +48 -48
- package/dist/components/step/style.less +66 -58
- package/dist/components/step-item/index.js +7 -7
- package/dist/components/step-item/index.vue +126 -126
- package/dist/components/step-item/style.less +399 -362
- package/dist/components/stepper/index.js +8 -8
- package/dist/components/stepper/index.vue +146 -146
- package/dist/components/style/index.vue +42 -42
- package/dist/components/switch/index.js +8 -8
- package/dist/components/switch/index.vue +72 -72
- package/dist/components/switch/style.less +56 -56
- package/dist/components/tab/index.js +7 -7
- package/dist/components/tab/index.vue +94 -94
- package/dist/components/tabs/index.js +8 -8
- package/dist/components/tabs/index.vue +281 -281
- package/dist/components/tabs/style.less +408 -408
- package/dist/components/tag/index.js +6 -6
- package/dist/components/tag/index.vue +64 -64
- package/dist/components/tag/style.less +210 -210
- package/dist/components/title/index.js +8 -8
- package/dist/components/title/index.vue +99 -99
- package/dist/components/title/style.less +187 -187
- package/dist/components/toast/index.js +97 -97
- package/dist/components/toast/index.vue +49 -49
- package/dist/components/toast/style.less +57 -57
- package/dist/components/transition/index.js +8 -8
- package/dist/components/transition/index.vue +13 -13
- package/dist/components/transition/style.less +208 -208
- package/dist/components/upload/index.js +6 -6
- package/dist/components/upload/index.vue +106 -106
- package/dist/components/upload/style.less +147 -147
- package/dist/components/utils/assist.js +34 -34
- package/dist/components/utils/env.js +21 -21
- package/dist/locale/ar.js +97 -97
- package/dist/locale/en.js +97 -97
- package/dist/locale/zh.js +97 -97
- package/dist/token.css +2988 -2988
- package/dist/vdesign-ui.common.js +104 -103
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +104 -103
- package/dist/vdesign-ui.umd.min.js +2 -2
- package/package.json +113 -113
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="classes">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
<script>
|
|
7
|
-
import { findComponentsDownward } from "../utils/assist";
|
|
8
|
-
|
|
9
|
-
const prefixCls = 'vd-radio-group';
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: 'vd-radio-group',
|
|
13
|
-
props: {
|
|
14
|
-
// 绑定的值,用于 v-model
|
|
15
|
-
value: {
|
|
16
|
-
type: [String, Number, Boolean],
|
|
17
|
-
default: '',
|
|
18
|
-
},
|
|
19
|
-
// 类型,用于样式
|
|
20
|
-
type: String,
|
|
21
|
-
// 是否禁用组内所有单选框
|
|
22
|
-
disabled: Boolean
|
|
23
|
-
},
|
|
24
|
-
computed: {
|
|
25
|
-
// 组容器的类名
|
|
26
|
-
classes() {
|
|
27
|
-
return [
|
|
28
|
-
`${prefixCls}`,
|
|
29
|
-
{
|
|
30
|
-
[`${prefixCls}__${this.type}`]: this.type,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
methods: {
|
|
36
|
-
// 更新子单选框的状态
|
|
37
|
-
updateValue() {
|
|
38
|
-
const children = findComponentsDownward(this, 'vd-radio');
|
|
39
|
-
if (children.length) {
|
|
40
|
-
children.forEach((child) => {
|
|
41
|
-
child.updateValue();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
// 处理子单选框的变化
|
|
46
|
-
change(name) {
|
|
47
|
-
this.$emit('input', name);
|
|
48
|
-
this.$emit('change', name);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
watch: {
|
|
52
|
-
// 监听 value 的变化,更新子组件
|
|
53
|
-
value() {
|
|
54
|
-
this.updateValue();
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
import { findComponentsDownward } from "../utils/assist";
|
|
8
|
+
|
|
9
|
+
const prefixCls = 'vd-radio-group';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'vd-radio-group',
|
|
13
|
+
props: {
|
|
14
|
+
// 绑定的值,用于 v-model
|
|
15
|
+
value: {
|
|
16
|
+
type: [String, Number, Boolean],
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
// 类型,用于样式
|
|
20
|
+
type: String,
|
|
21
|
+
// 是否禁用组内所有单选框
|
|
22
|
+
disabled: Boolean
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
// 组容器的类名
|
|
26
|
+
classes() {
|
|
27
|
+
return [
|
|
28
|
+
`${prefixCls}`,
|
|
29
|
+
{
|
|
30
|
+
[`${prefixCls}__${this.type}`]: this.type,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
// 更新子单选框的状态
|
|
37
|
+
updateValue() {
|
|
38
|
+
const children = findComponentsDownward(this, 'vd-radio');
|
|
39
|
+
if (children.length) {
|
|
40
|
+
children.forEach((child) => {
|
|
41
|
+
child.updateValue();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
// 处理子单选框的变化
|
|
46
|
+
change(name) {
|
|
47
|
+
this.$emit('input', name);
|
|
48
|
+
this.$emit('change', name);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
// 监听 value 的变化,更新子组件
|
|
53
|
+
value() {
|
|
54
|
+
this.updateValue();
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Result from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
Result.install = function (Vue) {
|
|
5
|
-
Vue.component(Result.name, Result);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default Result;
|
|
1
|
+
import Result from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
Result.install = function (Vue) {
|
|
5
|
+
Vue.component(Result.name, Result);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default Result;
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vd-result">
|
|
3
|
-
<div class="vd-result-img" v-if="currentImg"><img :src="currentImg" alt="img"></div>
|
|
4
|
-
<div class="vd-result-title" v-if="title">{{ title }}</div>
|
|
5
|
-
<div class="vd-result-txt" v-if="text">{{ text }}</div>
|
|
6
|
-
<div class="vd-result-footer">
|
|
7
|
-
<slot name="btnp"></slot>
|
|
8
|
-
<div class="vd-result-footer-btnx" v-if="$slots.btnt">
|
|
9
|
-
<slot name="btnt"></slot>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
import { themeMixin } from '../mixins/themeMixin';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: 'vd-result',
|
|
21
|
-
mixins: [themeMixin], // 引入混入
|
|
22
|
-
props: {
|
|
23
|
-
imgs: String,
|
|
24
|
-
text: String,
|
|
25
|
-
title: String,
|
|
26
|
-
state: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '' // 默认类型
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
data() {
|
|
32
|
-
return {
|
|
33
|
-
defaultImgs: {
|
|
34
|
-
completed: {
|
|
35
|
-
light: require('./completed.png'),
|
|
36
|
-
dark: require('./completed-dark.png')
|
|
37
|
-
},
|
|
38
|
-
waiting: {
|
|
39
|
-
light: require('./wait.png'),
|
|
40
|
-
dark: require('./wait-dark.png')
|
|
41
|
-
},
|
|
42
|
-
error: {
|
|
43
|
-
light: require('./error.png'),
|
|
44
|
-
dark: require('./error-dark.png')
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
computed:{
|
|
50
|
-
currentImg() {
|
|
51
|
-
if (this.imgs) return this.imgs;
|
|
52
|
-
return this.defaultImgs[this.state][this.theme];
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
preloadImages() {
|
|
57
|
-
Object.values(this.defaultImgs).forEach((modes) => {
|
|
58
|
-
Object.values(modes).forEach((src) => {
|
|
59
|
-
const img = new Image();
|
|
60
|
-
img.src = src;
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
mounted() {
|
|
66
|
-
this.preloadImages();
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<style lang="less">
|
|
72
|
-
@import './style.less';
|
|
73
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-result">
|
|
3
|
+
<div class="vd-result-img" v-if="currentImg"><img :src="currentImg" alt="img"></div>
|
|
4
|
+
<div class="vd-result-title" v-if="title">{{ title }}</div>
|
|
5
|
+
<div class="vd-result-txt" v-if="text">{{ text }}</div>
|
|
6
|
+
<div class="vd-result-footer">
|
|
7
|
+
<slot name="btnp"></slot>
|
|
8
|
+
<div class="vd-result-footer-btnx" v-if="$slots.btnt">
|
|
9
|
+
<slot name="btnt"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
import { themeMixin } from '../mixins/themeMixin';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'vd-result',
|
|
21
|
+
mixins: [themeMixin], // 引入混入
|
|
22
|
+
props: {
|
|
23
|
+
imgs: String,
|
|
24
|
+
text: String,
|
|
25
|
+
title: String,
|
|
26
|
+
state: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '' // 默认类型
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
defaultImgs: {
|
|
34
|
+
completed: {
|
|
35
|
+
light: require('./completed.png'),
|
|
36
|
+
dark: require('./completed-dark.png')
|
|
37
|
+
},
|
|
38
|
+
waiting: {
|
|
39
|
+
light: require('./wait.png'),
|
|
40
|
+
dark: require('./wait-dark.png')
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
light: require('./error.png'),
|
|
44
|
+
dark: require('./error-dark.png')
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
computed:{
|
|
50
|
+
currentImg() {
|
|
51
|
+
if (this.imgs) return this.imgs;
|
|
52
|
+
return this.defaultImgs[this.state][this.theme];
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
preloadImages() {
|
|
57
|
+
Object.values(this.defaultImgs).forEach((modes) => {
|
|
58
|
+
Object.values(modes).forEach((src) => {
|
|
59
|
+
const img = new Image();
|
|
60
|
+
img.src = src;
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
mounted() {
|
|
66
|
+
this.preloadImages();
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="less">
|
|
72
|
+
@import './style.less';
|
|
73
|
+
</style>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
.vd-result {
|
|
2
|
-
height: 100%;
|
|
3
|
-
margin: 0 auto;
|
|
4
|
-
text-align: center;
|
|
5
|
-
padding: 0 20px 40px;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
|
|
10
|
-
&-img {
|
|
11
|
-
margin: 0 auto;
|
|
12
|
-
width: 160px;
|
|
13
|
-
img {
|
|
14
|
-
max-width: 100%;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-title {
|
|
19
|
-
margin-top: var(--spacing-result-title-margin_top);
|
|
20
|
-
font-size: var(--en-single-f-f-b-fontSize);
|
|
21
|
-
font-weight: var(--en-single-f-f-b-fontWeight);
|
|
22
|
-
color: var(--color-result-title);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-txt {
|
|
26
|
-
margin-top: var(--spacing-result-text-margin_top);
|
|
27
|
-
font-size: var(--en-multi-f-d-r-fontSize);
|
|
28
|
-
font-weight: var(--en-multi-f-d-r-fontWeight);
|
|
29
|
-
color: var(--color-result-text);
|
|
30
|
-
line-height: var(--en-multi-f-d-r-lineHeight);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-footer {
|
|
34
|
-
margin-top: var(--spacing-result-text-margin_bottom);
|
|
35
|
-
padding-left: calc(var(--spacing-result-button-margin_y) - 20px);
|
|
36
|
-
padding-right: calc(var(--spacing-result-button-margin_y) - 20px);
|
|
37
|
-
|
|
38
|
-
&-btnx {
|
|
39
|
-
display: flex;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
margin-top: var(--spacing-result-text_button-margin_top);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
.vd-result {
|
|
2
|
+
height: 100%;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
text-align: center;
|
|
5
|
+
padding: 0 20px 40px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
|
|
10
|
+
&-img {
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
width: 160px;
|
|
13
|
+
img {
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-title {
|
|
19
|
+
margin-top: var(--spacing-result-title-margin_top);
|
|
20
|
+
font-size: var(--en-single-f-f-b-fontSize);
|
|
21
|
+
font-weight: var(--en-single-f-f-b-fontWeight);
|
|
22
|
+
color: var(--color-result-title);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-txt {
|
|
26
|
+
margin-top: var(--spacing-result-text-margin_top);
|
|
27
|
+
font-size: var(--en-multi-f-d-r-fontSize);
|
|
28
|
+
font-weight: var(--en-multi-f-d-r-fontWeight);
|
|
29
|
+
color: var(--color-result-text);
|
|
30
|
+
line-height: var(--en-multi-f-d-r-lineHeight);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-footer {
|
|
34
|
+
margin-top: var(--spacing-result-text-margin_bottom);
|
|
35
|
+
padding-left: calc(var(--spacing-result-button-margin_y) - 20px);
|
|
36
|
+
padding-right: calc(var(--spacing-result-button-margin_y) - 20px);
|
|
37
|
+
|
|
38
|
+
&-btnx {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
margin-top: var(--spacing-result-text_button-margin_top);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
44
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Search from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
Search.install = function (Vue) {
|
|
5
|
-
Vue.component(Search.name, Search);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default Search;
|
|
1
|
+
import Search from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
Search.install = function (Vue) {
|
|
5
|
+
Vue.component(Search.name, Search);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default Search;
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vd-search">
|
|
3
|
-
<div class="vd-search-content">
|
|
4
|
-
<span v-if="prefix || $slots.prefix" class="vd-search__prefix">
|
|
5
|
-
<slot name="prefix">
|
|
6
|
-
<vd-icon name="icon_nav_search"></vd-icon>
|
|
7
|
-
</slot>
|
|
8
|
-
</span>
|
|
9
|
-
<vd-input
|
|
10
|
-
v-bind="$attrs"
|
|
11
|
-
v-on="inputListeners"
|
|
12
|
-
:value="value"
|
|
13
|
-
:type="type"
|
|
14
|
-
:clearable="clearable"
|
|
15
|
-
form="search"
|
|
16
|
-
:hairline="false"
|
|
17
|
-
></vd-input>
|
|
18
|
-
</div>
|
|
19
|
-
<span class="vd-search__action" v-if="$slots.default">
|
|
20
|
-
<slot></slot>
|
|
21
|
-
</span>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import VdInput from '../input';
|
|
27
|
-
export default {
|
|
28
|
-
name: 'vd-search',
|
|
29
|
-
components: {
|
|
30
|
-
VdInput,
|
|
31
|
-
},
|
|
32
|
-
inheritAttrs: false,
|
|
33
|
-
props: {
|
|
34
|
-
value: [String, Number],
|
|
35
|
-
type: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'text'
|
|
38
|
-
},
|
|
39
|
-
clearable: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false,
|
|
42
|
-
},
|
|
43
|
-
prefix: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: true, // 默认显示前缀图标
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
data() {
|
|
49
|
-
return {
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
inputListeners() {
|
|
54
|
-
return {
|
|
55
|
-
...this.$listeners,
|
|
56
|
-
input: this.onInput,
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
onInput(value) {
|
|
62
|
-
this.$emit('input', value);
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-search">
|
|
3
|
+
<div class="vd-search-content">
|
|
4
|
+
<span v-if="prefix || $slots.prefix" class="vd-search__prefix">
|
|
5
|
+
<slot name="prefix">
|
|
6
|
+
<vd-icon name="icon_nav_search"></vd-icon>
|
|
7
|
+
</slot>
|
|
8
|
+
</span>
|
|
9
|
+
<vd-input
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
v-on="inputListeners"
|
|
12
|
+
:value="value"
|
|
13
|
+
:type="type"
|
|
14
|
+
:clearable="clearable"
|
|
15
|
+
form="search"
|
|
16
|
+
:hairline="false"
|
|
17
|
+
></vd-input>
|
|
18
|
+
</div>
|
|
19
|
+
<span class="vd-search__action" v-if="$slots.default">
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</span>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import VdInput from '../input';
|
|
27
|
+
export default {
|
|
28
|
+
name: 'vd-search',
|
|
29
|
+
components: {
|
|
30
|
+
VdInput,
|
|
31
|
+
},
|
|
32
|
+
inheritAttrs: false,
|
|
33
|
+
props: {
|
|
34
|
+
value: [String, Number],
|
|
35
|
+
type: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'text'
|
|
38
|
+
},
|
|
39
|
+
clearable: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
prefix: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true, // 默认显示前缀图标
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
inputListeners() {
|
|
54
|
+
return {
|
|
55
|
+
...this.$listeners,
|
|
56
|
+
input: this.onInput,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
onInput(value) {
|
|
62
|
+
this.$emit('input', value);
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import VSelector from "./index.vue";
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
VSelector.install = function (Vue) {
|
|
5
|
-
Vue.component(VSelector.name, VSelector);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default VSelector;
|
|
1
|
+
import VSelector from "./index.vue";
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
VSelector.install = function (Vue) {
|
|
5
|
+
Vue.component(VSelector.name, VSelector);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default VSelector;
|