evui 2.0.8 → 2.1.1
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/{adac9fa4f723f9d2cb5b6640517114a9.png → 0b8d1200e71cae8d747dce4e69c4efb6.png} +0 -0
- package/dist/1.css +4 -0
- package/dist/1.css.map +1 -0
- package/dist/1.evui.min.js +2 -0
- package/dist/1.evui.min.js.map +1 -0
- package/dist/1ba679c05036b34bf359aa2e6c450faa.ttf +0 -0
- package/dist/2.css +4 -0
- package/dist/2.css.map +1 -0
- package/dist/2.evui.min.js +2 -0
- package/dist/2.evui.min.js.map +1 -0
- package/dist/{e8c322de9658cbeb8a774b6624167c2c.woff2 → 278156e41e0ad908cf7f841b17130502.woff2} +0 -0
- package/dist/3.evui.min.js +2 -0
- package/dist/3.evui.min.js.map +1 -0
- package/dist/32be89b11725274cd3e801192ba88361.ttf +0 -0
- package/dist/{0ab54153eeeca0ce03978cc463b257f7.woff2 → 38c6d8bab26db77d8c806813e1497763.woff2} +0 -0
- package/dist/4.evui.min.js +2 -0
- package/dist/4.evui.min.js.map +1 -0
- package/dist/{faff92145777a3cbaf8e7367b4807987.woff → 425399f81e4ce7cbd967685402ba0260.woff} +0 -0
- package/dist/4730076470a665bbc7b783c56d29a72e.svg +261 -0
- package/dist/52e9a7f6ff3af5ad261e5292d07ebdca.eot +0 -0
- package/dist/{ad97afd3337e8cda302d10ff5a4026b8.ttf → 5367103510b27b78482794590e1ce3b0.ttf} +0 -0
- package/dist/{65363c4d55617bbeb57d8ce6dcd46099.svg → 57e963e3d6dd0a9cf05150b40eebf69b.svg} +0 -0
- package/dist/{c5ebe0b32dc1b5cc449a76c4204d13bb.ttf → 65a2fb6d9aaa164b41a039302093995b.ttf} +0 -0
- package/dist/{cd6c777f1945164224dee082abaea03a.woff2 → 687a4990ea22bb1a49d469a5d9319790.woff2} +0 -0
- package/dist/{7583da5c07275cd5eb364507616f998f.ttf → 6c1d906bf5ba48676f65b2d65e935e1a.ttf} +0 -0
- package/dist/6dafca5a4f1e31f2bdf11939b24ff422.ttf +0 -0
- package/dist/{701ae6abd4719e9c2ada3535a497b341.eot → 752905fa5edf21fc52a10a0c1ca9c7a4.eot} +0 -0
- package/dist/76c05d80dda67cdc5d03f345b7bd063f.ttf +0 -0
- package/dist/{b551b554a67e86a840bc80cbb8066c30.svg → 7d62eb50e7bb05eedb2a4656f7fe8f3b.svg} +0 -0
- package/dist/{8e3c7f5520f5ae906c6cf6d7f3ddcd19.eot → a01e3f2d6c83dc3aee175e2482b3f777.eot} +0 -0
- package/dist/{448f2aaa315fa9dce7b2cf6ce31caed6.svg → b30fd8419d7e6d5918856c7531d33482.svg} +0 -0
- package/dist/c57dd55fa982e8940f69ca1d69a8a999.woff +0 -0
- package/dist/{b87b9ba532ace76ae9f6edfe9f72ded2.ttf → c656b8caa454ed19b9a2ef7f4f5b8fea.ttf} +0 -0
- package/dist/{a046592bac8f2fd96e994733faf3858c.woff → cac87dc00c87a5d74711d0276713808a.woff} +0 -0
- package/dist/{13db00b7a34fee4d819ab7f9838cc428.eot → d68fa3e67dbb653a13cec44b1bcabcfe.eot} +0 -0
- package/dist/{ef60a4f6c25ef7f39f2d25a748dbecfe.woff → ddae9b1ba9b0b42f58809904b0b21349.woff} +0 -0
- package/dist/evui.min.js +12 -59485
- package/dist/evui.min.js.gz +0 -0
- package/dist/evui.min.js.map +1 -1
- package/dist/main.css +85 -0
- package/dist/main.css.gz +0 -0
- package/dist/main.css.map +1 -0
- package/package.json +58 -89
- package/src/common/emitter.js +20 -0
- package/src/common/utils.debounce.js +223 -0
- package/src/common/utils.js +51 -17
- package/src/common/utils.throttle.js +83 -0
- package/src/common/utils.tree.js +18 -0
- package/src/components/button/button.vue +316 -241
- package/src/components/chart/chart.core.js +699 -0
- package/src/components/chart/chart.vue +200 -204
- package/src/components/chart/element/element.bar.js +311 -0
- package/src/components/chart/element/element.bar.time.js +115 -0
- package/src/components/chart/element/element.line.js +288 -0
- package/src/components/chart/element/element.pie.js +86 -0
- package/src/components/chart/element/element.scatter.js +83 -0
- package/src/components/chart/element/element.tip.js +356 -0
- package/src/components/chart/helpers/helpers.canvas.js +237 -0
- package/src/components/chart/helpers/helpers.constant.js +138 -0
- package/src/components/chart/helpers/helpers.util.js +154 -0
- package/src/components/chart/index.js +0 -1
- package/src/components/chart/model/index.js +4 -0
- package/src/components/chart/model/model.series.js +86 -0
- package/src/components/chart/model/model.store.js +559 -0
- package/src/components/chart/plugins/plugins.interaction.js +324 -0
- package/src/components/chart/plugins/plugins.legend.js +589 -0
- package/src/components/chart/plugins/plugins.pie.js +179 -0
- package/src/components/chart/plugins/plugins.title.js +56 -0
- package/src/components/chart/plugins/plugins.tooltip.js +384 -0
- package/src/components/chart/scale/scale.js +272 -0
- package/src/components/chart/scale/scale.linear.js +30 -0
- package/src/components/chart/scale/scale.logarithmic.js +120 -0
- package/src/components/chart/scale/scale.step.js +197 -0
- package/src/components/chart/scale/scale.time.category.js +204 -0
- package/src/components/chart/scale/scale.time.js +40 -0
- package/src/components/checkbox/checkbox-group.vue +31 -12
- package/src/components/checkbox/checkbox.vue +269 -19
- package/src/components/codeview/code.vue +42 -29
- package/src/components/contextmenu/contextmenu.child.vue +79 -0
- package/src/components/contextmenu/contextmenu.vue +276 -0
- package/src/components/contextmenu/contextmenu.wrap.vue +189 -0
- package/src/components/contextmenu/index.js +3 -0
- package/src/components/datepicker/calendar.core.js +604 -510
- package/src/components/datepicker/calendar.vue +0 -3
- package/src/components/datepicker/datepicker.vue +73 -14
- package/src/components/datepicker/index.js +5 -1
- package/src/components/grid/grid.filter.vue +290 -0
- package/src/components/grid/grid.filter.window.vue +411 -0
- package/src/components/grid/grid.render.vue +45 -0
- package/src/components/grid/grid.vue +1338 -0
- package/src/components/icon/icon.vue +22 -7
- package/src/components/input/input.number.vue +309 -277
- package/src/components/label/label.vue +2 -2
- package/src/components/loadingmask/loadingmask.vue +52 -63
- package/src/components/loginfield/index.js +3 -0
- package/src/components/loginfield/loginfield.vue +339 -0
- package/src/components/markdown/index.js +3 -0
- package/src/components/markdown/markdown.vue +1001 -0
- package/src/components/menu/index.js +1 -3
- package/src/components/menu/menu.nav.item.vue +115 -0
- package/src/components/menu/menu.nav.sub.vue +42 -0
- package/src/components/menu/menu.nav.vue +71 -98
- package/src/components/message/index.js +3 -0
- package/src/components/message/message.js +63 -0
- package/src/components/message/message.vue +191 -0
- package/src/components/message-box/index.js +3 -0
- package/src/components/message-box/message-box.js +31 -0
- package/src/components/message-box/message-box.vue +298 -0
- package/src/components/notification/index.js +3 -0
- package/src/components/notification/notification.js +75 -0
- package/src/components/notification/notification.vue +242 -0
- package/src/components/radio/radio-group.vue +12 -2
- package/src/components/radio/radio.vue +186 -25
- package/src/components/selectbox/dropdown.vue +96 -39
- package/src/components/selectbox/listbox.vue +68 -29
- package/src/components/selectbox/option.vue +1 -1
- package/src/components/selectbox/selectbox.vue +445 -245
- package/src/components/slider/slider-tooltip.vue +7 -7
- package/src/components/slider/slider.vue +20 -25
- package/src/components/splitter/index.js +3 -0
- package/src/components/splitter/splitter.vue +294 -0
- package/src/components/table/table.black.css +1 -1
- package/src/components/table/table.filter.lite.vue +8 -8
- package/src/components/table/table.filter.vue +1 -1
- package/src/components/table/table.grey.css +5 -6
- package/src/components/table/table.navy.css +1 -1
- package/src/components/table/table.vue +60 -55
- package/src/components/tabs/tab-panel.vue +19 -5
- package/src/components/tabs/tabs.vue +182 -87
- package/src/components/textfield/textfield.vue +140 -80
- package/src/components/timepicker/index.js +2 -2
- package/src/components/timepicker/spinner.vue +15 -17
- package/src/components/timepicker/timepicker.vue +98 -53
- package/src/components/toggle/toggle.vue +206 -158
- package/src/components/tree/index.js +2 -6
- package/src/components/tree/render.js +17 -0
- package/src/components/tree/tree-node.vue +214 -0
- package/src/components/tree/tree.vue +296 -0
- package/src/components/tree-table/index.js +7 -0
- package/src/components/{tree → tree-table}/tree.table.black.css +0 -0
- package/src/components/{tree → tree-table}/tree.table.grey.css +12 -12
- package/src/components/{tree → tree-table}/tree.table.vue +151 -95
- package/src/components/tree-table/tree.util.js +119 -0
- package/src/components/window/window.vue +238 -183
- package/src/index.js +29 -12
- package/src/styles/base/base.scss +50 -0
- package/src/styles/base/index.scss +1 -0
- package/src/styles/default.scss +5 -0
- package/src/styles/{codemirror.css → lib/codemirror.css} +0 -0
- package/src/styles/{all.css → lib/fontawesome.css} +1 -1
- package/src/styles/lib/icon.css +792 -0
- package/src/styles/themes/index.scss +2 -0
- package/src/styles/themes/mixin.scss +33 -0
- package/src/styles/themes/variables.scss +206 -0
- package/src/styles/utils/colors.scss +222 -0
- package/src/styles/utils/index.scss +2 -0
- package/src/styles/utils/mixins.scss +34 -0
- package/src/styles/utils/variables.scss +27 -0
- package/src/webfonts/EVUI.eot +0 -0
- package/src/webfonts/EVUI.svg +251 -173
- package/src/webfonts/EVUI.ttf +0 -0
- package/src/webfonts/EVUI.woff +0 -0
- package/src/webfonts/Roboto-Bold.ttf +0 -0
- package/src/webfonts/Roboto-Medium.ttf +0 -0
- package/src/webfonts/Roboto-Regular.ttf +0 -0
- package/dist/3c9453211570a4ede66a4b4954a32bbb.ttf +0 -0
- package/dist/8634884f932627fc43782e6963b64ccd.svg +0 -183
- package/dist/b9e64d9b5fa6b500eb5df6fa980d3e5b.eot +0 -0
- package/dist/f0ac0c8b3c9cd3ef9002749985ae546f.woff +0 -0
- package/src/components/chart/charts/chart.bar.js +0 -334
- package/src/components/chart/charts/chart.base.js +0 -1075
- package/src/components/chart/charts/chart.line.js +0 -262
- package/src/components/chart/charts/chart.pie.js +0 -383
- package/src/components/chart/charts/chart.scatter.js +0 -349
- package/src/components/chart/charts/chart.sunburst.js +0 -193
- package/src/components/chart/core/axis/axis.js +0 -217
- package/src/components/chart/core/axis/axis.scale.auto.js +0 -69
- package/src/components/chart/core/axis/axis.scale.fixed.js +0 -65
- package/src/components/chart/core/axis/axis.scale.steps.js +0 -149
- package/src/components/chart/core/core.constant.js +0 -91
- package/src/components/chart/core/core.legend.js +0 -473
- package/src/components/chart/core/core.util.js +0 -66
- package/src/components/chart/core/data/data.js +0 -412
- package/src/components/chart/core/data/data.pie.js +0 -70
- package/src/components/chart/core/data/data.stack.js +0 -222
- package/src/components/chart/core/data/data.sunburst.js +0 -172
- package/src/components/menu/menu.context.children.vue +0 -201
- package/src/components/menu/menu.context.vue +0 -144
- package/src/components/tabs/jun/tab.vue +0 -123
- package/src/components/tabs/jun/tabs.vue +0 -484
- package/src/components/tree/tree.util.js +0 -39
- package/src/styles/evui.css +0 -386
- package/src/styles/icon.css +0 -557
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@mouseover="onMouseOver"
|
|
6
6
|
@mouseout="onMouseOut"
|
|
7
7
|
>
|
|
8
|
-
<slot/>
|
|
8
|
+
<slot />
|
|
9
9
|
<transition name="fade">
|
|
10
10
|
<div :class="popperClasses">
|
|
11
11
|
<div
|
|
@@ -14,15 +14,13 @@
|
|
|
14
14
|
>
|
|
15
15
|
{{ content }}
|
|
16
16
|
</div>
|
|
17
|
-
<div :class="`${prefixCls}-arrow`"/>
|
|
17
|
+
<div :class="`${prefixCls}-arrow`" />
|
|
18
18
|
</div>
|
|
19
19
|
</transition>
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
-
import '@/styles/evui.css';
|
|
25
|
-
|
|
26
24
|
const prefixCls = 'evui-slider-tooltip';
|
|
27
25
|
|
|
28
26
|
export default {
|
|
@@ -77,7 +75,9 @@
|
|
|
77
75
|
};
|
|
78
76
|
</script>
|
|
79
77
|
|
|
80
|
-
<style scoped>
|
|
78
|
+
<style lang="scss" scoped>
|
|
79
|
+
@import '~@/styles/default';
|
|
80
|
+
|
|
81
81
|
.evui-slider-tooltip {
|
|
82
82
|
position: absolute;
|
|
83
83
|
user-select: none;
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
left: -17px;
|
|
90
90
|
font-size: 12px;
|
|
91
91
|
line-height: 1.5;
|
|
92
|
-
z-index:
|
|
92
|
+
z-index: 850;
|
|
93
93
|
}
|
|
94
94
|
.evui-slider-tooltip-popper.on {
|
|
95
95
|
visibility: visible;
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
text-align: left;
|
|
103
103
|
text-decoration: none;
|
|
104
104
|
border-radius: 4px;
|
|
105
|
-
color: #
|
|
105
|
+
color: #FFFFFF;
|
|
106
106
|
background-color: rgba(70, 76, 91, .9);
|
|
107
107
|
box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
|
|
108
108
|
white-space: nowrap;
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
:key="name+'Dot'+idx"
|
|
12
12
|
:style="{ left: `${item.valuePer}%` }"
|
|
13
13
|
:class="`${prefixCls}-dot`"
|
|
14
|
-
@click="onClick"
|
|
14
|
+
@click="onClick"
|
|
15
|
+
/>
|
|
15
16
|
</template>
|
|
16
17
|
<div
|
|
17
18
|
:style="barStyle"
|
|
18
|
-
:class="`${prefixCls}-bar`"
|
|
19
|
+
:class="`${prefixCls}-bar`"
|
|
20
|
+
/>
|
|
19
21
|
<slider-tooltip
|
|
20
22
|
:pos-x="leftBtnValuePer"
|
|
21
23
|
:is-dragging="leftBtnDragging"
|
|
@@ -45,7 +47,6 @@
|
|
|
45
47
|
</template>
|
|
46
48
|
|
|
47
49
|
<script>
|
|
48
|
-
import '@/styles/evui.css';
|
|
49
50
|
import SliderTooltip from './slider-tooltip';
|
|
50
51
|
|
|
51
52
|
const prefixCls = 'evui-slider';
|
|
@@ -393,12 +394,8 @@
|
|
|
393
394
|
};
|
|
394
395
|
</script>
|
|
395
396
|
|
|
396
|
-
<style>
|
|
397
|
-
|
|
398
|
-
Slider Component
|
|
399
|
-
************************************************************************************/
|
|
400
|
-
|
|
401
|
-
/** evui-slider **/
|
|
397
|
+
<style lang="scss">
|
|
398
|
+
@import '~@/styles/default';
|
|
402
399
|
|
|
403
400
|
.evui-slider {
|
|
404
401
|
position: relative;
|
|
@@ -406,22 +403,20 @@
|
|
|
406
403
|
height: 4px;
|
|
407
404
|
margin: 4px 0;
|
|
408
405
|
vertical-align: middle;
|
|
409
|
-
background-color: #
|
|
406
|
+
background-color: #E9EAEC;
|
|
410
407
|
border-radius: 3px;
|
|
411
408
|
}
|
|
412
409
|
.evui-slider-dragging {
|
|
413
|
-
border-color: #
|
|
414
|
-
cursor: -webkit-grabbing;
|
|
410
|
+
border-color: #2D8CF0;
|
|
415
411
|
cursor: grabbing;
|
|
416
412
|
}
|
|
417
413
|
.evui-slider:hover:not(.evui-slider-dragging) {
|
|
418
|
-
cursor: -webkit-grab;
|
|
419
414
|
cursor: grab;
|
|
420
415
|
}
|
|
421
416
|
.evui-slider-bar {
|
|
422
417
|
position: absolute;
|
|
423
418
|
height: 4px;
|
|
424
|
-
background: #
|
|
419
|
+
background: #57A3F3;
|
|
425
420
|
border-radius: 3px;
|
|
426
421
|
}
|
|
427
422
|
.evui-slider-btn {
|
|
@@ -429,21 +424,21 @@
|
|
|
429
424
|
top: -4px;
|
|
430
425
|
width: 12px;
|
|
431
426
|
height: 12px;
|
|
432
|
-
border: 2px solid #
|
|
427
|
+
border: 2px solid #57A3F3;
|
|
433
428
|
border-radius: 50%;
|
|
434
429
|
text-align: center;
|
|
435
|
-
background-color: #
|
|
430
|
+
background-color: #FFFFFF;
|
|
436
431
|
outline: 0;
|
|
437
432
|
transform: translateX(-4px);
|
|
438
433
|
}
|
|
439
434
|
.evui-slider-btn-dragging:not(:hover) {
|
|
440
|
-
border-color: #
|
|
435
|
+
border-color: #2D8CF0;
|
|
441
436
|
transform: translateX(-4px) scale(1.5);
|
|
442
437
|
transition: transform .2s linear;
|
|
443
438
|
}
|
|
444
439
|
.evui-slider-btn:focus,
|
|
445
440
|
.evui-slider-btn:hover {
|
|
446
|
-
border-color: #
|
|
441
|
+
border-color: #2D8CF0;
|
|
447
442
|
transform: translateX(-4px) scale(1.5);
|
|
448
443
|
transition: transform .2s linear;
|
|
449
444
|
}
|
|
@@ -453,23 +448,23 @@
|
|
|
453
448
|
width: 4px;
|
|
454
449
|
height: 4px;
|
|
455
450
|
border-radius: 50%;
|
|
456
|
-
background-color: #
|
|
451
|
+
background-color: #CCCCCC;
|
|
457
452
|
}
|
|
458
453
|
.evui-slider-disabled {
|
|
459
|
-
cursor: not-allowed
|
|
454
|
+
cursor: not-allowed;
|
|
460
455
|
}
|
|
461
456
|
.evui-slider-disabled .evui-slider {
|
|
462
|
-
background-color: #
|
|
463
|
-
cursor: not-allowed
|
|
457
|
+
background-color: #CCCCCC;
|
|
458
|
+
cursor: not-allowed;
|
|
464
459
|
}
|
|
465
460
|
.evui-slider-disabled .evui-slider-bar {
|
|
466
|
-
background-color: #
|
|
461
|
+
background-color: #CCCCCC;
|
|
467
462
|
}
|
|
468
463
|
.evui-slider-disabled .evui-slider-btn {
|
|
469
|
-
border-color: #
|
|
464
|
+
border-color: #CCCCCC;
|
|
470
465
|
}
|
|
471
466
|
.evui-slider-disabled .evui-slider-btn:hover {
|
|
472
|
-
border-color: #
|
|
467
|
+
border-color: #CCCCCC;
|
|
473
468
|
cursor: not-allowed;
|
|
474
469
|
}
|
|
475
470
|
.evui-slider-input .evui-slider {
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
:class="`${type} ev-splitter ${isDragging ? 'hide' : ''}`"
|
|
5
|
+
:style="getStyle"
|
|
6
|
+
@mousedown="onMouseDown"
|
|
7
|
+
>
|
|
8
|
+
<slot/>
|
|
9
|
+
</div>
|
|
10
|
+
<div
|
|
11
|
+
v-show="isDragging"
|
|
12
|
+
ref="guideline"
|
|
13
|
+
:class="`${type} ev-splitter-guideline`"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'Splitter',
|
|
20
|
+
props: {
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'hbox',
|
|
24
|
+
},
|
|
25
|
+
color: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '#dadada',
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 4,
|
|
32
|
+
},
|
|
33
|
+
leftBound: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default() {
|
|
36
|
+
return {
|
|
37
|
+
min: undefined,
|
|
38
|
+
max: undefined,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
rightBound: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default() {
|
|
45
|
+
return {
|
|
46
|
+
min: undefined,
|
|
47
|
+
max: undefined,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
top: 0,
|
|
55
|
+
left: 0,
|
|
56
|
+
width: 0,
|
|
57
|
+
height: 0,
|
|
58
|
+
topPad: 0,
|
|
59
|
+
leftPad: 0,
|
|
60
|
+
dragOffset: {},
|
|
61
|
+
leftItemInfo: {},
|
|
62
|
+
rightItemInfo: {},
|
|
63
|
+
isDragging: false,
|
|
64
|
+
bound: null,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
computed: {
|
|
68
|
+
getStyle() {
|
|
69
|
+
return {
|
|
70
|
+
background: this.color,
|
|
71
|
+
width: this.type === 'hbox' ? `${this.size}px` : '100%',
|
|
72
|
+
height: this.type === 'hbox' ? '100%' : `${this.size}px`,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
created() {
|
|
77
|
+
window.addEventListener('resize', this.onResize);
|
|
78
|
+
},
|
|
79
|
+
mounted() {
|
|
80
|
+
this.onResize();
|
|
81
|
+
},
|
|
82
|
+
beforeDestroy() {
|
|
83
|
+
window.removeEventListener('resize', this.onResize);
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
updateItemInfo() {
|
|
87
|
+
const el = this.$el;
|
|
88
|
+
const rect = this.$el.getBoundingClientRect();
|
|
89
|
+
const leftEl = el.previousElementSibling;
|
|
90
|
+
const rightEl = el.nextElementSibling;
|
|
91
|
+
|
|
92
|
+
this.top = el.offsetTop;
|
|
93
|
+
this.left = el.offsetLeft;
|
|
94
|
+
this.width = rect.width;
|
|
95
|
+
this.height = rect.height;
|
|
96
|
+
this.topPad = rect.top - this.top;
|
|
97
|
+
this.leftPad = rect.left - this.left;
|
|
98
|
+
|
|
99
|
+
this.leftItemInfo.el = leftEl;
|
|
100
|
+
this.rightItemInfo.el = rightEl;
|
|
101
|
+
|
|
102
|
+
this.leftItemInfo.top = leftEl.offsetTop;
|
|
103
|
+
this.leftItemInfo.left = leftEl.offsetLeft;
|
|
104
|
+
this.leftItemInfo.width = leftEl.offsetWidth;
|
|
105
|
+
this.leftItemInfo.height = leftEl.offsetHeight;
|
|
106
|
+
|
|
107
|
+
this.rightItemInfo.top = rightEl.offsetTop;
|
|
108
|
+
this.rightItemInfo.left = rightEl.offsetLeft;
|
|
109
|
+
this.rightItemInfo.width = rightEl.offsetWidth;
|
|
110
|
+
this.rightItemInfo.height = rightEl.offsetHeight;
|
|
111
|
+
},
|
|
112
|
+
onResize() {
|
|
113
|
+
let top;
|
|
114
|
+
let left;
|
|
115
|
+
|
|
116
|
+
this.updateItemInfo();
|
|
117
|
+
this.setBounds();
|
|
118
|
+
|
|
119
|
+
if (this.type === 'hbox') {
|
|
120
|
+
top = this.leftItemInfo.top;
|
|
121
|
+
left = this.leftItemInfo.left + this.leftItemInfo.width;
|
|
122
|
+
} else {
|
|
123
|
+
top = this.leftItemInfo.top + this.leftItemInfo.height;
|
|
124
|
+
left = this.leftItemInfo.left;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.$el.style.cssText += `top: ${top}px; left: ${left}px;`;
|
|
128
|
+
},
|
|
129
|
+
setBounds() {
|
|
130
|
+
const leftItemInfo = this.leftItemInfo;
|
|
131
|
+
const rightItemInfo = this.rightItemInfo;
|
|
132
|
+
let min = 0;
|
|
133
|
+
let max = 0;
|
|
134
|
+
let leftWh;
|
|
135
|
+
let rightWh;
|
|
136
|
+
let leftOffset;
|
|
137
|
+
let rightOffset;
|
|
138
|
+
|
|
139
|
+
if (this.type === 'hbox') {
|
|
140
|
+
leftWh = leftItemInfo.width;
|
|
141
|
+
rightWh = rightItemInfo.width;
|
|
142
|
+
leftOffset = leftItemInfo.left;
|
|
143
|
+
rightOffset = rightItemInfo.left;
|
|
144
|
+
} else {
|
|
145
|
+
leftWh = leftItemInfo.height;
|
|
146
|
+
rightWh = rightItemInfo.height;
|
|
147
|
+
leftOffset = leftItemInfo.top;
|
|
148
|
+
rightOffset = rightItemInfo.top;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const { min: leftMin = 40, max: leftMax = leftWh + rightWh - 40 } = this.leftBound;
|
|
152
|
+
const { min: rightMin = 40, max: rightMax = leftWh + rightWh - 40 } = this.rightBound;
|
|
153
|
+
|
|
154
|
+
min = Math.min(leftWh - leftMin, rightMax - rightWh);
|
|
155
|
+
min = leftOffset + (leftWh - min);
|
|
156
|
+
|
|
157
|
+
max = Math.min(leftMax - leftWh, rightWh - (rightMin + this.size));
|
|
158
|
+
max += rightOffset;
|
|
159
|
+
|
|
160
|
+
this.bound = { min, max };
|
|
161
|
+
},
|
|
162
|
+
resizeForNeighbor(changeValue) {
|
|
163
|
+
const leftItemInfo = this.leftItemInfo;
|
|
164
|
+
const rightItemInfo = this.rightItemInfo;
|
|
165
|
+
let leftWh;
|
|
166
|
+
let rightWh;
|
|
167
|
+
let rightOffset;
|
|
168
|
+
let actualChangeValue;
|
|
169
|
+
|
|
170
|
+
if (this.type === 'hbox') {
|
|
171
|
+
leftWh = leftItemInfo.width - changeValue;
|
|
172
|
+
rightWh = rightItemInfo.width + changeValue;
|
|
173
|
+
rightOffset = rightItemInfo.left - changeValue;
|
|
174
|
+
|
|
175
|
+
leftItemInfo.el.style.cssText += `width: ${leftWh}px;`;
|
|
176
|
+
rightItemInfo.el.style.cssText += `width: ${rightWh}px;`;
|
|
177
|
+
|
|
178
|
+
leftItemInfo.width = leftWh;
|
|
179
|
+
rightItemInfo.width = rightWh;
|
|
180
|
+
rightItemInfo.left = rightOffset;
|
|
181
|
+
} else {
|
|
182
|
+
leftWh = leftItemInfo.height - changeValue;
|
|
183
|
+
rightWh = rightItemInfo.height + changeValue;
|
|
184
|
+
rightOffset = rightItemInfo.top - changeValue;
|
|
185
|
+
|
|
186
|
+
leftItemInfo.el.style.cssText += `height: ${leftWh}px`;
|
|
187
|
+
rightItemInfo.el.style.cssText += `height: ${rightWh}px`;
|
|
188
|
+
|
|
189
|
+
leftItemInfo.height = leftWh;
|
|
190
|
+
rightItemInfo.height = rightWh;
|
|
191
|
+
rightItemInfo.top = rightOffset;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
this.$emit('resize', { value: actualChangeValue, left: leftItemInfo, right: rightItemInfo });
|
|
195
|
+
},
|
|
196
|
+
onMouseDown(event) {
|
|
197
|
+
const rootEl = this.$el.parentElement;
|
|
198
|
+
const guideEl = this.$refs.guideline;
|
|
199
|
+
|
|
200
|
+
this.updateItemInfo();
|
|
201
|
+
|
|
202
|
+
const { width, height, color, top, left } = this;
|
|
203
|
+
|
|
204
|
+
rootEl.addEventListener('mousemove', this.onMouseMove);
|
|
205
|
+
window.addEventListener('mouseup', this.onMouseUp);
|
|
206
|
+
|
|
207
|
+
guideEl.style.cssText = `top: ${top}px; left: ${left}px; background: ${color}; width: ${width}px; height: ${height}px;`;
|
|
208
|
+
|
|
209
|
+
this.isDragging = true;
|
|
210
|
+
this.$emit('custom-mousedown', event);
|
|
211
|
+
},
|
|
212
|
+
getBoundaryValue(value) {
|
|
213
|
+
const { bound: { min, max } } = this;
|
|
214
|
+
let computed = value;
|
|
215
|
+
|
|
216
|
+
if (max < computed) {
|
|
217
|
+
computed = max;
|
|
218
|
+
}
|
|
219
|
+
if (min > computed) {
|
|
220
|
+
computed = min;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return computed;
|
|
224
|
+
},
|
|
225
|
+
onMouseMove({ pageX: xPos, pageY: yPos }) {
|
|
226
|
+
const guideEl = this.$refs.guideline;
|
|
227
|
+
const { width, height, type, color } = this;
|
|
228
|
+
let { left, top } = this;
|
|
229
|
+
|
|
230
|
+
if (type === 'hbox') {
|
|
231
|
+
left = this.getBoundaryValue(xPos - (width / 2) - this.leftPad);
|
|
232
|
+
} else {
|
|
233
|
+
top = this.getBoundaryValue(yPos - (height / 2) - this.topPad);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
this.dragOffset = { top, left };
|
|
237
|
+
|
|
238
|
+
guideEl.style.cssText = `top: ${top}px; left: ${left}px; background: ${color}; width: ${width}px; height: ${height}px;`;
|
|
239
|
+
},
|
|
240
|
+
onMouseUp(event) {
|
|
241
|
+
const rootEl = this.$el.parentElement;
|
|
242
|
+
const { left: prevLeft, top: prevTop } = this;
|
|
243
|
+
const { top, left } = this.dragOffset;
|
|
244
|
+
|
|
245
|
+
rootEl.removeEventListener('mousemove', this.onMouseMove);
|
|
246
|
+
window.removeEventListener('mouseup', this.onMouseUp);
|
|
247
|
+
|
|
248
|
+
this.isDragging = false;
|
|
249
|
+
|
|
250
|
+
if (this.type === 'hbox') {
|
|
251
|
+
this.resizeForNeighbor(prevLeft - left);
|
|
252
|
+
this.$el.style.left = `${left}px`;
|
|
253
|
+
} else {
|
|
254
|
+
this.resizeForNeighbor(prevTop - top);
|
|
255
|
+
this.$el.style.top = `${top}px`;
|
|
256
|
+
}
|
|
257
|
+
this.$emit('custom-mouseup', event);
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
</script>
|
|
262
|
+
<style>
|
|
263
|
+
.ev-splitter {
|
|
264
|
+
top: 0;
|
|
265
|
+
-webkit-user-select: none;
|
|
266
|
+
-moz-user-select: none;
|
|
267
|
+
-ms-user-select: none;
|
|
268
|
+
user-select: none;
|
|
269
|
+
display: block;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ev-splitter-guideline {
|
|
273
|
+
position: absolute;
|
|
274
|
+
z-index: 100;
|
|
275
|
+
-webkit-user-select: none;
|
|
276
|
+
-moz-user-select: none;
|
|
277
|
+
-ms-user-select: none;
|
|
278
|
+
user-select: none;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ev-splitter.hide {
|
|
282
|
+
background: transparent;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.ev-splitter.hbox,
|
|
286
|
+
.ev-splitter-guideline.hbox {
|
|
287
|
+
cursor: col-resize;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.ev-splitter.vbox,
|
|
291
|
+
.ev-splitter-guideline.vbox {
|
|
292
|
+
cursor: row-resize;
|
|
293
|
+
}
|
|
294
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
value="or"
|
|
17
17
|
>
|
|
18
18
|
<label> OR </label>
|
|
19
|
-
<div style="float:right">
|
|
19
|
+
<div style="float: right;">
|
|
20
20
|
<button
|
|
21
21
|
ref="addButton"
|
|
22
22
|
disabled="true"
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
<div
|
|
30
30
|
v-for="(item, index) in filterDataList"
|
|
31
31
|
:key="index"
|
|
32
|
-
style="margin:3px;"
|
|
32
|
+
style="margin: 3px;"
|
|
33
33
|
>
|
|
34
34
|
<select
|
|
35
35
|
v-model="item.condition"
|
|
36
36
|
@change="changeCondition"
|
|
37
37
|
>
|
|
38
38
|
<option
|
|
39
|
-
v-for="
|
|
40
|
-
:
|
|
41
|
-
:
|
|
39
|
+
v-for="opt in condition"
|
|
40
|
+
:key="opt.value"
|
|
41
|
+
:value="opt.value"
|
|
42
42
|
>
|
|
43
43
|
{{ item.name }}
|
|
44
44
|
</option>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<input
|
|
47
47
|
v-model="item.text"
|
|
48
48
|
type="text"
|
|
49
|
-
style="width:120px;"
|
|
49
|
+
style="width: 120px;"
|
|
50
50
|
@focus="focusTextbox(index, $event.target.value)"
|
|
51
51
|
@input="changeFilterValue(index, $event.target.value)"
|
|
52
52
|
>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</template>
|
|
57
57
|
<script>
|
|
58
|
-
import _ from 'lodash';
|
|
58
|
+
import _ from 'lodash-es';
|
|
59
59
|
|
|
60
60
|
export default {
|
|
61
61
|
props: {
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
};
|
|
164
164
|
</script>
|
|
165
165
|
<style scoped>
|
|
166
|
-
.evui-table-filter-body,
|
|
166
|
+
.evui-table-filter-body, .evui-table-filter-body select, .evui-table-filter-body input {
|
|
167
167
|
font-family: Verdana, Arial, sans-serif;
|
|
168
168
|
font-size: 11px;
|
|
169
169
|
}
|
|
@@ -16,7 +16,6 @@ button {
|
|
|
16
16
|
font-size: 11px;
|
|
17
17
|
}
|
|
18
18
|
.evui-table-reset * {
|
|
19
|
-
color: default;
|
|
20
19
|
line-height: 100%;
|
|
21
20
|
-webkit-box-sizing: border-box;
|
|
22
21
|
-moz-box-sizing: border-box;
|
|
@@ -154,11 +153,11 @@ button {
|
|
|
154
153
|
overflow: hidden;
|
|
155
154
|
padding: 0px;
|
|
156
155
|
background-color: #ffffff;
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
user-select:
|
|
156
|
+
user-select: text;
|
|
157
|
+
-webkit-user-select: text;
|
|
158
|
+
-moz-user-select: text;
|
|
159
|
+
-ms-user-select: text;
|
|
160
|
+
-o-user-select: text;
|
|
162
161
|
}
|
|
163
162
|
.evui-table .evui-table-body input,
|
|
164
163
|
.evui-table .evui-table-body select,
|