evui 2.1.0 → 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.
Files changed (189) hide show
  1. package/dist/{adac9fa4f723f9d2cb5b6640517114a9.png → 0b8d1200e71cae8d747dce4e69c4efb6.png} +0 -0
  2. package/dist/1.css +4 -0
  3. package/dist/1.css.map +1 -0
  4. package/dist/1.evui.min.js +2 -0
  5. package/dist/1.evui.min.js.map +1 -0
  6. package/dist/1ba679c05036b34bf359aa2e6c450faa.ttf +0 -0
  7. package/dist/2.css +4 -0
  8. package/dist/2.css.map +1 -0
  9. package/dist/2.evui.min.js +2 -0
  10. package/dist/2.evui.min.js.map +1 -0
  11. package/dist/{e8c322de9658cbeb8a774b6624167c2c.woff2 → 278156e41e0ad908cf7f841b17130502.woff2} +0 -0
  12. package/dist/3.evui.min.js +2 -0
  13. package/dist/3.evui.min.js.map +1 -0
  14. package/dist/32be89b11725274cd3e801192ba88361.ttf +0 -0
  15. package/dist/{0ab54153eeeca0ce03978cc463b257f7.woff2 → 38c6d8bab26db77d8c806813e1497763.woff2} +0 -0
  16. package/dist/4.evui.min.js +2 -0
  17. package/dist/4.evui.min.js.map +1 -0
  18. package/dist/{faff92145777a3cbaf8e7367b4807987.woff → 425399f81e4ce7cbd967685402ba0260.woff} +0 -0
  19. package/dist/4730076470a665bbc7b783c56d29a72e.svg +261 -0
  20. package/dist/52e9a7f6ff3af5ad261e5292d07ebdca.eot +0 -0
  21. package/dist/{ad97afd3337e8cda302d10ff5a4026b8.ttf → 5367103510b27b78482794590e1ce3b0.ttf} +0 -0
  22. package/dist/{65363c4d55617bbeb57d8ce6dcd46099.svg → 57e963e3d6dd0a9cf05150b40eebf69b.svg} +0 -0
  23. package/dist/{c5ebe0b32dc1b5cc449a76c4204d13bb.ttf → 65a2fb6d9aaa164b41a039302093995b.ttf} +0 -0
  24. package/dist/{cd6c777f1945164224dee082abaea03a.woff2 → 687a4990ea22bb1a49d469a5d9319790.woff2} +0 -0
  25. package/dist/{7583da5c07275cd5eb364507616f998f.ttf → 6c1d906bf5ba48676f65b2d65e935e1a.ttf} +0 -0
  26. package/dist/6dafca5a4f1e31f2bdf11939b24ff422.ttf +0 -0
  27. package/dist/{701ae6abd4719e9c2ada3535a497b341.eot → 752905fa5edf21fc52a10a0c1ca9c7a4.eot} +0 -0
  28. package/dist/76c05d80dda67cdc5d03f345b7bd063f.ttf +0 -0
  29. package/dist/{b551b554a67e86a840bc80cbb8066c30.svg → 7d62eb50e7bb05eedb2a4656f7fe8f3b.svg} +0 -0
  30. package/dist/{8e3c7f5520f5ae906c6cf6d7f3ddcd19.eot → a01e3f2d6c83dc3aee175e2482b3f777.eot} +0 -0
  31. package/dist/{448f2aaa315fa9dce7b2cf6ce31caed6.svg → b30fd8419d7e6d5918856c7531d33482.svg} +0 -0
  32. package/dist/c57dd55fa982e8940f69ca1d69a8a999.woff +0 -0
  33. package/dist/{b87b9ba532ace76ae9f6edfe9f72ded2.ttf → c656b8caa454ed19b9a2ef7f4f5b8fea.ttf} +0 -0
  34. package/dist/{a046592bac8f2fd96e994733faf3858c.woff → cac87dc00c87a5d74711d0276713808a.woff} +0 -0
  35. package/dist/{13db00b7a34fee4d819ab7f9838cc428.eot → d68fa3e67dbb653a13cec44b1bcabcfe.eot} +0 -0
  36. package/dist/{ef60a4f6c25ef7f39f2d25a748dbecfe.woff → ddae9b1ba9b0b42f58809904b0b21349.woff} +0 -0
  37. package/dist/evui.min.js +6 -86054
  38. package/dist/evui.min.js.gz +0 -0
  39. package/dist/evui.min.js.map +1 -1
  40. package/dist/main.css +43 -5541
  41. package/dist/main.css.gz +0 -0
  42. package/dist/main.css.map +1 -1
  43. package/package.json +56 -76
  44. package/src/common/emitter.js +20 -0
  45. package/src/common/utils.debounce.js +223 -0
  46. package/src/common/utils.js +51 -17
  47. package/src/common/utils.throttle.js +83 -0
  48. package/src/common/utils.tree.js +18 -0
  49. package/src/components/button/button.vue +316 -241
  50. package/src/components/chart/chart.core.js +378 -85
  51. package/src/components/chart/chart.vue +133 -115
  52. package/src/components/chart/element/element.bar.js +219 -25
  53. package/src/components/chart/element/element.bar.time.js +115 -0
  54. package/src/components/chart/element/element.line.js +172 -21
  55. package/src/components/chart/element/element.pie.js +86 -0
  56. package/src/components/chart/element/element.scatter.js +9 -2
  57. package/src/components/chart/element/element.tip.js +356 -0
  58. package/src/components/chart/helpers/helpers.canvas.js +94 -0
  59. package/src/components/chart/helpers/helpers.constant.js +25 -6
  60. package/src/components/chart/helpers/helpers.util.js +83 -38
  61. package/src/components/chart/index.js +0 -1
  62. package/src/components/chart/model/model.series.js +43 -14
  63. package/src/components/chart/model/model.store.js +440 -46
  64. package/src/components/chart/plugins/plugins.interaction.js +324 -0
  65. package/src/components/chart/plugins/plugins.legend.js +233 -91
  66. package/src/components/chart/plugins/plugins.pie.js +179 -0
  67. package/src/components/chart/plugins/plugins.title.js +25 -2
  68. package/src/components/chart/plugins/plugins.tooltip.js +384 -0
  69. package/src/components/chart/scale/scale.js +91 -29
  70. package/src/components/chart/scale/scale.linear.js +12 -0
  71. package/src/components/chart/scale/scale.logarithmic.js +25 -0
  72. package/src/components/chart/scale/scale.step.js +89 -52
  73. package/src/components/chart/scale/scale.time.category.js +204 -0
  74. package/src/components/chart/scale/scale.time.js +19 -1
  75. package/src/components/checkbox/checkbox-group.vue +15 -11
  76. package/src/components/checkbox/checkbox.vue +210 -138
  77. package/src/components/codeview/code.vue +42 -29
  78. package/src/components/contextmenu/contextmenu.child.vue +79 -0
  79. package/src/components/contextmenu/contextmenu.vue +276 -0
  80. package/src/components/contextmenu/contextmenu.wrap.vue +189 -0
  81. package/src/components/contextmenu/index.js +3 -0
  82. package/src/components/datepicker/calendar.core.js +588 -492
  83. package/src/components/datepicker/calendar.vue +0 -3
  84. package/src/components/datepicker/datepicker.vue +43 -15
  85. package/src/components/datepicker/index.js +5 -1
  86. package/src/components/grid/grid.filter.vue +290 -0
  87. package/src/components/grid/grid.filter.window.vue +411 -0
  88. package/src/components/grid/grid.render.vue +45 -0
  89. package/src/components/grid/grid.vue +1338 -0
  90. package/src/components/icon/icon.vue +22 -7
  91. package/src/components/input/input.number.vue +309 -277
  92. package/src/components/label/label.vue +2 -2
  93. package/src/components/loadingmask/loadingmask.vue +6 -13
  94. package/src/components/loginfield/loginfield.vue +46 -37
  95. package/src/components/markdown/index.js +3 -0
  96. package/src/components/markdown/markdown.vue +1001 -0
  97. package/src/components/menu/index.js +1 -3
  98. package/src/components/menu/menu.nav.item.vue +115 -0
  99. package/src/components/menu/menu.nav.sub.vue +42 -0
  100. package/src/components/menu/menu.nav.vue +71 -98
  101. package/src/components/message/index.js +3 -0
  102. package/src/components/message/message.js +63 -0
  103. package/src/components/message/message.vue +191 -0
  104. package/src/components/message-box/index.js +3 -0
  105. package/src/components/message-box/message-box.js +31 -0
  106. package/src/components/message-box/message-box.vue +298 -0
  107. package/src/components/notification/index.js +3 -0
  108. package/src/components/notification/notification.js +75 -0
  109. package/src/components/notification/notification.vue +242 -0
  110. package/src/components/radio/radio-group.vue +6 -2
  111. package/src/components/radio/radio.vue +156 -76
  112. package/src/components/selectbox/dropdown.vue +86 -40
  113. package/src/components/selectbox/listbox.vue +47 -18
  114. package/src/components/selectbox/option.vue +1 -1
  115. package/src/components/selectbox/selectbox.vue +304 -316
  116. package/src/components/slider/slider-tooltip.vue +7 -7
  117. package/src/components/slider/slider.vue +20 -25
  118. package/src/components/splitter/splitter.vue +104 -94
  119. package/src/components/table/table.black.css +1 -1
  120. package/src/components/table/table.filter.lite.vue +7 -7
  121. package/src/components/table/table.filter.vue +1 -1
  122. package/src/components/table/table.grey.css +5 -6
  123. package/src/components/table/table.navy.css +1 -1
  124. package/src/components/table/table.vue +55 -48
  125. package/src/components/tabs/tab-panel.vue +19 -5
  126. package/src/components/tabs/tabs.vue +182 -87
  127. package/src/components/textfield/textfield.vue +110 -87
  128. package/src/components/timepicker/index.js +2 -2
  129. package/src/components/timepicker/spinner.vue +15 -17
  130. package/src/components/timepicker/timepicker.vue +98 -53
  131. package/src/components/toggle/toggle.vue +148 -109
  132. package/src/components/tree/index.js +2 -6
  133. package/src/components/tree/render.js +17 -0
  134. package/src/components/tree/tree-node.vue +214 -0
  135. package/src/components/tree/tree.vue +296 -0
  136. package/src/components/tree-table/index.js +7 -0
  137. package/src/components/{tree → tree-table}/tree.table.black.css +0 -0
  138. package/src/components/{tree → tree-table}/tree.table.grey.css +0 -0
  139. package/src/components/{tree → tree-table}/tree.table.vue +36 -41
  140. package/src/components/{tree → tree-table}/tree.util.js +0 -0
  141. package/src/components/window/window.vue +238 -191
  142. package/src/index.js +25 -12
  143. package/src/styles/base/base.scss +50 -0
  144. package/src/styles/base/index.scss +1 -0
  145. package/src/styles/default.scss +5 -0
  146. package/src/styles/{codemirror.css → lib/codemirror.css} +0 -0
  147. package/src/styles/{all.css → lib/fontawesome.css} +1 -1
  148. package/src/styles/lib/icon.css +792 -0
  149. package/src/styles/themes/index.scss +2 -0
  150. package/src/styles/themes/mixin.scss +33 -0
  151. package/src/styles/themes/variables.scss +206 -0
  152. package/src/styles/utils/colors.scss +222 -0
  153. package/src/styles/utils/index.scss +2 -0
  154. package/src/styles/utils/mixins.scss +34 -0
  155. package/src/styles/utils/variables.scss +27 -0
  156. package/src/webfonts/EVUI.eot +0 -0
  157. package/src/webfonts/EVUI.svg +251 -173
  158. package/src/webfonts/EVUI.ttf +0 -0
  159. package/src/webfonts/EVUI.woff +0 -0
  160. package/src/webfonts/Roboto-Bold.ttf +0 -0
  161. package/src/webfonts/Roboto-Medium.ttf +0 -0
  162. package/src/webfonts/Roboto-Regular.ttf +0 -0
  163. package/dist/3c9453211570a4ede66a4b4954a32bbb.ttf +0 -0
  164. package/dist/8634884f932627fc43782e6963b64ccd.svg +0 -183
  165. package/dist/b9e64d9b5fa6b500eb5df6fa980d3e5b.eot +0 -0
  166. package/dist/f0ac0c8b3c9cd3ef9002749985ae546f.woff +0 -0
  167. package/src/components/chart/charts/chart.bar.js +0 -334
  168. package/src/components/chart/charts/chart.base.js +0 -1075
  169. package/src/components/chart/charts/chart.line.js +0 -262
  170. package/src/components/chart/charts/chart.pie.js +0 -383
  171. package/src/components/chart/charts/chart.scatter.js +0 -349
  172. package/src/components/chart/charts/chart.sunburst.js +0 -193
  173. package/src/components/chart/core/axis/axis.js +0 -217
  174. package/src/components/chart/core/axis/axis.scale.auto.js +0 -69
  175. package/src/components/chart/core/axis/axis.scale.fixed.js +0 -65
  176. package/src/components/chart/core/axis/axis.scale.steps.js +0 -149
  177. package/src/components/chart/core/core.constant.js +0 -116
  178. package/src/components/chart/core/core.legend.js +0 -473
  179. package/src/components/chart/core/core.util.js +0 -66
  180. package/src/components/chart/core/data/data.js +0 -412
  181. package/src/components/chart/core/data/data.pie.js +0 -70
  182. package/src/components/chart/core/data/data.stack.js +0 -222
  183. package/src/components/chart/core/data/data.sunburst.js +0 -172
  184. package/src/components/menu/menu.context.children.vue +0 -201
  185. package/src/components/menu/menu.context.vue +0 -144
  186. package/src/components/tabs/jun/tab.vue +0 -123
  187. package/src/components/tabs/jun/tabs.vue +0 -484
  188. package/src/styles/evui.css +0 -386
  189. 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: 1060;
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: #fff;
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: #e9eaec;
406
+ background-color: #E9EAEC;
410
407
  border-radius: 3px;
