evui 3.4.207 → 3.4.208
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 +18 -33
- package/dist/404.html +44 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +22645 -0
- package/dist/index.umd.cjs +28 -0
- package/dist/style.css +1 -0
- package/package.json +46 -43
- package/dist/evui.common.js +0 -63681
- package/dist/evui.common.js.map +0 -1
- package/dist/evui.umd.js +0 -63691
- package/dist/evui.umd.js.map +0 -1
- package/dist/evui.umd.min.js +0 -2
- package/dist/evui.umd.min.js.map +0 -1
- package/dist/img/EVUI.b82ee81a.svg +0 -293
- package/src/assets/logo.png +0 -0
- package/src/common/emitter.js +0 -20
- package/src/common/utils.bignumber.js +0 -67
- package/src/common/utils.debounce.js +0 -223
- package/src/common/utils.js +0 -151
- package/src/common/utils.table.js +0 -78
- package/src/common/utils.throttle.js +0 -83
- package/src/common/utils.tree.js +0 -18
- package/src/components/button/Button.vue +0 -195
- package/src/components/button/index.js +0 -7
- package/src/components/buttonGroup/ButtonGroup.vue +0 -11
- package/src/components/buttonGroup/index.js +0 -7
- package/src/components/calendar/Calendar.vue +0 -725
- package/src/components/calendar/index.js +0 -7
- package/src/components/calendar/uses.js +0 -1410
- package/src/components/chart/Chart.vue +0 -363
- package/src/components/chart/ChartToolbar.vue +0 -52
- package/src/components/chart/chart.core.js +0 -1170
- package/src/components/chart/chartZoom.core.js +0 -540
- package/src/components/chart/element/element.bar.js +0 -672
- package/src/components/chart/element/element.bar.time.js +0 -166
- package/src/components/chart/element/element.heatmap.js +0 -743
- package/src/components/chart/element/element.line.js +0 -611
- package/src/components/chart/element/element.pie.js +0 -197
- package/src/components/chart/element/element.scatter.js +0 -320
- package/src/components/chart/element/element.tip.js +0 -717
- package/src/components/chart/helpers/helpers.canvas.js +0 -265
- package/src/components/chart/helpers/helpers.constant.js +0 -235
- package/src/components/chart/helpers/helpers.util.js +0 -400
- package/src/components/chart/index.js +0 -9
- package/src/components/chart/model/index.js +0 -50
- package/src/components/chart/model/model.series.js +0 -125
- package/src/components/chart/model/model.store.js +0 -1427
- package/src/components/chart/plugins/plugins.interaction.js +0 -1659
- package/src/components/chart/plugins/plugins.legend.gradient.js +0 -606
- package/src/components/chart/plugins/plugins.legend.js +0 -1543
- package/src/components/chart/plugins/plugins.pie.js +0 -254
- package/src/components/chart/plugins/plugins.scrollbar.js +0 -732
- package/src/components/chart/plugins/plugins.title.js +0 -61
- package/src/components/chart/plugins/plugins.tooltip.js +0 -1041
- package/src/components/chart/scale/scale.js +0 -951
- package/src/components/chart/scale/scale.linear.js +0 -268
- package/src/components/chart/scale/scale.logarithmic.js +0 -135
- package/src/components/chart/scale/scale.step.js +0 -430
- package/src/components/chart/scale/scale.time.category.js +0 -338
- package/src/components/chart/scale/scale.time.js +0 -49
- package/src/components/chart/style/chart.scss +0 -405
- package/src/components/chart/uses.js +0 -721
- package/src/components/chartBrush/ChartBrush.vue +0 -323
- package/src/components/chartBrush/chartBrush.core.js +0 -691
- package/src/components/chartBrush/index.js +0 -9
- package/src/components/chartBrush/uses.js +0 -23
- package/src/components/chartGroup/ChartGroup.vue +0 -144
- package/src/components/chartGroup/index.js +0 -9
- package/src/components/chartGroup/style/chartGroup.scss +0 -5
- package/src/components/chartGroup/uses.js +0 -53
- package/src/components/checkbox/Checkbox.vue +0 -229
- package/src/components/checkbox/index.js +0 -7
- package/src/components/checkboxGroup/CheckboxGroup.vue +0 -44
- package/src/components/checkboxGroup/index.js +0 -7
- package/src/components/contextMenu/ContextMenu.vue +0 -95
- package/src/components/contextMenu/MenuList.vue +0 -182
- package/src/components/contextMenu/index.js +0 -7
- package/src/components/contextMenu/uses.js +0 -223
- package/src/components/datePicker/DatePicker.vue +0 -504
- package/src/components/datePicker/index.js +0 -7
- package/src/components/datePicker/uses.js +0 -460
- package/src/components/grid/Grid.vue +0 -1535
- package/src/components/grid/GridColumnSetting.vue +0 -358
- package/src/components/grid/GridFilterSetting.vue +0 -323
- package/src/components/grid/GridPagination.vue +0 -75
- package/src/components/grid/GridSummary.vue +0 -314
- package/src/components/grid/GridToolbar.vue +0 -35
- package/src/components/grid/icon/icon-option-button.vue +0 -17
- package/src/components/grid/icon/icon-sort-button.vue +0 -67
- package/src/components/grid/index.js +0 -11
- package/src/components/grid/style/grid.scss +0 -417
- package/src/components/grid/uses.js +0 -1629
- package/src/components/icon/Icon.vue +0 -53
- package/src/components/icon/index.js +0 -8
- package/src/components/inputNumber/InputNumber.vue +0 -212
- package/src/components/inputNumber/index.js +0 -7
- package/src/components/inputNumber/uses.js +0 -217
- package/src/components/loading/Loading.vue +0 -125
- package/src/components/loading/index.js +0 -7
- package/src/components/menu/Menu.vue +0 -79
- package/src/components/menu/MenuItem.vue +0 -201
- package/src/components/menu/index.js +0 -7
- package/src/components/message/Message.vue +0 -229
- package/src/components/message/index.js +0 -34
- package/src/components/messageBox/MessageBox.vue +0 -358
- package/src/components/messageBox/index.js +0 -22
- package/src/components/notification/Notification.vue +0 -316
- package/src/components/notification/index.js +0 -49
- package/src/components/pagination/Pagination.vue +0 -317
- package/src/components/pagination/index.js +0 -7
- package/src/components/pagination/pageButton.vue +0 -31
- package/src/components/progress/Progress.vue +0 -139
- package/src/components/progress/index.js +0 -7
- package/src/components/radio/Radio.vue +0 -159
- package/src/components/radio/index.js +0 -7
- package/src/components/radioGroup/RadioGroup.vue +0 -41
- package/src/components/radioGroup/index.js +0 -7
- package/src/components/scheduler/Scheduler.vue +0 -149
- package/src/components/scheduler/index.js +0 -7
- package/src/components/scheduler/uses.js +0 -183
- package/src/components/select/Select.vue +0 -556
- package/src/components/select/index.js +0 -7
- package/src/components/select/uses.js +0 -379
- package/src/components/slider/Slider.vue +0 -505
- package/src/components/slider/index.js +0 -7
- package/src/components/slider/uses.js +0 -391
- package/src/components/tabPanel/TabPanel.vue +0 -74
- package/src/components/tabPanel/index.js +0 -7
- package/src/components/tabs/Tabs.vue +0 -517
- package/src/components/tabs/index.js +0 -7
- package/src/components/textField/TextField.vue +0 -399
- package/src/components/textField/index.js +0 -7
- package/src/components/timePicker/TimePicker.vue +0 -364
- package/src/components/timePicker/index.js +0 -7
- package/src/components/toggle/Toggle.vue +0 -115
- package/src/components/toggle/index.js +0 -7
- package/src/components/tree/Tree.vue +0 -338
- package/src/components/tree/TreeNode.vue +0 -293
- package/src/components/tree/index.js +0 -7
- package/src/components/treeGrid/TreeGrid.vue +0 -1074
- package/src/components/treeGrid/TreeGridNode.vue +0 -349
- package/src/components/treeGrid/TreeGridToolbar.vue +0 -35
- package/src/components/treeGrid/icon/icon-tree.png +0 -0
- package/src/components/treeGrid/index.js +0 -9
- package/src/components/treeGrid/style/treeGrid.scss +0 -277
- package/src/components/treeGrid/uses.js +0 -1178
- package/src/components/window/Window.vue +0 -329
- package/src/components/window/index.js +0 -7
- package/src/components/window/uses.js +0 -908
- package/src/directives/clickoutside.js +0 -90
- package/src/main.js +0 -120
- package/src/style/components/input.scss +0 -108
- package/src/style/functions.scss +0 -3
- package/src/style/index.scss +0 -6
- package/src/style/lib/fonts/EVUI.eot +0 -0
- package/src/style/lib/fonts/EVUI.svg +0 -293
- package/src/style/lib/fonts/EVUI.ttf +0 -0
- package/src/style/lib/fonts/EVUI.woff +0 -0
- package/src/style/lib/icon.css +0 -888
- package/src/style/mixins.scss +0 -94
- package/src/style/themes.scss +0 -69
- package/src/style/variables.scss +0 -22
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, render } from 'vue';
|
|
2
|
-
import Component from './Notification.vue';
|
|
3
|
-
|
|
4
|
-
const componentObj = defineComponent(Component);
|
|
5
|
-
|
|
6
|
-
const rootId = 'ev-notification-modal';
|
|
7
|
-
const root = document.createElement('div');
|
|
8
|
-
root.id = rootId;
|
|
9
|
-
|
|
10
|
-
const positionList = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
|
|
11
|
-
|
|
12
|
-
const notification = (options = {}) => {
|
|
13
|
-
const position = options.position || 'top-right';
|
|
14
|
-
if (!positionList.includes(position)) {
|
|
15
|
-
console.warn('[EVUI][Notification] The position value is incorrectly entered.');
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const hasRoot = document.getElementById(rootId);
|
|
20
|
-
if (!hasRoot) {
|
|
21
|
-
document.body.appendChild(root);
|
|
22
|
-
}
|
|
23
|
-
let wrapper = root.getElementsByClassName(`modal-${position}`);
|
|
24
|
-
const hasElem = wrapper.length;
|
|
25
|
-
if (hasElem) {
|
|
26
|
-
wrapper = wrapper[0];
|
|
27
|
-
} else {
|
|
28
|
-
wrapper = document.createElement('div');
|
|
29
|
-
wrapper.classList.add(`modal-${position}`);
|
|
30
|
-
root.appendChild(wrapper);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const container = document.createElement('div');
|
|
34
|
-
const unmount = () => render(null, container);
|
|
35
|
-
const msgOption = (typeof options === 'string') ? { message: options, unmount } : { ...options, unmount };
|
|
36
|
-
const instance = h(
|
|
37
|
-
componentObj,
|
|
38
|
-
msgOption,
|
|
39
|
-
);
|
|
40
|
-
render(instance, container);
|
|
41
|
-
wrapper.appendChild(instance.el);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
notification.install = (app) => {
|
|
45
|
-
const global = app.config.globalProperties;
|
|
46
|
-
global.$notify = notification;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default notification;
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav class="pagination">
|
|
3
|
-
<!-- Page Info -->
|
|
4
|
-
<small v-if="showPageInfo" class="pagination-info">
|
|
5
|
-
<template v-if="perPage === 1">
|
|
6
|
-
{{ firstData }} / {{ total }}
|
|
7
|
-
</template>
|
|
8
|
-
<template v-else>
|
|
9
|
-
{{ firstData }} - {{ Math.min(current * perPage, total) }}
|
|
10
|
-
/ {{ total }}
|
|
11
|
-
</template>
|
|
12
|
-
</small>
|
|
13
|
-
|
|
14
|
-
<ul class="pagination-list" :style="listClasses">
|
|
15
|
-
<!-- Jump -->
|
|
16
|
-
<li v-if="$props.pagePerJump"
|
|
17
|
-
class="step-button"
|
|
18
|
-
:class="{'is-disabled': !hasPrev}">
|
|
19
|
-
<page-button
|
|
20
|
-
class="pagination-previous"
|
|
21
|
-
:disabled="!hasPrev"
|
|
22
|
-
:page="getPage(prevJumpPage, {isCurrent: false})"
|
|
23
|
-
>
|
|
24
|
-
<ev-icon icon="ev-icon-s-double-left"/>
|
|
25
|
-
</page-button>
|
|
26
|
-
</li>
|
|
27
|
-
|
|
28
|
-
<!-- Previous -->
|
|
29
|
-
<li
|
|
30
|
-
class="step-button"
|
|
31
|
-
:class="{'is-disabled': !hasPrev}">
|
|
32
|
-
<page-button
|
|
33
|
-
class="pagination-previous"
|
|
34
|
-
:disabled="!hasPrev"
|
|
35
|
-
:page="getPage(current - 1)"
|
|
36
|
-
>
|
|
37
|
-
<ev-icon icon="ev-icon-s-arrow-left"/>
|
|
38
|
-
</page-button>
|
|
39
|
-
</li>
|
|
40
|
-
|
|
41
|
-
<!--Pages-->
|
|
42
|
-
<template v-for="(page, i) in pagesInRange" :key="i">
|
|
43
|
-
<li v-if="page.number === -1" class="pagination-ellipsis">
|
|
44
|
-
<span>…</span>
|
|
45
|
-
</li>
|
|
46
|
-
<li v-else :class="{ 'is-current': page.isCurrent, 'is-page': true }" @click="page.click">
|
|
47
|
-
<page-button :page="page"/>
|
|
48
|
-
</li>
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
<!-- Next -->
|
|
52
|
-
<li
|
|
53
|
-
class="step-button"
|
|
54
|
-
:class="{'is-disabled': !hasNext}">
|
|
55
|
-
<page-button
|
|
56
|
-
class="pagination-next"
|
|
57
|
-
:disabled="!hasNext"
|
|
58
|
-
:page="getPage(current + 1)"
|
|
59
|
-
>
|
|
60
|
-
<ev-icon icon="ev-icon-s-arrow-right"/>
|
|
61
|
-
</page-button>
|
|
62
|
-
</li>
|
|
63
|
-
|
|
64
|
-
<!-- Jump -->
|
|
65
|
-
<li v-if="$props.pagePerJump"
|
|
66
|
-
class="step-button"
|
|
67
|
-
:class="{'is-disabled': !hasNext}">
|
|
68
|
-
<page-button
|
|
69
|
-
class="pagination-previous"
|
|
70
|
-
:disabled="!hasNext"
|
|
71
|
-
:page="getPage(nextJumpPage, {isCurrent: false})"
|
|
72
|
-
>
|
|
73
|
-
<ev-icon icon="ev-icon-s-double-right"/>
|
|
74
|
-
</page-button>
|
|
75
|
-
</li>
|
|
76
|
-
|
|
77
|
-
</ul>
|
|
78
|
-
</nav>
|
|
79
|
-
</template>
|
|
80
|
-
|
|
81
|
-
<script>
|
|
82
|
-
import { computed, nextTick, watch } from 'vue';
|
|
83
|
-
import EvIcon from '@/components/icon/Icon';
|
|
84
|
-
import pageButton from './pageButton';
|
|
85
|
-
|
|
86
|
-
export default {
|
|
87
|
-
name: 'EvPagination',
|
|
88
|
-
components: {
|
|
89
|
-
EvIcon,
|
|
90
|
-
pageButton,
|
|
91
|
-
},
|
|
92
|
-
props: {
|
|
93
|
-
total: {
|
|
94
|
-
type: [Number, String],
|
|
95
|
-
default: 0,
|
|
96
|
-
},
|
|
97
|
-
visiblePage: {
|
|
98
|
-
type: [Number, String],
|
|
99
|
-
default: 8,
|
|
100
|
-
},
|
|
101
|
-
perPage: {
|
|
102
|
-
type: [Number, String],
|
|
103
|
-
default: 20,
|
|
104
|
-
},
|
|
105
|
-
modelValue: {
|
|
106
|
-
type: [Number, String],
|
|
107
|
-
default: 1,
|
|
108
|
-
},
|
|
109
|
-
showPageInfo: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: false,
|
|
112
|
-
},
|
|
113
|
-
order: {
|
|
114
|
-
type: String,
|
|
115
|
-
default: 'left',
|
|
116
|
-
validator: val => ['left', 'right', 'center'].includes(val),
|
|
117
|
-
},
|
|
118
|
-
pagePerJump: {
|
|
119
|
-
type: [Number, undefined],
|
|
120
|
-
default: undefined,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
emits: {
|
|
124
|
-
'update:modelValue': null,
|
|
125
|
-
change: null,
|
|
126
|
-
},
|
|
127
|
-
setup(props, { emit }) {
|
|
128
|
-
const visiblePage = computed(() => (props.visiblePage > 7 ? props.visiblePage : 7));
|
|
129
|
-
const current = computed(() => props.modelValue);
|
|
130
|
-
const pageCount = computed(() => (props.total === 0
|
|
131
|
-
? 1 : Math.ceil(props.total / props.perPage)));
|
|
132
|
-
const hasPrev = computed(() => current.value > 1);
|
|
133
|
-
const hasNext = computed(() => current.value < pageCount.value);
|
|
134
|
-
|
|
135
|
-
const prevJumpPage = computed(
|
|
136
|
-
() => Math.max(current.value - props.pagePerJump, 1),
|
|
137
|
-
);
|
|
138
|
-
const nextJumpPage = computed(
|
|
139
|
-
() => Math.min(current.value + props.pagePerJump, pageCount.value),
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
const firstData = computed(() => {
|
|
143
|
-
const item = current.value * props.perPage - props.perPage + 1;
|
|
144
|
-
return item >= 0 ? item : 0;
|
|
145
|
-
});
|
|
146
|
-
const changePage = (num, event) => {
|
|
147
|
-
if (current.value === num || num < 1 || num > pageCount.value) return;
|
|
148
|
-
emit('update:modelValue', num);
|
|
149
|
-
emit('change', num);
|
|
150
|
-
if (event && event.target) {
|
|
151
|
-
nextTick(() => event.target.focus());
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
const getPage = (num, options = {}) => ({
|
|
155
|
-
number: num,
|
|
156
|
-
isCurrent: options.isCurrent ?? current.value === num,
|
|
157
|
-
click: event => changePage(num, event),
|
|
158
|
-
input: (event, inputNum) => changePage(+inputNum, event),
|
|
159
|
-
disabled: options.disabled || false,
|
|
160
|
-
class: options.class || '',
|
|
161
|
-
});
|
|
162
|
-
const onRange = (from, to) => {
|
|
163
|
-
const range = [];
|
|
164
|
-
const f = from > 0 ? from : 1;
|
|
165
|
-
|
|
166
|
-
for (let i = f; i <= to; i++) {
|
|
167
|
-
range.push(getPage(i));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return range;
|
|
171
|
-
};
|
|
172
|
-
const pagesInRange = computed(() => {
|
|
173
|
-
const totalVisible = parseInt(visiblePage.value, 10);
|
|
174
|
-
|
|
175
|
-
if (totalVisible === 0) {
|
|
176
|
-
return [];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const maxLength = Math.min(
|
|
180
|
-
Math.max(0, totalVisible) || pageCount.value,
|
|
181
|
-
pageCount.value,
|
|
182
|
-
);
|
|
183
|
-
if (pageCount.value <= maxLength) {
|
|
184
|
-
return onRange(1, pageCount.value);
|
|
185
|
-
}
|
|
186
|
-
const even = maxLength % 2 === 0 ? 1 : 0;
|
|
187
|
-
const left = Math.floor(maxLength / 2);
|
|
188
|
-
const right = pageCount.value - left + 1 + even;
|
|
189
|
-
|
|
190
|
-
if (current.value > left && current.value < right) {
|
|
191
|
-
const firstItem = 1;
|
|
192
|
-
const lastItem = pageCount.value;
|
|
193
|
-
const start = current.value - left + 2;
|
|
194
|
-
const end = current.value + left - 2 - even;
|
|
195
|
-
const secondItem = start - 1 === firstItem + 1 ? 2 : -1;
|
|
196
|
-
const beforeLastItem = end + 1 === lastItem - 1 ? end + 1 : -1;
|
|
197
|
-
return [
|
|
198
|
-
getPage(1),
|
|
199
|
-
getPage(secondItem),
|
|
200
|
-
...onRange(start, end),
|
|
201
|
-
getPage(beforeLastItem),
|
|
202
|
-
getPage(pageCount.value),
|
|
203
|
-
];
|
|
204
|
-
} else if (current.value === left) {
|
|
205
|
-
const end = current.value + left - 1 - even;
|
|
206
|
-
return [...onRange(1, end), getPage(-1), getPage(pageCount.value)];
|
|
207
|
-
} else if (current.value === right) {
|
|
208
|
-
const start = current.value - left + 1;
|
|
209
|
-
return [getPage(1), getPage(-1), ...onRange(start, pageCount.value)];
|
|
210
|
-
}
|
|
211
|
-
return [
|
|
212
|
-
...onRange(1, left),
|
|
213
|
-
getPage(-1),
|
|
214
|
-
...onRange(right, pageCount.value),
|
|
215
|
-
];
|
|
216
|
-
});
|
|
217
|
-
const listClasses = computed(() => ({ 'justify-content': props.order, flex: '3 1 0%' }));
|
|
218
|
-
|
|
219
|
-
watch(
|
|
220
|
-
() => pageCount.value,
|
|
221
|
-
(value) => {
|
|
222
|
-
if (current.value > value) {
|
|
223
|
-
changePage(value);
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
);
|
|
227
|
-
watch(
|
|
228
|
-
() => current.value,
|
|
229
|
-
(after, before) => {
|
|
230
|
-
if (pageCount.value < after) {
|
|
231
|
-
changePage(before);
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
);
|
|
235
|
-
return {
|
|
236
|
-
pageCount,
|
|
237
|
-
pagesInRange,
|
|
238
|
-
hasPrev,
|
|
239
|
-
hasNext,
|
|
240
|
-
listClasses,
|
|
241
|
-
firstData,
|
|
242
|
-
current,
|
|
243
|
-
changePage,
|
|
244
|
-
getPage,
|
|
245
|
-
prevJumpPage,
|
|
246
|
-
nextJumpPage,
|
|
247
|
-
};
|
|
248
|
-
},
|
|
249
|
-
};
|
|
250
|
-
</script>
|
|
251
|
-
|
|
252
|
-
<style lang="scss">
|
|
253
|
-
.pagination {
|
|
254
|
-
display: flex;
|
|
255
|
-
.pagination-next,
|
|
256
|
-
.pagination-previous {
|
|
257
|
-
margin: 0;
|
|
258
|
-
padding-left: 10px;
|
|
259
|
-
padding-right: 10px;
|
|
260
|
-
background: center center no-repeat;
|
|
261
|
-
background-size: 16px;
|
|
262
|
-
cursor: pointer;
|
|
263
|
-
&:hover {
|
|
264
|
-
color: #1A6AFE;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
&-info {
|
|
268
|
-
order: 2;
|
|
269
|
-
line-height: 32px;
|
|
270
|
-
}
|
|
271
|
-
.is-current {
|
|
272
|
-
pointer-events: none;
|
|
273
|
-
cursor: not-allowed;
|
|
274
|
-
background-color: #1A6AFE;
|
|
275
|
-
color: #FFFFFF;
|
|
276
|
-
border-radius: 4px;
|
|
277
|
-
}
|
|
278
|
-
.is-page {
|
|
279
|
-
&:hover {
|
|
280
|
-
color: #1A6AFE;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
.pagination-ellipsis {
|
|
284
|
-
pointer-events: none;
|
|
285
|
-
cursor: not-allowed;
|
|
286
|
-
}
|
|
287
|
-
.is-disabled {
|
|
288
|
-
pointer-events: none;
|
|
289
|
-
cursor: not-allowed;
|
|
290
|
-
opacity: 0.5;
|
|
291
|
-
color: #C0C4CC;
|
|
292
|
-
}
|
|
293
|
-
&-list {
|
|
294
|
-
display: flex;
|
|
295
|
-
user-select: none;
|
|
296
|
-
list-style: none;
|
|
297
|
-
font-size: 0;
|
|
298
|
-
padding: 0;
|
|
299
|
-
margin: 0;
|
|
300
|
-
align-items: center;
|
|
301
|
-
flex-wrap: wrap;
|
|
302
|
-
li {
|
|
303
|
-
display: flex;
|
|
304
|
-
height: 32px;
|
|
305
|
-
padding: 0 4px;
|
|
306
|
-
justify-content: center;
|
|
307
|
-
align-items: center;
|
|
308
|
-
font-size: 14px;
|
|
309
|
-
min-width: 32px;
|
|
310
|
-
line-height: 32px;
|
|
311
|
-
cursor: pointer;
|
|
312
|
-
box-sizing: border-box;
|
|
313
|
-
text-align: center;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span
|
|
3
|
-
:class="{
|
|
4
|
-
'is-current': page.isCurrent,
|
|
5
|
-
'is-disabled': disabled || page.disabled,
|
|
6
|
-
[page.class]: true
|
|
7
|
-
}"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
:aria-current="page.isCurrent"
|
|
10
|
-
@click.stop="page.click"
|
|
11
|
-
>
|
|
12
|
-
<slot>{{ page.number }}</slot>
|
|
13
|
-
</span>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: 'PageButton',
|
|
20
|
-
props: {
|
|
21
|
-
page: {
|
|
22
|
-
type: Object,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
</script>
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ev-progress">
|
|
3
|
-
<div
|
|
4
|
-
class="ev-progress-wrapper"
|
|
5
|
-
:style="wrapperStyle"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
class="ev-progress-inner"
|
|
9
|
-
:style="innerStyle"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
v-if="innerText"
|
|
13
|
-
class="ev-progress-inner-text"
|
|
14
|
-
>
|
|
15
|
-
{{ innerText }}
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<div
|
|
20
|
-
v-if="$slots.default"
|
|
21
|
-
class="ev-progress-label"
|
|
22
|
-
>
|
|
23
|
-
<slot />
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import { computed } from 'vue';
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
name: 'EvProgress',
|
|
33
|
-
props: {
|
|
34
|
-
modelValue: {
|
|
35
|
-
type: Number,
|
|
36
|
-
default: 0,
|
|
37
|
-
validator: val => (val >= 0 && val <= 100),
|
|
38
|
-
},
|
|
39
|
-
color: {
|
|
40
|
-
type: [String, Array],
|
|
41
|
-
default: '#409EFF',
|
|
42
|
-
},
|
|
43
|
-
strokeWidth: {
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 6,
|
|
46
|
-
},
|
|
47
|
-
innerText: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: '',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
emits: {
|
|
53
|
-
},
|
|
54
|
-
setup(props) {
|
|
55
|
-
const wrapperStyle = computed(() => ({
|
|
56
|
-
height: `${props.strokeWidth}px`,
|
|
57
|
-
}));
|
|
58
|
-
const innerStyle = computed(() => {
|
|
59
|
-
if (Array.isArray(props.color)) {
|
|
60
|
-
const sortedColorList = [...props.color].sort((curr, next) => curr.value - next.value);
|
|
61
|
-
let color = sortedColorList[0].color;
|
|
62
|
-
if (!props.modelValue) {
|
|
63
|
-
return {
|
|
64
|
-
width: `${props.modelValue}%`,
|
|
65
|
-
'background-color': color,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
for (let i = 0; i < sortedColorList.length; i++) {
|
|
69
|
-
const prevValue = i === 0 ? 0 : sortedColorList[i - 1].value;
|
|
70
|
-
const currValue = sortedColorList[i].value;
|
|
71
|
-
if (props.modelValue > prevValue && props.modelValue <= currValue) {
|
|
72
|
-
color = sortedColorList[i].color;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
width: `${props.modelValue}%`,
|
|
78
|
-
'background-color': color,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
width: `${props.modelValue}%`,
|
|
83
|
-
'background-color': props.color,
|
|
84
|
-
};
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
wrapperStyle,
|
|
89
|
-
innerStyle,
|
|
90
|
-
};
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<style lang="scss">
|
|
96
|
-
@import '../../style/index.scss';
|
|
97
|
-
|
|
98
|
-
.ev-progress {
|
|
99
|
-
display: flex;
|
|
100
|
-
position: relative;
|
|
101
|
-
width: 100%;
|
|
102
|
-
box-sizing: border-box;
|
|
103
|
-
user-select: none;
|
|
104
|
-
|
|
105
|
-
&-wrapper {
|
|
106
|
-
position: relative;
|
|
107
|
-
height: 6px;
|
|
108
|
-
border-radius: 100px;
|
|
109
|
-
background-color: #EBEEF5;
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
flex: 1;
|
|
112
|
-
align-self: center;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&-inner {
|
|
116
|
-
position: absolute;
|
|
117
|
-
top: 0;
|
|
118
|
-
left: 0;
|
|
119
|
-
height: 100%;
|
|
120
|
-
border-radius: 100px;
|
|
121
|
-
text-align: right;
|
|
122
|
-
white-space: nowrap;
|
|
123
|
-
transition: width .6s ease;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&-inner-text {
|
|
127
|
-
display: inline-block;
|
|
128
|
-
margin: 0 5px;
|
|
129
|
-
color: #FFFFFF;
|
|
130
|
-
font-size: 12px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&-label {
|
|
134
|
-
min-width: 55px;
|
|
135
|
-
text-align: right;
|
|
136
|
-
margin-left: 10px;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
</style>
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<label
|
|
3
|
-
class="ev-radio"
|
|
4
|
-
:class="[
|
|
5
|
-
{
|
|
6
|
-
disabled,
|
|
7
|
-
checked,
|
|
8
|
-
},
|
|
9
|
-
size,
|
|
10
|
-
]"
|
|
11
|
-
>
|
|
12
|
-
<input
|
|
13
|
-
v-model="mv"
|
|
14
|
-
type="radio"
|
|
15
|
-
class="ev-radio-input"
|
|
16
|
-
:value="label"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
@change.stop="changeMv"
|
|
19
|
-
>
|
|
20
|
-
<span class="ev-radio-label">
|
|
21
|
-
<template v-if="$slots.default">
|
|
22
|
-
<slot />
|
|
23
|
-
</template>
|
|
24
|
-
<template v-else>
|
|
25
|
-
{{ label }}
|
|
26
|
-
</template>
|
|
27
|
-
</span>
|
|
28
|
-
</label>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
import { computed, inject, nextTick } from 'vue';
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
name: 'EvRadio',
|
|
36
|
-
props: {
|
|
37
|
-
modelValue: {
|
|
38
|
-
type: [String, Number, Symbol, Boolean],
|
|
39
|
-
default: null,
|
|
40
|
-
},
|
|
41
|
-
label: {
|
|
42
|
-
type: [String, Number, Symbol, Boolean],
|
|
43
|
-
default: null,
|
|
44
|
-
},
|
|
45
|
-
disabled: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: false,
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: '',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
emits: {
|
|
55
|
-
'update:modelValue': null,
|
|
56
|
-
change: null,
|
|
57
|
-
},
|
|
58
|
-
setup(props, { emit }) {
|
|
59
|
-
const mv = inject(
|
|
60
|
-
'EvRadioGroupMv',
|
|
61
|
-
computed({
|
|
62
|
-
get: () => props.modelValue,
|
|
63
|
-
set: val => emit('update:modelValue', val),
|
|
64
|
-
}),
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
const changeMv = inject(
|
|
68
|
-
'EvRadioGroupChange',
|
|
69
|
-
async (e) => {
|
|
70
|
-
await nextTick();
|
|
71
|
-
emit('change', mv.value, e);
|
|
72
|
-
},
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
const checked = computed(() => mv.value === props.label);
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
mv,
|
|
79
|
-
checked,
|
|
80
|
-
changeMv,
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<style lang="scss">
|
|
87
|
-
@import '../../style/index.scss';
|
|
88
|
-
|
|
89
|
-
.ev-radio {
|
|
90
|
-
$button-size-default: 18px;
|
|
91
|
-
display: inline-block;
|
|
92
|
-
position: relative;
|
|
93
|
-
padding: 0 5px;
|
|
94
|
-
margin-right: 30px;
|
|
95
|
-
user-select: none;
|
|
96
|
-
line-height: $button-size-default;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
&-label {
|
|
99
|
-
padding-left: 5px;
|
|
100
|
-
}
|
|
101
|
-
&-input {
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@include state('disabled') {
|
|
107
|
-
.ev-radio-label {
|
|
108
|
-
@include evThemify() {
|
|
109
|
-
color: evThemed('disabled');
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
.ev-radio-input,
|
|
113
|
-
.ev-radio-label {
|
|
114
|
-
cursor: not-allowed !important;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
@include state('type-button') {
|
|
118
|
-
.ev-radio {
|
|
119
|
-
display: inline-block;
|
|
120
|
-
padding: 0;
|
|
121
|
-
margin: 0;
|
|
122
|
-
text-align: center;
|
|
123
|
-
|
|
124
|
-
@include evThemify() {
|
|
125
|
-
border: 1px solid evThemed('border-base');
|
|
126
|
-
border-left: 0;
|
|
127
|
-
}
|
|
128
|
-
&:first-child {
|
|
129
|
-
border-radius: $default-radius 0 0 $default-radius;
|
|
130
|
-
|
|
131
|
-
@include evThemify() {
|
|
132
|
-
border-left: 1px solid evThemed('border-base');
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
&:last-child {
|
|
136
|
-
border-radius: 0 $default-radius $default-radius 0;
|
|
137
|
-
}
|
|
138
|
-
&.checked {
|
|
139
|
-
color: $color-white;
|
|
140
|
-
|
|
141
|
-
@include evThemify() {
|
|
142
|
-
background-color: evThemed('primary');
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
&.disabled.checked {
|
|
146
|
-
@include evThemify() {
|
|
147
|
-
background-color: rgba(evThemed('border-base'), 0.5);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
.ev-radio-input {
|
|
152
|
-
@include visible-hide();
|
|
153
|
-
}
|
|
154
|
-
.ev-radio-label {
|
|
155
|
-
display: inline-block;
|
|
156
|
-
padding: 7px 12px;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
</style>
|