evui 3.3.36 → 3.3.39

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 (141) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/dist/evui.common.js +1907 -1832
  4. package/dist/evui.common.js.map +1 -1
  5. package/dist/evui.umd.js +1907 -1832
  6. package/dist/evui.umd.js.map +1 -1
  7. package/dist/evui.umd.min.js +1 -1
  8. package/dist/evui.umd.min.js.map +1 -1
  9. package/dist/img/{EVUI.7f3588fb.svg → EVUI.b82ee81a.svg} +292 -292
  10. package/dist/img/{icon_mysql.7ea26d5d.svg → icon_mysql.1085fdc9.svg} +78 -78
  11. package/dist/img/{icon_oracle.9009b108.svg → icon_oracle.0572d3ee.svg} +13 -13
  12. package/dist/img/{icon_postgresql.f8fffba9.svg → icon_postgresql.ee12bde8.svg} +58 -58
  13. package/package.json +61 -61
  14. package/src/common/emitter.js +20 -20
  15. package/src/common/utils.debounce.js +223 -223
  16. package/src/common/utils.js +134 -134
  17. package/src/common/utils.table.js +78 -78
  18. package/src/common/utils.throttle.js +83 -83
  19. package/src/common/utils.tree.js +18 -18
  20. package/src/components/button/Button.vue +198 -198
  21. package/src/components/button/index.js +7 -7
  22. package/src/components/buttonGroup/ButtonGroup.vue +11 -11
  23. package/src/components/buttonGroup/index.js +7 -7
  24. package/src/components/calendar/Calendar.vue +661 -661
  25. package/src/components/calendar/index.js +7 -7
  26. package/src/components/calendar/uses.js +1272 -1272
  27. package/src/components/chart/Chart.vue +189 -192
  28. package/src/components/chart/chart.core.js +870 -870
  29. package/src/components/chart/element/element.bar.js +524 -524
  30. package/src/components/chart/element/element.bar.time.js +156 -156
  31. package/src/components/chart/element/element.heatmap.js +533 -533
  32. package/src/components/chart/element/element.line.js +339 -339
  33. package/src/components/chart/element/element.pie.js +197 -197
  34. package/src/components/chart/element/element.scatter.js +184 -184
  35. package/src/components/chart/element/element.tip.js +550 -542
  36. package/src/components/chart/helpers/helpers.canvas.js +265 -265
  37. package/src/components/chart/helpers/helpers.constant.js +206 -206
  38. package/src/components/chart/helpers/helpers.util.js +346 -338
  39. package/src/components/chart/index.js +9 -9
  40. package/src/components/chart/model/index.js +4 -4
  41. package/src/components/chart/model/model.series.js +93 -93
  42. package/src/components/chart/model/model.store.js +977 -967
  43. package/src/components/chart/plugins/plugins.interaction.js +769 -769
  44. package/src/components/chart/plugins/plugins.legend.gradient.js +602 -602
  45. package/src/components/chart/plugins/plugins.legend.js +1155 -1151
  46. package/src/components/chart/plugins/plugins.pie.js +254 -254
  47. package/src/components/chart/plugins/plugins.title.js +56 -56
  48. package/src/components/chart/plugins/plugins.tooltip.js +692 -692
  49. package/src/components/chart/scale/scale.js +848 -848
  50. package/src/components/chart/scale/scale.linear.js +38 -38
  51. package/src/components/chart/scale/scale.logarithmic.js +128 -128
  52. package/src/components/chart/scale/scale.step.js +336 -336
  53. package/src/components/chart/scale/scale.time.category.js +277 -277
  54. package/src/components/chart/scale/scale.time.js +48 -48
  55. package/src/components/chart/style/chart.scss +312 -312
  56. package/src/components/chart/uses.js +264 -252
  57. package/src/components/checkbox/Checkbox.vue +200 -200
  58. package/src/components/checkbox/index.js +7 -7
  59. package/src/components/checkboxGroup/CheckboxGroup.vue +44 -44
  60. package/src/components/checkboxGroup/index.js +7 -7
  61. package/src/components/contextMenu/ContextMenu.vue +80 -80
  62. package/src/components/contextMenu/MenuList.vue +149 -149
  63. package/src/components/contextMenu/index.js +7 -7
  64. package/src/components/contextMenu/uses.js +203 -203
  65. package/src/components/datePicker/DatePicker.vue +437 -437
  66. package/src/components/datePicker/index.js +7 -7
  67. package/src/components/datePicker/uses.js +419 -419
  68. package/src/components/grid/Grid.vue +827 -827
  69. package/src/components/grid/grid.filter.window.vue +493 -493
  70. package/src/components/grid/grid.pagination.vue +75 -75
  71. package/src/components/grid/grid.summary.vue +265 -265
  72. package/src/components/grid/grid.toolbar.vue +26 -26
  73. package/src/components/grid/index.js +11 -11
  74. package/src/components/grid/style/grid.scss +263 -263
  75. package/src/components/grid/uses.js +1002 -1007
  76. package/src/components/icon/Icon.vue +49 -49
  77. package/src/components/icon/index.js +8 -8
  78. package/src/components/inputNumber/InputNumber.vue +212 -212
  79. package/src/components/inputNumber/index.js +7 -7
  80. package/src/components/inputNumber/uses.js +217 -217
  81. package/src/components/loading/Loading.vue +125 -125
  82. package/src/components/loading/index.js +7 -7
  83. package/src/components/menu/Menu.vue +68 -68
  84. package/src/components/menu/MenuItem.vue +187 -187
  85. package/src/components/menu/index.js +7 -7
  86. package/src/components/message/Message.vue +223 -223
  87. package/src/components/message/index.js +31 -31
  88. package/src/components/messageBox/MessageBox.vue +358 -358
  89. package/src/components/messageBox/index.js +22 -22
  90. package/src/components/notification/Notification.vue +316 -316
  91. package/src/components/notification/index.js +49 -49
  92. package/src/components/pagination/Pagination.vue +271 -271
  93. package/src/components/pagination/index.js +7 -7
  94. package/src/components/pagination/pageButton.vue +30 -30
  95. package/src/components/progress/Progress.vue +139 -139
  96. package/src/components/progress/index.js +7 -7
  97. package/src/components/radio/Radio.vue +159 -159
  98. package/src/components/radio/index.js +7 -7
  99. package/src/components/radioGroup/RadioGroup.vue +41 -41
  100. package/src/components/radioGroup/index.js +7 -7
  101. package/src/components/scheduler/Scheduler.vue +149 -149
  102. package/src/components/scheduler/index.js +7 -7
  103. package/src/components/scheduler/uses.js +183 -183
  104. package/src/components/select/Select.vue +440 -440
  105. package/src/components/select/index.js +7 -7
  106. package/src/components/select/uses.js +270 -270
  107. package/src/components/slider/Slider.vue +505 -505
  108. package/src/components/slider/index.js +7 -7
  109. package/src/components/slider/uses.js +390 -390
  110. package/src/components/tabPanel/TabPanel.vue +74 -74
  111. package/src/components/tabPanel/index.js +7 -7
  112. package/src/components/tabs/Tabs.vue +517 -517
  113. package/src/components/tabs/index.js +7 -7
  114. package/src/components/textField/TextField.vue +375 -375
  115. package/src/components/textField/index.js +7 -7
  116. package/src/components/timePicker/TimePicker.vue +352 -352
  117. package/src/components/timePicker/index.js +7 -7
  118. package/src/components/toggle/Toggle.vue +115 -115
  119. package/src/components/toggle/index.js +7 -7
  120. package/src/components/tree/Tree.vue +313 -313
  121. package/src/components/tree/TreeNode.vue +293 -293
  122. package/src/components/tree/index.js +7 -7
  123. package/src/components/treeGrid/TreeGrid.vue +758 -758
  124. package/src/components/treeGrid/TreeGridNode.vue +275 -275
  125. package/src/components/treeGrid/index.js +9 -9
  126. package/src/components/treeGrid/style/treeGrid.scss +261 -261
  127. package/src/components/treeGrid/treeGrid.toolbar.vue +26 -26
  128. package/src/components/treeGrid/uses.js +867 -867
  129. package/src/components/window/Window.vue +329 -329
  130. package/src/components/window/index.js +7 -7
  131. package/src/components/window/uses.js +899 -899
  132. package/src/directives/clickoutside.js +90 -90
  133. package/src/main.js +116 -116
  134. package/src/style/components/input.scss +108 -108
  135. package/src/style/functions.scss +3 -3
  136. package/src/style/index.scss +6 -6
  137. package/src/style/lib/fonts/EVUI.svg +292 -292
  138. package/src/style/lib/icon.css +888 -888
  139. package/src/style/mixins.scss +94 -94
  140. package/src/style/themes.scss +67 -67
  141. package/src/style/variables.scss +22 -22