411
408
  }
412
409
  .evui-slider-dragging {
413
- border-color: #2d8cf0;
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: #57a3f3;
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 #57a3f3;
427
+ border: 2px solid #57A3F3;
433
428
  border-radius: 50%;
434
429
  text-align: center;
435
- background-color: #fff;
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: #2d8cf0;
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: #2d8cf0;
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: #ccc;
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: #ccc;
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: #ccc
461
+ background-color: #CCCCCC;
467
462
  }
468
463
  .evui-slider-disabled .evui-slider-btn {
469
- border-color: #ccc
464
+ border-color: #CCCCCC;
470
465
  }
471
466
  .evui-slider-disabled .evui-slider-btn:hover {
472
- border-color: #ccc;
467
+ border-color: #CCCCCC;
473
468
  cursor: not-allowed;
474
469
  }
475
470
  .evui-slider-input .evui-slider {
@@ -2,8 +2,11 @@
2
2
  <div>
3
3
  <div
4
4
  :class="`${type} ev-splitter ${isDragging ? 'hide' : ''}`"
5
+ :style="getStyle"
5
6
  @mousedown="onMouseDown"
6
- />
7
+ >
8
+ <slot/>
9
+ </div>
7
10
  <div
8
11
  v-show="isDragging"
9
12
  ref="guideline"
@@ -19,6 +22,32 @@
19
22
  type: String,
20
23
  default: 'hbox',
21
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
+ },
22
51
  },
