evui 2.0.8 → 2.0.10

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 (126) hide show
  1. package/README.md +27 -27
  2. package/{src/webfonts/fa-regular-400.svg → dist/82f60bd0b94a1ed68b1e6e309ce2e8c3.svg} +366 -366
  3. package/{src/webfonts/EVUI.svg → dist/91c6092c0a9164541a69045d746b9e78.svg} +183 -183
  4. package/dist/{448f2aaa315fa9dce7b2cf6ce31caed6.svg → 962a1bf31c081691065fe333d9fa8105.svg} +1518 -1518
  5. package/dist/{65363c4d55617bbeb57d8ce6dcd46099.svg → a1a749e89f578a49306ec2b055c073da.svg} +1008 -1008
  6. package/dist/evui.min.js +178 -59366
  7. package/dist/evui.min.js.gz +0 -0
  8. package/dist/evui.min.js.map +1 -1
  9. package/dist/main.css +5161 -0
  10. package/dist/main.css.gz +0 -0
  11. package/dist/main.css.map +1 -0
  12. package/package.json +125 -136
  13. package/dist/8634884f932627fc43782e6963b64ccd.svg +0 -183
  14. package/dist/b551b554a67e86a840bc80cbb8066c30.svg +0 -366
  15. package/src/code/checkbox.js +0 -12
  16. package/src/common/utils.js +0 -95
  17. package/src/common/utils.table.js +0 -78
  18. package/src/components/button/button.vue +0 -318
  19. package/src/components/button/index.js +0 -3
  20. package/src/components/chart/chart.vue +0 -354
  21. package/src/components/chart/charts/chart.bar.js +0 -334
  22. package/src/components/chart/charts/chart.base.js +0 -1075
  23. package/src/components/chart/charts/chart.line.js +0 -262
  24. package/src/components/chart/charts/chart.pie.js +0 -383
  25. package/src/components/chart/charts/chart.scatter.js +0 -349
  26. package/src/components/chart/charts/chart.sunburst.js +0 -193
  27. package/src/components/chart/core/axis/axis.js +0 -217
  28. package/src/components/chart/core/axis/axis.scale.auto.js +0 -69
  29. package/src/components/chart/core/axis/axis.scale.fixed.js +0 -65
  30. package/src/components/chart/core/axis/axis.scale.steps.js +0 -149
  31. package/src/components/chart/core/core.constant.js +0 -91
  32. package/src/components/chart/core/core.legend.js +0 -473
  33. package/src/components/chart/core/core.util.js +0 -66
  34. package/src/components/chart/core/data/data.js +0 -412
  35. package/src/components/chart/core/data/data.pie.js +0 -70
  36. package/src/components/chart/core/data/data.stack.js +0 -222
  37. package/src/components/chart/core/data/data.sunburst.js +0 -172
  38. package/src/components/chart/index.js +0 -4
  39. package/src/components/checkbox/checkbox-group.vue +0 -57
  40. package/src/components/checkbox/checkbox.vue +0 -98
  41. package/src/components/checkbox/index.js +0 -3
  42. package/src/components/checkbox-group/index.js +0 -3
  43. package/src/components/codeview/code.vue +0 -242
  44. package/src/components/datepicker/calendar.core.js +0 -1829
  45. package/src/components/datepicker/calendar.vue +0 -86
  46. package/src/components/datepicker/datepicker.vue +0 -599
  47. package/src/components/datepicker/index.js +0 -3
  48. package/src/components/icon/icon.vue +0 -31
  49. package/src/components/icon/index.js +0 -3
  50. package/src/components/input/index.js +0 -3
  51. package/src/components/input/input.number.vue +0 -440
  52. package/src/components/label/index.js +0 -3
  53. package/src/components/label/label.vue +0 -86
  54. package/src/components/loadingmask/index.js +0 -3
  55. package/src/components/loadingmask/loadingmask.vue +0 -142
  56. package/src/components/menu/index.js +0 -5
  57. package/src/components/menu/menu.context.children.vue +0 -201
  58. package/src/components/menu/menu.context.vue +0 -144
  59. package/src/components/menu/menu.nav.vue +0 -123
  60. package/src/components/radio/index.js +0 -3
  61. package/src/components/radio/radio-group.vue +0 -48
  62. package/src/components/radio/radio.vue +0 -95
  63. package/src/components/radio-group/index.js +0 -3
  64. package/src/components/selectbox/dropdown.vue +0 -174
  65. package/src/components/selectbox/index.js +0 -3
  66. package/src/components/selectbox/listbox.vue +0 -106
  67. package/src/components/selectbox/option.vue +0 -11
  68. package/src/components/selectbox/selectbox.vue +0 -465
  69. package/src/components/slider/index.js +0 -3
  70. package/src/components/slider/slider-tooltip.vue +0 -119
  71. package/src/components/slider/slider.vue +0 -483
  72. package/src/components/summary/index.js +0 -3
  73. package/src/components/summary/summary.vue +0 -138
  74. package/src/components/table/data.json +0 -1000
  75. package/src/components/table/data2.json +0 -1000
  76. package/src/components/table/index.js +0 -3
  77. package/src/components/table/table.black.css +0 -547
  78. package/src/components/table/table.filter.lite.vue +0 -170
  79. package/src/components/table/table.filter.vue +0 -112
  80. package/src/components/table/table.grey.css +0 -539
  81. package/src/components/table/table.navy.css +0 -536
  82. package/src/components/table/table.vue +0 -1382
  83. package/src/components/tabs/index.js +0 -14
  84. package/src/components/tabs/jun/tab.vue +0 -123
  85. package/src/components/tabs/jun/tabs.vue +0 -484
  86. package/src/components/tabs/tab-panel.vue +0 -39
  87. package/src/components/tabs/tabs.vue +0 -446
  88. package/src/components/textfield/index.js +0 -3
  89. package/src/components/textfield/textfield.vue +0 -381
  90. package/src/components/timepicker/index.js +0 -3
  91. package/src/components/timepicker/spinner.vue +0 -205
  92. package/src/components/timepicker/timepicker.vue +0 -492
  93. package/src/components/toggle/index.js +0 -3
  94. package/src/components/toggle/toggle.vue +0 -355
  95. package/src/components/tree/index.js +0 -7
  96. package/src/components/tree/tree.table.black.css +0 -680
  97. package/src/components/tree/tree.table.grey.css +0 -675
  98. package/src/components/tree/tree.table.vue +0 -734
  99. package/src/components/tree/tree.util.js +0 -39
  100. package/src/components/window/index.js +0 -3
  101. package/src/components/window/window.vue +0 -606
  102. package/src/images/evui_icon.png +0 -0
  103. package/src/index.js +0 -78
  104. package/src/styles/all.css +0 -5
  105. package/src/styles/codemirror.css +0 -346
  106. package/src/styles/evui.css +0 -386
  107. package/src/styles/icon.css +0 -557
  108. package/src/webfonts/EVUI.eot +0 -0
  109. package/src/webfonts/EVUI.ttf +0 -0
  110. package/src/webfonts/EVUI.woff +0 -0
  111. package/src/webfonts/NanumGothic.ttf +0 -0
  112. package/src/webfonts/NanumGothicBold.ttf +0 -0
  113. package/src/webfonts/fa-brands-400.eot +0 -0
  114. package/src/webfonts/fa-brands-400.svg +0 -1008
  115. package/src/webfonts/fa-brands-400.ttf +0 -0
  116. package/src/webfonts/fa-brands-400.woff +0 -0
  117. package/src/webfonts/fa-brands-400.woff2 +0 -0
  118. package/src/webfonts/fa-regular-400.eot +0 -0
  119. package/src/webfonts/fa-regular-400.ttf +0 -0
  120. package/src/webfonts/fa-regular-400.woff +0 -0
  121. package/src/webfonts/fa-regular-400.woff2 +0 -0
  122. package/src/webfonts/fa-solid-900.eot +0 -0
  123. package/src/webfonts/fa-solid-900.svg +0 -1518
  124. package/src/webfonts/fa-solid-900.ttf +0 -0
  125. package/src/webfonts/fa-solid-900.woff +0 -0
  126. package/src/webfonts/fa-solid-900.woff2 +0 -0