@@ -1,358 +1,358 @@
1
- <template>
2
- <teleport to="body">
3
- <transition
4
- name="ev-message-box-fade"
5
- appear
6
- >
7
- <div
8
- v-show="isShow"
9
- id="ev-message-box-modal"
10
- @click.self="closeMsg('modal')"
11
- @wheel.stop.prevent="() => {}"
12
- >
13
- <div
14
- ref="msgRef"
15
- class="ev-message-box"
16
- :class="{
17
- [`type-${type}`]: !!type,
18
- 'show-close': showClose,
19
- 'has-icon': !!iconClass,
20
- 'has-title': !!title,
21
- }"
22
- tabindex="-1"
23
- >
24
- <span
25
- v-if="iconClass"
26
- class="ev-message-box-icon"
27
- >
28
- <i
29
- :class="iconClass"
30
- />
31
- </span>
32
- <div class="ev-message-box-content">
33
- <p
34
- v-if="title"
35
- class="ev-message-box-title"
36
- >
37
- {{ title }}
38
- </p>
39
- <p
40
- v-if="useHTML"
41
- class="ev-message-box-message"
42
- v-html="message"
43
- />
44
- <p
45
- v-else
46
- class="ev-message-box-message"
47
- >
48
- {{ message }}
49
- </p>
50
- </div>
51
- <div class="ev-message-box-btn">
52
- <ev-button
53
- v-if="showCancelBtn"
54
- size="small"
55
- class="ev-message-box-cancel"
56
- :auto-focus="hasFocus('cancelBtn')"
57
- @click="closeMsg('cancel')"
58
- >
59
- {{ cancelBtnText }}
60
- </ev-button>
61
- <ev-button
62
- v-if="showConfirmBtn"
63
- type="primary"
64
- size="small"
65
- class="ev-message-box-confirm"
66
- :auto-focus="hasFocus('confirmBtn')"
67
- @click="closeMsg('ok')"
68
- >
69
- {{ confirmBtnText }}
70
- </ev-button>
71
- </div>
72
- <span
73
- v-if="showClose"
74
- class="ev-message-box-close"
75
- @click="closeMsg('cancel')"
76
- >
77
- <i class="ev-icon-close" />
78
- </span>
79
- </div>
80
- </div>
81
- </transition>
82
- </teleport>
83
- </template>
84
-
85
- <script>
86
- import { reactive, toRefs, watch, onMounted, ref, onBeforeUnmount } from 'vue';
87
- import EvButton from '@/components/button/Button.vue';
88
-
89
- export default {
90
- name: 'EvMessageBox',
91
- components: {
92
- EvButton,
93
- },
94
- props: {
95
- type: {
96
- type: String,
97
- default: '',
98
- validator: val => ['', 'info', 'success', 'warning', 'error'].includes(val),
99
- },
100
- title: {
101
- type: String,
102
- default: '',
103
- },
104
- message: {
105
- type: [String, Array],
106
- default: '',
107
- },
108
- iconClass: {
109
- type: String,
110
- default: '',
111
- },
112
- onClose: {
113
- type: Function,
114
- default: null,
115
- },
116
- showClose: {
117
- type: Boolean,
118
- default: true,
119
- },
120
- showConfirmBtn: {
121
- type: Boolean,
122
- default: true,
123
- },
124
- showCancelBtn: {
125
- type: Boolean,
126
- default: true,
127
- },
128
- confirmBtnText: {
129
- type: String,
130
- default: 'OK',
131
- },
132
- cancelBtnText: {
133
- type: String,
134
- default: 'Cancel',
135
- },
136
- closeOnClickModal: {
137
- type: Boolean,
138
- default: true,
139
- },
140
- useHTML: {
141
- type: Boolean,
142
- default: false,
143
- },
144
- unmount: {
145
- type: Function,
146
- default: null,
147
- },
148
- focusable: {
149
- type: Boolean,
150
- default: false,
151
- },
152
- },
153
- setup(props) {
154
- const msgRef = ref(null);
155
-
156
- const state = reactive({
157
- isShow: true,
158
- iconClass: '',
159
- });
160
- const closeMsg = (btnType) => {
161
- if (!props.closeOnClickModal && btnType === 'modal') {
162
- return;
163
- }
164
-
165
- const type = btnType === 'modal' ? 'cancel' : btnType;
166
- state.isShow = false;
167
-
168
- if (props.onClose) {
169
- props.onClose(type);
170
- }
171
- if (props.unmount) {
172
- setTimeout(props.unmount, 1000);
173
- }
174
- };
175
- const keydown = (e) => {
176
- if (e.keyCode === 27 && state.isShow) {
177
- closeMsg();
178
- }
179
- };
180
-
181
- const getIconClassName = (type) => {
182
- switch (type) {
183
- case 'success':
184
- return 'ev-icon-arrow-check';
185
- case 'warning':
186
- return 'ev-icon-warning2';
187
- case 'error':
188
- return 'ev-icon-warning3';
189
- case 'info':
190
- default:
191
- return 'ev-icon-info2';
192
- }
193
- };
194
- const setState = () => {
195
- if (props.iconClass) {
196
- state.iconClass = props.iconClass;
197
- } else if (props.type) {
198
- state.iconClass = getIconClassName(props.type);
199
- }
200
- };
201
-
202
- const hasFocus = (type) => {
203
- if (!props.focusable) return false;
204
-
205
- switch (type) {
206
- case 'confirmBtn':
207
- return props.showConfirmBtn;
208
- case 'cancelBtn':
209
- return !props.showConfirmBtn && props.showCancelBtn;
210
- case 'messagebox':
211
- return !props.showConfirmBtn && !props.showCancelBtn;
212
- default:
213
- return false;
214
- }
215
- };
216
-
217
- onMounted(() => {
218
- setState();
219
- document.addEventListener('keydown', keydown);
220
- if (hasFocus('messagebox')) {
221
- msgRef.value.focus();
222
- }
223
- });
224
- watch(() => state.isShow, (val) => {
225
- if (!val) {
226
- document.removeEventListener('keydown', keydown);
227
- }
228
- });
229
- onBeforeUnmount(() => {
230
- document.removeEventListener('keydown', keydown);
231
- });
232
- return {
233
- closeMsg,
234
- ...toRefs(state),
235
- msgRef,
236
- hasFocus,
237
- };
238
- },
239
- };
240
- </script>
241
-
242
- <style lang="scss">
243
- @import '../../style/index.scss';
244
-
245
- #ev-message-box-modal {
246
- display: flex;
247
- position: fixed;
248
- top: 0;
249
- left: 0;
250
- z-index: 901;
251
- width: 100vw;
252
- height: 100vh;
253
- justify-content: center;
254
- align-items: center;
255
- background-color: rgba(0, 0, 0, 0.5);
256
- transition: opacity .2s ease-in-out;
257
- }
258
- .ev-message-box {
259
- $padding-vertical: 20px;
260
- $padding-horizontal: 17px;
261
-
262
- position: relative;
263
- width: 400px;
264
- padding: $padding-vertical $padding-horizontal $padding-vertical - 5px;
265
- margin-bottom: 10px;
266
- box-sizing: border-box;
267
- border-radius: $default-radius;
268
- background-color: #FDFDFD;
269
- border: 1px solid #E3E3E3;
270
- transition: opacity .2s ease-in-out, transform .3s ease-in-out;
271
- font-size: $font-size-medium;
272
- line-height: 1.5em;
273
-
274
- &-fade-enter-active,
275
- &-fade-leave-active {
276
- .ev-message-box-layer {
277
- opacity: 0;
278
- }
279
- .ev-message-box {
280
- opacity: 0;
281
- transform: translateY(-10%);
282
- }
283
- }
284
- &-title {
285
- margin-bottom: 17px;
286
- font-size: $font-size-large;
287
- font-weight: 700;
288
- }
289
- &-icon {
290
- position: absolute;
291
- top: $padding-vertical;
292
- left: $padding-horizontal;
293
- font-size: $font-size-large + 2px;
294
- }
295
- &-close {
296
- position: absolute;
297
- top: $padding-vertical;
298
- right: $padding-horizontal;
299
- font-size: $font-size-small;
300
- cursor: pointer;
301
- transition: opacity $animate-base;
302
-
303
- &:hover {
304
- opacity: 0.5;
305
- }
306
- }
307
- &-btn {
308
- margin-top: 23px;
309
- text-align: right;
310
- .ev-button {
311
- min-width: 70px;
312
- margin-left: 5px;
313
- }
314
- }
315
-
316
- @include state('show-close') {
317
- .ev-message-box-message {
318
- margin-right: 20px;
319
- }
320
- }
321
- @include state('has-icon') {
322
- .ev-message-box-message {
323
- margin-left: 23px;
324
- }
325
- }
326
- @include state('has-title') {
327
- .ev-message-box-message {
328
- margin: 0 5px;
329
- }
330
- &.show-close {
331
- .ev-message-box-title {
332
- margin-right: 20px;
333
- }
334
- .ev-message-box-message {
335
- margin-right: 5px;
336
- }
337
- }
338
- &.has-icon {
339
- .ev-message-box-title {
340
- margin-left: 23px;
341
- }
342
- .ev-message-box-message {
343
- margin-left: 5px;
344
- }
345
- }
346
- }
347
-
348
- @each $type in ('info', 'success', 'warning', 'error') {
349
- &.type-#{$type} {
350
- .ev-message-box-icon {
351
- @include evThemify() {
352
- color: evThemed($type);
353
- }
354
- }
355
- }
356
- }
357
- }
358
- </style>
1
+ <template>
2
+ <teleport to="body">
3
+ <transition
4
+ name="ev-message-box-fade"
5
+ appear
6
+ >
7
+ <div
8
+ v-show="isShow"
9
+ id="ev-message-box-modal"
10
+ @click.self="closeMsg('modal')"
11
+ @wheel.stop.prevent="() => {}"
12
+ >
13
+ <div
14
+ ref="msgRef"
15
+ class="ev-message-box"
16
+ :class="{
17
+ [`type-${type}`]: !!type,
18
+ 'show-close': showClose,
19
+ 'has-icon': !!iconClass,
20
+ 'has-title': !!title,
21
+ }"
22
+ tabindex="-1"
23
+ >
24
+ <span
25
+ v-if="iconClass"
26
+ class="ev-message-box-icon"
27
+ >
28
+ <i
29
+ :class="iconClass"
30
+ />
31
+ </span>
32
+ <div class="ev-message-box-content">
33
+ <p
34
+ v-if="title"
35
+ class="ev-message-box-title"
36
+ >
37
+ {{ title }}
38
+ </p>
39
+ <p
40
+ v-if="useHTML"
41
+ class="ev-message-box-message"
42
+ v-html="message"
43
+ />
44
+ <p
45
+ v-else
46
+ class="ev-message-box-message"
47
+ >
48
+ {{ message }}
49
+ </p>
50
+ </div>
51
+ <div class="ev-message-box-btn">
52
+ <ev-button
53
+ v-if="showCancelBtn"
54
+ size="small"
55
+ class="ev-message-box-cancel"
56
+ :auto-focus="hasFocus('cancelBtn')"
57
+ @click="closeMsg('cancel')"
58
+ >
59
+ {{ cancelBtnText }}
60
+ </ev-button>
61
+ <ev-button
62
+ v-if="showConfirmBtn"
63
+ type="primary"
64
+ size="small"
65
+ class="ev-message-box-confirm"
66
+ :auto-focus="hasFocus('confirmBtn')"
67
+ @click="closeMsg('ok')"
68
+ >
69
+ {{ confirmBtnText }}
70
+ </ev-button>
71
+ </div>
72
+ <span
73
+ v-if="showClose"
74
+ class="ev-message-box-close"
75
+ @click="closeMsg('cancel')"
76
+ >
77
+ <i class="ev-icon-close" />
78
+ </span>
79
+ </div>
80
+ </div>
81
+ </transition>
82
+ </teleport>
83
+ </template>
84
+
85
+ <script>
86
+ import { reactive, toRefs, watch, onMounted, ref, onBeforeUnmount } from 'vue';
87
+ import EvButton from '@/components/button/Button.vue';
88
+
89
+ export default {
90
+ name: 'EvMessageBox',
91
+ components: {
92
+ EvButton,
93
+ },
94
+ props: {
95
+ type: {
96
+ type: String,
97
+ default: '',
98
+ validator: val => ['', 'info', 'success', 'warning', 'error'].includes(val),
99
+ },
100
+ title: {
101
+ type: String,
102
+ default: '',
103
+ },
104
+ message: {
105
+ type: [String, Array],
106
+ default: '',
107
+ },
108
+ iconClass: {
109
+ type: String,
110
+ default: '',
111
+ },
112
+ onClose: {
113
+ type: Function,
114
+ default: null,
115
+ },
116
+ showClose: {
117
+ type: Boolean,
118
+ default: true,
119
+ },
120
+ showConfirmBtn: {
121
+ type: Boolean,
122
+ default: true,
123
+ },
124
+ showCancelBtn: {
125
+ type: Boolean,
126
+ default: true,
127
+ },
128
+ confirmBtnText: {
129
+ type: String,
130
+ default: 'OK',
131
+ },
132
+ cancelBtnText: {
133
+ type: String,
134
+ default: 'Cancel',
135
+ },
136
+ closeOnClickModal: {
137
+ type: Boolean,
138
+ default: true,
139
+ },
140
+ useHTML: {
141
+ type: Boolean,
142
+ default: false,
143
+ },
144
+ unmount: {
145
+ type: Function,
146
+ default: null,
147
+ },
148
+ focusable: {
149
+ type: Boolean,
150
+ default: false,
151
+ },
152
+ },
153
+ setup(props) {
154
+ const msgRef = ref(null);
155
+
156
+ const state = reactive({
157
+ isShow: true,
158
+ iconClass: '',
159
+ });
160
+ const closeMsg = (btnType) => {
161
+ if (!props.closeOnClickModal && btnType === 'modal') {
162
+ return;
163
+ }
164
+
165
+ const type = btnType === 'modal' ? 'cancel' : btnType;
166
+ state.isShow = false;
167
+
168
+ if (props.onClose) {
169
+ props.onClose(type);
170
+ }
171
+ if (props.unmount) {
172
+ setTimeout(props.unmount, 1000);
173
+ }
174
+ };
175
+ const keydown = (e) => {
176
+ if (e.keyCode === 27 && state.isShow) {
177
+ closeMsg();
178
+ }
179
+ };
180
+
181
+ const getIconClassName = (type) => {
182
+ switch (type) {
183
+ case 'success':
184
+ return 'ev-icon-arrow-check';
185
+ case 'warning':
186
+ return 'ev-icon-warning2';
187
+ case 'error':
188
+ return 'ev-icon-warning3';
189
+ case 'info':
190
+ default:
191
+ return 'ev-icon-info2';
192
+ }
193
+ };
194
+ const setState = () => {
195
+ if (props.iconClass) {
196
+ state.iconClass = props.iconClass;
197
+ } else if (props.type) {
198
+ state.iconClass = getIconClassName(props.type);
199
+ }
200
+ };
201
+
202
+ const hasFocus = (type) => {
203
+ if (!props.focusable) return false;
204
+
205
+ switch (type) {
206
+ case 'confirmBtn':
207
+ return props.showConfirmBtn;
208
+ case 'cancelBtn':
209
+ return !props.showConfirmBtn && props.showCancelBtn;
210
+ case 'messagebox':
211
+ return !props.showConfirmBtn && !props.showCancelBtn;
212
+ default:
213
+ return false;
214
+ }
215
+ };
216
+
217
+ onMounted(() => {
218
+ setState();
219
+ document.addEventListener('keydown', keydown);
220
+ if (hasFocus('messagebox')) {
221
+ msgRef.value.focus();
222
+ }
223
+ });
224
+ watch(() => state.isShow, (val) => {
225
+ if (!val) {
226
+ document.removeEventListener('keydown', keydown);
227
+ }
228
+ });
229
+ onBeforeUnmount(() => {
230
+ document.removeEventListener('keydown', keydown);
231
+ });
232
+ return {
233
+ closeMsg,
234
+ ...toRefs(state),
235
+ msgRef,
236
+ hasFocus,
237
+ };
238
+ },
239
+ };
240
+ </script>
241
+
242
+ <style lang="scss">
243
+ @import '../../style/index.scss';
244
+
245
+ #ev-message-box-modal {
246
+ display: flex;
247
+ position: fixed;
248
+ top: 0;
249
+ left: 0;
250
+ z-index: 901;
251
+ width: 100vw;
252
+ height: 100vh;
253
+ justify-content: center;
254
+ align-items: center;
255
+ background-color: rgba(0, 0, 0, 0.5);
256
+ transition: opacity .2s ease-in-out;
257
+ }
258
+ .ev-message-box {
259
+ $padding-vertical: 20px;
260
+ $padding-horizontal: 17px;
261
+
262
+ position: relative;
263
+ width: 400px;
264
+ padding: $padding-vertical $padding-horizontal $padding-vertical - 5px;
265
+ margin-bottom: 10px;
266
+ box-sizing: border-box;
267
+ border-radius: $default-radius;
268
+ background-color: #FDFDFD;
269
+ border: 1px solid #E3E3E3;
270
+ transition: opacity .2s ease-in-out, transform .3s ease-in-out;
271
+ font-size: $font-size-medium;
272
+ line-height: 1.5em;
273
+
274
+ &-fade-enter-active,
275
+ &-fade-leave-active {
276
+ .ev-message-box-layer {
277
+ opacity: 0;
278
+ }
279
+ .ev-message-box {
280
+ opacity: 0;
281
+ transform: translateY(-10%);
282
+ }
283
+ }
284
+ &-title {
285
+ margin-bottom: 17px;
286
+ font-size: $font-size-large;
287
+ font-weight: 700;
288
+ }
289
+ &-icon {
290
+ position: absolute;
291
+ top: $padding-vertical;
292
+ left: $padding-horizontal;
293
+ font-size: $font-size-large + 2px;
294
+ }
295
+ &-close {
296
+ position: absolute;
297
+ top: $padding-vertical;
298
+ right: $padding-horizontal;
299
+ font-size: $font-size-small;
300
+ cursor: pointer;
301
+ transition: opacity $animate-base;
302
+
303
+ &:hover {
304
+ opacity: 0.5;
305
+ }
306
+ }
307
+ &-btn {
308
+ margin-top: 23px;
309
+ text-align: right;
310
+ .ev-button {
311
+ min-width: 70px;
312
+ margin-left: 5px;
313
+ }
314
+ }
315
+
316
+ @include state('show-close') {
317
+ .ev-message-box-message {
318
+ margin-right: 20px;
319
+ }
320
+ }
321
+ @include state('has-icon') {
322
+ .ev-message-box-message {
323
+ margin-left: 23px;
324
+ }
325
+ }
326
+ @include state('has-title') {
327
+ .ev-message-box-message {
328
+ margin: 0 5px;
329
+ }
330
+ &.show-close {
331
+ .ev-message-box-title {
332
+ margin-right: 20px;
333
+ }
334
+ .ev-message-box-message {
335
+ margin-right: 5px;
336
+ }
337
+ }
338
+ &.has-icon {
339
+ .ev-message-box-title {
340
+ margin-left: 23px;
341
+ }
342
+ .ev-message-box-message {
343
+ margin-left: 5px;
344
+ }
345
+ }
346
+ }
347
+
348
+ @each $type in ('info', 'success', 'warning', 'error') {
349
+ &.type-#{$type} {
350
+ .ev-message-box-icon {
351
+ @include evThemify() {
352
+ color: evThemed($type);
353
+ }
354
+ }
355
+ }
356
+ }
357
+ }
358
+ </style>