evui 2.0.9 → 2.0.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/README.md +27 -27
- package/{src/webfonts/fa-regular-400.svg → dist/82f60bd0b94a1ed68b1e6e309ce2e8c3.svg} +366 -366
- package/{src/webfonts/EVUI.svg → dist/91c6092c0a9164541a69045d746b9e78.svg} +183 -183
- package/{src/webfonts/fa-solid-900.svg → dist/962a1bf31c081691065fe333d9fa8105.svg} +1518 -1518
- package/{src/webfonts/fa-brands-400.svg → dist/a1a749e89f578a49306ec2b055c073da.svg} +1008 -1008
- package/dist/evui.min.js +304 -0
- package/dist/evui.min.js.gz +0 -0
- package/dist/evui.min.js.map +1 -0
- package/dist/main.css +5161 -0
- package/dist/main.css.gz +0 -0
- package/dist/main.css.map +1 -0
- package/package.json +125 -125
- package/src/code/checkbox.js +0 -12
- package/src/common/utils.js +0 -95
- package/src/common/utils.table.js +0 -78
- package/src/components/button/button.vue +0 -318
- package/src/components/button/index.js +0 -3
- package/src/components/chart/chart.core.js +0 -406
- package/src/components/chart/chart.vue +0 -332
- package/src/components/chart/charts/chart.bar.js +0 -334
- package/src/components/chart/charts/chart.base.js +0 -1075
- package/src/components/chart/charts/chart.line.js +0 -262
- package/src/components/chart/charts/chart.pie.js +0 -383
- package/src/components/chart/charts/chart.scatter.js +0 -349
- package/src/components/chart/charts/chart.sunburst.js +0 -193
- package/src/components/chart/core/axis/axis.js +0 -217
- package/src/components/chart/core/axis/axis.scale.auto.js +0 -69
- package/src/components/chart/core/axis/axis.scale.fixed.js +0 -65
- package/src/components/chart/core/axis/axis.scale.steps.js +0 -149
- package/src/components/chart/core/core.constant.js +0 -116
- package/src/components/chart/core/core.legend.js +0 -473
- package/src/components/chart/core/core.util.js +0 -66
- package/src/components/chart/core/data/data.js +0 -412
- package/src/components/chart/core/data/data.pie.js +0 -70
- package/src/components/chart/core/data/data.stack.js +0 -222
- package/src/components/chart/core/data/data.sunburst.js +0 -172
- package/src/components/chart/element/element.bar.js +0 -117
- package/src/components/chart/element/element.line.js +0 -137
- package/src/components/chart/element/element.scatter.js +0 -76
- package/src/components/chart/helpers/helpers.canvas.js +0 -143
- package/src/components/chart/helpers/helpers.constant.js +0 -119
- package/src/components/chart/helpers/helpers.util.js +0 -109
- package/src/components/chart/index.js +0 -4
- package/src/components/chart/model/index.js +0 -4
- package/src/components/chart/model/model.series.js +0 -57
- package/src/components/chart/model/model.store.js +0 -165
- package/src/components/chart/plugins/plugins.legend.js +0 -447
- package/src/components/chart/plugins/plugins.title.js +0 -33
- package/src/components/chart/scale/scale.js +0 -210
- package/src/components/chart/scale/scale.linear.js +0 -18
- package/src/components/chart/scale/scale.logarithmic.js +0 -95
- package/src/components/chart/scale/scale.step.js +0 -160
- package/src/components/chart/scale/scale.time.js +0 -22
- package/src/components/checkbox/checkbox-group.vue +0 -72
- package/src/components/checkbox/checkbox.vue +0 -276
- package/src/components/checkbox/index.js +0 -3
- package/src/components/checkbox-group/index.js +0 -3
- package/src/components/codeview/code.vue +0 -242
- package/src/components/datepicker/calendar.core.js +0 -1827
- package/src/components/datepicker/calendar.vue +0 -86
- package/src/components/datepicker/datepicker.vue +0 -630
- package/src/components/datepicker/index.js +0 -3
- package/src/components/icon/icon.vue +0 -31
- package/src/components/icon/index.js +0 -3
- package/src/components/input/index.js +0 -3
- package/src/components/input/input.number.vue +0 -440
- package/src/components/label/index.js +0 -3
- package/src/components/label/label.vue +0 -86
- package/src/components/loadingmask/index.js +0 -3
- package/src/components/loadingmask/loadingmask.vue +0 -138
- package/src/components/loginfield/index.js +0 -3
- package/src/components/loginfield/loginfield.vue +0 -330
- package/src/components/menu/index.js +0 -5
- package/src/components/menu/menu.context.children.vue +0 -201
- package/src/components/menu/menu.context.vue +0 -144
- package/src/components/menu/menu.nav.vue +0 -123
- package/src/components/radio/index.js +0 -3
- package/src/components/radio/radio-group.vue +0 -54
- package/src/components/radio/radio.vue +0 -176
- package/src/components/radio-group/index.js +0 -3
- package/src/components/selectbox/dropdown.vue +0 -185
- package/src/components/selectbox/index.js +0 -3
- package/src/components/selectbox/listbox.vue +0 -116
- package/src/components/selectbox/option.vue +0 -11
- package/src/components/selectbox/selectbox.vue +0 -677
- package/src/components/slider/index.js +0 -3
- package/src/components/slider/slider-tooltip.vue +0 -119
- package/src/components/slider/slider.vue +0 -483
- package/src/components/splitter/index.js +0 -3
- package/src/components/splitter/splitter.vue +0 -284
- package/src/components/summary/index.js +0 -3
- package/src/components/summary/summary.vue +0 -138
- package/src/components/table/data.json +0 -1000
- package/src/components/table/data2.json +0 -1000
- package/src/components/table/index.js +0 -3
- package/src/components/table/table.black.css +0 -547
- package/src/components/table/table.filter.lite.vue +0 -170
- package/src/components/table/table.filter.vue +0 -112
- package/src/components/table/table.grey.css +0 -539
- package/src/components/table/table.navy.css +0 -536
- package/src/components/table/table.vue +0 -1380
- package/src/components/tabs/index.js +0 -14
- package/src/components/tabs/jun/tab.vue +0 -123
- package/src/components/tabs/jun/tabs.vue +0 -484
- package/src/components/tabs/tab-panel.vue +0 -39
- package/src/components/tabs/tabs.vue +0 -446
- package/src/components/textfield/index.js +0 -3
- package/src/components/textfield/textfield.vue +0 -418
- package/src/components/timepicker/index.js +0 -3
- package/src/components/timepicker/spinner.vue +0 -205
- package/src/components/timepicker/timepicker.vue +0 -492
- package/src/components/toggle/index.js +0 -3
- package/src/components/toggle/toggle.vue +0 -364
- package/src/components/tree/index.js +0 -7
- package/src/components/tree/tree.table.black.css +0 -680
- package/src/components/tree/tree.table.grey.css +0 -675
- package/src/components/tree/tree.table.vue +0 -795
- package/src/components/tree/tree.util.js +0 -119
- package/src/components/window/index.js +0 -3
- package/src/components/window/window.vue +0 -614
- package/src/index.js +0 -82
- package/src/styles/all.css +0 -5
- package/src/styles/codemirror.css +0 -346
- package/src/styles/evui.css +0 -386
- package/src/styles/icon.css +0 -557
- package/src/webfonts/NanumGothicBold.ttf +0 -0
- /package/{src/webfonts/fa-solid-900.woff2 → dist/0ab54153eeeca0ce03978cc463b257f7.woff2} +0 -0
- /package/{src/webfonts/fa-brands-400.eot → dist/13db00b7a34fee4d819ab7f9838cc428.eot} +0 -0
- /package/{src/webfonts/EVUI.ttf → dist/3c9453211570a4ede66a4b4954a32bbb.ttf} +0 -0
- /package/{src/webfonts/fa-regular-400.eot → dist/701ae6abd4719e9c2ada3535a497b341.eot} +0 -0
- /package/{src/webfonts/NanumGothic.ttf → dist/7583da5c07275cd5eb364507616f998f.ttf} +0 -0
- /package/{src/webfonts/fa-solid-900.eot → dist/8e3c7f5520f5ae906c6cf6d7f3ddcd19.eot} +0 -0
- /package/{src/webfonts/fa-brands-400.woff → dist/a046592bac8f2fd96e994733faf3858c.woff} +0 -0
- /package/{src/webfonts/fa-regular-400.ttf → dist/ad97afd3337e8cda302d10ff5a4026b8.ttf} +0 -0
- /package/{src/images/evui_icon.png → dist/adac9fa4f723f9d2cb5b6640517114a9.png} +0 -0
- /package/{src/webfonts/fa-solid-900.ttf → dist/b87b9ba532ace76ae9f6edfe9f72ded2.ttf} +0 -0
- /package/{src/webfonts/EVUI.eot → dist/b9e64d9b5fa6b500eb5df6fa980d3e5b.eot} +0 -0
- /package/{src/webfonts/fa-brands-400.ttf → dist/c5ebe0b32dc1b5cc449a76c4204d13bb.ttf} +0 -0
- /package/{src/webfonts/fa-regular-400.woff2 → dist/cd6c777f1945164224dee082abaea03a.woff2} +0 -0
- /package/{src/webfonts/fa-brands-400.woff2 → dist/e8c322de9658cbeb8a774b6624167c2c.woff2} +0 -0
- /package/{src/webfonts/fa-regular-400.woff → dist/ef60a4f6c25ef7f39f2d25a748dbecfe.woff} +0 -0
- /package/{src/webfonts/EVUI.woff → dist/f0ac0c8b3c9cd3ef9002749985ae546f.woff} +0 -0
- /package/{src/webfonts/fa-solid-900.woff → dist/faff92145777a3cbaf8e7367b4807987.woff} +0 -0
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="evui-left-navigation">
|
|
3
|
-
<ul class="evui-menu">
|
|
4
|
-
<li
|
|
5
|
-
v-for="(menu, index) in store"
|
|
6
|
-
:key="menu.name + index"
|
|
7
|
-
class="evui-menu-group"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
class="evui-menu-group-title"
|
|
11
|
-
>
|
|
12
|
-
<i
|
|
13
|
-
v-show="menu.cls"
|
|
14
|
-
:class="menu.cls"
|
|
15
|
-
/> {{ menu.name }}
|
|
16
|
-
</div>
|
|
17
|
-
<ul
|
|
18
|
-
v-for="(submenu, index) in menu.children"
|
|
19
|
-
v-show="menu.children"
|
|
20
|
-
:key="submenu.name + index"
|
|
21
|
-
class="evui-menu-group-sub"
|
|
22
|
-
>
|
|
23
|
-
<li
|
|
24
|
-
:class="selectedMenu.name === submenu.name ? 'active' : ''"
|
|
25
|
-
class="evui-menu-item"
|
|
26
|
-
@click="setSelectedMenu(menu.name, submenu.name, index)"
|
|
27
|
-
>
|
|
28
|
-
{{ submenu.name }}
|
|
29
|
-
</li>
|
|
30
|
-
</ul>
|
|
31
|
-
</li>
|
|
32
|
-
</ul>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
export default {
|
|
38
|
-
model: {
|
|
39
|
-
},
|
|
40
|
-
props: {
|
|
41
|
-
store: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: () => [],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
selectedMenu: {
|
|
49
|
-
parentName: '',
|
|
50
|
-
name: '',
|
|
51
|
-
index: '',
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
computed: {
|
|
56
|
-
},
|
|
57
|
-
methods: {
|
|
58
|
-
initSelectedMenu() {
|
|
59
|
-
this.selectedMenu.parentName = '';
|
|
60
|
-
this.selectedMenu.name = '';
|
|
61
|
-
this.selectedMenu.index = '';
|
|
62
|
-
},
|
|
63
|
-
setSelectedMenu(parentMenu, childMenu, childIndex) {
|
|
64
|
-
this.selectedMenu.parentName = parentMenu;
|
|
65
|
-
this.selectedMenu.name = childMenu;
|
|
66
|
-
this.selectedMenu.index = childIndex;
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<style scoped>
|
|
73
|
-
.evui-left-navigation {
|
|
74
|
-
width: 240px;
|
|
75
|
-
border-right: 1px solid #dddee0;
|
|
76
|
-
}
|
|
77
|
-
.evui-menu {
|
|
78
|
-
display: block;
|
|
79
|
-
width: 100%;
|
|
80
|
-
background: #fff;
|
|
81
|
-
z-index: 900;
|
|
82
|
-
}
|
|
83
|
-
.evui-menu-group {
|
|
84
|
-
list-style-type: none;
|
|
85
|
-
}
|
|
86
|
-
.evui-menu-group-sub {
|
|
87
|
-
list-style-type: none;
|
|
88
|
-
}
|
|
89
|
-
.evui-menu-group-title {
|
|
90
|
-
height: 48px;
|
|
91
|
-
line-height: 48px;
|
|
92
|
-
padding-left: 20px;
|
|
93
|
-
font-weight: bold;
|
|
94
|
-
user-select: none;
|
|
95
|
-
}
|
|
96
|
-
.evui-menu-group-title > i {
|
|
97
|
-
margin-right: 10px;
|
|
98
|
-
}
|
|
99
|
-
.evui-menu-item {
|
|
100
|
-
height: 35px;
|
|
101
|
-
line-height: 35px;
|
|
102
|
-
padding-left: 30px;
|
|
103
|
-
border-right: 2px solid transparent;
|
|
104
|
-
color: #888888;
|
|
105
|
-
background-color: #ffffff;
|
|
106
|
-
z-index: 1;
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
}
|
|
109
|
-
.evui-menu-item:hover {
|
|
110
|
-
border-right: 4px solid #2D89EF;
|
|
111
|
-
color: #2d8cf0;
|
|
112
|
-
}
|
|
113
|
-
.evui-menu-item.active {
|
|
114
|
-
border-right: 4px solid #2D89EF;
|
|
115
|
-
color: #f1f1f1;
|
|
116
|
-
background-color: #2D89EF;
|
|
117
|
-
transition: background-color 600ms ease;
|
|
118
|
-
z-index: 2;
|
|
119
|
-
}
|
|
120
|
-
a:hover {
|
|
121
|
-
color: #2D89EF;
|
|
122
|
-
}
|
|
123
|
-
</style>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<slot/>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
<script>
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
components: {
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
value: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: '',
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: '',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
componentName: 'RadioGroup',
|
|
26
|
-
computed: {
|
|
27
|
-
},
|
|
28
|
-
watch: {
|
|
29
|
-
value(v) {
|
|
30
|
-
this.initValue(v);
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
created() {
|
|
34
|
-
},
|
|
35
|
-
mounted() {
|
|
36
|
-
this.initValue();
|
|
37
|
-
},
|
|
38
|
-
methods: {
|
|
39
|
-
initValue(v) {
|
|
40
|
-
if (this.$children && this.$children instanceof Array) {
|
|
41
|
-
const self = this;
|
|
42
|
-
this.$children.forEach((c) => {
|
|
43
|
-
const child = c;
|
|
44
|
-
child.bindValue = v || self.value;
|
|
45
|
-
child.bindSize = self.size;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style scoped>
|
|
54
|
-
</style>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="[{ disabled: disabled }, dataSize]"
|
|
4
|
-
class="ev-radio-wrap"
|
|
5
|
-
>
|
|
6
|
-
<input
|
|
7
|
-
:id="`${radioId}_${value}`"
|
|
8
|
-
:value="value"
|
|
9
|
-
:name="groupName"
|
|
10
|
-
:disabled="disabled"
|
|
11
|
-
v-model="bindValue"
|
|
12
|
-
type="radio"
|
|
13
|
-
class="ev-radio-input"
|
|
14
|
-
@change="onChange"
|
|
15
|
-
>
|
|
16
|
-
<label
|
|
17
|
-
:for="`${radioId}_${value}`"
|
|
18
|
-
:class="dataSize"
|
|
19
|
-
class="ev-radio-label"
|
|
20
|
-
>
|
|
21
|
-
<slot/>
|
|
22
|
-
</label>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
export default {
|
|
28
|
-
model: {
|
|
29
|
-
prop: 'customValue',
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
value: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: true,
|
|
35
|
-
},
|
|
36
|
-
customValue: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: '',
|
|
39
|
-
},
|
|
40
|
-
groupName: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: '',
|
|
43
|
-
},
|
|
44
|
-
disabled: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false,
|
|
47
|
-
},
|
|
48
|
-
size: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: '',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
bindValue: this.customValue,
|
|
56
|
-
radioId: this._uid,
|
|
57
|
-
dataSize: this.size,
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
computed: {
|
|
61
|
-
bindSize: {
|
|
62
|
-
get() {
|
|
63
|
-
return this.size;
|
|
64
|
-
},
|
|
65
|
-
set(size) {
|
|
66
|
-
this.dataSize = size;
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
watch: {
|
|
71
|
-
},
|
|
72
|
-
created() {
|
|
73
|
-
},
|
|
74
|
-
mounted() {
|
|
75
|
-
},
|
|
76
|
-
methods: {
|
|
77
|
-
onChange(e) {
|
|
78
|
-
if (this.$parent.$options.componentName === 'RadioGroup') {
|
|
79
|
-
// 부모 컴포넌트가 Radio Group인 경우
|
|
80
|
-
this.$parent.$emit('changeEvent', e);
|
|
81
|
-
this.$parent.$emit('input', e.target.value);
|
|
82
|
-
}
|
|
83
|
-
// else {
|
|
84
|
-
// // 부모 컴포넌트가 Radio Group로 안감싼경우
|
|
85
|
-
// this.$emit('input', e.target.value);
|
|
86
|
-
// }
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
</script>
|
|
91
|
-
|
|
92
|
-
<style scoped>
|
|
93
|
-
.ev-radio-wrap {
|
|
94
|
-
height: 19px;
|
|
95
|
-
float: left;
|
|
96
|
-
user-select: none;
|
|
97
|
-
}
|
|
98
|
-
.ev-radio-wrap.small{
|
|
99
|
-
height: 16px;
|
|
100
|
-
}
|
|
101
|
-
.ev-radio-wrap.disabled {
|
|
102
|
-
color: #C0C4CC;
|
|
103
|
-
}
|
|
104
|
-
.ev-radio-label {
|
|
105
|
-
position: relative;
|
|
106
|
-
display: inline-block;
|
|
107
|
-
padding-left: 25px;
|
|
108
|
-
line-height: 19px;
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
}
|
|
111
|
-
.ev-radio-label.small {
|
|
112
|
-
padding-left: 20px;
|
|
113
|
-
line-height: 16px;
|
|
114
|
-
}
|
|
115
|
-
.ev-radio-label:before {
|
|
116
|
-
position: absolute;
|
|
117
|
-
top: 50%;
|
|
118
|
-
left: 2px;
|
|
119
|
-
width: 16px;
|
|
120
|
-
height: 16px;
|
|
121
|
-
background: transparent;
|
|
122
|
-
border: 1px solid #B0B3B7;
|
|
123
|
-
border-radius: 100%;
|
|
124
|
-
text-align: center;
|
|
125
|
-
transform: translateY(-50%);
|
|
126
|
-
content: '';
|
|
127
|
-
}
|
|
128
|
-
.ev-radio-label.small:before {
|
|
129
|
-
width: 12px;
|
|
130
|
-
height: 12px;
|
|
131
|
-
}
|
|
132
|
-
.ev-radio-wrap.disabled .ev-radio-label {
|
|
133
|
-
cursor: not-allowed;
|
|
134
|
-
}
|
|
135
|
-
.ev-radio-wrap.disabled .ev-radio-label:before {
|
|
136
|
-
border: 1px solid #B01012;
|
|
137
|
-
}
|
|
138
|
-
.ev-radio-input {
|
|
139
|
-
position: absolute;
|
|
140
|
-
width: 1px;
|
|
141
|
-
height: 1px;
|
|
142
|
-
padding: 0;
|
|
143
|
-
border: 0;
|
|
144
|
-
vertical-align: middle;
|
|
145
|
-
overflow: hidden;
|
|
146
|
-
cursor: inherit;
|
|
147
|
-
clip: rect(0, 0, 0, 0);
|
|
148
|
-
}
|
|
149
|
-
.ev-radio-input:checked + .ev-radio-label:before {
|
|
150
|
-
border: 1px solid #41B7FD;
|
|
151
|
-
}
|
|
152
|
-
.ev-radio-wrap.disabled .ev-radio-input:checked + .ev-radio-label:before {
|
|
153
|
-
border: 1px solid #B01012;
|
|
154
|
-
}
|
|
155
|
-
.ev-radio-input:checked + .ev-radio-label:after {
|
|
156
|
-
position: absolute;
|
|
157
|
-
top: 50%;
|
|
158
|
-
left: 7px;
|
|
159
|
-
width: 8px;
|
|
160
|
-
height: 8px;
|
|
161
|
-
border-radius: 100%;
|
|
162
|
-
transform: translateY(-50%);
|
|
163
|
-
content: '';
|
|
164
|
-
}
|
|
165
|
-
.ev-radio-input:checked + .ev-radio-label.small:after {
|
|
166
|
-
left: 6px;
|
|
167
|
-
width: 6px;
|
|
168
|
-
height: 6px;
|
|
169
|
-
}
|
|
170
|
-
.ev-radio-input:checked + .ev-radio-label:after {
|
|
171
|
-
background: #41B7FD;
|
|
172
|
-
}
|
|
173
|
-
.ev-radio-wrap.disabled .ev-radio-input:checked + .ev-radio-label:after {
|
|
174
|
-
background: #B01012;
|
|
175
|
-
}
|
|
176
|
-
</style>
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="prefixCls">
|
|
3
|
-
<div
|
|
4
|
-
v-if="multiple"
|
|
5
|
-
:class="`${prefixCls}-multiple-input-area`"
|
|
6
|
-
>
|
|
7
|
-
<input
|
|
8
|
-
ref="filterInputField"
|
|
9
|
-
:disabled="disabled"
|
|
10
|
-
type="text"
|
|
11
|
-
class="input-text"
|
|
12
|
-
@keyup="onKeyUp"
|
|
13
|
-
>
|
|
14
|
-
</div>
|
|
15
|
-
<div :class="`${prefixCls}-listbox-wrap`">
|
|
16
|
-
<div
|
|
17
|
-
v-if="isGroup"
|
|
18
|
-
:class="`${prefixCls}-group-area`"
|
|
19
|
-
>
|
|
20
|
-
<div
|
|
21
|
-
v-for="item in items"
|
|
22
|
-
:key="item.groupName"
|
|
23
|
-
class="group-row"
|
|
24
|
-
>
|
|
25
|
-
<li class="title">
|
|
26
|
-
{{ item.groupName }}
|
|
27
|
-
</li>
|
|
28
|
-
<Listbox
|
|
29
|
-
:style="listBoxStyle"
|
|
30
|
-
:is-group="true"
|
|
31
|
-
:size="size"
|
|
32
|
-
:items="item.items"
|
|
33
|
-
:selected-items="selectedItems"
|
|
34
|
-
@select="onSelect"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div
|
|
39
|
-
v-else
|
|
40
|
-
:class="`${prefixCls}-single-area`"
|
|
41
|
-
>
|
|
42
|
-
<Listbox
|
|
43
|
-
:style="listBoxStyle"
|
|
44
|
-
:items="items"
|
|
45
|
-
:selected-items="selectedItems"
|
|
46
|
-
@select="onSelect"
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</template>
|
|
52
|
-
|
|
53
|
-
<script>
|
|
54
|
-
import Listbox from '@/components/selectbox/listbox';
|
|
55
|
-
|
|
56
|
-
const prefixCls = 'evui-dropdown';
|
|
57
|
-
|
|
58
|
-
export default {
|
|
59
|
-
components: {
|
|
60
|
-
Listbox,
|
|
61
|
-
},
|
|
62
|
-
props: {
|
|
63
|
-
listBoxStyle: {
|
|
64
|
-
type: Object,
|
|
65
|
-
default() {
|
|
66
|
-
return {};
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
disabled: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: false,
|
|
72
|
-
},
|
|
73
|
-
isGroup: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
size: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: 'medium',
|
|
80
|
-
validator(value) {
|
|
81
|
-
const list = ['small', 'medium', 'large'];
|
|
82
|
-
return list.indexOf(value) > -1;
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
multiple: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: false,
|
|
88
|
-
},
|
|
89
|
-
items: {
|
|
90
|
-
type: Array,
|
|
91
|
-
default() {
|
|
92
|
-
return [];
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
selectedItems: {
|
|
96
|
-
type: Array,
|
|
97
|
-
default() {
|
|
98
|
-
return [];
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
data() {
|
|
103
|
-
return {
|
|
104
|
-
prefixCls,
|
|
105
|
-
};
|
|
106
|
-
},
|
|
107
|
-
methods: {
|
|
108
|
-
onSelect(item, target, index) {
|
|
109
|
-
this.$emit('select', item, target, index);
|
|
110
|
-
},
|
|
111
|
-
onKeyUp(e) {
|
|
112
|
-
this.$emit('keyup', e);
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<style scoped>
|
|
119
|
-
/** evui-dropdown **/
|
|
120
|
-
/** evui-dropdown > multiple-input-area **/
|
|
121
|
-
/** evui-dropdown > multiple-input-area > input-text **/
|
|
122
|
-
|
|
123
|
-
.evui-dropdown{
|
|
124
|
-
position: absolute;
|
|
125
|
-
width: 100%;
|
|
126
|
-
height: 35px;
|
|
127
|
-
border: 1px solid #ccc;
|
|
128
|
-
background-color: #fff;
|
|
129
|
-
-webkit-border-radius: 4px;
|
|
130
|
-
-moz-border-radius: 4px;
|
|
131
|
-
border-radius: 4px;
|
|
132
|
-
z-index: 11;
|
|
133
|
-
}
|
|
134
|
-
.evui-dropdown-multiple-input-area{
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 100%;
|
|
137
|
-
padding: 3px;
|
|
138
|
-
}
|
|
139
|
-
.evui-dropdown-multiple-input-area .input-text{
|
|
140
|
-
width: 100%;
|
|
141
|
-
height: 100%;
|
|
142
|
-
border: 1px solid #ccc;
|
|
143
|
-
-webkit-border-radius: 4px;
|
|
144
|
-
-moz-border-radius: 4px;
|
|
145
|
-
border-radius: 4px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/** evui-dropdown > evui-dropdown-listbox-wrap **/
|
|
149
|
-
/** evui-dropdown > evui-dropdown-listbox-wrap > evui-dropdown-group-area **/
|
|
150
|
-
/** evui-dropdown > evui-dropdown-listbox-wrap > evui-dropdown-single-area **/
|
|
151
|
-
|
|
152
|
-
.evui-dropdown-listbox-wrap {
|
|
153
|
-
width: 100%;
|
|
154
|
-
}
|
|
155
|
-
.evui-dropdown-group-area {
|
|
156
|
-
list-style-type: none;
|
|
157
|
-
width: 100%;
|
|
158
|
-
max-height: 150px;
|
|
159
|
-
border: 1px solid #ccc;
|
|
160
|
-
-webkit-border-radius: 4px;
|
|
161
|
-
-moz-border-radius: 4px;
|
|
162
|
-
border-radius: 4px;
|
|
163
|
-
background: #FFFFFF;
|
|
164
|
-
-webkit-box-shadow: 0 6px 12px #ccc;
|
|
165
|
-
box-shadow: 0 6px 12px #ccc;
|
|
166
|
-
overflow: auto;
|
|
167
|
-
}
|
|
168
|
-
.evui-dropdown-group-area .title {
|
|
169
|
-
padding: 7px 10px;
|
|
170
|
-
color:#999;
|
|
171
|
-
}
|
|
172
|
-
.evui-dropdown-single-area {
|
|
173
|
-
position: absolute;
|
|
174
|
-
min-width: 100%;
|
|
175
|
-
max-height: 150px;
|
|
176
|
-
border: 1px solid #ccc;
|
|
177
|
-
-webkit-border-radius: 4px;
|
|
178
|
-
-moz-border-radius: 4px;
|
|
179
|
-
border-radius: 4px;
|
|
180
|
-
background: #FFFFFF;
|
|
181
|
-
-webkit-box-shadow: 0 6px 12px #ccc;
|
|
182
|
-
box-shadow: 0 6px 12px #ccc;
|
|
183
|
-
overflow: auto;
|
|
184
|
-
}
|
|
185
|
-
</style>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="prefixCls">
|
|
3
|
-
<ul
|
|
4
|
-
:class="ulClasses"
|
|
5
|
-
@click.stop="onClick"
|
|
6
|
-
>
|
|
7
|
-
<li
|
|
8
|
-
v-for="(item, index) in items"
|
|
9
|
-
:key="index"
|
|
10
|
-
:data-index="index"
|
|
11
|
-
:class="getLiClasses(item)"
|
|
12
|
-
>
|
|
13
|
-
{{ item.name }}
|
|
14
|
-
</li>
|
|
15
|
-
</ul>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
const prefixCls = 'evui-listbox';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
props: {
|
|
24
|
-
isGroup: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
size: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: 'medium',
|
|
31
|
-
validator(value) {
|
|
32
|
-
const list = ['small', 'medium', 'large'];
|
|
33
|
-
return list.indexOf(value) > -1;
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
items: {
|
|
37
|
-
type: Array,
|
|
38
|
-
default() {
|
|
39
|
-
return [];
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
selectedItems: {
|
|
43
|
-
type: Array,
|
|
44
|
-
default() {
|
|
45
|
-
return [];
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
prefixCls,
|
|
52
|
-
ulClasses: '',
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
created() {
|
|
56
|
-
this.ulClasses = this.isGroup ? `${prefixCls}-ul-group` : `${prefixCls}-ul`;
|
|
57
|
-
},
|
|
58
|
-
methods: {
|
|
59
|
-
onClick(event) {
|
|
60
|
-
const target = event.target;
|
|
61
|
-
const index = +(target.dataset.index);
|
|
62
|
-
const item = this.items[index];
|
|
63
|
-
|
|
64
|
-
switch (target.tagName) {
|
|
65
|
-
case 'LI':
|
|
66
|
-
this.$emit('before-select', item, target, index);
|
|
67
|
-
this.$emit('select', item, target, index);
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
getLiClasses(item) {
|
|
74
|
-
const foundItem = this.selectedItems.find(obj => obj.name === item.name);
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
[`${prefixCls}-li`]: true,
|
|
78
|
-
[`${prefixCls}-li-selected`]: !!foundItem,
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style scoped>
|
|
86
|
-
.evui-listbox{
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
}
|
|
90
|
-
.evui-listbox-ul{
|
|
91
|
-
list-style-type: none;
|
|
92
|
-
padding: 2px 0;
|
|
93
|
-
}
|
|
94
|
-
.evui-listbox-ul-group{
|
|
95
|
-
height: 100%;
|
|
96
|
-
}
|
|
97
|
-
.evui-listbox-li{
|
|
98
|
-
display: block;
|
|
99
|
-
list-style: none;
|
|
100
|
-
color: #495060;
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
transition: background .1s ease-in-out;
|
|
104
|
-
}
|
|
105
|
-
.evui-listbox-li:hover:not(.evui-listbox-li-selected){
|
|
106
|
-
background-color: #eeeeee;
|
|
107
|
-
}
|
|
108
|
-
.evui-listbox-li-selected {
|
|
109
|
-
color: #fff;
|
|
110
|
-
background-color: #337ab6;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.evui-selectbox-size-small .evui-listbox-li { padding: 7px; }
|
|
114
|
-
.evui-selectbox-size-medium .evui-listbox-li { padding: 7px; }
|
|
115
|
-
.evui-selectbox-size-large .evui-listbox-li { padding: 7px 10px; }
|
|
116
|
-
</style>
|