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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-if="
|
|
4
|
-
v-show="
|
|
5
|
-
:id="windowId"
|
|
2
|
+
<section
|
|
3
|
+
v-if="isAttachToDom"
|
|
4
|
+
v-show="isShowFlag"
|
|
6
5
|
:style="windowStyle"
|
|
7
6
|
:class="windowCls"
|
|
8
7
|
@mousedown="mousedown"
|
|
@@ -15,27 +14,46 @@
|
|
|
15
14
|
:class="headerCls"
|
|
16
15
|
@dblclick="headerDblClick"
|
|
17
16
|
>
|
|
18
|
-
<
|
|
19
|
-
|
|
17
|
+
<p :class="`${prefixCls}-title-area`">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</p>
|
|
20
20
|
<div
|
|
21
|
-
:class="`${prefixCls}-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
:class="`${prefixCls}-btn-area`"
|
|
22
|
+
>
|
|
23
|
+
<span
|
|
24
|
+
v-if="maximizable"
|
|
25
|
+
:class="`${prefixCls}-btn`"
|
|
26
|
+
class="expand"
|
|
27
|
+
@click="clickExpandBtn"
|
|
28
|
+
>
|
|
29
|
+
<ev-icon
|
|
30
|
+
v-if="!isFullExpandWindow"
|
|
31
|
+
:cls="'ei-expand2'"
|
|
32
|
+
/>
|
|
33
|
+
<ev-icon
|
|
34
|
+
v-else
|
|
35
|
+
:cls="'ei-compress2'"
|
|
36
|
+
/>
|
|
37
|
+
</span>
|
|
38
|
+
<span
|
|
39
|
+
v-if="closable"
|
|
40
|
+
:class="`${prefixCls}-btn`"
|
|
41
|
+
class="close"
|
|
42
|
+
@click="clickCloseBtn"
|
|
43
|
+
>
|
|
44
|
+
<ev-icon
|
|
45
|
+
:cls="'ei-close2'"
|
|
46
|
+
/>
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
29
49
|
</div>
|
|
30
50
|
<div :class="`${prefixCls}-body-area`">
|
|
31
|
-
<slot/>
|
|
51
|
+
<slot />
|
|
32
52
|
</div>
|
|
33
|
-
</
|
|
53
|
+
</section>
|
|
34
54
|
</template>
|
|
35
55
|
|
|
36
56
|
<script>
|
|
37
|
-
import '@/styles/evui.css';
|
|
38
|
-
|
|
39
57
|
export default {
|
|
40
58
|
props: {
|
|
41
59
|
width: {
|
|
@@ -58,6 +76,26 @@
|
|
|
58
76
|
type: String,
|
|
59
77
|
default: '',
|
|
60
78
|
},
|
|
79
|
+
maximizable: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true,
|
|
82
|
+
},
|
|
83
|
+
resizable: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: true,
|
|
86
|
+
},
|
|
87
|
+
closable: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: true,
|
|
90
|
+
},
|
|
91
|
+
modal: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
95
|
+
isShow: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: true,
|
|
98
|
+
},
|
|
61
99
|
closeType: {
|
|
62
100
|
type: String,
|
|
63
101
|
default: 'hide',
|
|
@@ -66,23 +104,23 @@
|
|
|
66
104
|
return list.indexOf(value) > -1;
|
|
67
105
|
},
|
|
68
106
|
},
|
|
69
|
-
resizable: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: true,
|
|
72
|
-
},
|
|
73
107
|
},
|
|
74
108
|
data() {
|
|
75
109
|
return {
|
|
76
110
|
prefixCls: 'ev-window',
|
|
77
|
-
|
|
78
|
-
|
|
111
|
+
modelEl: null,
|
|
112
|
+
isMovedEl: false,
|
|
113
|
+
isAttachToDom: true,
|
|
114
|
+
isShowFlag: true,
|
|
115
|
+
isFullExpandWindow: false,
|
|
116
|
+
vIf: true,
|
|
117
|
+
vShow: true,
|
|
118
|
+
windowStyle: null,
|
|
79
119
|
windowCls: '',
|
|
80
120
|
headerCls: '',
|
|
81
121
|
headerStyle: '',
|
|
82
122
|
headerHeight: 32,
|
|
83
123
|
grabbingBorderSize: 5,
|
|
84
|
-
isExist: true,
|
|
85
|
-
isShow: true,
|
|
86
124
|
grabbingBorderPosInfo: {
|
|
87
125
|
top: false,
|
|
88
126
|
right: false,
|
|
@@ -101,17 +139,51 @@
|
|
|
101
139
|
},
|
|
102
140
|
};
|
|
103
141
|
},
|
|
142
|
+
watch: {
|
|
143
|
+
isShow: {
|
|
144
|
+
immediate: true,
|
|
145
|
+
handler(value) {
|
|
146
|
+
this.isAttachToDom = this.closeType === 'hide' || value;
|
|
147
|
+
this.isShowFlag = value;
|
|
148
|
+
|
|
149
|
+
if (!this.windowStyle && value) {
|
|
150
|
+
this.$nextTick(() => {
|
|
151
|
+
this.syncIsShow();
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
this.syncIsShow();
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
104
159
|
created() {
|
|
105
|
-
this.windowId = `window_${this._uid}`;
|
|
106
160
|
this.headerStyle = `height: ${this.headerHeight}px`;
|
|
107
161
|
this.headerCls = { [`${this.prefixCls}-header-area`]: true };
|
|
108
162
|
this.windowCls = { [this.prefixCls]: true };
|
|
109
163
|
},
|
|
110
164
|
mounted() {
|
|
111
|
-
|
|
165
|
+
const body = document.body;
|
|
166
|
+
if (!this.isMovedEl) {
|
|
167
|
+
this.isMovedEl = true;
|
|
168
|
+
|
|
169
|
+
if (this.modal) {
|
|
170
|
+
this.modelEl = document.createElement('div');
|
|
171
|
+
this.modelEl.classList.add(`${this.prefixCls}-modal`);
|
|
172
|
+
this.modelEl.appendChild(this.$el);
|
|
173
|
+
body.appendChild(this.modelEl);
|
|
174
|
+
} else {
|
|
175
|
+
body.appendChild(this.$el);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
112
178
|
},
|
|
113
|
-
|
|
114
|
-
this.
|
|
179
|
+
destroyed() {
|
|
180
|
+
if (this.isMovedEl) {
|
|
181
|
+
if (this.modal) {
|
|
182
|
+
this.modelEl.remove();
|
|
183
|
+
} else {
|
|
184
|
+
this.$el.remove();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
115
187
|
},
|
|
116
188
|
methods: {
|
|
117
189
|
mousedown(e) {
|
|
@@ -238,6 +310,28 @@
|
|
|
238
310
|
|
|
239
311
|
this.isFullExpandWindow = !this.isFullExpandWindow;
|
|
240
312
|
},
|
|
313
|
+
clickCloseBtn() {
|
|
314
|
+
this.$emit('before-close', this);
|
|
315
|
+
this.close();
|
|
316
|
+
},
|
|
317
|
+
close() {
|
|
318
|
+
if (this.closeType === 'destroy') {
|
|
319
|
+
this.isAttachToDom = false;
|
|
320
|
+
} else {
|
|
321
|
+
this.isShowFlag = false;
|
|
322
|
+
}
|
|
323
|
+
this.isFullExpandWindow = false;
|
|
324
|
+
this.$emit('update:is-show', false);
|
|
325
|
+
},
|
|
326
|
+
show() {
|
|
327
|
+
if (this.closeType === 'destroy') {
|
|
328
|
+
this.isAttachToDom = true;
|
|
329
|
+
} else {
|
|
330
|
+
this.isShowFlag = true;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
this.$emit('update:is-show', true);
|
|
334
|
+
},
|
|
241
335
|
resize(e) {
|
|
242
336
|
const isTop = this.grabbingBorderPosInfo.top;
|
|
243
337
|
const isLeft = this.grabbingBorderPosInfo.left;
|
|
@@ -321,27 +415,6 @@
|
|
|
321
415
|
this.$el.style.cursor = 'default';
|
|
322
416
|
}
|
|
323
417
|
},
|
|
324
|
-
isInHeader(x, y) {
|
|
325
|
-
if (x == null || y == null) {
|
|
326
|
-
return false;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
const rect = this.$el.getBoundingClientRect();
|
|
330
|
-
const posX = +x - rect.left;
|
|
331
|
-
const posY = +y - rect.top;
|
|
332
|
-
const headerAreaStyleInfo = this.$refs.headerArea.style;
|
|
333
|
-
const headerPaddingInfo = {
|
|
334
|
-
top: this.removePixel(headerAreaStyleInfo.paddingTop),
|
|
335
|
-
left: this.removePixel(headerAreaStyleInfo.paddingLeft),
|
|
336
|
-
right: this.removePixel(headerAreaStyleInfo.paddingRight),
|
|
337
|
-
};
|
|
338
|
-
const startPosX = headerPaddingInfo.left;
|
|
339
|
-
const endPosX = rect.width - headerPaddingInfo.right;
|
|
340
|
-
const startPosY = headerPaddingInfo.top;
|
|
341
|
-
const endPosY = startPosY + this.headerHeight;
|
|
342
|
-
|
|
343
|
-
return posX > startPosX && posX < endPosX && posY > startPosY && posY < endPosY;
|
|
344
|
-
},
|
|
345
418
|
setCssText(paramObj) {
|
|
346
419
|
if (paramObj === null || typeof paramObj !== 'object') {
|
|
347
420
|
return;
|
|
@@ -399,6 +472,9 @@
|
|
|
399
472
|
headerHeight = this.headerHeight;
|
|
400
473
|
}
|
|
401
474
|
|
|
475
|
+
width = Math.max(width, minWidth);
|
|
476
|
+
height = Math.max(height, minHeight);
|
|
477
|
+
|
|
402
478
|
windowEl.style.cssText = `
|
|
403
479
|
top: ${this.numberToPixel(top)};
|
|
404
480
|
left: ${this.numberToPixel(left)};
|
|
@@ -409,11 +485,10 @@
|
|
|
409
485
|
padding-top: ${this.numberToPixel(headerHeight)}`;
|
|
410
486
|
},
|
|
411
487
|
getWindowStyle() {
|
|
412
|
-
const
|
|
413
|
-
const
|
|
414
|
-
const
|
|
415
|
-
const
|
|
416
|
-
const left = (bodyWidth / 2) - (this.width / 2) - clientRect.left;
|
|
488
|
+
const bodyWidth = window.innerWidth;
|
|
489
|
+
const bodyHeight = window.innerHeight;
|
|
490
|
+
const top = (bodyHeight / 2) - (this.height / 2);
|
|
491
|
+
const left = (bodyWidth / 2) - (this.width / 2);
|
|
417
492
|
|
|
418
493
|
return {
|
|
419
494
|
top: this.numberToPixel(top),
|
|
@@ -459,148 +534,128 @@
|
|
|
459
534
|
|
|
460
535
|
return result || 0;
|
|
461
536
|
},
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
537
|
+
isInHeader(x, y) {
|
|
538
|
+
if (x == null || y == null) {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
const rect = this.$el.getBoundingClientRect();
|
|
543
|
+
const posX = +x - rect.left;
|
|
544
|
+
const posY = +y - rect.top;
|
|
545
|
+
const headerAreaStyleInfo = this.$refs.headerArea.style;
|
|
546
|
+
const headerPaddingInfo = {
|
|
547
|
+
top: this.removePixel(headerAreaStyleInfo.paddingTop),
|
|
548
|
+
left: this.removePixel(headerAreaStyleInfo.paddingLeft),
|
|
549
|
+
right: this.removePixel(headerAreaStyleInfo.paddingRight),
|
|
550
|
+
};
|
|
551
|
+
const startPosX = headerPaddingInfo.left;
|
|
552
|
+
const endPosX = rect.width - headerPaddingInfo.right;
|
|
553
|
+
const startPosY = headerPaddingInfo.top;
|
|
554
|
+
const endPosY = startPosY + this.headerHeight;
|
|
555
|
+
|
|
556
|
+
return posX > startPosX && posX < endPosX && posY > startPosY && posY < endPosY;
|
|
467
557
|
},
|
|
468
|
-
|
|
469
|
-
this
|
|
558
|
+
syncIsShow() {
|
|
559
|
+
if (this.modal && this.modelEl) {
|
|
560
|
+
const displayBlockCls = `${this.prefixCls}-display-block`;
|
|
470
561
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
562
|
+
if (this.isShowFlag) {
|
|
563
|
+
this.modelEl.classList.add(displayBlockCls);
|
|
564
|
+
} else {
|
|
565
|
+
this.modelEl.classList.remove(displayBlockCls);
|
|
566
|
+
}
|
|
475
567
|
}
|
|
568
|
+
|
|
569
|
+
this.windowStyle = this.getWindowStyle();
|
|
476
570
|
},
|
|
477
571
|
},
|
|
478
572
|
};
|
|
479
573
|
</script>
|
|
480
574
|
|
|
481
|
-
<style>
|
|
575
|
+
<style lang="scss">
|
|
576
|
+
@import '~@/styles/default';
|
|
577
|
+
|
|
482
578
|
.ev-window {
|
|
483
579
|
position: absolute;
|
|
484
|
-
border:
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
overflow: visible;
|
|
488
|
-
z-index: 8888;
|
|
489
|
-
}
|
|
490
|
-
.gray .ev-window {
|
|
491
|
-
border: 9px solid #595C64;
|
|
492
|
-
background: #212227;
|
|
493
|
-
}
|
|
494
|
-
.ev-window-header-area {
|
|
495
|
-
position: absolute;
|
|
496
|
-
top: 0;
|
|
497
|
-
width: 100%;
|
|
498
|
-
border-bottom: 1px solid #B6B6B6;
|
|
499
|
-
background: #ffffff;
|
|
500
|
-
font-family: 'NanumGothic', sans-serif;
|
|
501
|
-
align-items: center;
|
|
580
|
+
border-radius: $border-radius-base;
|
|
581
|
+
overflow: hidden;
|
|
582
|
+
z-index: 700;
|
|
502
583
|
user-select: none;
|
|
584
|
+
|
|
585
|
+
@include evThemify() {
|
|
586
|
+
background-color: evThemed('window-bg');
|
|
587
|
+
border: $border-solid evThemed('window-border');
|
|
588
|
+
color: evThemed('window-btn');
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
&-header-area {
|
|
592
|
+
position: absolute;
|
|
593
|
+
top: 0;
|
|
594
|
+
left: 0;
|
|
595
|
+
display: flex;
|
|
596
|
+
width: 100%;
|
|
597
|
+
padding: 7px 10px;
|
|
598
|
+
justify-content: space-between;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
&-title-area {
|
|
602
|
+
left: 15px;
|
|
603
|
+
line-height: 26px;
|
|
604
|
+
font-size: $font-size-large;
|
|
605
|
+
|
|
606
|
+
@include evThemify() {
|
|
607
|
+
color: evThemed('window-btn');
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
&-btn-area {
|
|
612
|
+
display: inline-flex;
|
|
613
|
+
|
|
614
|
+
.ev-window-btn {
|
|
615
|
+
display: flex;
|
|
616
|
+
justify-content: center;
|
|
617
|
+
align-items: center;
|
|
618
|
+
width: 20px;
|
|
619
|
+
height: 20px;
|
|
620
|
+
margin-left: 4px;
|
|
621
|
+
cursor: pointer;
|
|
622
|
+
font-size: $font-size-medium;
|
|
623
|
+
border-radius: $border-radius-base;
|
|
624
|
+
|
|
625
|
+
@include evThemify() {
|
|
626
|
+
color: evThemed('window-btn');
|
|
627
|
+
background-color: evThemed('window-btn-bg');
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
&-body-area {
|
|
633
|
+
position: relative;
|
|
634
|
+
width: 100%;
|
|
635
|
+
height: 100%;
|
|
636
|
+
padding: 13px 10px 10px;
|
|
637
|
+
overflow: auto;
|
|
638
|
+
|
|
639
|
+
@include evThemify() {
|
|
640
|
+
color: evThemed('window-btn');
|
|
641
|
+
}
|
|
642
|
+
}
|
|
503
643
|
}
|
|
504
|
-
.
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
color: #ABAEB5;
|
|
508
|
-
}
|
|
509
|
-
.ev-window-title-area {
|
|
510
|
-
display: inline-block;
|
|
511
|
-
padding: 6px 0 0 12px;
|
|
512
|
-
font-size: 16px;
|
|
513
|
-
}
|
|
514
|
-
.ev-window-header-pa {
|
|
515
|
-
border-color: #474a53;
|
|
516
|
-
background-color: #212227;
|
|
517
|
-
color: #ABAEB5;
|
|
518
|
-
}
|
|
519
|
-
.ev-window-expand-btn-line{
|
|
520
|
-
position: absolute;
|
|
521
|
-
top: 0;
|
|
522
|
-
right: 66px;
|
|
523
|
-
height: 32px;
|
|
524
|
-
border-left: 1px solid #B6B6B6;
|
|
525
|
-
}
|
|
526
|
-
.gray .ev-window-expand-btn-line {
|
|
527
|
-
border-left: 1px solid #464850;
|
|
528
|
-
}
|
|
529
|
-
.ev-window-expand-btn {
|
|
530
|
-
position: absolute;
|
|
531
|
-
top: 6px;
|
|
532
|
-
right: 40px;
|
|
533
|
-
width: 19px;
|
|
534
|
-
height: 19px;
|
|
535
|
-
line-height: 19px;
|
|
536
|
-
border-radius: 50%;
|
|
537
|
-
color: white;
|
|
538
|
-
text-align: center;
|
|
539
|
-
background: #B6B6B6;
|
|
540
|
-
font-size: 13px;
|
|
541
|
-
font-weight: bold;
|
|
542
|
-
}
|
|
543
|
-
.gray .ev-window-expand-btn {
|
|
544
|
-
color: #c7c8cc;
|
|
545
|
-
background: #595c64;
|
|
546
|
-
}
|
|
547
|
-
.ev-window-expand-btn:before {
|
|
548
|
-
top: -1px;
|
|
549
|
-
right: 1px;
|
|
550
|
-
font-size: 18px;
|
|
551
|
-
content: 'ㅁ';
|
|
552
|
-
}
|
|
553
|
-
.ev-window-expand-btn:hover {
|
|
554
|
-
background: #319de9;
|
|
555
|
-
cursor: pointer;
|
|
556
|
-
}
|
|
557
|
-
.ev-window-close-btn-line {
|
|
558
|
-
position: absolute;
|
|
559
|
-
top: 0;
|
|
560
|
-
right: 32px;
|
|
561
|
-
height: 32px;
|
|
562
|
-
border-left: 1px solid #B6B6B6;
|
|
563
|
-
}
|
|
564
|
-
.gray .ev-window-close-btn-line {
|
|
565
|
-
border-left: 1px solid #464850;
|
|
566
|
-
}
|
|
567
|
-
.ev-window-close-btn {
|
|
568
|
-
position: absolute;
|
|
569
|
-
top: 6px;
|
|
570
|
-
right: 7px;
|
|
571
|
-
width: 19px;
|
|
572
|
-
height: 19px;
|
|
573
|
-
line-height: 19px;
|
|
574
|
-
border-radius: 50%;
|
|
575
|
-
color: white;
|
|
576
|
-
text-align: center;
|
|
577
|
-
background: #B6B6B6;
|
|
578
|
-
font-size: 13px;
|
|
579
|
-
font-weight: bold;
|
|
580
|
-
}
|
|
581
|
-
.gray .ev-window-close-btn {
|
|
582
|
-
color: #c7c8cc;
|
|
583
|
-
background: #595c64;
|
|
584
|
-
}
|
|
585
|
-
.ev-window-close-btn:before{
|
|
644
|
+
.ev-window-modal {
|
|
645
|
+
display: none;
|
|
646
|
+
position: fixed;
|
|
586
647
|
top: 0;
|
|
587
|
-
|
|
588
|
-
font-size: 11px;
|
|
589
|
-
content: 'X';
|
|
590
|
-
}
|
|
591
|
-
.ev-window-close-btn:hover{
|
|
592
|
-
background: #319de9;
|
|
593
|
-
cursor: pointer;
|
|
594
|
-
}
|
|
595
|
-
.ev-window-body-area{
|
|
596
|
-
position: relative;
|
|
648
|
+
left: 0;
|
|
597
649
|
width: 100%;
|
|
598
650
|
height: 100%;
|
|
599
|
-
padding:
|
|
600
|
-
|
|
601
|
-
|
|
651
|
+
padding-top: 100px;
|
|
652
|
+
overflow: hidden;
|
|
653
|
+
background-color: rgba(0,0,0,0.6);
|
|
654
|
+
text-align: center;
|
|
655
|
+
z-index: 720;
|
|
656
|
+
user-select: none;
|
|
602
657
|
}
|
|
603
|
-
.
|
|
604
|
-
|
|
658
|
+
.ev-window-display-block {
|
|
659
|
+
display: block !important;
|
|
605
660
|
}
|
|
606
661
|
</style>
|
package/src/index.js
CHANGED
|
@@ -2,53 +2,66 @@ import EvButton from './components/button';
|
|
|
2
2
|
import EvChart from './components/chart';
|
|
3
3
|
import EvCheckbox from './components/checkbox';
|
|
4
4
|
import EvCheckboxGroup from './components/checkbox-group';
|
|
5
|
+
import EvContextMenu from './components/contextmenu';
|
|
5
6
|
import EvIcon from './components/icon';
|
|
6
7
|
import EvInput from './components/input';
|
|
7
8
|
import EvTextField from './components/textfield';
|
|
9
|
+
import EvLoginField from './components/loginfield';
|
|
8
10
|
import EvLoadingMask from './components/loadingmask';
|
|
9
|
-
import
|
|
10
|
-
NavMenu as EvNavMenu,
|
|
11
|
-
ContextMenu as EvContextMenu,
|
|
12
|
-
ContextMenuChildren as EvContextMenuChildren,
|
|
13
|
-
} from './components/menu';
|
|
11
|
+
import EvNavMenu from './components/menu';
|
|
14
12
|
import EvRadio from './components/radio';
|
|
15
13
|
import EvRadioGroup from './components/radio-group';
|
|
16
14
|
import EvSelectbox from './components/selectbox';
|
|
17
15
|
import EvSlider from './components/slider';
|
|
18
16
|
import EvTable from './components/table';
|
|
19
|
-
import
|
|
17
|
+
import EvTimepicker from './components/timepicker';
|
|
20
18
|
import EvToggle from './components/toggle';
|
|
21
19
|
import EvLabel from './components/label';
|
|
22
|
-
import EvDatepicker from './components/datepicker';
|
|
20
|
+
import { Calendar as EvCalendar, Datepicker as EvDatepicker } from './components/datepicker';
|
|
23
21
|
import EvWindow from './components/window';
|
|
24
22
|
import { tabs as EvTabs, tab as EvTabPanel } from './components/tabs';
|
|
25
|
-
import { TreeTable as EvTreeTable } from './components/tree';
|
|
23
|
+
import { TreeTable as EvTreeTable } from './components/tree-table';
|
|
24
|
+
import EvTree from './components/tree';
|
|
25
|
+
import EvSplitter from './components/splitter';
|
|
26
|
+
import EvMarkdown from './components/markdown';
|
|
27
|
+
import EvGrid from './components/grid/grid';
|
|
28
|
+
import EvMessage from './components/message/index';
|
|
29
|
+
import EvNotification from './components/notification/index';
|
|
30
|
+
import EvMessageBox from './components/message-box/index';
|
|
26
31
|
|
|
27
32
|
const components = {
|
|
28
33
|
EvButton,
|
|
29
34
|
EvChart,
|
|
30
35
|
EvCheckbox,
|
|
31
36
|
EvCheckboxGroup,
|
|
37
|
+
EvContextMenu,
|
|
32
38
|
EvIcon,
|
|
33
39
|
EvInput,
|
|
34
40
|
EvTextField,
|
|
41
|
+
EvLoginField,
|
|
35
42
|
EvLoadingMask,
|
|
36
43
|
EvNavMenu,
|
|
37
|
-
EvContextMenu,
|
|
38
|
-
EvContextMenuChildren,
|
|
39
44
|
EvRadio,
|
|
40
45
|
EvRadioGroup,
|
|
41
46
|
EvSelectbox,
|
|
42
47
|
EvSlider,
|
|
43
48
|
EvTable,
|
|
44
|
-
|
|
49
|
+
EvTimepicker,
|
|
45
50
|
EvToggle,
|
|
46
51
|
EvLabel,
|
|
47
52
|
EvWindow,
|
|
53
|
+
EvCalendar,
|
|
48
54
|
EvDatepicker,
|
|
49
55
|
EvTabs,
|
|
50
56
|
EvTabPanel,
|
|
51
57
|
EvTreeTable,
|
|
58
|
+
EvTree,
|
|
59
|
+
EvSplitter,
|
|
60
|
+
EvMarkdown,
|
|
61
|
+
EvGrid,
|
|
62
|
+
EvMessage,
|
|
63
|
+
EvNotification,
|
|
64
|
+
EvMessageBox,
|
|
52
65
|
};
|
|
53
66
|
|
|
54
67
|
const evui = {
|
|
@@ -61,6 +74,10 @@ const install = function (Vue) {
|
|
|
61
74
|
Object.keys(evui).forEach((key) => {
|
|
62
75
|
Vue.component(key, evui[key]);
|
|
63
76
|
});
|
|
77
|
+
|
|
78
|
+
Vue.prototype.$message = EvMessage;
|
|
79
|
+
Vue.prototype.$messagebox = EvMessageBox;
|
|
80
|
+
Vue.prototype.$notify = EvNotification;
|
|
64
81
|
};
|
|
65
82
|
|
|
66
83
|
// auto install
|
|
@@ -74,5 +91,5 @@ const API = {
|
|
|
74
91
|
...components,
|
|
75
92
|
};
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
export default API;
|
|
78
95
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
$file-path : '~@/webfonts/';
|
|
2
|
+
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'NanumGothic';
|
|
5
|
+
src: url($file-path + 'NanumGothic.ttf') format('truetype');
|
|
6
|
+
}
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: 'Roboto';
|
|
9
|
+
src: url($file-path + 'Roboto-Bold.ttf') format('trutype');
|
|
10
|
+
font-weight: 800;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
}
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Roboto';
|
|
15
|
+
src: url($file-path + 'Roboto-Medium.ttf') format('trutype');
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
}
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: 'Roboto';
|
|
21
|
+
src: url($file-path + 'Roboto-Regular.ttf') format('truetype');
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
}
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: 'RobotoBold';
|
|
28
|
+
src: url($file-path + 'Roboto-Bold.ttf') format('trutype');
|
|
29
|
+
font-weight: 800;
|
|
30
|
+
font-style: normal;
|
|
31
|
+
}
|
|
32
|
+
@font-face {
|
|
33
|
+
font-family: 'RobotoMedium';
|
|
34
|
+
src: url($file-path + 'Roboto-Medium.ttf') format('trutype');
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
font-style: normal;
|
|
37
|
+
}
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'RobotoRegular';
|
|
40
|
+
src: url($file-path + 'Roboto-Regular.ttf') format('truetype');
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
* {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'base';
|
|
File without changes
|