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,517 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section
|
|
3
|
-
v-resize="onResize"
|
|
4
|
-
v-observe-visibility="{
|
|
5
|
-
callback: onResize,
|
|
6
|
-
once: true,
|
|
7
|
-
}"
|
|
8
|
-
class="ev-tabs"
|
|
9
|
-
:class="{
|
|
10
|
-
closable,
|
|
11
|
-
stretch,
|
|
12
|
-
}"
|
|
13
|
-
>
|
|
14
|
-
<div class="ev-tabs-header">
|
|
15
|
-
<div
|
|
16
|
-
class="ev-tabs-nav-wrapper"
|
|
17
|
-
:class="{
|
|
18
|
-
'has-scroll': hasScroll,
|
|
19
|
-
}"
|
|
20
|
-
>
|
|
21
|
-
<template v-if="hasScroll">
|
|
22
|
-
<span
|
|
23
|
-
class="ev-tabs-arrow prev"
|
|
24
|
-
@click="scrollTab('prev')"
|
|
25
|
-
>
|
|
26
|
-
<i class="ev-icon-s-arrow-left" />
|
|
27
|
-
</span>
|
|
28
|
-
<span
|
|
29
|
-
class="ev-tabs-arrow next"
|
|
30
|
-
@click="scrollTab('next')"
|
|
31
|
-
>
|
|
32
|
-
<i class="ev-icon-s-arrow-right" />
|
|
33
|
-
</span>
|
|
34
|
-
</template>
|
|
35
|
-
<div
|
|
36
|
-
ref="listWrapperRef"
|
|
37
|
-
class="ev-tabs-list-wrapper"
|
|
38
|
-
>
|
|
39
|
-
<ul
|
|
40
|
-
ref="listRef"
|
|
41
|
-
class="ev-tabs-list"
|
|
42
|
-
:style="listRefStyle"
|
|
43
|
-
>
|
|
44
|
-
<li
|
|
45
|
-
v-for="(item, idx) in computedTabList"
|
|
46
|
-
:key="`${item.value}_${idx}`"
|
|
47
|
-
class="ev-tabs-title"
|
|
48
|
-
v-bind="{ draggable }"
|
|
49
|
-
:class="{
|
|
50
|
-
active: item.value === mv,
|
|
51
|
-
'has-icon': item.iconClass,
|
|
52
|
-
'drag-select': dragSelectCls(item.value),
|
|
53
|
-
'select-idx': selectIdxCls(idx),
|
|
54
|
-
}"
|
|
55
|
-
@click="clickTab(item.value)"
|
|
56
|
-
@dragstart.stop="dragstartTab(item, idx)"
|
|
57
|
-
@dragover.prevent="dragoverTab(item.value)"
|
|
58
|
-
@dragend.prevent="dragendTab"
|
|
59
|
-
>
|
|
60
|
-
<i
|
|
61
|
-
v-if="item.iconClass"
|
|
62
|
-
class="ev-tabs-icon"
|
|
63
|
-
:class="item.iconClass"
|
|
64
|
-
/>
|
|
65
|
-
<span
|
|
66
|
-
class="text"
|
|
67
|
-
:title="item.text"
|
|
68
|
-
>
|
|
69
|
-
{{ item.text }}
|
|
70
|
-
</span>
|
|
71
|
-
<span
|
|
72
|
-
v-if="closable"
|
|
73
|
-
class="close-icon"
|
|
74
|
-
@click.stop="removeTab(item.value)"
|
|
75
|
-
>
|
|
76
|
-
<i class="ev-icon-s-close" />
|
|
77
|
-
</span>
|
|
78
|
-
</li>
|
|
79
|
-
</ul>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="ev-tabs-body">
|
|
84
|
-
<slot />
|
|
85
|
-
</div>
|
|
86
|
-
</section>
|
|
87
|
-
</template>
|
|
88
|
-
|
|
89
|
-
<script>
|
|
90
|
-
import {
|
|
91
|
-
ref, reactive, computed,
|
|
92
|
-
provide, triggerRef,
|
|
93
|
-
onBeforeUpdate, nextTick,
|
|
94
|
-
} from 'vue';
|
|
95
|
-
|
|
96
|
-
export default {
|
|
97
|
-
name: 'EvTabs',
|
|
98
|
-
props: {
|
|
99
|
-
modelValue: {
|
|
100
|
-
type: [String, Number],
|
|
101
|
-
default: null,
|
|
102
|
-
},
|
|
103
|
-
panels: {
|
|
104
|
-
type: Array,
|
|
105
|
-
default: () => [],
|
|
106
|
-
validator: (list) => {
|
|
107
|
-
const valueList = list.map(v => v.value);
|
|
108
|
-
const setList = [...new Set(valueList)];
|
|
109
|
-
if (list.length !== setList.length) {
|
|
110
|
-
console.warn('[EVUI][Tabs] TabPanel \'value\' attribute is duplicate values.');
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
if (!list.every(v => Object.hasOwnProperty.call(v, 'value'))) {
|
|
114
|
-
console.warn('[EVUI][Tabs] TabPanel \'value\' attribute is essential.');
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
closable: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: false,
|
|
123
|
-
},
|
|
124
|
-
stretch: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: false,
|
|
127
|
-
},
|
|
128
|
-
draggable: {
|
|
129
|
-
type: Boolean,
|
|
130
|
-
default: false,
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
emits: {
|
|
134
|
-
'update:modelValue': [String, Number],
|
|
135
|
-
'update:panels': [Array],
|
|
136
|
-
change: [String, Number],
|
|
137
|
-
},
|
|
138
|
-
setup(props, { emit }) {
|
|
139
|
-
// 드래그 상태 여부 (dragstart ~ dragend)
|
|
140
|
-
const isDragState = ref(false);
|
|
141
|
-
|
|
142
|
-
const tabCloneList = ref([]);
|
|
143
|
-
|
|
144
|
-
const mv = computed({
|
|
145
|
-
get: () => props.modelValue,
|
|
146
|
-
set: (val) => {
|
|
147
|
-
emit('update:modelValue', val);
|
|
148
|
-
emit('change', val);
|
|
149
|
-
},
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
provide('evTabs', mv);
|
|
153
|
-
|
|
154
|
-
const tabList = computed({
|
|
155
|
-
get: () => props.panels,
|
|
156
|
-
set: val => emit('update:panels', val),
|
|
157
|
-
});
|
|
158
|
-
const computedTabList = computed(() => {
|
|
159
|
-
if (!props.draggable) {
|
|
160
|
-
return tabList.value;
|
|
161
|
-
}
|
|
162
|
-
if (!isDragState.value) {
|
|
163
|
-
return tabList.value;
|
|
164
|
-
}
|
|
165
|
-
return tabCloneList.value;
|
|
166
|
-
});
|
|
167
|
-
const tabElValueList = tabList.value.map(v => v.value);
|
|
168
|
-
|
|
169
|
-
const listWrapperRef = ref(null);
|
|
170
|
-
const listRef = ref(null);
|
|
171
|
-
const hasScroll = ref(false);
|
|
172
|
-
|
|
173
|
-
const translateScroll = reactive({
|
|
174
|
-
x: 0,
|
|
175
|
-
});
|
|
176
|
-
const listRefStyle = computed(() => ({
|
|
177
|
-
transform: `translateX(${translateScroll.x}px)`,
|
|
178
|
-
}));
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* 상단 탭 nav의 element 길이를 감시 및 계산하여 스크롤 여부 확인
|
|
182
|
-
* UL의 길이가 긴 경우 양쪽에 버튼 노출
|
|
183
|
-
*/
|
|
184
|
-
const observeListEl = () => {
|
|
185
|
-
const listWrapperWidth = listWrapperRef.value.offsetWidth;
|
|
186
|
-
const listWidth = listRef.value.offsetWidth;
|
|
187
|
-
hasScroll.value = listWrapperWidth < listWidth;
|
|
188
|
-
|
|
189
|
-
if (hasScroll.value) {
|
|
190
|
-
const widthLimit = listWrapperWidth - listWidth;
|
|
191
|
-
if (widthLimit > translateScroll.x) {
|
|
192
|
-
translateScroll.x = widthLimit;
|
|
193
|
-
}
|
|
194
|
-
} else {
|
|
195
|
-
translateScroll.x = 0;
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
onBeforeUpdate(() => {
|
|
200
|
-
// 삭제된 탭이 선택된 경우 탭선택 인덱스를 변경하는 로직
|
|
201
|
-
if (tabElValueList.length === tabList.value.length + 1) {
|
|
202
|
-
let longList;
|
|
203
|
-
let shortList;
|
|
204
|
-
if (tabElValueList.length > tabList.value.length) {
|
|
205
|
-
longList = tabElValueList;
|
|
206
|
-
shortList = tabList.value.map(v => v.value);
|
|
207
|
-
} else {
|
|
208
|
-
longList = tabList.value.map(v => v.value);
|
|
209
|
-
shortList = tabElValueList;
|
|
210
|
-
}
|
|
211
|
-
const removeValue = longList.filter(v => !shortList.includes(v))[0];
|
|
212
|
-
if (mv.value === removeValue) {
|
|
213
|
-
const selectedIdx = tabElValueList.findIndex(v => v === removeValue);
|
|
214
|
-
if (selectedIdx === 0) {
|
|
215
|
-
mv.value = tabList.value[0].value;
|
|
216
|
-
} else {
|
|
217
|
-
mv.value = tabList.value[selectedIdx - 1].value;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* 탭 클릭 로직
|
|
225
|
-
*/
|
|
226
|
-
const clickTab = (val) => {
|
|
227
|
-
mv.value = val;
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* 탭 삭제 로직
|
|
232
|
-
*/
|
|
233
|
-
const removeTab = (val) => {
|
|
234
|
-
if (tabList.value.length < 2) {
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
const selectedIdx = tabList.value.findIndex(v => v.value === val);
|
|
238
|
-
if (selectedIdx < 0) {
|
|
239
|
-
mv.value = tabList.value[0].value;
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
if (val === mv.value) {
|
|
243
|
-
if (selectedIdx === 0) {
|
|
244
|
-
mv.value = tabList.value[1].value;
|
|
245
|
-
} else {
|
|
246
|
-
mv.value = tabList.value[selectedIdx - 1].value;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
tabList.value.splice(selectedIdx, 1);
|
|
250
|
-
nextTick(() => {
|
|
251
|
-
tabElValueList.splice(selectedIdx, 1);
|
|
252
|
-
});
|
|
253
|
-
triggerRef(tabList);
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* tab nav위에서 마우스 휠 동작
|
|
258
|
-
* @param type - {'next'|'prev'}
|
|
259
|
-
* @param movingWidth
|
|
260
|
-
*/
|
|
261
|
-
const scrollTab = (type, movingWidth = 100) => {
|
|
262
|
-
const listWrapperWidth = listWrapperRef.value.offsetWidth;
|
|
263
|
-
const listWidth = listRef.value.offsetWidth;
|
|
264
|
-
const widthLimit = listWrapperWidth - listWidth;
|
|
265
|
-
if (type === 'next' && translateScroll.x !== widthLimit) {
|
|
266
|
-
if (widthLimit >= translateScroll.x - movingWidth) {
|
|
267
|
-
translateScroll.x = widthLimit;
|
|
268
|
-
} else {
|
|
269
|
-
translateScroll.x -= movingWidth;
|
|
270
|
-
}
|
|
271
|
-
} else if (type === 'prev' && translateScroll.x !== 0) {
|
|
272
|
-
if (movingWidth * -1 <= translateScroll.x) {
|
|
273
|
-
translateScroll.x = 0;
|
|
274
|
-
} else {
|
|
275
|
-
translateScroll.x += movingWidth;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
// draggable 모드에서 drag되는 아이템
|
|
281
|
-
const dragObj = reactive({
|
|
282
|
-
item: {},
|
|
283
|
-
idx: null,
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* 드래그된 LI의 클래스
|
|
288
|
-
* @param val
|
|
289
|
-
* @returns {boolean|boolean}
|
|
290
|
-
*/
|
|
291
|
-
const dragSelectCls = val => props.draggable && dragObj.item?.value === val;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* 드래그하기위해 선택한 li의 idx 여부 클래스
|
|
295
|
-
*/
|
|
296
|
-
const selectIdxCls = idx => props.draggable && dragObj.idx === idx;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* 탭 드래그 시작 메소드, isDragState모드 시작
|
|
300
|
-
* @param item - 선택한 아이템
|
|
301
|
-
*/
|
|
302
|
-
const dragstartTab = (item, idx) => {
|
|
303
|
-
if (!props.draggable) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
tabCloneList.value = [...tabList.value];
|
|
307
|
-
dragObj.item = item;
|
|
308
|
-
dragObj.idx = idx;
|
|
309
|
-
isDragState.value = true;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* 탭 드래그오버 메소드
|
|
314
|
-
* @param val - 오버 중인 아이템의 value
|
|
315
|
-
*/
|
|
316
|
-
const dragoverTab = (val) => {
|
|
317
|
-
if (!props.draggable || dragObj.item?.value === val) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
const dragValueIdx = tabCloneList.value.findIndex(v => v.value === dragObj.item?.value);
|
|
321
|
-
const targetValueIdx = tabCloneList.value.findIndex(v => v.value === val);
|
|
322
|
-
tabCloneList.value.splice(dragValueIdx, 1);
|
|
323
|
-
tabCloneList.value.splice(targetValueIdx, 0, dragObj.item);
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* 탭 드래그 종료 메소드, 원래 tabList에 값을 넣고 isDragState모드를 종료
|
|
328
|
-
*/
|
|
329
|
-
const dragendTab = () => {
|
|
330
|
-
if (!props.draggable) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
tabList.value = [...tabCloneList.value];
|
|
334
|
-
dragObj.item = {};
|
|
335
|
-
dragObj.idx = null;
|
|
336
|
-
isDragState.value = false;
|
|
337
|
-
tabCloneList.value.splice(0);
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
const onResize = () => {
|
|
341
|
-
observeListEl();
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
return {
|
|
345
|
-
mv,
|
|
346
|
-
computedTabList,
|
|
347
|
-
clickTab,
|
|
348
|
-
removeTab,
|
|
349
|
-
|
|
350
|
-
listWrapperRef,
|
|
351
|
-
listRef,
|
|
352
|
-
hasScroll,
|
|
353
|
-
listRefStyle,
|
|
354
|
-
scrollTab,
|
|
355
|
-
|
|
356
|
-
dragstartTab,
|
|
357
|
-
dragoverTab,
|
|
358
|
-
dragendTab,
|
|
359
|
-
dragSelectCls,
|
|
360
|
-
selectIdxCls,
|
|
361
|
-
|
|
362
|
-
onResize,
|
|
363
|
-
};
|
|
364
|
-
},
|
|
365
|
-
};
|
|
366
|
-
</script>
|
|
367
|
-
|
|
368
|
-
<style lang="scss">
|
|
369
|
-
@import '../../style/index.scss';
|
|
370
|
-
|
|
371
|
-
.ev-tabs {
|
|
372
|
-
ul, li {
|
|
373
|
-
list-style: none;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
@include state('closable') {
|
|
377
|
-
.ev-tabs-title {
|
|
378
|
-
&:hover {
|
|
379
|
-
.text {
|
|
380
|
-
transform: translateX(-5px);
|
|
381
|
-
}
|
|
382
|
-
.close-icon {
|
|
383
|
-
opacity: 1;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
@include state('stretch') {
|
|
389
|
-
.ev-tabs-title {
|
|
390
|
-
width: 100%;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.ev-tabs-header {
|
|
396
|
-
$tab-header-height: $input-default-height;
|
|
397
|
-
position: relative;
|
|
398
|
-
|
|
399
|
-
@include evThemify() {
|
|
400
|
-
border-bottom: 1px solid evThemed('border-base');
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.ev-tabs-list-wrapper {
|
|
404
|
-
user-select: none;
|
|
405
|
-
overflow: hidden;
|
|
406
|
-
}
|
|
407
|
-
.ev-tabs-list {
|
|
408
|
-
display: flex;
|
|
409
|
-
float: left;
|
|
410
|
-
border-radius: 4px 4px 0 0;
|
|
411
|
-
border-bottom: none !important;
|
|
412
|
-
text-align: center;
|
|
413
|
-
transition: transform .3s;
|
|
414
|
-
user-select: none;
|
|
415
|
-
|
|
416
|
-
@include evThemify() {
|
|
417
|
-
border: 1px solid evThemed('border-base');
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
.ev-tabs-title {
|
|
421
|
-
position: relative;
|
|
422
|
-
width: 100px;
|
|
423
|
-
height: $tab-header-height;
|
|
424
|
-
padding: 0 17px;
|
|
425
|
-
line-height: $tab-header-height;
|
|
426
|
-
cursor: pointer;
|
|
427
|
-
|
|
428
|
-
@include evThemify() {
|
|
429
|
-
background-color: evThemed('background-lighten');
|
|
430
|
-
}
|
|
431
|
-
&:not(:first-child) {
|
|
432
|
-
@include evThemify() {
|
|
433
|
-
border-left: 1px solid evThemed('border-base');
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
&:not(.select-idx):hover {
|
|
437
|
-
@include evThemify() {
|
|
438
|
-
color: evThemed('primary');
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
&.active {
|
|
442
|
-
background-color: transparent;
|
|
443
|
-
|
|
444
|
-
@include evThemify() {
|
|
445
|
-
border-bottom: 1px solid evThemed('background-base');
|
|
446
|
-
color: evThemed('primary');
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
&.has-icon {
|
|
450
|
-
padding-left: 32px;
|
|
451
|
-
}
|
|
452
|
-
&.drag-select {
|
|
453
|
-
@include evThemify() {
|
|
454
|
-
background-color: rgba(evThemed('background-base'), 0.3);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.text {
|
|
459
|
-
transition: transform $animate-base;
|
|
460
|
-
|
|
461
|
-
@include shortening();
|
|
462
|
-
}
|
|
463
|
-
.close-icon {
|
|
464
|
-
position: absolute;
|
|
465
|
-
top: 50%;
|
|
466
|
-
right: 7px;
|
|
467
|
-
transform: translateY(-50%);
|
|
468
|
-
font-size: $font-size-small;
|
|
469
|
-
opacity: 0;
|
|
470
|
-
transition: opacity $animate-base;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
.ev-tabs-icon {
|
|
474
|
-
position: absolute;
|
|
475
|
-
left: 10px;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.ev-tabs-nav-wrapper {
|
|
480
|
-
$tab-header-height: $input-default-height;
|
|
481
|
-
box-sizing: border-box;
|
|
482
|
-
margin-bottom: -1px;
|
|
483
|
-
user-select: none;
|
|
484
|
-
|
|
485
|
-
&.has-scroll {
|
|
486
|
-
$arrow-width: 17px;
|
|
487
|
-
padding: 0 20px;
|
|
488
|
-
|
|
489
|
-
.ev-tabs-arrow {
|
|
490
|
-
position: absolute;
|
|
491
|
-
top: 0;
|
|
492
|
-
width: $arrow-width;
|
|
493
|
-
height: $tab-header-height;
|
|
494
|
-
line-height: $tab-header-height;
|
|
495
|
-
font-size: $font-size-base;
|
|
496
|
-
text-align: center;
|
|
497
|
-
cursor: pointer;
|
|
498
|
-
|
|
499
|
-
@include evThemify() {
|
|
500
|
-
background-color: evThemed('background-base');
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
&:hover {
|
|
504
|
-
@include evThemify() {
|
|
505
|
-
color: evThemed('primary');
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
&.prev {
|
|
509
|
-
left: 0;
|
|
510
|
-
}
|
|
511
|
-
&.next {
|
|
512
|
-
right: 0;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
</style>
|