evui 3.1.39 → 3.1.43
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/evui.common.js +2039 -986
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +2039 -986
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar/Calendar.vue +194 -82
- package/src/components/calendar/uses.js +457 -138
- package/src/components/chart/chart.core.js +27 -23
- package/src/components/chart/helpers/helpers.constant.js +9 -0
- package/src/components/chart/scale/scale.js +380 -164
- package/src/components/chart/scale/scale.step.js +118 -78
- package/src/components/contextMenu/MenuList.vue +1 -1
- package/src/components/datePicker/DatePicker.vue +109 -31
- package/src/components/datePicker/uses.js +213 -21
- package/src/components/grid/Grid.vue +15 -10
- package/src/components/treeGrid/TreeGrid.vue +30 -2
- package/src/components/treeGrid/TreeGridNode.vue +10 -1
- package/src/components/treeGrid/treeGrid.toolbar.vue +4 -4
package/package.json
CHANGED
|
@@ -65,49 +65,113 @@
|
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div
|
|
68
|
-
v-if="
|
|
69
|
-
class="ev-calendar-
|
|
68
|
+
v-if="['dateTime', 'dateTimeRange'].includes(mode)"
|
|
69
|
+
class="ev-calendar-time-area"
|
|
70
|
+
>
|
|
71
|
+
<div class="ev-calendar-time-side">
|
|
72
|
+
<div
|
|
73
|
+
v-for="hmsType in ['HOUR', 'MIN', 'SEC']"
|
|
74
|
+
:key="`${hmsType}_TITLE`"
|
|
75
|
+
>
|
|
76
|
+
{{ hmsType }}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="ev-calendar-time-center">
|
|
80
|
+
<template
|
|
81
|
+
v-for="timeType in ['hour', 'min', 'sec']"
|
|
82
|
+
:key="`${timeType}_table`"
|
|
83
|
+
>
|
|
84
|
+
<table class="ev-calendar-time-table">
|
|
85
|
+
<tbody
|
|
86
|
+
@wheel.prevent="wheelTime('main', timeType, $event)"
|
|
87
|
+
>
|
|
88
|
+
<tr
|
|
89
|
+
v-for="i in 3"
|
|
90
|
+
:key="`${timeType}_${i}_tr`"
|
|
91
|
+
>
|
|
92
|
+
<td
|
|
93
|
+
v-for="j in 4"
|
|
94
|
+
:key="`${timeType}_${i}_${j}_td`"
|
|
95
|
+
class="ev-calendar-time-td"
|
|
96
|
+
:class="{
|
|
97
|
+
selected: getTimeInfo(timeType, i, j, 'main').isSelected,
|
|
98
|
+
disabled: preventTimeEventType.main[timeType]
|
|
99
|
+
|| getTimeInfo(timeType, i, j, 'main').isDisabled,
|
|
100
|
+
}"
|
|
101
|
+
@click="clickTime('main', timeType, i, j)"
|
|
102
|
+
>
|
|
103
|
+
<div> {{ getTimeInfo(timeType, i, j, 'main').num }} </div>
|
|
104
|
+
</td>
|
|
105
|
+
</tr>
|
|
106
|
+
</tbody>
|
|
107
|
+
</table>
|
|
108
|
+
</template>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="ev-calendar-time-side">
|
|
111
|
+
<template
|
|
112
|
+
v-for="hmsType in ['hour', 'min', 'sec']"
|
|
113
|
+
:key="`${hmsType}_btn_area`"
|
|
114
|
+
>
|
|
115
|
+
<div
|
|
116
|
+
v-for="arrowType in ['up', 'down']"
|
|
117
|
+
:key="`${hmsType}_${arrowType}_btn`"
|
|
118
|
+
:class="hmsType === 'hour' ? 'arrow-hour' : 'arrow-other'"
|
|
119
|
+
@click="clickHmsBtn('main', hmsType, arrowType)"
|
|
120
|
+
>
|
|
121
|
+
<i
|
|
122
|
+
:class="[
|
|
123
|
+
`ev-icon-arrow-${arrowType}`,
|
|
124
|
+
{ disabled: preventTimeEventType.main[hmsType] }
|
|
125
|
+
]" />
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div
|
|
132
|
+
v-if="['dateRange', 'dateTimeRange'].includes(mode)"
|
|
133
|
+
class="ev-calendar-date-area"
|
|
70
134
|
>
|
|
71
135
|
<div class="ev-calendar-header">
|
|
72
136
|
<div>
|
|
73
137
|
<i
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
138
|
+
class="ev-icon-s-arrow-left move-month-arrow"
|
|
139
|
+
:class="{ disabled: isContinuousMonths }"
|
|
140
|
+
@click="clickPrevNextBtn('expanded', 'prev')"
|
|
77
141
|
/>
|
|
78
142
|
</div>
|
|
79
143
|
<span class="ev-calendar-year">{{ expandedCalendarPageInfo.year }}</span>
|
|
80
144
|
<span class="ev-calendar-month">{{ expandedCalendarMonth }}</span>
|
|
81
145
|
<div>
|
|
82
146
|
<i
|
|
83
|
-
|
|
84
|
-
|
|
147
|
+
class="ev-icon-s-arrow-right move-month-arrow"
|
|
148
|
+
@click="clickPrevNextBtn('expanded', 'next')"
|
|
85
149
|
/>
|
|
86
150
|
</div>
|
|
87
151
|
</div>
|
|
88
152
|
<div class="ev-calendar-body">
|
|
89
153
|
<table
|
|
90
|
-
|
|
91
|
-
|
|
154
|
+
:key="'expanded_calendar_table'"
|
|
155
|
+
class="ev-calendar-table"
|
|
92
156
|
>
|
|
93
157
|
<thead>
|
|
94
|
-
|
|
95
|
-
|
|
158
|
+
<tr>
|
|
159
|
+
<th
|
|
96
160
|
v-for="dayOfTheWeek in dayOfTheWeekList"
|
|
97
161
|
:key="dayOfTheWeek"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
162
|
+
>
|
|
163
|
+
{{ dayOfTheWeek }}
|
|
164
|
+
</th>
|
|
165
|
+
</tr>
|
|
102
166
|
</thead>
|
|
103
167
|
<tbody
|
|
104
|
-
|
|
168
|
+
@wheel.prevent="wheelMonth('expanded', $event)"
|
|
105
169
|
>
|
|
106
|
-
|
|
170
|
+
<tr
|
|
107
171
|
v-for="weekInfo in expandedCalendarTableInfo"
|
|
108
172
|
:key="weekInfo"
|
|
109
|
-
|
|
110
|
-
|
|
173
|
+
>
|
|
174
|
+
<td
|
|
111
175
|
v-for="dateInfo in weekInfo"
|
|
112
176
|
:key="dateInfo"
|
|
113
177
|
class="ev-calendar-date-td"
|
|
@@ -118,73 +182,78 @@
|
|
|
118
182
|
]"
|
|
119
183
|
@click="clickDate('expanded', dateInfo)"
|
|
120
184
|
@[`${calendarEventName}`]="onMousemoveDate('expanded', $event)"
|
|
121
|
-
|
|
122
|
-
|
|
185
|
+
>
|
|
186
|
+
<div>
|
|
123
187
|
<span>
|
|
124
188
|
{{ dateInfo.date }}
|
|
125
189
|
</span>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
190
|
+
</div>
|
|
191
|
+
</td>
|
|
192
|
+
</tr>
|
|
129
193
|
</tbody>
|
|
130
194
|
</table>
|
|
131
195
|
</div>
|
|
132
196
|
</div>
|
|
133
197
|
|
|
134
198
|
<div
|
|
135
|
-
|
|
136
|
-
|
|
199
|
+
v-if="mode === 'dateTimeRange'"
|
|
200
|
+
class="ev-calendar-time-area"
|
|
137
201
|
>
|
|
138
202
|
<div class="ev-calendar-time-side">
|
|
139
203
|
<div
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
class="ev-calendar-time-110"
|
|
204
|
+
v-for="hmsType in ['HOUR', 'MIN', 'SEC']"
|
|
205
|
+
:key="`${hmsType}_TITLE`"
|
|
143
206
|
>
|
|
144
207
|
{{ hmsType }}
|
|
145
208
|
</div>
|
|
146
209
|
</div>
|
|
147
210
|
<div class="ev-calendar-time-center">
|
|
148
211
|
<template
|
|
149
|
-
|
|
150
|
-
|
|
212
|
+
v-for="timeType in ['hour', 'min', 'sec']"
|
|
213
|
+
:key="`${timeType}_table`"
|
|
151
214
|
>
|
|
152
215
|
<table class="ev-calendar-time-table">
|
|
153
216
|
<tbody
|
|
154
|
-
|
|
217
|
+
@wheel.prevent="wheelTime('expanded', timeType, $event)"
|
|
155
218
|
>
|
|
156
|
-
|
|
157
|
-
v-for="i in
|
|
219
|
+
<tr
|
|
220
|
+
v-for="i in 3"
|
|
158
221
|
:key="`${timeType}_${i}_tr`"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
v-for="j in
|
|
222
|
+
>
|
|
223
|
+
<td
|
|
224
|
+
v-for="j in 4"
|
|
162
225
|
:key="`${timeType}_${i}_${j}_td`"
|
|
163
226
|
class="ev-calendar-time-td"
|
|
164
227
|
:class="{
|
|
165
|
-
selected: getTimeInfo(timeType, i, j).isSelected,
|
|
228
|
+
selected: getTimeInfo(timeType, i, j, 'expanded').isSelected,
|
|
229
|
+
disabled: preventTimeEventType.expanded[timeType]
|
|
230
|
+
|| getTimeInfo(timeType, i, j, 'expanded').isDisabled,
|
|
166
231
|
}"
|
|
167
|
-
@click="clickTime(timeType, i, j)"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
232
|
+
@click="clickTime('expanded', timeType, i, j)"
|
|
233
|
+
>
|
|
234
|
+
<div> {{ getTimeInfo(timeType, i, j, 'expanded').num }} </div>
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
172
237
|
</tbody>
|
|
173
238
|
</table>
|
|
174
239
|
</template>
|
|
175
240
|
</div>
|
|
176
241
|
<div class="ev-calendar-time-side">
|
|
177
242
|
<template
|
|
178
|
-
|
|
179
|
-
|
|
243
|
+
v-for="hmsType in ['hour', 'min', 'sec']"
|
|
244
|
+
:key="`${hmsType}_btn_area`"
|
|
180
245
|
>
|
|
181
246
|
<div
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
247
|
+
v-for="arrowType in ['up', 'down']"
|
|
248
|
+
:key="`${hmsType}_${arrowType}_btn`"
|
|
249
|
+
:class="hmsType === 'hour' ? 'arrow-hour' : 'arrow-other'"
|
|
250
|
+
@click="clickHmsBtn('expanded', hmsType, arrowType)"
|
|
186
251
|
>
|
|
187
|
-
<i
|
|
252
|
+
<i
|
|
253
|
+
:class="[
|
|
254
|
+
`ev-icon-arrow-${arrowType}`,
|
|
255
|
+
{ disabled: preventTimeEventType.expanded[hmsType] }
|
|
256
|
+
]" />
|
|
188
257
|
</div>
|
|
189
258
|
</template>
|
|
190
259
|
</div>
|
|
@@ -206,7 +275,8 @@ export default {
|
|
|
206
275
|
const dateTimeReg = new RegExp(/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]/);
|
|
207
276
|
if (Array.isArray(value)) {
|
|
208
277
|
return value.every(v => !!(!v
|
|
209
|
-
|| (v.length === 10 && dateReg.exec(v)))
|
|
278
|
+
|| (v.length === 10 && dateReg.exec(v)))
|
|
279
|
+
|| (v.length === 19 && dateTimeReg.exec(v)));
|
|
210
280
|
}
|
|
211
281
|
return !!(!value
|
|
212
282
|
|| (value.length === 10 && dateReg.exec(value))
|
|
@@ -216,7 +286,7 @@ export default {
|
|
|
216
286
|
mode: {
|
|
217
287
|
type: String,
|
|
218
288
|
default: 'date',
|
|
219
|
-
validator: value => ['date', 'dateTime', 'dateMulti', 'dateRange']
|
|
289
|
+
validator: value => ['date', 'dateTime', 'dateMulti', 'dateRange', 'dateTimeRange']
|
|
220
290
|
.indexOf(value) !== -1,
|
|
221
291
|
},
|
|
222
292
|
monthNotation: {
|
|
@@ -237,10 +307,15 @@ export default {
|
|
|
237
307
|
multiType: 'date',
|
|
238
308
|
limit: 1,
|
|
239
309
|
}),
|
|
240
|
-
validator: ({ multiType, multiDayLimit, disabledDate }) =>
|
|
241
|
-
|
|
310
|
+
validator: ({ multiType, multiDayLimit, disabledDate, timeFormat }) => {
|
|
311
|
+
const timeReg = new RegExp(/(HH|2[0-3]|[01][0-9]):(mm|[0-5][0-9]):(ss|[0-5][0-9])/);
|
|
312
|
+
return (multiType ? ['weekday', 'week', 'date'].indexOf(multiType) !== -1 : true)
|
|
242
313
|
&& (multiDayLimit ? typeof multiDayLimit === 'number' && multiDayLimit > 0 : true)
|
|
243
|
-
&& (disabledDate ? typeof disabledDate === 'function' : true)
|
|
314
|
+
&& (disabledDate ? typeof disabledDate === 'function' : true)
|
|
315
|
+
&& Array.isArray(timeFormat)
|
|
316
|
+
? timeFormat.every(v => !!(!v || timeReg.exec(v)))
|
|
317
|
+
: !!(!timeFormat || (timeReg.exec(timeFormat)));
|
|
318
|
+
},
|
|
244
319
|
},
|
|
245
320
|
},
|
|
246
321
|
emits: {
|
|
@@ -260,7 +335,8 @@ export default {
|
|
|
260
335
|
const {
|
|
261
336
|
mainCalendarTableInfo,
|
|
262
337
|
expandedCalendarTableInfo,
|
|
263
|
-
|
|
338
|
+
mainTimeTableInfo,
|
|
339
|
+
expandedTimeTableInfo,
|
|
264
340
|
setCalendarDate,
|
|
265
341
|
setHmsTime,
|
|
266
342
|
getTimeInfo,
|
|
@@ -277,8 +353,10 @@ export default {
|
|
|
277
353
|
clickTime,
|
|
278
354
|
wheelMonth,
|
|
279
355
|
wheelTime,
|
|
356
|
+
resetCalendarInfo,
|
|
280
357
|
calendarEventName,
|
|
281
358
|
onMousemoveDate,
|
|
359
|
+
preventTimeEventType,
|
|
282
360
|
} = useEvent({
|
|
283
361
|
selectedValue,
|
|
284
362
|
mainCalendarPageInfo,
|
|
@@ -288,10 +366,13 @@ export default {
|
|
|
288
366
|
});
|
|
289
367
|
|
|
290
368
|
setCalendarDate('main');
|
|
291
|
-
if (props.mode
|
|
369
|
+
if (['dateRange', 'dateTimeRange'].includes(props.mode)) {
|
|
292
370
|
setCalendarDate('expanded');
|
|
293
371
|
}
|
|
294
|
-
|
|
372
|
+
|
|
373
|
+
if (['dateTime', 'dateTimeRange'].includes(props.mode)) {
|
|
374
|
+
setHmsTime();
|
|
375
|
+
}
|
|
295
376
|
|
|
296
377
|
return {
|
|
297
378
|
selectedValue,
|
|
@@ -304,7 +385,8 @@ export default {
|
|
|
304
385
|
|
|
305
386
|
mainCalendarTableInfo,
|
|
306
387
|
expandedCalendarTableInfo,
|
|
307
|
-
|
|
388
|
+
mainTimeTableInfo,
|
|
389
|
+
expandedTimeTableInfo,
|
|
308
390
|
getTimeInfo,
|
|
309
391
|
|
|
310
392
|
clickPrevNextBtn,
|
|
@@ -313,8 +395,10 @@ export default {
|
|
|
313
395
|
clickTime,
|
|
314
396
|
wheelMonth,
|
|
315
397
|
wheelTime,
|
|
398
|
+
resetCalendarInfo,
|
|
316
399
|
calendarEventName,
|
|
317
400
|
onMousemoveDate,
|
|
401
|
+
preventTimeEventType,
|
|
318
402
|
};
|
|
319
403
|
},
|
|
320
404
|
};
|
|
@@ -339,7 +423,7 @@ export default {
|
|
|
339
423
|
.ev-calendar-header {
|
|
340
424
|
display: flex;
|
|
341
425
|
height: 40px;
|
|
342
|
-
padding: 10px;
|
|
426
|
+
padding: 10px 8px;
|
|
343
427
|
|
|
344
428
|
div {
|
|
345
429
|
width: 20px;
|
|
@@ -369,7 +453,7 @@ export default {
|
|
|
369
453
|
}
|
|
370
454
|
|
|
371
455
|
.ev-calendar-body {
|
|
372
|
-
padding: 10px;
|
|
456
|
+
padding: 10px 8px 8px;
|
|
373
457
|
flex: 1;
|
|
374
458
|
}
|
|
375
459
|
|
|
@@ -475,27 +559,12 @@ export default {
|
|
|
475
559
|
.ev-calendar-time {
|
|
476
560
|
&-area {
|
|
477
561
|
display: flex;
|
|
478
|
-
width:
|
|
562
|
+
width: 195px;
|
|
479
563
|
flex-direction: row;
|
|
480
|
-
font-size: 12px;
|
|
481
564
|
border-left: 1px solid #EBEEF5;
|
|
482
565
|
color: #606266;
|
|
483
566
|
box-sizing: content-box;
|
|
484
567
|
}
|
|
485
|
-
|
|
486
|
-
&-110 {
|
|
487
|
-
height: 110px;
|
|
488
|
-
line-height: 110px;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
&-55 {
|
|
492
|
-
height: 55px;
|
|
493
|
-
line-height: 55px;
|
|
494
|
-
&:hover {
|
|
495
|
-
color: #409EFF;
|
|
496
|
-
cursor: pointer;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
568
|
}
|
|
500
569
|
|
|
501
570
|
.ev-calendar-time-td {
|
|
@@ -518,36 +587,79 @@ export default {
|
|
|
518
587
|
background-color: #409EFF;
|
|
519
588
|
text-align: center;
|
|
520
589
|
}
|
|
590
|
+
&.disabled {
|
|
591
|
+
background-color: #EEF0F3;
|
|
592
|
+
opacity: 1;
|
|
593
|
+
color: #C0C4CC;
|
|
594
|
+
|
|
595
|
+
&:hover {
|
|
596
|
+
cursor: not-allowed;
|
|
597
|
+
}
|
|
598
|
+
&.selected:hover {
|
|
599
|
+
cursor: pointer !important;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
521
602
|
}
|
|
522
603
|
|
|
523
604
|
.ev-calendar-time-side {
|
|
524
|
-
|
|
605
|
+
font-size: 10px;
|
|
525
606
|
text-align: center;
|
|
526
607
|
background-color: #E5E5E5;
|
|
527
608
|
|
|
609
|
+
&:first-child {
|
|
610
|
+
width: 35px;
|
|
611
|
+
|
|
612
|
+
& div {
|
|
613
|
+
height: 110px;
|
|
614
|
+
line-height: 110px;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
&:last-child {
|
|
619
|
+
width: 30px;
|
|
620
|
+
|
|
621
|
+
&:hover {
|
|
622
|
+
color: #409EFF;
|
|
623
|
+
cursor: pointer;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
& div {
|
|
627
|
+
height: 55px;
|
|
628
|
+
line-height: 55px;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
528
632
|
& div:not(:last-child) {
|
|
529
633
|
border-bottom: 1px solid #EBEEF5;
|
|
530
634
|
}
|
|
635
|
+
|
|
636
|
+
& div > .disabled {
|
|
637
|
+
color: #C0C4CC;
|
|
638
|
+
}
|
|
639
|
+
& div > .disabled:hover {
|
|
640
|
+
color: #C0C4CC;
|
|
641
|
+
}
|
|
531
642
|
}
|
|
532
643
|
.ev-calendar-time-center {
|
|
533
|
-
width:
|
|
644
|
+
width: 132px;
|
|
534
645
|
height: 100%;
|
|
535
646
|
text-align: center;
|
|
647
|
+
font-size: 12px;
|
|
536
648
|
|
|
537
649
|
& table:not(:last-child) {
|
|
538
650
|
border-bottom: 1px solid #EBEEF5;
|
|
539
651
|
}
|
|
540
652
|
}
|
|
541
653
|
.ev-calendar-time-table {
|
|
542
|
-
width:
|
|
654
|
+
width: 132px;
|
|
543
655
|
height: 110px;
|
|
544
656
|
table-layout: fixed;
|
|
545
657
|
border-collapse: collapse;
|
|
546
658
|
border-spacing: 0;
|
|
547
659
|
user-select: none;
|
|
548
660
|
|
|
549
|
-
|
|
550
|
-
height:
|
|
661
|
+
tr {
|
|
662
|
+
height: 33px;
|
|
551
663
|
}
|
|
552
664
|
}
|
|
553
665
|
</style>
|