23
52
  data() {
24
53
  return {
@@ -28,16 +57,30 @@
28
57
  height: 0,
29
58
  topPad: 0,
30
59
  leftPad: 0,
31
- prevOffset: {},
60
+ dragOffset: {},
32
61
  leftItemInfo: {},
33
62
  rightItemInfo: {},
34
63
  isDragging: false,
64
+ bound: null,
35
65
  };
36
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
+ },
37
76
  created() {
77
+ window.addEventListener('resize', this.onResize);
38
78
  },
39
79
  mounted() {
40
- this.updateItemInfo();
80
+ this.onResize();
81
+ },
82
+ beforeDestroy() {
83
+ window.removeEventListener('resize', this.onResize);
41
84
  },
42
85
  methods: {
43
86
  updateItemInfo() {
@@ -66,15 +109,12 @@
66
109
  this.rightItemInfo.width = rightEl.offsetWidth;
67
110
  this.rightItemInfo.height = rightEl.offsetHeight;
68
111
  },
69
- onResize(id, type) {
70
- if (!type && this.uid !== id) {
71
- return;
72
- }
73
-
112
+ onResize() {
74
113
  let top;
75
114
  let left;
76
115
 
77
116
  this.updateItemInfo();
117
+ this.setBounds();
78
118
 
79
119
  if (this.type === 'hbox') {
80
120
  top = this.leftItemInfo.top;
@@ -86,7 +126,7 @@
86
126
 
87
127
  this.$el.style.cssText += `top: ${top}px; left: ${left}px;`;
88
128
  },
89
- getBounds() {
129
+ setBounds() {
90
130
  const leftItemInfo = this.leftItemInfo;
91
131
  const rightItemInfo = this.rightItemInfo;
92
132
  let min = 0;
@@ -108,35 +148,32 @@
108
148
  rightOffset = rightItemInfo.top;
109
149
  }
110
150
 
111
- min = Math.floor(leftWh * 0.1);
112
- min = min < 60 ? 60 : min;
113
- min += leftOffset;
151
+ const { min: leftMin = 40, max: leftMax = leftWh + rightWh - 40 } = this.leftBound;
152
+ const { min: rightMin = 40, max: rightMax = leftWh + rightWh - 40 } = this.rightBound;
114
153
 
115
- max = Math.floor(rightWh * 0.1);
116
- max = max < 60 ? 60 : max;
117
- max = (rightOffset + rightWh) - max;
154
+ min = Math.min(leftWh - leftMin, rightMax - rightWh);
155
+ min = leftOffset + (leftWh - min);
118
156
 
119
- return {
120
- min,
121
- max,
122
- };
157
+ max = Math.min(leftMax - leftWh, rightWh - (rightMin + this.size));
158
+ max += rightOffset;
159
+
160
+ this.bound = { min, max };
123
161
  },
124
162
  resizeForNeighbor(changeValue) {
125
163
  const leftItemInfo = this.leftItemInfo;
126
164
  const rightItemInfo = this.rightItemInfo;
127
- // const leftId = leftItemInfo.el.dataset.id;
128
- // const rightId = rightItemInfo.el.dataset.id;
129
165
  let leftWh;
130
166
  let rightWh;
131
167
  let rightOffset;
168
+ let actualChangeValue;
132
169
 
133
170
  if (this.type === 'hbox') {
134
171
  leftWh = leftItemInfo.width - changeValue;
135
172
  rightWh = rightItemInfo.width + changeValue;
136
173
  rightOffset = rightItemInfo.left - changeValue;
137
174
 
138
- leftItemInfo.el.style.cssText += `width: ${leftWh}px; height: ${leftItemInfo.height}px`;
139
- rightItemInfo.el.style.cssText += `width: ${rightWh}px; height: ${rightItemInfo.height}px`;
175
+ leftItemInfo.el.style.cssText += `width: ${leftWh}px;`;
176
+ rightItemInfo.el.style.cssText += `width: ${rightWh}px;`;
140
177
 
141
178
  leftItemInfo.width = leftWh;
142
179
  rightItemInfo.width = rightWh;
@@ -146,103 +183,78 @@
146
183
  rightWh = rightItemInfo.height + changeValue;
147
184
  rightOffset = rightItemInfo.top - changeValue;
148
185
 
149
- leftItemInfo.el.style.cssText += `width: ${leftItemInfo.width}px; height: ${leftWh}px`;
150
- rightItemInfo.el.style.cssText += `width: ${rightItemInfo.width}px; height: ${rightWh}px`;
186
+ leftItemInfo.el.style.cssText += `height: ${leftWh}px`;
187
+ rightItemInfo.el.style.cssText += `height: ${rightWh}px`;
151
188
 
152
189
  leftItemInfo.height = leftWh;
153
190
  rightItemInfo.height = rightWh;
154
191
  rightItemInfo.top = rightOffset;
155
192
  }
156
193
 
157
- // if (leftId) {
158
- // this.$resizeBus.$emit('resize', leftId, this.type, leftItemInfo);
159
- // }
160
- //
161
- // if (rightId) {
162
- // this.$resizeBus.$emit('resize', rightId, this.type, rightItemInfo);
163
- // }
194
+ this.$emit('resize', { value: actualChangeValue, left: leftItemInfo, right: rightItemInfo });
164
195
  },
165
- onMouseDown({ pageX: prevLeft, pageY: prevTop }) {
196
+ onMouseDown(event) {
166
197
  const rootEl = this.$el.parentElement;
167
198
  const guideEl = this.$refs.guideline;
168
199
 
169
- this.prevOffset = { prevLeft, prevTop };
170
200
  this.updateItemInfo();
171
201
 
202
+ const { width, height, color, top, left } = this;
203
+
172
204
  rootEl.addEventListener('mousemove', this.onMouseMove);
173
205
  window.addEventListener('mouseup', this.onMouseUp);
174
206
 
207
+ guideEl.style.cssText = `top: ${top}px; left: ${left}px; background: ${color}; width: ${width}px; height: ${height}px;`;
208
+
175
209
  this.isDragging = true;
210
+ this.$emit('custom-mousedown', event);
211
+ },
212
+ getBoundaryValue(value) {
213
+ const { bound: { min, max } } = this;
214
+ let computed = value;
176
215
 
177
- guideEl.style.cssText = `top: ${this.top}px; left: ${this.left}px;`;
216
+ if (max < computed) {
217
+ computed = max;
218
+ }
219
+ if (min > computed) {
220
+ computed = min;
221
+ }
222
+
223
+ return computed;
178
224
  },
179
225
  onMouseMove({ pageX: xPos, pageY: yPos }) {
180
226
  const guideEl = this.$refs.guideline;
181
- const { min, max } = this.getBounds();
182
- const width = this.width;
183
- const height = this.height;
184
- let left = this.left;
185
- let top = this.top;
227
+ const { width, height, type, color } = this;
228
+ let { left, top } = this;
186
229
 
187
- if (this.type === 'hbox') {
188
- left = xPos - width - this.leftPad;
189
- if (min > left) {
190
- left = min;
191
- } else if (max < left) {
192
- left = max;
193
- }
230
+ if (type === 'hbox') {
231
+ left = this.getBoundaryValue(xPos - (width / 2) - this.leftPad);
194
232
  } else {
195
- top = yPos - height - this.topPad;
196
- if (min > top) {
197
- top = min;
198
- } else if (max < top) {
199
- top = max;
200
- }
233
+ top = this.getBoundaryValue(yPos - (height / 2) - this.topPad);
201
234
  }
202
235
 
203
- this.isDragging = true;
236
+ this.dragOffset = { top, left };
204
237
 
205
- guideEl.style.cssText = `top: ${top}px; left: ${left}px;`;
238
+ guideEl.style.cssText = `top: ${top}px; left: ${left}px; background: ${color}; width: ${width}px; height: ${height}px;`;
206
239
  },
207
- onMouseUp({ pageX: xPos, pageY: yPos }) {
240
+ onMouseUp(event) {
208
241
  const rootEl = this.$el.parentElement;
209
- const { min, max } = this.getBounds();
210
- const { prevLeft, prevTop } = this.prevOffset;
211
- let left;
212
- let top;
213
- let changeValue;
214
- let cssText;
215
-
216
- if (this.type === 'hbox') {
217
- left = xPos - this.width - this.leftPad;
218
- if (min > left) {
219
- left = min;
220
- } else if (max < left) {
221
- left = max;
222
- }
223
-
224
- changeValue = prevLeft - xPos;
225
- cssText = `left: ${left}px;`;
226
- } else {
227
- top = yPos - this.height - this.topPad;
228
- if (min > top) {
229
- top = min;
230
- } else if (max < top) {
231
- top = max;
232
- }
233
-
234
- changeValue = prevTop - yPos;
235
- cssText = `top: ${top}px;`;
236
- }
242
+ const { left: prevLeft, top: prevTop } = this;
243
+ const { top, left } = this.dragOffset;
237
244
 
238
245
  rootEl.removeEventListener('mousemove', this.onMouseMove);
239
246
  window.removeEventListener('mouseup', this.onMouseUp);
240
247
 
241
248
  this.isDragging = false;
242
249
 
243
- this.resizeForNeighbor(changeValue);
244
-
245
- this.$el.style.cssText += cssText;
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);
246
258
  },
247
259
  },
248
260
  };
@@ -250,35 +262,33 @@
250
262
  <style>
251
263
  .ev-splitter {
252
264
  top: 0;
253
- background: #dadada;
254
265
  -webkit-user-select: none;
255
266
  -moz-user-select: none;
256
267
  -ms-user-select: none;
257
268
  user-select: none;
258
269
  display: block;
259
270
  }
271
+
260
272
  .ev-splitter-guideline {
261
273
  position: absolute;
262
- z-index: 10000;
263
- background: #dadada;
274
+ z-index: 100;
264
275
  -webkit-user-select: none;
265
276
  -moz-user-select: none;
266
277
  -ms-user-select: none;
267
278
  user-select: none;
268
279
  }
280
+
269
281
  .ev-splitter.hide {
270
282
  background: transparent;
271
283
  }
284
+
272
285
  .ev-splitter.hbox,
273
286
  .ev-splitter-guideline.hbox {
274
- width: 4px;
275
- height: 100%;
276
287
  cursor: col-resize;
277
288
  }
289
+
278
290
  .ev-splitter.vbox,
279
291
  .ev-splitter-guideline.vbox {
280
- width: 100%;
281
- height: 4px;
282
292
  cursor: row-resize;
283
293
  }
284
294
  </style>
@@ -183,7 +183,7 @@ button {
183
183
  }
184
184
  .evui-table .evui-table-body .evui-table-columns .evui-table-columns-resizer {
185
185
  position: absolute;
186
- z-index: 1000;
186
+ z-index: 10;
187
187
  display: block;
188
188
  background-image: none;
189
189
  background-color: rgba(0, 0, 0, 0);
@@ -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="item in condition"
40
- :value="item.value"
41
- :key="item.value"
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
  >
@@ -163,7 +163,7 @@
163
163
  };
164
164
  </script>
165
165
  <style scoped>
166
- .evui-table-filter-body, .evui-table-filter-body select, .evui-table-filter-body input{
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
  }
@@ -75,7 +75,7 @@
75
75
  .modal {
76
76
  display: none; /* Hidden by default */
77
77
  position: fixed; /* Stay in place */
78
- z-index: 1001; /* Sit on top */
78
+ z-index: 850; /* Sit on top */
79
79
  padding-top: 100px; /* Location of the box */
80
80
  left: 0;
81
81
  top: 0;
@@ -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
- -webkit-user-select: none;
158
- -moz-user-select: none;
159
- -ms-user-select: none;
160
- -o-user-select: none;
161
- user-select: none;
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,
@@ -183,7 +183,7 @@ button {
183
183
  }
184
184
  .evui-table .evui-table-body .evui-table-columns .evui-table-columns-resizer {
185
185
  position: absolute;
186
- z-index: 1000;
186
+ z-index: 10;
187
187
  display: block;
188
188
  background-image: none;
189
189
  background-color: rgba(0, 0, 0, 0);