@@ -1,31 +0,0 @@
1
- <template>
2
- <i :class="preCls"/>
3
- </template>
4
- <script>
5
- import '@/styles/all.css';
6
- import '@/styles/icon.css';
7
-
8
- const prefixCls = 'ei';
9
-
10
- export default {
11
- props: {
12
- type: {
13
- type: String,
14
- default: null,
15
- },
16
- size: {
17
- type: [Number, String],
18
- default: null,
19
- },
20
- cls: {
21
- type: String,
22
- default: null,
23
- },
24
- },
25
- data() {
26
- return {
27
- preCls: `${prefixCls} ${this.cls}`,
28
- };
29
- },
30
- };
31
- </script>
@@ -1,3 +0,0 @@
1
- import icon from './icon';
2
-
3
- export default icon;
@@ -1,3 +0,0 @@
1
- import inputNumber from './input.number';
2
-
3
- export default inputNumber;
@@ -1,440 +0,0 @@
1
- <template>
2
- <div
3
- :style="styleObject"
4
- :class="wrapClasses"
5
- >
6
- <div :class="handlerClasses">
7
- <a
8
- :class="upClasses"
9
- @click="up"
10
- @mousedown="preventDefault"
11
- >
12
- <span
13
- :class="innerUpClasses"
14
- @click="preventDefault"
15
- />
16
- <icon
17
- class="fa-sort-up"
18
- />
19
- </a>
20
- <a
21
- :class="downClasses"
22
- @click="down"
23
- @mousedown="preventDefault"
24
- >
25
- <span
26
- :class="innerDownClasses"
27
- @click="preventDefault"
28
- />
29
- <icon class="fa-sort-down"/>
30
- </a>
31
- </div>
32
- <div
33
- :class="inputWrapClasses"
34
- >
35
- <input
36
- :min="min"
37
- :max="max"
38
- :step="step"
39
- :disabled="disabled"
40
- :readonly="readonly"
41
- :precision="precision"
42
- :value="formatterValue"
43
- :class="inputClasses"
44
- @keydown.stop="keyDownEvent"
45
- @focus="focus"
46
- @blur="blur"
47
- @mousewheel="wheelEvent"
48
- @change="change"
49
- @input="change"
50
- >
51
- </div>
52
- </div>
53
- </template>
54
-
55
- <script>
56
- import icon from '@/components/icon/icon';
57
-
58
- const prefixCls = 'evui-input-number';
59
-
60
- function parsedStyle(value) {
61
- const mark = value.toString();
62
- let result = mark;
63
- if (!mark.match(/^(([1-9]+(?:\.\d+)?)(px|%+))$/g)) {
64
- result = mark.concat('px');
65
- }
66
- return result;
67
- }
68
- function addNum(num1, num2) {
69
- let sq1;
70
- let sq2;
71
- try {
72
- sq1 = num1.toString().split('.')[1].length;
73
- } catch (e) {
74
- sq1 = 0;
75
- }
76
- try {
77
- sq2 = num2.toString().split('.')[1].length;
78
- } catch (e) {
79
- sq2 = 0;
80
- }
81
- const sf = 10 ** Math.max(sq1, sq2);
82
- return (Math.round(num1 * sf) + Math.round(num2 * sf)) / sf;
83
- }
84
- export default {
85
- components: {
86
- icon,
87
- },
88
- props: {
89
- max: {
90
- type: Number,
91
- default: Infinity,
92
- },
93
- min: {
94
- type: Number,
95
- default: -Infinity,
96
- },
97
- step: {
98
- type: Number,
99
- default: 0.1,
100
- },
101
- width: {
102
- type: [String, Number],
103
- default: '100%',
104
- },
105
- height: {
106
- type: [String, Number],
107
- default: '100%',
108
- },
109
- value: {
110
- type: Number,
111
- default: null,
112
- },
113
- disabled: {
114
- type: Boolean,
115
- default: false,
116
- },
117
- precision: {
118
- type: Number,
119
- default: 1,
120
- validator(value) {
121
- return !isNaN(Number(value)) && value >= 0 && value <= 100;
122
- },
123
- },
124
- formatter: {
125
- type: Function,
126
- default: null,
127
- },
128
- readonly: {
129
- type: Boolean,
130
- default: false,
131
- },
132
- },
133
- data() {
134
- return {
135
- focused: false,
136
- upDisabled: false,
137
- downDisabled: false,
138
- currentValue: this.setValue(this.value),
139
- };
140
- },
141
- computed: {
142
- styleObject: function styleObject() {
143
- return {
144
- width: parsedStyle(this.width),
145
- height: parsedStyle(this.height),
146
- };
147
- },
148
- formatterValue: function formatterValue() {
149
- if (this.formatter) {
150
- return this.formatter(this.currentValue);
151
- }
152
- return this.currentValue;
153
- },
154
- wrapClasses: function wrapClasses() {
155
- return [
156
- `${prefixCls}`,
157
- {
158
- [`${prefixCls}-disabled`]: this.disabled,
159
- },
160
- ];
161
- },
162
- handlerClasses: function handlerClasses() {
163
- return `${prefixCls}-handler-wrap`;
164
- },
165
- upClasses: function upClasses() {
166
- return [
167
- `${prefixCls}-handler`,
168
- `${prefixCls}-handler-up`,
169
- ];
170
- },
171
- innerUpClasses: function innerUpClasses() {
172
- return `${prefixCls}-handler-up-inner icon`;
173
- },
174
- downClasses: function downClasses() {
175
- return [
176
- `${prefixCls}-handler`,
177
- `${prefixCls}-handler-down`,
178
- ];
179
- },
180
- innerDownClasses: function innerDownClasses() {
181
- return `${prefixCls}-handler-down-inner icon`;
182
- },
183
- inputWrapClasses: function inputWrapClasses() {
184
- return `${prefixCls}-input-wrap`;
185
- },
186
- inputClasses: function inputClasses() {
187
- return `${prefixCls}-input`;
188
- },
189
- },
190
- watch: {
191
- value(updatedValue) {
192
- this.currentValue = updatedValue;
193
- },
194
- },
195
- methods: {
196
- preventDefault(e) {
197
- e.preventDefault();
198
- },
199
- up(e) {
200
- const targetValue = Number(e.target.value);
201
- if (this.upDisabled && isNaN(targetValue)) {
202
- return false;
203
- }
204
- this.changeStep('up', e);
205
- return true;
206
- },
207
- down(e) {
208
- const targetValue = Number(e.target.value);
209
- if (this.downDisabled && isNaN(targetValue)) {
210
- return false;
211
- }
212
- this.changeStep('down', e);
213
- return true;
214
- },
215
- changeStep(type, e) {
216
- if (this.disabled || this.readonly) {
217
- return false;
218
- }
219
- const step = Number(this.step);
220
- const targetValue = Number(e.target.value);
221
- let updatedValue = Number(this.currentValue);
222
-
223
- if (isNaN(updatedValue)) {
224
- return false;
225
- }
226
- if (!isNaN(targetValue) && type !== null) {
227
- if (addNum(targetValue, updatedValue) <= this.max ||
228
- addNum(targetValue, -updatedValue) >= this.min) {
229
- updatedValue = targetValue;
230
- } else {
231
- return false;
232
- }
233
- }
234
- if (type === 'up') {
235
- updatedValue = addNum(updatedValue, step);
236
- } else if (type === 'down') {
237
- updatedValue = addNum(updatedValue, -step);
238
- }
239
- this.setValue(updatedValue);
240
- return true;
241
- },
242
- setValue(value) {
243
- const updatedValue = Number(Number(value).toFixed(this.precision));
244
- this.$nextTick(() => {
245
- this.currentValue = updatedValue;
246
- });
247
- return updatedValue;
248
- },
249
- change(e) {
250
- let updatedValue;
251
- const max = this.max;
252
- const min = this.min;
253
- const value = e.target.value.trim();
254
- const isEmptyString = value.length === 0;
255
- if (isEmptyString) {
256
- this.setValue(null);
257
- return false;
258
- }
259
- if (this.validateValue(e.type, value)) {
260
- return false;
261
- }
262
- if (isNaN(value)) {
263
- e.target.value = this.setValue(this.currentValue);
264
- return false;
265
- }
266
- if (!isNaN(value)) {
267
- updatedValue = Number(value);
268
- if (e.type === 'input' && value < min) {
269
- return false;
270
- }
271
- if (value > max || value < min) {
272
- updatedValue = value > max ? max : min;
273
- } else {
274
- updatedValue = value;
275
- }
276
- this.setValue(updatedValue);
277
- }
278
- this.setValue(updatedValue);
279
- this.currentValue = value;
280
- return true;
281
- },
282
- validateValue(type, value) {
283
- let result = false;
284
- if (type === 'input'
285
- && value.match(/^-?\.?$|\.$/)) {
286
- result = true;
287
- }
288
- if (type === 'change'
289
- && value === this.currentValue) {
290
- result = true;
291
- }
292
- return result;
293
- },
294
- focus() {
295
- this.focused = true;
296
- },
297
- blur() {
298
- this.focused = false;
299
- },
300
- keyDownEvent(e) {
301
- if (e.keyCode === 38) {
302
- e.preventDefault();
303
- this.up(e);
304
- } else if (e.keyCode === 40) {
305
- e.preventDefault();
306
- this.down(e);
307
- }
308
- },
309
- wheelEvent(e) {
310
- e.preventDefault();
311
- if (e.wheelDeltaY === 120) {
312
- this.up(e);
313
- } else if (e.wheelDeltaY === -120) {
314
- this.down(e);
315
- }
316
- },
317
- },
318
- init() {
319
- },
320
- };
321
- </script>
322
- <style scoped>
323
- /*base class*/
324
- .evui-input-number {
325
- display: inline-block;
326
- width: 100%;
327
- line-height: 1.5;
328
- padding: 0px;
329
- font-size: 12px;
330
- color: #495060;
331
- background-color: #fff;
332
- background-image: none;
333
- position: relative;
334
- cursor: text;
335
- margin: 0;
336
- height: 32px;
337
- vertical-align: middle;
338
- border: 1px solid #dddee1;
339
- border-radius: 4px;
340
- overflow: hidden;
341
- transition: border 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
342
- }
343
- .evui-input-number-handler-wrap {
344
- width: 22px;
345
- height: 100%;
346
- border-left: 1px solid #dddee1;
347
- border-radius: 0 4px 4px 0;
348
- background: #fff;
349
- position: absolute;
350
- top: 0;
351
- right: 0;
352
- opacity: 0;
353
- transition: opacity 0.2s ease-in-out;
354
- }
355
- /*border color when mouse hover*/
356
- .evui-input-number:hover {
357
- border-color : #2d8cf0;
358
- }
359
- .evui-input-number:hover .evui-input-number-handler-wrap {
360
- border-color : #2d8cf0;
361
- opacity: 1;
362
- }
363
-
364
- .evui-input-number:hover i{
365
- color : #2d8cf0;
366
- }
367
-
368
- /*inner input div class*/
369
- .evui-input-number-input-wrap {
370
- overflow: hidden;
371
- height: 32px;
372
- }
373
- .evui-input-number-input {
374
- width: 100%;
375
- height: 32px;
376
- line-height: 32px;
377
- padding: 0 7px;
378
- text-align: left;
379
- outline: 0;
380
- -moz-appearance: textfield;
381
- color: #666;
382
- border: 0;
383
- border-radius: 4px;
384
- }
385
- /*handler line class*/
386
- .evui-input-number-handler {
387
- display: block;
388
- width: 100%;
389
- height: 16px;
390
- line-height: 0;
391
- text-align: center;
392
- overflow: hidden;
393
- color: #999;
394
- position: relative;
395
- }
396
- .evui-input-number-handler-up {
397
- cursor: pointer;
398
- }
399
- .evui-input-number-handler-down {
400
- border-top: 1px solid #dddee1;
401
- top: -1px;
402
- cursor: pointer;
403
- }
404
- /*disable base class*/
405
- .evui-input-number-disabled {
406
- background-color: #f3f3f3;
407
- opacity: 1;
408
- cursor: not-allowed;
409
- color: #ccc;
410
- }
411
- /*use border color when mouse hover*/
412
- .evui-input-number-disabled:hover {
413
- border-color : #D77F7F;
414
- }
415
- /*inner input div class*/
416
- .evui-input-number-disabled .evui-input-number {
417
- opacity: .72;
418
- cursor: not-allowed;
419
- background-color: #f3f3f3;
420
- }
421
- /*handler line class*/
422
- .evui-input-number-disabled .evui-input-number-handler-wrap {
423
- display: none;
424
- }
425
- .evui-input-number-disabled .evui-input-number-handler {
426
- opacity: .72;
427
- color: #ccc!important;
428
- cursor: not-allowed;
429
- }
430
- .evui-input-number-input[disabled] {
431
- background-color: #f3f3f3;
432
- opacity: 1;
433
- cursor: not-allowed;
434
- color: #ccc;
435
- }
436
- /*TODO SET ICON CLASS*/
437
- .fa-sort-up {
438
- margin-top: 4px;
439
- }
440
- </style>
@@ -1,3 +0,0 @@
1
- import Label from './label';
2
-
3
- export default Label;
@@ -1,86 +0,0 @@
1
- <template>
2
- <label
3
- ref="label"
4
- :class="labelClass"
5
- :style="labelStyle"
6
- >
7
- {{ labelText }}
8
- </label>
9
- </template>
10
- <script>
11
- const prefixCls = 'ev-label';
12
- export default{
13
- props: {
14
- value: {
15
- type: String,
16
- default: '',
17
- },
18
- size: {
19
- type: String,
20
- default: 'medium',
21
- },
22
- userCls: {
23
- type: String,
24
- default: '',
25
- },
26
- textAlign: {
27
- type: String,
28
- default: 'center',
29
- },
30
- },
31
- data() {
32
- return {
33
- labelSize: this.size,
34
- };
35
- },
36
- computed: {
37
- labelText() {
38
- return this.value;
39
- },
40
- hAlign() {
41
- let align;
42
-
43
- switch (this.textAlign) {
44
- case 'left':
45
- case 'center':
46
- case 'right':
47
- align = this.textAlign;
48
- break;
49
- default:
50
- align = 'center';
51
- break;
52
- }
53
-
54
- return align;
55
- },
56
- labelStyle() {
57
- return {
58
- textAlign: this.hAlign,
59
- };
60
- },
61
- labelClass() {
62
- return [
63
- `${prefixCls}`,
64
- `${prefixCls}-${this.labelSize}`,
65
- `${this.userCls}`,
66
- ];
67
- },
68
- },
69
- methods: {
70
- },
71
- };
72
- </script>
73
- <style>
74
- .ev-label {
75
- display: inline-block;
76
- }
77
- .ev-label-small {
78
- font-size: 12px;
79
- }
80
- .ev-label-medium {
81
- font-size: 14px;
82
- }
83
- .ev-label-large {
84
- font-size: 16px;
85
- }
86
- </style>
@@ -1,3 +0,0 @@
1
- import Loadingmask from './loadingmask';
2
-
3
- export default Loadingmask;
@@ -1,142 +0,0 @@
1
- <template>
2
- <div
3
- v-show="isShow"
4
- class="ev-loadingmask"
5
- style="display: none;"
6
- >
7
- <div
8
- v-show="barCount"
9
- ref="contents"
10
- class="ev-loadingmask-center"
11
- >
12
- <div
13
- v-for="(item, index) in barData"
14
- :key="index"
15
- :style="{
16
- position: 'absolute',
17
- width: item.width,
18
- height: item.height,
19
- borderRadius: item.borderRadius,
20
- background: item.barColor,
21
- transform: item.transform,
22
- animation: item.animation,
23
- animationDelay: item.animDelay,
24
- }"
25
- />
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- props: {
33
- width: { // 바 너비
34
- type: String,
35
- default: '30px',
36
- },
37
- height: { // 바 높이
38
- type: String,
39
- default: '10px',
40
- },
41
- borderRadius: { // 바 테두리 둥근정도
42
- type: String,
43
- default: '20px',
44
- },
45
- barColor: { // 바 색상
46
- type: String,
47
- default: 'rgba(200, 200, 200, 0.7)',
48
- },
49
- barCount: { // 로딩 바의 개수
50
- type: Number,
51
- default: 13,
52
- },
53
- fadebarRadius: { // 중앙점에서부터 로딩 바까지의 반지름
54
- type: String,
55
- default: '45px',
56
- },
57
- animInterval: { // css animation seconds during 1-time
58
- type: Number,
59
- default: 1,
60
- },
61
- isShow: {
62
- type: Boolean,
63
- default: false,
64
- },
65
- },
66
- data() {
67
- return {
68
- barData: [],
69
- };
70
- },
71
- watch: {
72
- isShow() {
73
- setTimeout(this.updatePosition.bind(this), 1);
74
- },
75
- },
76
- created() {
77
- for (let ix = 0, ixLen = this.barCount; ix < ixLen; ix++) {
78
- const obj = {};
79
- const deg = Math.round(360 * (ix / ixLen));
80
- obj.position = 'absolute';
81
- obj.width = this.width;
82
- obj.height = this.height;
83
- obj.borderRadius = this.borderRadius;
84
- obj.barColor = this.barColor;
85
- obj.transform = `rotate(${deg}deg) translate(${this.fadebarRadius}, 0px)`;
86
- obj.animation = `ev-loadingmask-fadedelay ${this.animInterval}s infinite ease-in-out`;
87
- obj.animDelay = `${(this.animInterval * (ix / ixLen)).toFixed(3)}s`;
88
- this.barData.push(obj);
89
- }
90
- },
91
- mounted() {
92
- setTimeout(this.updatePosition.bind(this), 1);
93
- },
94
- methods: {
95
- updatePosition() {
96
- if (!this.isShow) {
97
- this.$el.style.display = 'none';
98
- return;
99
- }
100
-
101
- const element = this.$el;
102
- const parentRect = element.parentElement.getBoundingClientRect();
103
- const contentsRect = this.$refs.contents.getBoundingClientRect();
104
-
105
- element.style.cssText = `
106
- display: block;
107
- top: ${(parentRect.height / 2) - (contentsRect.height / 2)}px;
108
- left: ${(parentRect.width / 2) - (contentsRect.width / 2)}px;
109
- width: ${contentsRect}px;
110
- height: ${contentsRect}px;`;
111
- },
112
- },
113
- };
114
- </script>
115
-
116
- <style>
117
- .ev-loadingmask
118
- {
119
- position: absolute;
120
- z-index: 18000;
121
- }
122
- .ev-loadingmask-center
123
- {
124
- position: relative;
125
- top: 45%;
126
- left: calc(50% - 15px);
127
- transform: translate3d(0px, 0px, 0px);
128
- }
129
- @keyframes ev-loadingmask-fadedelay
130
- {
131
- 80%
132
- {
133
- -webkit-opacity: 0.2;
134
- opacity: 0.2;
135
- }
136
- 100%
137
- {
138
- -webkit-opacity: 0.9;
139
- opacity: 0.9;
140
- }
141
- }
142
- </style>