evui 3.3.4 → 3.3.7
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/evui.common.js +853 -759
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +853 -759
- 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/package.json +1 -1
- package/src/components/chart/chart.core.js +3 -2
- package/src/components/chart/element/element.bar.js +1 -1
- package/src/components/chart/element/element.pie.js +56 -42
- package/src/components/chart/element/element.tip.js +37 -22
- package/src/components/chart/model/model.store.js +19 -22
- package/src/components/chart/plugins/plugins.interaction.js +12 -9
- package/src/components/chart/plugins/plugins.pie.js +21 -20
- package/src/components/chart/plugins/plugins.tooltip.js +23 -9
- package/src/components/chart/uses.js +1 -0
- package/src/components/datePicker/DatePicker.vue +108 -97
- package/src/components/datePicker/uses.js +3 -1
- package/src/components/grid/Grid.vue +8 -14
- package/src/components/grid/uses.js +1 -0
- package/src/components/inputNumber/InputNumber.vue +27 -22
- package/src/components/message/Message.vue +3 -2
- package/src/components/messageBox/MessageBox.vue +4 -1
- package/src/components/notification/Notification.vue +3 -2
- package/src/components/select/Select.vue +89 -86
- package/src/components/select/uses.js +4 -2
- package/src/components/treeGrid/TreeGrid.vue +33 -25
- package/src/components/treeGrid/TreeGridNode.vue +1 -0
- package/src/components/treeGrid/uses.js +60 -51
|
@@ -7,114 +7,121 @@
|
|
|
7
7
|
disabled : $props.disabled,
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
v-model.trim="currentValue"
|
|
16
|
-
type="text"
|
|
17
|
-
class="ev-input"
|
|
18
|
-
:placeholder="$props.placeholder"
|
|
19
|
-
:disabled="$props.disabled"
|
|
20
|
-
@click="clickSelectInput"
|
|
21
|
-
@keydown.enter.prevent="validateValue(currentValue)"
|
|
22
|
-
@change="validateValue(currentValue)"
|
|
23
|
-
/>
|
|
24
|
-
</template>
|
|
25
|
-
<template v-else>
|
|
26
|
-
<div
|
|
27
|
-
class="ev-date-picker-tag-wrapper"
|
|
28
|
-
@click="clickSelectInput"
|
|
29
|
-
>
|
|
10
|
+
<div
|
|
11
|
+
ref="datePickerWrapper"
|
|
12
|
+
class="ev-date-picker__wrapper"
|
|
13
|
+
>
|
|
14
|
+
<template v-if="$props.mode === 'date' || $props.mode === 'dateTime'">
|
|
30
15
|
<span class="ev-date-picker-prefix-icon">
|
|
31
16
|
<i class="ev-icon-calendar" />
|
|
32
17
|
</span>
|
|
33
18
|
<input
|
|
19
|
+
v-model.trim="currentValue"
|
|
34
20
|
type="text"
|
|
35
|
-
class="ev-input
|
|
36
|
-
readonly
|
|
21
|
+
class="ev-input"
|
|
37
22
|
:placeholder="$props.placeholder"
|
|
38
23
|
:disabled="$props.disabled"
|
|
24
|
+
@click="clickSelectInput"
|
|
25
|
+
@keydown.enter.prevent="validateValue(currentValue)"
|
|
26
|
+
@change="validateValue(currentValue)"
|
|
39
27
|
/>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
</template>
|
|
29
|
+
<template v-else>
|
|
30
|
+
<div
|
|
31
|
+
class="ev-date-picker-tag-wrapper"
|
|
32
|
+
@click="clickSelectInput"
|
|
43
33
|
>
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
:key="`${item}_${idx}`"
|
|
47
|
-
class="ev-select-tag"
|
|
48
|
-
:class="{ num: $props.options.multiType !== 'date' }"
|
|
49
|
-
>
|
|
50
|
-
<span class="ev-tag-name"> {{ item }} </span>
|
|
51
|
-
<span
|
|
52
|
-
v-if="$props.options.multiType === 'date'"
|
|
53
|
-
class="ev-tag-suffix"
|
|
54
|
-
@click.stop="[removeMv(item), changeDropboxPosition()]"
|
|
55
|
-
>
|
|
56
|
-
<i class="ev-tag-suffix-close ev-icon-error" />
|
|
34
|
+
<span class="ev-date-picker-prefix-icon">
|
|
35
|
+
<i class="ev-icon-calendar" />
|
|
57
36
|
</span>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<span
|
|
75
|
-
v-show="isClearableIcon"
|
|
76
|
-
class="ev-input-suffix"
|
|
77
|
-
@click.stop="[removeAllMv(), clickOutsideDropbox()]"
|
|
78
|
-
>
|
|
79
|
-
<i class="ev-icon-error" />
|
|
80
|
-
</span>
|
|
81
|
-
</template>
|
|
82
|
-
<div class="ev-date-picker-dropbox-wrapper">
|
|
83
|
-
<div
|
|
84
|
-
v-if="isDropbox"
|
|
85
|
-
ref="dropbox"
|
|
86
|
-
class="ev-date-picker-dropdown"
|
|
87
|
-
:class="$props.mode"
|
|
88
|
-
:style="dropboxPosition"
|
|
89
|
-
>
|
|
90
|
-
<div
|
|
91
|
-
v-if="usedShortcuts.length"
|
|
92
|
-
class="ev-date-picker-dropbox__button-layout">
|
|
93
|
-
<ev-button-group>
|
|
94
|
-
<ev-button
|
|
95
|
-
v-for="button in usedShortcuts"
|
|
96
|
-
:key="button.key"
|
|
97
|
-
:type="button.isActive ? 'primary' : 'default'"
|
|
98
|
-
@click="clickShortcut(button.key)"
|
|
37
|
+
<input
|
|
38
|
+
type="text"
|
|
39
|
+
class="ev-input readonly"
|
|
40
|
+
readonly
|
|
41
|
+
:placeholder="$props.placeholder"
|
|
42
|
+
:disabled="$props.disabled"
|
|
43
|
+
/>
|
|
44
|
+
<template
|
|
45
|
+
v-if="$props.mode === 'dateMulti'
|
|
46
|
+
&& ($props.options.multiType === 'date' || !$props.options.tagShorten)"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
v-for="(item, idx) in mv"
|
|
50
|
+
:key="`${item}_${idx}`"
|
|
51
|
+
class="ev-select-tag"
|
|
52
|
+
:class="{ num: $props.options.multiType !== 'date' }"
|
|
99
53
|
>
|
|
100
|
-
{{
|
|
101
|
-
|
|
102
|
-
|
|
54
|
+
<span class="ev-tag-name"> {{ item }} </span>
|
|
55
|
+
<span
|
|
56
|
+
v-if="$props.options.multiType === 'date'"
|
|
57
|
+
class="ev-tag-suffix"
|
|
58
|
+
@click.stop="[removeMv(item), changeDropboxPosition()]"
|
|
59
|
+
>
|
|
60
|
+
<i class="ev-tag-suffix-close ev-icon-error" />
|
|
61
|
+
</span>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
<template v-else-if="mv[0] && mv[mv.length - 1]">
|
|
65
|
+
<div class="ev-select-tag num">
|
|
66
|
+
<span class="ev-tag-name"> {{ mv[0] }} </span>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="ev-select-tag num">
|
|
69
|
+
<span class="ev-tag-name"> ~ </span>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="ev-select-tag num">
|
|
72
|
+
<span class="ev-tag-name"> {{ mv[mv.length - 1] }} </span>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
103
75
|
</div>
|
|
76
|
+
</template>
|
|
77
|
+
<template v-if="$props.clearable">
|
|
78
|
+
<span
|
|
79
|
+
v-show="isClearableIcon"
|
|
80
|
+
class="ev-input-suffix"
|
|
81
|
+
@click.stop="[removeAllMv(), clickOutsideDropbox()]"
|
|
82
|
+
>
|
|
83
|
+
<i class="ev-icon-error" />
|
|
84
|
+
</span>
|
|
85
|
+
</template>
|
|
86
|
+
<div class="ev-date-picker-dropbox-wrapper">
|
|
104
87
|
<div
|
|
88
|
+
v-if="isDropbox"
|
|
89
|
+
ref="dropbox"
|
|
90
|
+
class="ev-date-picker-dropdown"
|
|
91
|
+
:class="$props.mode"
|
|
92
|
+
:style="dropboxPosition"
|
|
93
|
+
>
|
|
94
|
+
<div
|
|
95
|
+
v-if="usedShortcuts.length"
|
|
96
|
+
class="ev-date-picker-dropbox__button-layout"
|
|
97
|
+
>
|
|
98
|
+
<ev-button-group>
|
|
99
|
+
<ev-button
|
|
100
|
+
v-for="button in usedShortcuts"
|
|
101
|
+
:key="button.key"
|
|
102
|
+
:type="button.isActive ? 'primary' : 'default'"
|
|
103
|
+
@click="clickShortcut(button.key)"
|
|
104
|
+
>
|
|
105
|
+
{{ button.label }}
|
|
106
|
+
</ev-button>
|
|
107
|
+
</ev-button-group>
|
|
108
|
+
</div>
|
|
109
|
+
<div
|
|
105
110
|
v-if="usedShortcuts.length"
|
|
106
111
|
class="ev-date-picker-dropbox__divider"
|
|
107
|
-
/>
|
|
108
|
-
<div
|
|
109
|
-
:class="{ 'ev-date-picker-dropbox__calendar':usedShortcuts.length }">
|
|
110
|
-
<ev-calendar
|
|
111
|
-
key="fromCalendar"
|
|
112
|
-
v-model="mv"
|
|
113
|
-
:mode="$props.mode"
|
|
114
|
-
:month-notation="$props.monthNotation"
|
|
115
|
-
:day-of-the-week-notation="$props.dayOfTheWeekNotation"
|
|
116
|
-
:options="$props.options"
|
|
117
112
|
/>
|
|
113
|
+
<div
|
|
114
|
+
:class="{ 'ev-date-picker-dropbox__calendar':usedShortcuts.length }"
|
|
115
|
+
>
|
|
116
|
+
<ev-calendar
|
|
117
|
+
key="fromCalendar"
|
|
118
|
+
v-model="mv"
|
|
119
|
+
:mode="$props.mode"
|
|
120
|
+
:month-notation="$props.monthNotation"
|
|
121
|
+
:day-of-the-week-notation="$props.dayOfTheWeekNotation"
|
|
122
|
+
:options="$props.options"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
118
125
|
</div>
|
|
119
126
|
</div>
|
|
120
127
|
</div>
|
|
@@ -230,6 +237,7 @@ export default {
|
|
|
230
237
|
const {
|
|
231
238
|
isDropbox,
|
|
232
239
|
datePicker,
|
|
240
|
+
datePickerWrapper,
|
|
233
241
|
dropbox,
|
|
234
242
|
itemWrapper,
|
|
235
243
|
dropboxPosition,
|
|
@@ -261,6 +269,7 @@ export default {
|
|
|
261
269
|
|
|
262
270
|
isDropbox,
|
|
263
271
|
datePicker,
|
|
272
|
+
datePickerWrapper,
|
|
264
273
|
dropbox,
|
|
265
274
|
itemWrapper,
|
|
266
275
|
dropboxPosition,
|
|
@@ -279,13 +288,18 @@ export default {
|
|
|
279
288
|
@import '../../style/index.scss';
|
|
280
289
|
|
|
281
290
|
.ev-date-picker {
|
|
282
|
-
$select-height:
|
|
291
|
+
$select-height: $input-default-height;
|
|
283
292
|
display: block;
|
|
284
293
|
position: relative;
|
|
285
294
|
width: 100%;
|
|
286
|
-
min-height: $select-height;
|
|
287
295
|
|
|
288
296
|
@import '../../style/components/input.scss';
|
|
297
|
+
|
|
298
|
+
&__wrapper {
|
|
299
|
+
position: relative;
|
|
300
|
+
min-height: $select-height;
|
|
301
|
+
}
|
|
302
|
+
|
|
289
303
|
.ev-input {
|
|
290
304
|
$calendar-icon-width: 30px;
|
|
291
305
|
position: absolute;
|
|
@@ -312,15 +326,12 @@ export default {
|
|
|
312
326
|
height: 100%;
|
|
313
327
|
align-items: center;
|
|
314
328
|
cursor: pointer;
|
|
315
|
-
|
|
316
|
-
|
|
317
329
|
&:hover {
|
|
318
330
|
color: #409EFF;
|
|
319
331
|
}
|
|
320
332
|
}
|
|
321
333
|
|
|
322
334
|
.ev-date-picker-tag-wrapper {
|
|
323
|
-
$select-height: 35px;
|
|
324
335
|
display: flex;
|
|
325
336
|
width: 100%;
|
|
326
337
|
height: 100%;
|
|
@@ -125,6 +125,7 @@ export const useDropdown = () => {
|
|
|
125
125
|
|
|
126
126
|
const isDropbox = ref(false);
|
|
127
127
|
const datePicker = ref(null);
|
|
128
|
+
const datePickerWrapper = ref(null);
|
|
128
129
|
const dropbox = ref(null);
|
|
129
130
|
const itemWrapper = ref(null);
|
|
130
131
|
const dropboxPosition = reactive({
|
|
@@ -138,7 +139,7 @@ export const useDropdown = () => {
|
|
|
138
139
|
*/
|
|
139
140
|
const changeDropboxPosition = async () => {
|
|
140
141
|
await nextTick();
|
|
141
|
-
const datePickerRect =
|
|
142
|
+
const datePickerRect = datePickerWrapper.value?.getBoundingClientRect();
|
|
142
143
|
const dropboxRect = dropbox.value?.getBoundingClientRect();
|
|
143
144
|
const datePickerHeight = datePickerRect.height;
|
|
144
145
|
const datePickerY = datePickerRect.y;
|
|
@@ -195,6 +196,7 @@ export const useDropdown = () => {
|
|
|
195
196
|
return {
|
|
196
197
|
isDropbox,
|
|
197
198
|
datePicker,
|
|
199
|
+
datePickerWrapper,
|
|
198
200
|
dropbox,
|
|
199
201
|
itemWrapper,
|
|
200
202
|
dropboxPosition,
|
|
@@ -341,19 +341,14 @@ export default {
|
|
|
341
341
|
items: [],
|
|
342
342
|
},
|
|
343
343
|
isSearch: false,
|
|
344
|
-
|
|
344
|
+
searchWord: '',
|
|
345
345
|
});
|
|
346
346
|
const stores = reactive({
|
|
347
347
|
viewStore: [],
|
|
348
348
|
originStore: [],
|
|
349
349
|
filterStore: [],
|
|
350
350
|
store: computed(() => {
|
|
351
|
-
|
|
352
|
-
if (filterInfo.isFiltering) {
|
|
353
|
-
store = stores.filterStore;
|
|
354
|
-
} else {
|
|
355
|
-
store = stores.originStore;
|
|
356
|
-
}
|
|
351
|
+
const store = filterInfo.isFiltering ? stores.filterStore : stores.originStore;
|
|
357
352
|
return filterInfo.isSearch ? stores.searchStore : store;
|
|
358
353
|
}),
|
|
359
354
|
orderedColumns: computed(() =>
|
|
@@ -512,9 +507,9 @@ export default {
|
|
|
512
507
|
(value) => {
|
|
513
508
|
setStore(value);
|
|
514
509
|
if (filterInfo.isSearch) {
|
|
515
|
-
onSearch(filterInfo.
|
|
510
|
+
onSearch(filterInfo.searchWord);
|
|
516
511
|
}
|
|
517
|
-
},
|
|
512
|
+
}, { deep: true },
|
|
518
513
|
);
|
|
519
514
|
watch(
|
|
520
515
|
() => props.checked,
|
|
@@ -582,13 +577,12 @@ export default {
|
|
|
582
577
|
},
|
|
583
578
|
);
|
|
584
579
|
watch(
|
|
585
|
-
() =>
|
|
580
|
+
() => props.option.searchValue,
|
|
586
581
|
(value) => {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
onSearch(searchValue);
|
|
582
|
+
if (value !== undefined) {
|
|
583
|
+
onSearch(value?.value ?? value);
|
|
590
584
|
}
|
|
591
|
-
}, { immediate: true },
|
|
585
|
+
}, { immediate: true, deep: true },
|
|
592
586
|
);
|
|
593
587
|
const isFilterButton = field => filterInfo.isFiltering && field !== 'db-icon' && field !== 'user-icon';
|
|
594
588
|
return {
|
|
@@ -6,28 +6,30 @@
|
|
|
6
6
|
readonly,
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
<div class="ev-input-number__wrapper">
|
|
10
|
+
<span
|
|
11
|
+
v-for="type in ['up', 'down']"
|
|
12
|
+
:key="`step-arrow-${type}`"
|
|
13
|
+
:class="['ev-input-number-icon', `step-${type}`]"
|
|
14
|
+
@click="stepValue(type)"
|
|
15
|
+
>
|
|
16
|
+
<i :class="`ev-icon-s-arrow-${type}`" />
|
|
17
|
+
</span>
|
|
18
|
+
<input
|
|
19
|
+
v-model.trim="currentValue"
|
|
20
|
+
class="ev-input"
|
|
21
|
+
type="text"
|
|
22
|
+
:placeholder="placeholder"
|
|
23
|
+
:disabled="disabled"
|
|
24
|
+
:readonly="readonly"
|
|
25
|
+
@focus="focusInput"
|
|
26
|
+
@blur="blurInput"
|
|
27
|
+
@change="changeMv"
|
|
28
|
+
@keydown.up.prevent="stepValue('up')"
|
|
29
|
+
@keydown.down.prevent="stepValue('down')"
|
|
30
|
+
@keydown.enter.prevent="validateValue(currentValue)"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
31
33
|
</div>
|
|
32
34
|
</template>
|
|
33
35
|
|
|
@@ -136,6 +138,9 @@ export default {
|
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
140
|
}
|
|
141
|
+
&__wrapper {
|
|
142
|
+
position: relative;
|
|
143
|
+
}
|
|
139
144
|
.ev-input {
|
|
140
145
|
$number-arrow-btn-width: 30px;
|
|
141
146
|
padding: 0 #{$number-arrow-btn-width + $input-default-padding} 0 $input-default-padding;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script>
|
|
51
|
-
import { reactive, toRefs, onMounted,
|
|
51
|
+
import { reactive, toRefs, onMounted, onBeforeUnmount } from 'vue';
|
|
52
52
|
|
|
53
53
|
export default {
|
|
54
54
|
name: 'EvMessage',
|
|
@@ -125,8 +125,9 @@ export default {
|
|
|
125
125
|
startTimer();
|
|
126
126
|
document.addEventListener('keydown', keydown);
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
onBeforeUnmount(() => {
|
|
129
129
|
document.removeEventListener('keydown', keydown);
|
|
130
|
+
clearTimer();
|
|
130
131
|
});
|
|
131
132
|
return {
|
|
132
133
|
startTimer,
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</template>
|
|
84
84
|
|
|
85
85
|
<script>
|
|
86
|
-
import { reactive, toRefs, watch, onMounted, ref } from 'vue';
|
|
86
|
+
import { reactive, toRefs, watch, onMounted, ref, onBeforeUnmount } from 'vue';
|
|
87
87
|
import EvButton from '@/components/button/Button.vue';
|
|
88
88
|
|
|
89
89
|
export default {
|
|
@@ -226,6 +226,9 @@ export default {
|
|
|
226
226
|
document.removeEventListener('keydown', keydown);
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
|
+
onBeforeUnmount(() => {
|
|
230
|
+
document.removeEventListener('keydown', keydown);
|
|
231
|
+
});
|
|
229
232
|
return {
|
|
230
233
|
closeMsg,
|
|
231
234
|
...toRefs(state),
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script>
|
|
58
|
-
import { reactive, toRefs, onMounted,
|
|
58
|
+
import { reactive, toRefs, onMounted, onBeforeUnmount } from 'vue';
|
|
59
59
|
|
|
60
60
|
export default {
|
|
61
61
|
name: 'EvNotification',
|
|
@@ -153,8 +153,9 @@ export default {
|
|
|
153
153
|
startTimer();
|
|
154
154
|
document.addEventListener('keydown', keydown);
|
|
155
155
|
});
|
|
156
|
-
|
|
156
|
+
onBeforeUnmount(() => {
|
|
157
157
|
document.removeEventListener('keydown', keydown);
|
|
158
|
+
clearTimer();
|
|
158
159
|
});
|
|
159
160
|
return {
|
|
160
161
|
startTimer,
|