evui 3.3.36 → 3.3.39
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/LICENSE +21 -21
- package/README.md +40 -40
- package/dist/evui.common.js +1907 -1832
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +1907 -1832
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/dist/img/{EVUI.7f3588fb.svg → EVUI.b82ee81a.svg} +292 -292
- package/dist/img/{icon_mysql.7ea26d5d.svg → icon_mysql.1085fdc9.svg} +78 -78
- package/dist/img/{icon_oracle.9009b108.svg → icon_oracle.0572d3ee.svg} +13 -13
- package/dist/img/{icon_postgresql.f8fffba9.svg → icon_postgresql.ee12bde8.svg} +58 -58
- package/package.json +61 -61
- package/src/common/emitter.js +20 -20
- package/src/common/utils.debounce.js +223 -223
- package/src/common/utils.js +134 -134
- package/src/common/utils.table.js +78 -78
- package/src/common/utils.throttle.js +83 -83
- package/src/common/utils.tree.js +18 -18
- package/src/components/button/Button.vue +198 -198
- package/src/components/button/index.js +7 -7
- package/src/components/buttonGroup/ButtonGroup.vue +11 -11
- package/src/components/buttonGroup/index.js +7 -7
- package/src/components/calendar/Calendar.vue +661 -661
- package/src/components/calendar/index.js +7 -7
- package/src/components/calendar/uses.js +1272 -1272
- package/src/components/chart/Chart.vue +189 -192
- package/src/components/chart/chart.core.js +870 -870
- package/src/components/chart/element/element.bar.js +524 -524
- package/src/components/chart/element/element.bar.time.js +156 -156
- package/src/components/chart/element/element.heatmap.js +533 -533
- package/src/components/chart/element/element.line.js +339 -339
- package/src/components/chart/element/element.pie.js +197 -197
- package/src/components/chart/element/element.scatter.js +184 -184
- package/src/components/chart/element/element.tip.js +550 -542
- package/src/components/chart/helpers/helpers.canvas.js +265 -265
- package/src/components/chart/helpers/helpers.constant.js +206 -206
- package/src/components/chart/helpers/helpers.util.js +346 -338
- package/src/components/chart/index.js +9 -9
- package/src/components/chart/model/index.js +4 -4
- package/src/components/chart/model/model.series.js +93 -93
- package/src/components/chart/model/model.store.js +977 -967
- package/src/components/chart/plugins/plugins.interaction.js +769 -769
- package/src/components/chart/plugins/plugins.legend.gradient.js +602 -602
- package/src/components/chart/plugins/plugins.legend.js +1155 -1151
- package/src/components/chart/plugins/plugins.pie.js +254 -254
- package/src/components/chart/plugins/plugins.title.js +56 -56
- package/src/components/chart/plugins/plugins.tooltip.js +692 -692
- package/src/components/chart/scale/scale.js +848 -848
- package/src/components/chart/scale/scale.linear.js +38 -38
- package/src/components/chart/scale/scale.logarithmic.js +128 -128
- package/src/components/chart/scale/scale.step.js +336 -336
- package/src/components/chart/scale/scale.time.category.js +277 -277
- package/src/components/chart/scale/scale.time.js +48 -48
- package/src/components/chart/style/chart.scss +312 -312
- package/src/components/chart/uses.js +264 -252
- package/src/components/checkbox/Checkbox.vue +200 -200
- package/src/components/checkbox/index.js +7 -7
- package/src/components/checkboxGroup/CheckboxGroup.vue +44 -44
- package/src/components/checkboxGroup/index.js +7 -7
- package/src/components/contextMenu/ContextMenu.vue +80 -80
- package/src/components/contextMenu/MenuList.vue +149 -149
- package/src/components/contextMenu/index.js +7 -7
- package/src/components/contextMenu/uses.js +203 -203
- package/src/components/datePicker/DatePicker.vue +437 -437
- package/src/components/datePicker/index.js +7 -7
- package/src/components/datePicker/uses.js +419 -419
- package/src/components/grid/Grid.vue +827 -827
- package/src/components/grid/grid.filter.window.vue +493 -493
- package/src/components/grid/grid.pagination.vue +75 -75
- package/src/components/grid/grid.summary.vue +265 -265
- package/src/components/grid/grid.toolbar.vue +26 -26
- package/src/components/grid/index.js +11 -11
- package/src/components/grid/style/grid.scss +263 -263
- package/src/components/grid/uses.js +1002 -1007
- package/src/components/icon/Icon.vue +49 -49
- package/src/components/icon/index.js +8 -8
- package/src/components/inputNumber/InputNumber.vue +212 -212
- package/src/components/inputNumber/index.js +7 -7
- package/src/components/inputNumber/uses.js +217 -217
- package/src/components/loading/Loading.vue +125 -125
- package/src/components/loading/index.js +7 -7
- package/src/components/menu/Menu.vue +68 -68
- package/src/components/menu/MenuItem.vue +187 -187
- package/src/components/menu/index.js +7 -7
- package/src/components/message/Message.vue +223 -223
- package/src/components/message/index.js +31 -31
- package/src/components/messageBox/MessageBox.vue +358 -358
- package/src/components/messageBox/index.js +22 -22
- package/src/components/notification/Notification.vue +316 -316
- package/src/components/notification/index.js +49 -49
- package/src/components/pagination/Pagination.vue +271 -271
- package/src/components/pagination/index.js +7 -7
- package/src/components/pagination/pageButton.vue +30 -30
- package/src/components/progress/Progress.vue +139 -139
- package/src/components/progress/index.js +7 -7
- package/src/components/radio/Radio.vue +159 -159
- package/src/components/radio/index.js +7 -7
- package/src/components/radioGroup/RadioGroup.vue +41 -41
- package/src/components/radioGroup/index.js +7 -7
- package/src/components/scheduler/Scheduler.vue +149 -149
- package/src/components/scheduler/index.js +7 -7
- package/src/components/scheduler/uses.js +183 -183
- package/src/components/select/Select.vue +440 -440
- package/src/components/select/index.js +7 -7
- package/src/components/select/uses.js +270 -270
- package/src/components/slider/Slider.vue +505 -505
- package/src/components/slider/index.js +7 -7
- package/src/components/slider/uses.js +390 -390
- package/src/components/tabPanel/TabPanel.vue +74 -74
- package/src/components/tabPanel/index.js +7 -7
- package/src/components/tabs/Tabs.vue +517 -517
- package/src/components/tabs/index.js +7 -7
- package/src/components/textField/TextField.vue +375 -375
- package/src/components/textField/index.js +7 -7
- package/src/components/timePicker/TimePicker.vue +352 -352
- package/src/components/timePicker/index.js +7 -7
- package/src/components/toggle/Toggle.vue +115 -115
- package/src/components/toggle/index.js +7 -7
- package/src/components/tree/Tree.vue +313 -313
- package/src/components/tree/TreeNode.vue +293 -293
- package/src/components/tree/index.js +7 -7
- package/src/components/treeGrid/TreeGrid.vue +758 -758
- package/src/components/treeGrid/TreeGridNode.vue +275 -275
- package/src/components/treeGrid/index.js +9 -9
- package/src/components/treeGrid/style/treeGrid.scss +261 -261
- package/src/components/treeGrid/treeGrid.toolbar.vue +26 -26
- package/src/components/treeGrid/uses.js +867 -867
- package/src/components/window/Window.vue +329 -329
- package/src/components/window/index.js +7 -7
- package/src/components/window/uses.js +899 -899
- package/src/directives/clickoutside.js +90 -90
- package/src/main.js +116 -116
- package/src/style/components/input.scss +108 -108
- package/src/style/functions.scss +3 -3
- package/src/style/index.scss +6 -6
- package/src/style/lib/fonts/EVUI.svg +292 -292
- package/src/style/lib/icon.css +888 -888
- package/src/style/mixins.scss +94 -94
- package/src/style/themes.scss +67 -67
- package/src/style/variables.scss +22 -22
|
@@ -1,200 +1,200 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<label
|
|
3
|
-
class="ev-checkbox"
|
|
4
|
-
:class="[
|
|
5
|
-
{ disabled, },
|
|
6
|
-
{ checked, },
|
|
7
|
-
]"
|
|
8
|
-
>
|
|
9
|
-
<input
|
|
10
|
-
ref="checkbox"
|
|
11
|
-
v-model="mv"
|
|
12
|
-
type="checkbox"
|
|
13
|
-
class="ev-checkbox-input"
|
|
14
|
-
:disabled="disabled"
|
|
15
|
-
:value="label"
|
|
16
|
-
:readonly="readonly"
|
|
17
|
-
@change="changeMv"
|
|
18
|
-
/>
|
|
19
|
-
<span class="ev-checkbox-label">
|
|
20
|
-
<template v-if="$slots.default">
|
|
21
|
-
<slot />
|
|
22
|
-
</template>
|
|
23
|
-
<template v-else>
|
|
24
|
-
{{ label }}
|
|
25
|
-
</template>
|
|
26
|
-
</span>
|
|
27
|
-
</label>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import { ref, computed, watch, nextTick, inject } from 'vue';
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: 'EvCheckbox',
|
|
35
|
-
props: {
|
|
36
|
-
modelValue: {
|
|
37
|
-
type: [String, Number, Boolean, Symbol, Array],
|
|
38
|
-
default: false,
|
|
39
|
-
},
|
|
40
|
-
label: {
|
|
41
|
-
type: [String, Number, Boolean, Symbol],
|
|
42
|
-
default: null,
|
|
43
|
-
},
|
|
44
|
-
disabled: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false,
|
|
47
|
-
},
|
|
48
|
-
readonly: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false,
|
|
51
|
-
},
|
|
52
|
-
indeterminate: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
emits: {
|
|
58
|
-
'update:modelValue': null,
|
|
59
|
-
'update:indeterminate': [Boolean],
|
|
60
|
-
change: null,
|
|
61
|
-
},
|
|
62
|
-
setup(props, { emit }) {
|
|
63
|
-
/**
|
|
64
|
-
* checkbox Ref
|
|
65
|
-
*/
|
|
66
|
-
const checkbox = ref(null);
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* checkbox의 modelView 값
|
|
70
|
-
* checkbox group 컴포넌트를 사용하는 경우 Provide('EvCheckboxGroupMv')가 실행
|
|
71
|
-
* checkbox group 컴포넌트가 없는 경우 2nd argument 실행
|
|
72
|
-
* - checkbox html5 indeterminate attribute 여부에 따라 v-model:indeterminate값을 update
|
|
73
|
-
* - Vue3의 v-model:attr 방식은 Vue2의 :attr.sync와 동일 (사용방식이 변경)
|
|
74
|
-
*/
|
|
75
|
-
const mv = inject(
|
|
76
|
-
'EvCheckboxGroupMv',
|
|
77
|
-
computed({
|
|
78
|
-
get: () => props.modelValue,
|
|
79
|
-
set: (val) => {
|
|
80
|
-
if (val && !checkbox.value.indeterminate) {
|
|
81
|
-
emit('update:indeterminate', false);
|
|
82
|
-
}
|
|
83
|
-
emit('update:modelValue', val);
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* mv에 해당 값이 포함 또는 동일한지에 따라 check여부가 결정
|
|
90
|
-
* return {Boolean}
|
|
91
|
-
*/
|
|
92
|
-
const refLabel = computed(() => props.label);
|
|
93
|
-
const checked = computed(() => {
|
|
94
|
-
if (Array.isArray(mv.value)) {
|
|
95
|
-
return mv.value.includes(refLabel.value);
|
|
96
|
-
}
|
|
97
|
-
return mv.value;
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* 해당 컴포넌트를 '직접' 클릭하여 변경했을 때 실행되는 메소드
|
|
102
|
-
* checkbox group을 사용하는 경우 Provide('EvCheckboxGroupChange')가 실행
|
|
103
|
-
* checkbox group을 사용하지 않는 경우 2nd argument 실행
|
|
104
|
-
*/
|
|
105
|
-
const changeMv = inject(
|
|
106
|
-
'EvCheckboxGroupChange',
|
|
107
|
-
async (e) => {
|
|
108
|
-
await nextTick();
|
|
109
|
-
emit('change', mv.value, e);
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* props의 indeterminate 값을 감시하여
|
|
115
|
-
* checkbox element의 indeterminate attribute에 값 적용
|
|
116
|
-
*/
|
|
117
|
-
watch(
|
|
118
|
-
() => props.indeterminate,
|
|
119
|
-
(val) => { checkbox.value.indeterminate = val; },
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
return {
|
|
123
|
-
mv,
|
|
124
|
-
checkbox,
|
|
125
|
-
checked,
|
|
126
|
-
changeMv,
|
|
127
|
-
};
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<style lang="scss">
|
|
133
|
-
@import '../../style/index.scss';
|
|
134
|
-
|
|
135
|
-
.ev-checkbox {
|
|
136
|
-
margin-right: 30px;
|
|
137
|
-
cursor: pointer;
|
|
138
|
-
user-select: none;
|
|
139
|
-
&-label {
|
|
140
|
-
padding-left: 5px;
|
|
141
|
-
}
|
|
142
|
-
&-input {
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@include state('disabled') {
|
|
148
|
-
.ev-checkbox-label {
|
|
149
|
-
@include evThemify() {
|
|
150
|
-
color: evThemed('disabled');
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
.ev-checkbox-input,
|
|
154
|
-
.ev-checkbox-label {
|
|
155
|
-
cursor: not-allowed !important;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
@include state('type-button') {
|
|
159
|
-
.ev-checkbox {
|
|
160
|
-
display: inline-block;
|
|
161
|
-
padding: 0;
|
|
162
|
-
margin: 0;
|
|
163
|
-
text-align: center;
|
|
164
|
-
|
|
165
|
-
@include evThemify() {
|
|
166
|
-
border: 1px solid evThemed('border-base');
|
|
167
|
-
border-left: 0;
|
|
168
|
-
}
|
|
169
|
-
&:first-child {
|
|
170
|
-
border-radius: $default-radius 0 0 $default-radius;
|
|
171
|
-
|
|
172
|
-
@include evThemify() {
|
|
173
|
-
border-left: 1px solid evThemed('border-base');
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
&:last-child {
|
|
177
|
-
border-radius: 0 $default-radius $default-radius 0;
|
|
178
|
-
}
|
|
179
|
-
&.checked {
|
|
180
|
-
color: $color-white;
|
|
181
|
-
|
|
182
|
-
@include evThemify() {
|
|
183
|
-
background-color: evThemed('primary');
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
&.disabled.checked {
|
|
187
|
-
@include evThemify() {
|
|
188
|
-
background-color: rgba(evThemed('border-base'), 0.5);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
.ev-checkbox-input {
|
|
193
|
-
@include visible-hide();
|
|
194
|
-
}
|
|
195
|
-
.ev-checkbox-label {
|
|
196
|
-
display: inline-block;
|
|
197
|
-
padding: 7px 12px;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
class="ev-checkbox"
|
|
4
|
+
:class="[
|
|
5
|
+
{ disabled, },
|
|
6
|
+
{ checked, },
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<input
|
|
10
|
+
ref="checkbox"
|
|
11
|
+
v-model="mv"
|
|
12
|
+
type="checkbox"
|
|
13
|
+
class="ev-checkbox-input"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
:value="label"
|
|
16
|
+
:readonly="readonly"
|
|
17
|
+
@change="changeMv"
|
|
18
|
+
/>
|
|
19
|
+
<span class="ev-checkbox-label">
|
|
20
|
+
<template v-if="$slots.default">
|
|
21
|
+
<slot />
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else>
|
|
24
|
+
{{ label }}
|
|
25
|
+
</template>
|
|
26
|
+
</span>
|
|
27
|
+
</label>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { ref, computed, watch, nextTick, inject } from 'vue';
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'EvCheckbox',
|
|
35
|
+
props: {
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: [String, Number, Boolean, Symbol, Array],
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
label: {
|
|
41
|
+
type: [String, Number, Boolean, Symbol],
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
readonly: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
indeterminate: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
emits: {
|
|
58
|
+
'update:modelValue': null,
|
|
59
|
+
'update:indeterminate': [Boolean],
|
|
60
|
+
change: null,
|
|
61
|
+
},
|
|
62
|
+
setup(props, { emit }) {
|
|
63
|
+
/**
|
|
64
|
+
* checkbox Ref
|
|
65
|
+
*/
|
|
66
|
+
const checkbox = ref(null);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* checkbox의 modelView 값
|
|
70
|
+
* checkbox group 컴포넌트를 사용하는 경우 Provide('EvCheckboxGroupMv')가 실행
|
|
71
|
+
* checkbox group 컴포넌트가 없는 경우 2nd argument 실행
|
|
72
|
+
* - checkbox html5 indeterminate attribute 여부에 따라 v-model:indeterminate값을 update
|
|
73
|
+
* - Vue3의 v-model:attr 방식은 Vue2의 :attr.sync와 동일 (사용방식이 변경)
|
|
74
|
+
*/
|
|
75
|
+
const mv = inject(
|
|
76
|
+
'EvCheckboxGroupMv',
|
|
77
|
+
computed({
|
|
78
|
+
get: () => props.modelValue,
|
|
79
|
+
set: (val) => {
|
|
80
|
+
if (val && !checkbox.value.indeterminate) {
|
|
81
|
+
emit('update:indeterminate', false);
|
|
82
|
+
}
|
|
83
|
+
emit('update:modelValue', val);
|
|
84
|
+
},
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* mv에 해당 값이 포함 또는 동일한지에 따라 check여부가 결정
|
|
90
|
+
* return {Boolean}
|
|
91
|
+
*/
|
|
92
|
+
const refLabel = computed(() => props.label);
|
|
93
|
+
const checked = computed(() => {
|
|
94
|
+
if (Array.isArray(mv.value)) {
|
|
95
|
+
return mv.value.includes(refLabel.value);
|
|
96
|
+
}
|
|
97
|
+
return mv.value;
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 해당 컴포넌트를 '직접' 클릭하여 변경했을 때 실행되는 메소드
|
|
102
|
+
* checkbox group을 사용하는 경우 Provide('EvCheckboxGroupChange')가 실행
|
|
103
|
+
* checkbox group을 사용하지 않는 경우 2nd argument 실행
|
|
104
|
+
*/
|
|
105
|
+
const changeMv = inject(
|
|
106
|
+
'EvCheckboxGroupChange',
|
|
107
|
+
async (e) => {
|
|
108
|
+
await nextTick();
|
|
109
|
+
emit('change', mv.value, e);
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* props의 indeterminate 값을 감시하여
|
|
115
|
+
* checkbox element의 indeterminate attribute에 값 적용
|
|
116
|
+
*/
|
|
117
|
+
watch(
|
|
118
|
+
() => props.indeterminate,
|
|
119
|
+
(val) => { checkbox.value.indeterminate = val; },
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
mv,
|
|
124
|
+
checkbox,
|
|
125
|
+
checked,
|
|
126
|
+
changeMv,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<style lang="scss">
|
|
133
|
+
@import '../../style/index.scss';
|
|
134
|
+
|
|
135
|
+
.ev-checkbox {
|
|
136
|
+
margin-right: 30px;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
user-select: none;
|
|
139
|
+
&-label {
|
|
140
|
+
padding-left: 5px;
|
|
141
|
+
}
|
|
142
|
+
&-input {
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@include state('disabled') {
|
|
148
|
+
.ev-checkbox-label {
|
|
149
|
+
@include evThemify() {
|
|
150
|
+
color: evThemed('disabled');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
.ev-checkbox-input,
|
|
154
|
+
.ev-checkbox-label {
|
|
155
|
+
cursor: not-allowed !important;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
@include state('type-button') {
|
|
159
|
+
.ev-checkbox {
|
|
160
|
+
display: inline-block;
|
|
161
|
+
padding: 0;
|
|
162
|
+
margin: 0;
|
|
163
|
+
text-align: center;
|
|
164
|
+
|
|
165
|
+
@include evThemify() {
|
|
166
|
+
border: 1px solid evThemed('border-base');
|
|
167
|
+
border-left: 0;
|
|
168
|
+
}
|
|
169
|
+
&:first-child {
|
|
170
|
+
border-radius: $default-radius 0 0 $default-radius;
|
|
171
|
+
|
|
172
|
+
@include evThemify() {
|
|
173
|
+
border-left: 1px solid evThemed('border-base');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
&:last-child {
|
|
177
|
+
border-radius: 0 $default-radius $default-radius 0;
|
|
178
|
+
}
|
|
179
|
+
&.checked {
|
|
180
|
+
color: $color-white;
|
|
181
|
+
|
|
182
|
+
@include evThemify() {
|
|
183
|
+
background-color: evThemed('primary');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
&.disabled.checked {
|
|
187
|
+
@include evThemify() {
|
|
188
|
+
background-color: rgba(evThemed('border-base'), 0.5);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
.ev-checkbox-input {
|
|
193
|
+
@include visible-hide();
|
|
194
|
+
}
|
|
195
|
+
.ev-checkbox-label {
|
|
196
|
+
display: inline-block;
|
|
197
|
+
padding: 7px 12px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import EvCheckbox from './Checkbox';
|
|
2
|
-
|
|
3
|
-
EvCheckbox.install = (app) => {
|
|
4
|
-
app.component(EvCheckbox.name, EvCheckbox);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export default EvCheckbox;
|
|
1
|
+
import EvCheckbox from './Checkbox';
|
|
2
|
+
|
|
3
|
+
EvCheckbox.install = (app) => {
|
|
4
|
+
app.component(EvCheckbox.name, EvCheckbox);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export default EvCheckbox;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="ev-checkbox-group"
|
|
4
|
-
:class="{ 'type-button': type === 'button' }"
|
|
5
|
-
role="group"
|
|
6
|
-
>
|
|
7
|
-
<slot />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import { computed, nextTick, provide } from 'vue';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
name: 'EvCheckboxGroup',
|
|
16
|
-
props: {
|
|
17
|
-
modelValue: {
|
|
18
|
-
type: Array,
|
|
19
|
-
default: () => [],
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'checkbox',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
emits: {
|
|
27
|
-
'update:modelValue': null,
|
|
28
|
-
change: null,
|
|
29
|
-
},
|
|
30
|
-
setup(props, { emit }) {
|
|
31
|
-
const mv = computed({
|
|
32
|
-
get: () => props.modelValue,
|
|
33
|
-
set: labels => emit('update:modelValue', labels),
|
|
34
|
-
});
|
|
35
|
-
provide('EvCheckboxGroupMv', mv);
|
|
36
|
-
|
|
37
|
-
const change = async (e) => {
|
|
38
|
-
await nextTick();
|
|
39
|
-
emit('change', mv.value, e);
|
|
40
|
-
};
|
|
41
|
-
provide('EvCheckboxGroupChange', change);
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="ev-checkbox-group"
|
|
4
|
+
:class="{ 'type-button': type === 'button' }"
|
|
5
|
+
role="group"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { computed, nextTick, provide } from 'vue';
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: 'EvCheckboxGroup',
|
|
16
|
+
props: {
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'checkbox',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
emits: {
|
|
27
|
+
'update:modelValue': null,
|
|
28
|
+
change: null,
|
|
29
|
+
},
|
|
30
|
+
setup(props, { emit }) {
|
|
31
|
+
const mv = computed({
|
|
32
|
+
get: () => props.modelValue,
|
|
33
|
+
set: labels => emit('update:modelValue', labels),
|
|
34
|
+
});
|
|
35
|
+
provide('EvCheckboxGroupMv', mv);
|
|
36
|
+
|
|
37
|
+
const change = async (e) => {
|
|
38
|
+
await nextTick();
|
|
39
|
+
emit('change', mv.value, e);
|
|
40
|
+
};
|
|
41
|
+
provide('EvCheckboxGroupChange', change);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import EvCheckboxGroup from './CheckboxGroup';
|
|
2
|
-
|
|
3
|
-
EvCheckboxGroup.install = (app) => {
|
|
4
|
-
app.component(EvCheckboxGroup.name, EvCheckboxGroup);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export default EvCheckboxGroup;
|
|
1
|
+
import EvCheckboxGroup from './CheckboxGroup';
|
|
2
|
+
|
|
3
|
+
EvCheckboxGroup.install = (app) => {
|
|
4
|
+
app.component(EvCheckboxGroup.name, EvCheckboxGroup);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export default EvCheckboxGroup;
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<template v-if="isShow && items.length">
|
|
3
|
-
<teleport to="#ev-context-menu-modal">
|
|
4
|
-
<menu-list
|
|
5
|
-
ref="rootMenuList"
|
|
6
|
-
v-model:isShow="isShow"
|
|
7
|
-
v-clickoutside="hide"
|
|
8
|
-
:class="customClass"
|
|
9
|
-
:items="items"
|
|
10
|
-
:style="menuStyle"
|
|
11
|
-
:comp="comp"
|
|
12
|
-
/>
|
|
13
|
-
</teleport>
|
|
14
|
-
</template>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import { onBeforeMount } from 'vue';
|
|
19
|
-
import { clickoutside } from '@/directives/clickoutside';
|
|
20
|
-
import MenuList from './MenuList';
|
|
21
|
-
import { useModel, usePosition } from './uses';
|
|
22
|
-
|
|
23
|
-
export default {
|
|
24
|
-
name: 'EvContextMenu',
|
|
25
|
-
directives: {
|
|
26
|
-
clickoutside,
|
|
27
|
-
},
|
|
28
|
-
components: {
|
|
29
|
-
MenuList,
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
items: {
|
|
33
|
-
type: Array,
|
|
34
|
-
default: () => [],
|
|
35
|
-
validator: (list) => {
|
|
36
|
-
if (list.some(v => v.children !== undefined && !Array.isArray(v.children))) {
|
|
37
|
-
console.warn('[EVUI][ContextMenu] children attribute must be \'Array\' type.');
|
|
38
|
-
return false;
|
|
39
|
-
} else if (list.some(v => v.click !== undefined && typeof v.click !== 'function')) {
|
|
40
|
-
console.warn('[EVUI][ContextMenu] click attribute must be \'Function\' type.');
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return true;
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
customClass: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: '',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
setup() {
|
|
52
|
-
const {
|
|
53
|
-
comp,
|
|
54
|
-
initWrapperDiv,
|
|
55
|
-
} = useModel();
|
|
56
|
-
|
|
57
|
-
const {
|
|
58
|
-
isShow,
|
|
59
|
-
rootMenuList,
|
|
60
|
-
menuStyle,
|
|
61
|
-
show,
|
|
62
|
-
hide,
|
|
63
|
-
} = usePosition();
|
|
64
|
-
|
|
65
|
-
onBeforeMount(() => initWrapperDiv());
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
isShow,
|
|
69
|
-
rootMenuList,
|
|
70
|
-
menuStyle,
|
|
71
|
-
comp,
|
|
72
|
-
show,
|
|
73
|
-
hide,
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
<style lang="scss">
|
|
80
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="isShow && items.length">
|
|
3
|
+
<teleport to="#ev-context-menu-modal">
|
|
4
|
+
<menu-list
|
|
5
|
+
ref="rootMenuList"
|
|
6
|
+
v-model:isShow="isShow"
|
|
7
|
+
v-clickoutside="hide"
|
|
8
|
+
:class="customClass"
|
|
9
|
+
:items="items"
|
|
10
|
+
:style="menuStyle"
|
|
11
|
+
:comp="comp"
|
|
12
|
+
/>
|
|
13
|
+
</teleport>
|
|
14
|
+
</template>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { onBeforeMount } from 'vue';
|
|
19
|
+
import { clickoutside } from '@/directives/clickoutside';
|
|
20
|
+
import MenuList from './MenuList';
|
|
21
|
+
import { useModel, usePosition } from './uses';
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: 'EvContextMenu',
|
|
25
|
+
directives: {
|
|
26
|
+
clickoutside,
|
|
27
|
+
},
|
|
28
|
+
components: {
|
|
29
|
+
MenuList,
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
items: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => [],
|
|
35
|
+
validator: (list) => {
|
|
36
|
+
if (list.some(v => v.children !== undefined && !Array.isArray(v.children))) {
|
|
37
|
+
console.warn('[EVUI][ContextMenu] children attribute must be \'Array\' type.');
|
|
38
|
+
return false;
|
|
39
|
+
} else if (list.some(v => v.click !== undefined && typeof v.click !== 'function')) {
|
|
40
|
+
console.warn('[EVUI][ContextMenu] click attribute must be \'Function\' type.');
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
customClass: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: '',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
setup() {
|
|
52
|
+
const {
|
|
53
|
+
comp,
|
|
54
|
+
initWrapperDiv,
|
|
55
|
+
} = useModel();
|
|
56
|
+
|
|
57
|
+
const {
|
|
58
|
+
isShow,
|
|
59
|
+
rootMenuList,
|
|
60
|
+
menuStyle,
|
|
61
|
+
show,
|
|
62
|
+
hide,
|
|
63
|
+
} = usePosition();
|
|
64
|
+
|
|
65
|
+
onBeforeMount(() => initWrapperDiv());
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
isShow,
|
|
69
|
+
rootMenuList,
|
|
70
|
+
menuStyle,
|
|
71
|
+
comp,
|
|
72
|
+
show,
|
|
73
|
+
hide,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
</style>
|