vxe-pc-ui 4.15.1 → 4.15.3

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 (133) hide show
  1. package/dist/all.esm.js +834 -175
  2. package/es/backtop/src/backtop.js +2 -1
  3. package/es/button/src/button.js +3 -2
  4. package/es/calendar/src/calendar.js +2 -1
  5. package/es/cascader/src/cascader.js +2 -1
  6. package/es/checkbox/src/group.js +5 -1
  7. package/es/date-panel/src/util.js +27 -4
  8. package/es/date-picker/src/date-picker.js +609 -45
  9. package/es/date-range-picker/src/date-range-picker.js +20 -4
  10. package/es/drawer/src/drawer.js +2 -0
  11. package/es/form/render/index.js +3 -2
  12. package/es/form/src/form.js +6 -5
  13. package/es/form/src/itemInfo.js +6 -5
  14. package/es/input/src/input.js +2 -1
  15. package/es/menu/src/menu.js +2 -1
  16. package/es/modal/src/modal.js +5 -2
  17. package/es/number-input/src/number-input.js +2 -3
  18. package/es/pager/src/pager.js +4 -3
  19. package/es/radio/src/group.js +5 -1
  20. package/es/select/src/select.js +25 -20
  21. package/es/splitter/src/splitter.js +12 -7
  22. package/es/table-select/src/table-select.js +21 -16
  23. package/es/tabs/src/tabs.js +4 -3
  24. package/es/textarea/src/textarea.js +2 -1
  25. package/es/tree/src/tree.js +3 -2
  26. package/es/tree-select/src/tree-select.js +2 -1
  27. package/es/ui/index.js +1 -1
  28. package/es/ui/src/log.js +7 -1
  29. package/es/upload/src/upload.js +12 -3
  30. package/lib/backtop/src/backtop.js +5 -2
  31. package/lib/backtop/src/backtop.min.js +1 -1
  32. package/lib/button/src/button.js +4 -1
  33. package/lib/button/src/button.min.js +1 -1
  34. package/lib/calendar/src/calendar.js +4 -1
  35. package/lib/calendar/src/calendar.min.js +1 -1
  36. package/lib/cascader/src/cascader.js +4 -1
  37. package/lib/cascader/src/cascader.min.js +1 -1
  38. package/lib/checkbox/src/group.js +5 -1
  39. package/lib/checkbox/src/group.min.js +1 -1
  40. package/lib/date-panel/src/util.js +37 -6
  41. package/lib/date-panel/src/util.min.js +1 -1
  42. package/lib/date-picker/src/date-picker.js +665 -43
  43. package/lib/date-picker/src/date-picker.min.js +1 -1
  44. package/lib/date-range-picker/src/date-range-picker.js +21 -3
  45. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  46. package/lib/drawer/src/drawer.js +2 -0
  47. package/lib/drawer/src/drawer.min.js +1 -1
  48. package/lib/form/render/index.js +4 -1
  49. package/lib/form/render/index.min.js +1 -1
  50. package/lib/form/src/form.js +8 -4
  51. package/lib/form/src/form.min.js +1 -1
  52. package/lib/form/src/itemInfo.js +7 -4
  53. package/lib/form/src/itemInfo.min.js +1 -1
  54. package/lib/index.umd.js +916 -137
  55. package/lib/index.umd.min.js +1 -1
  56. package/lib/input/src/input.js +6 -3
  57. package/lib/input/src/input.min.js +1 -1
  58. package/lib/menu/src/menu.js +4 -1
  59. package/lib/menu/src/menu.min.js +1 -1
  60. package/lib/modal/src/modal.js +8 -2
  61. package/lib/modal/src/modal.min.js +1 -1
  62. package/lib/number-input/src/number-input.js +2 -3
  63. package/lib/pager/src/pager.js +6 -2
  64. package/lib/pager/src/pager.min.js +1 -1
  65. package/lib/radio/src/group.js +5 -1
  66. package/lib/radio/src/group.min.js +1 -1
  67. package/lib/select/src/select.js +27 -20
  68. package/lib/select/src/select.min.js +1 -1
  69. package/lib/splitter/src/splitter.js +17 -9
  70. package/lib/splitter/src/splitter.min.js +1 -1
  71. package/lib/table-select/src/table-select.js +22 -15
  72. package/lib/table-select/src/table-select.min.js +1 -1
  73. package/lib/tabs/src/tabs.js +7 -3
  74. package/lib/tabs/src/tabs.min.js +1 -1
  75. package/lib/textarea/src/textarea.js +4 -1
  76. package/lib/textarea/src/textarea.min.js +1 -1
  77. package/lib/tree/src/tree.js +7 -4
  78. package/lib/tree/src/tree.min.js +1 -1
  79. package/lib/tree-select/src/tree-select.js +7 -3
  80. package/lib/tree-select/src/tree-select.min.js +1 -1
  81. package/lib/ui/index.js +1 -1
  82. package/lib/ui/index.min.js +1 -1
  83. package/lib/ui/src/log.js +8 -1
  84. package/lib/ui/src/log.min.js +1 -1
  85. package/lib/upload/src/upload.js +20 -3
  86. package/lib/upload/src/upload.min.js +1 -1
  87. package/package.json +1 -1
  88. package/packages/backtop/src/backtop.ts +3 -1
  89. package/packages/button/src/button.ts +4 -2
  90. package/packages/calendar/src/calendar.ts +3 -1
  91. package/packages/cascader/src/cascader.ts +3 -1
  92. package/packages/checkbox/src/group.ts +6 -2
  93. package/packages/date-panel/src/util.ts +28 -3
  94. package/packages/date-picker/src/date-picker.ts +624 -48
  95. package/packages/date-range-picker/src/date-range-picker.ts +19 -4
  96. package/packages/drawer/src/drawer.ts +2 -0
  97. package/packages/form/render/index.ts +4 -2
  98. package/packages/form/src/form.ts +7 -5
  99. package/packages/form/src/itemInfo.ts +7 -5
  100. package/packages/input/src/input.ts +3 -1
  101. package/packages/menu/src/menu.ts +3 -1
  102. package/packages/modal/src/modal.ts +6 -2
  103. package/packages/number-input/src/number-input.ts +2 -6
  104. package/packages/pager/src/pager.ts +5 -3
  105. package/packages/radio/src/group.ts +6 -2
  106. package/packages/select/src/select.ts +29 -22
  107. package/packages/splitter/src/splitter.ts +13 -7
  108. package/packages/table-select/src/table-select.ts +24 -17
  109. package/packages/tabs/src/tabs.ts +5 -3
  110. package/packages/textarea/src/textarea.ts +3 -1
  111. package/packages/tree/src/tree.ts +4 -2
  112. package/packages/tree-select/src/tree-select.ts +3 -1
  113. package/packages/ui/src/log.ts +7 -0
  114. package/packages/upload/src/upload.ts +14 -3
  115. package/types/components/date-picker.d.ts +27 -1
  116. package/types/components/date-range-picker.d.ts +4 -0
  117. package/types/components/drawer.d.ts +2 -0
  118. package/types/components/modal.d.ts +2 -0
  119. package/types/components/splitter.d.ts +1 -0
  120. package/types/components/table.d.ts +29 -3
  121. package/types/components/upload.d.ts +28 -1
  122. /package/es/icon/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
  123. /package/es/icon/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
  124. /package/es/icon/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
  125. /package/es/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
  126. /package/es/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
  127. /package/es/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
  128. /package/lib/icon/style/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
  129. /package/lib/icon/style/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
  130. /package/lib/icon/style/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
  131. /package/lib/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
  132. /package/lib/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
  133. /package/lib/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
@@ -1,15 +1,42 @@
1
- import { h, Teleport, ref, computed, provide, reactive, inject, nextTick, watch, onUnmounted } from 'vue';
1
+ import { h, Teleport, ref, computed, provide, reactive, inject, nextTick, watch, onUnmounted, onMounted } from 'vue';
2
2
  import { defineVxeComponent } from '../../ui/src/comp';
3
3
  import XEUtils from 'xe-utils';
4
4
  import { getConfig, getIcon, getI18n, commands, createEvent, globalEvents, GLOBAL_EVENT_KEYS, useSize, renderEmptyElement } from '../../ui';
5
5
  import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
6
- import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom';
6
+ import { updatePanelPlacement, getEventTargetNode, hasControlKey } from '../../ui/src/dom';
7
7
  import { getSlotVNs } from '../../ui/src/vn';
8
- import { parseDateObj, parseDateValue, getDateByCode, handleValueFormat, hasDateValueType, hasTimestampValueType } from '../../date-panel/src/util';
9
- import { errLog } from '../../ui/src/log';
8
+ import { parseDateObj, parseDateValue, getDateByCode, handleValueFormat, hasDateValueType, hasTimestampValueType, isAllSameChar, getChunkDefaultNum } from '../../date-panel/src/util';
9
+ import { createComponentLog } from '../../ui/src/log';
10
10
  import VxeDatePanelComponent from '../../date-panel/src/date-panel';
11
11
  import VxeButtonComponent from '../../button/src/button';
12
12
  import VxeButtonGroupComponent from '../../button/src/button-group';
13
+ const { warnLog, errLog } = createComponentLog('date-picker');
14
+ const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
15
+ const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
16
+ const parseInputKayMaps = {};
17
+ inputMaskedKeys.forEach(key => {
18
+ parseInputKayMaps[key] = true;
19
+ });
20
+ function createReactData() {
21
+ return {
22
+ initialized: false,
23
+ panelIndex: 0,
24
+ visiblePanel: false,
25
+ isAniVisible: false,
26
+ panelStyle: {},
27
+ panelPlacement: '',
28
+ isActivated: false,
29
+ inputValue: '',
30
+ labelFlag: 0
31
+ };
32
+ }
33
+ function createInternalData() {
34
+ return {
35
+ // hpTimeout: undefined,
36
+ inputLabel: '',
37
+ laseFocusMasked: 0
38
+ };
39
+ }
13
40
  export default defineVxeComponent({
14
41
  name: 'VxeDatePicker',
15
42
  props: {
@@ -101,6 +128,7 @@ export default defineVxeComponent({
101
128
  type: Boolean,
102
129
  default: () => getConfig().datePicker.autoClose
103
130
  },
131
+ maskedConfig: Object,
104
132
  prefixIcon: String,
105
133
  suffixIcon: String,
106
134
  placement: String,
@@ -141,20 +169,8 @@ export default defineVxeComponent({
141
169
  const formItemInfo = inject('xeFormItemInfo', null);
142
170
  const xID = XEUtils.uniqueId();
143
171
  const { computeSize } = useSize(props);
144
- const reactData = reactive({
145
- initialized: false,
146
- panelIndex: 0,
147
- visiblePanel: false,
148
- isAniVisible: false,
149
- panelStyle: {},
150
- panelPlacement: '',
151
- isActivated: false,
152
- inputValue: '',
153
- inputLabel: ''
154
- });
155
- const internalData = {
156
- hpTimeout: undefined
157
- };
172
+ const reactData = reactive(createReactData());
173
+ const internalData = createInternalData();
158
174
  const refElem = ref();
159
175
  const refInputTarget = ref();
160
176
  const refInputPanel = ref();
@@ -220,6 +236,44 @@ export default defineVxeComponent({
220
236
  const computeIsClearable = computed(() => {
221
237
  return props.clearable;
222
238
  });
239
+ const computeIsDatePanelType = computed(() => {
240
+ const isDateTimeType = computeIsDateTimeType.value;
241
+ return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
242
+ });
243
+ const computeDateListValue = computed(() => {
244
+ const { modelValue, type, multiple } = props;
245
+ const isDatePanelType = computeIsDatePanelType.value;
246
+ const dateValueFormat = computeDateValueFormat.value;
247
+ if (multiple && modelValue && isDatePanelType) {
248
+ return XEUtils.toValueString(modelValue).split(',').map(item => {
249
+ const date = parseDateValue(item, type, {
250
+ valueFormat: dateValueFormat
251
+ });
252
+ if (XEUtils.isValidDate(date)) {
253
+ return date;
254
+ }
255
+ return date;
256
+ });
257
+ }
258
+ return [];
259
+ });
260
+ const computeLimitMaxCount = computed(() => {
261
+ return props.multiple ? XEUtils.toNumber(props.limitCount) : 0;
262
+ });
263
+ const computeDateMultipleValue = computed(() => {
264
+ const dateListValue = computeDateListValue.value;
265
+ const dateValueFormat = computeDateValueFormat.value;
266
+ return dateListValue.map(date => XEUtils.toDateString(date, dateValueFormat));
267
+ });
268
+ const computeOverCount = computed(() => {
269
+ const { multiple } = props;
270
+ const limitMaxCount = computeLimitMaxCount.value;
271
+ const dateMultipleValue = computeDateMultipleValue.value;
272
+ if (multiple && limitMaxCount) {
273
+ return dateMultipleValue.length >= limitMaxCount;
274
+ }
275
+ return false;
276
+ });
223
277
  const computeInputReadonly = computed(() => {
224
278
  const { type, editable, multiple } = props;
225
279
  const formReadonly = computeFormReadonly.value;
@@ -269,6 +323,10 @@ export default defineVxeComponent({
269
323
  const { type, valueFormat } = props;
270
324
  return handleValueFormat(type, valueFormat);
271
325
  });
326
+ const computeDateMaskedFormat = computed(() => {
327
+ const dateLabelFormat = computeDateLabelFormat.value;
328
+ return dateLabelFormat;
329
+ });
272
330
  const computeFirstDayOfWeek = computed(() => {
273
331
  const { startDay } = props;
274
332
  return XEUtils.toNumber(startDay);
@@ -289,6 +347,14 @@ export default defineVxeComponent({
289
347
  return dateObj.label;
290
348
  }).join(', ');
291
349
  });
350
+ const computeMaskedOpts = computed(() => {
351
+ return Object.assign({}, getConfig().datePicker.maskedConfig, props.maskedConfig);
352
+ });
353
+ const computeMaskChar = computed(() => {
354
+ const maskedOpts = computeMaskedOpts.value;
355
+ const { maskPlaceholder } = maskedOpts;
356
+ return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || '*';
357
+ });
292
358
  const updateModelValue = () => {
293
359
  const { modelValue } = props;
294
360
  let val = '';
@@ -302,6 +368,12 @@ export default defineVxeComponent({
302
368
  }
303
369
  reactData.inputValue = val;
304
370
  };
371
+ const handleInputLabel = (text, isUpdate) => {
372
+ internalData.inputLabel = text;
373
+ if (isUpdate) {
374
+ reactData.labelFlag++;
375
+ }
376
+ };
305
377
  const triggerEvent = (evnt) => {
306
378
  const { inputValue } = reactData;
307
379
  dispatchEvent(evnt.type, { value: inputValue }, evnt);
@@ -347,7 +419,7 @@ export default defineVxeComponent({
347
419
  const inputEvent = (evnt) => {
348
420
  const inputElem = evnt.target;
349
421
  const value = inputElem.value;
350
- reactData.inputLabel = value;
422
+ handleInputLabel(value, true);
351
423
  dispatchEvent('input', { value }, evnt);
352
424
  };
353
425
  const changeEvent = (evnt) => {
@@ -356,15 +428,6 @@ export default defineVxeComponent({
356
428
  triggerEvent(evnt);
357
429
  }
358
430
  };
359
- const focusEvent = (evnt) => {
360
- const popupOpts = computePopupOpts.value;
361
- const { trigger } = popupOpts;
362
- reactData.isActivated = true;
363
- if (!trigger || trigger === 'default') {
364
- datePickerOpenEvent(evnt);
365
- }
366
- triggerEvent(evnt);
367
- };
368
431
  const clickPrefixEvent = (evnt) => {
369
432
  const isDisabled = computeIsDisabled.value;
370
433
  if (!isDisabled) {
@@ -381,6 +444,107 @@ export default defineVxeComponent({
381
444
  }, 350);
382
445
  });
383
446
  };
447
+ const dateChange = (date, isReload) => {
448
+ const { modelValue, multiple } = props;
449
+ const isDateTimeType = computeIsDateTimeType.value;
450
+ const dateValueFormat = computeDateValueFormat.value;
451
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
452
+ if (props.type === 'week') {
453
+ const sWeek = XEUtils.toNumber(props.selectDay);
454
+ date = XEUtils.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
455
+ }
456
+ const inpVal = XEUtils.toDateString(date, dateValueFormat, { firstDay: firstDayOfWeek });
457
+ if (multiple) {
458
+ const overCount = computeOverCount.value;
459
+ // 如果为多选
460
+ if (isDateTimeType) {
461
+ // 如果是datetime特殊类型
462
+ const dateListValue = isReload ? [] : [...computeDateListValue.value];
463
+ const datetimeRest = [];
464
+ const eqIndex = XEUtils.findIndexOf(dateListValue, val => XEUtils.isDateSame(date, val, 'yyyyMMdd'));
465
+ if (eqIndex === -1) {
466
+ if (overCount) {
467
+ // 如果超出最大多选数量
468
+ return;
469
+ }
470
+ dateListValue.push(date);
471
+ }
472
+ else {
473
+ dateListValue.splice(eqIndex, 1);
474
+ }
475
+ dateListValue.forEach(item => {
476
+ if (item) {
477
+ datetimeRest.push(item);
478
+ }
479
+ });
480
+ handleChange(datetimeRest.map(date => XEUtils.toDateString(date, dateValueFormat)).join(','), { type: 'update' });
481
+ }
482
+ else {
483
+ const dateMultipleValue = isReload ? [] : computeDateMultipleValue.value;
484
+ // 如果是日期类型
485
+ if (dateMultipleValue.some(val => XEUtils.isEqual(val, inpVal))) {
486
+ handleChange(dateMultipleValue.filter(val => !XEUtils.isEqual(val, inpVal)).join(','), { type: 'update' });
487
+ }
488
+ else {
489
+ if (overCount) {
490
+ // 如果超出最大多选数量
491
+ return;
492
+ }
493
+ handleChange(dateMultipleValue.concat([inpVal]).join(','), { type: 'update' });
494
+ }
495
+ }
496
+ }
497
+ else {
498
+ // 如果为单选
499
+ if (!XEUtils.isEqual(modelValue, inpVal)) {
500
+ handleChange(inpVal, { type: 'update' });
501
+ }
502
+ }
503
+ };
504
+ const dateRevert = () => {
505
+ const panelLabel = computePanelLabel.value;
506
+ handleInputLabel(panelLabel, true);
507
+ };
508
+ const afterCheckValue = (inpVal) => {
509
+ const { type } = props;
510
+ const { inputLabel } = internalData;
511
+ const dateLabelFormat = computeDateLabelFormat.value;
512
+ if (!inpVal) {
513
+ handleChange('', { type: 'check' });
514
+ return;
515
+ }
516
+ let inpDateVal = parseDateValue(inpVal, type, {
517
+ valueFormat: dateLabelFormat
518
+ });
519
+ if (!XEUtils.isValidDate(inpDateVal)) {
520
+ dateRevert();
521
+ return;
522
+ }
523
+ if (type === 'time') {
524
+ inpDateVal = XEUtils.toDateString(inpDateVal, dateLabelFormat);
525
+ if (inputLabel !== inpDateVal) {
526
+ handleChange(inpDateVal, { type: 'check' });
527
+ }
528
+ handleInputLabel(inpDateVal, true);
529
+ return;
530
+ }
531
+ let isChange = false;
532
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
533
+ if (type === 'datetime') {
534
+ const dateValue = reactData.inputValue;
535
+ if (inpVal !== XEUtils.toDateString(dateValue, dateLabelFormat) || inpVal !== XEUtils.toDateString(inpDateVal, dateLabelFormat)) {
536
+ isChange = true;
537
+ }
538
+ }
539
+ else {
540
+ isChange = true;
541
+ }
542
+ const label = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
543
+ handleInputLabel(label, true);
544
+ if (isChange) {
545
+ dateChange(inpDateVal);
546
+ }
547
+ };
384
548
  const clearValueEvent = (evnt, value) => {
385
549
  const isDatePickerType = computeIsDatePickerType.value;
386
550
  if (isDatePickerType) {
@@ -396,6 +560,298 @@ export default defineVxeComponent({
396
560
  dispatchEvent('suffix-click', { value: inputValue }, evnt);
397
561
  }
398
562
  };
563
+ const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
564
+ const { type, multiple } = props;
565
+ if (multiple) {
566
+ return;
567
+ }
568
+ const targetElem = refInputTarget.value;
569
+ if (!targetElem) {
570
+ return;
571
+ }
572
+ const inpValue = targetElem.value;
573
+ if (!inpValue) {
574
+ return;
575
+ }
576
+ const dateMaskedFormat = computeDateMaskedFormat.value;
577
+ const dateLabelFormat = computeDateLabelFormat.value;
578
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
579
+ const maskChar = computeMaskChar.value;
580
+ const selectionStart = targetElem.selectionStart || 0;
581
+ let selectKey = dateMaskedFormat[selectionStart];
582
+ if (!parseInputKayMaps[selectKey]) {
583
+ selectKey = dateMaskedFormat[selectionStart - 1];
584
+ }
585
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
586
+ if (!skRest) {
587
+ return;
588
+ }
589
+ if (isUpArrow || isDwArrow) {
590
+ const chunkFormat = skRest[0] || '';
591
+ const chunkStartIndex = skRest.index || 0;
592
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
593
+ const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
594
+ if (parseInputKayMaps[selectKey]) {
595
+ const chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : XEUtils.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
596
+ const restValue = inpValue.slice(0, chunkStartIndex) + XEUtils.padStart(chunkNum, chunkFormat.length, '0') + inpValue.slice(chunkEndIndex);
597
+ evnt.preventDefault();
598
+ if (restValue.indexOf(maskChar) === -1) {
599
+ // 解析日期
600
+ const inpDateVal = parseDateValue(restValue, type, {
601
+ valueFormat: dateLabelFormat
602
+ });
603
+ if (XEUtils.isValidDate(inpDateVal)) {
604
+ const label = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
605
+ targetElem.value = label;
606
+ handleInputLabel(label, false);
607
+ }
608
+ }
609
+ else {
610
+ targetElem.value = restValue;
611
+ handleInputLabel(restValue, false);
612
+ }
613
+ }
614
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
615
+ }
616
+ else if (isLtArrow || isRtArrow) {
617
+ const currKeyIndex = inputMaskedKeys.indexOf(selectKey);
618
+ if (currKeyIndex > -1) {
619
+ const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
620
+ const currIndex = XEUtils.findIndexOf(allMaskedKeys, key => selectKey === key[0]);
621
+ const targetFormatKey = isLtArrow ? (allMaskedKeys[currIndex - 1] || allMaskedKeys[0]) : (allMaskedKeys[currIndex + 1] || allMaskedKeys[allMaskedKeys.length - 1]);
622
+ const targetKey = targetFormatKey ? targetFormatKey[0] : '';
623
+ const sktRest = dateMaskedFormat.match(new RegExp(targetKey + '+'));
624
+ if (sktRest) {
625
+ evnt.preventDefault();
626
+ const mtStartIndex = sktRest.index || 0;
627
+ const mtEndIndex = mtStartIndex + sktRest[0].length;
628
+ targetElem.setSelectionRange(mtStartIndex, mtEndIndex);
629
+ }
630
+ }
631
+ }
632
+ internalData.isTriggerMasked = true;
633
+ };
634
+ const handleMaskedInputDate = (evnt) => {
635
+ const { multiple } = props;
636
+ if (multiple) {
637
+ return;
638
+ }
639
+ const targetElem = refInputTarget.value;
640
+ if (!targetElem) {
641
+ return;
642
+ }
643
+ const isControlKey = hasControlKey(evnt);
644
+ if (isControlKey) {
645
+ return;
646
+ }
647
+ evnt.preventDefault();
648
+ const eKey = evnt.key;
649
+ const isDeleleKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
650
+ const isBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE);
651
+ const isNumKey = eKey >= '0' && eKey <= '9';
652
+ const numKey = isNumKey ? evnt.key : '';
653
+ if (!(isDeleleKey || isBackspaceKey || isNumKey)) {
654
+ return;
655
+ }
656
+ const { isTriggerMasked } = internalData;
657
+ const dateMaskedFormat = computeDateMaskedFormat.value;
658
+ const maskChar = computeMaskChar.value;
659
+ let inpValue = targetElem.value || dateMaskedFormat;
660
+ const selectionStart = targetElem.selectionStart || 0;
661
+ const selectionEnd = targetElem.selectionEnd || 0;
662
+ let selectKey = dateMaskedFormat[selectionStart];
663
+ if (!parseInputKayMaps[selectKey]) {
664
+ selectKey = dateMaskedFormat[selectionStart - 1];
665
+ }
666
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
667
+ if (!skRest) {
668
+ return;
669
+ }
670
+ const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
671
+ const chunkFormat = skRest[0] || '';
672
+ const chunkStartIndex = skRest.index || 0;
673
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
674
+ const currKeyIndex = allMaskedKeys.indexOf(selectKey);
675
+ // 全选 | 如果无效字符
676
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
677
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
678
+ if (isAllSelected || isNotMasked) {
679
+ inpValue = dateMaskedFormat;
680
+ }
681
+ let chunkValue = isDeleleKey ? '' : inpValue.slice(chunkStartIndex, chunkEndIndex);
682
+ const chunkNums = (chunkValue.match(/\d/g) || []);
683
+ const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
684
+ if (isNumKey) {
685
+ chunkNumList.push(numKey);
686
+ }
687
+ else if (isBackspaceKey) {
688
+ chunkNumList.pop();
689
+ }
690
+ chunkValue = chunkNumList.join('').padEnd(chunkFormat.length, maskChar);
691
+ let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
692
+ restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
693
+ targetElem.value = restValue;
694
+ handleInputLabel(restValue, false);
695
+ // 如果是全选/删除
696
+ if (isAllSelected) {
697
+ if (isBackspaceKey || isDeleleKey) {
698
+ const firstMaskedKeys = allMaskedKeys[0];
699
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
700
+ if (firstSkRest) {
701
+ const firstChunkFormat = firstSkRest[0];
702
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
703
+ internalData.isTriggerMasked = true;
704
+ return;
705
+ }
706
+ }
707
+ }
708
+ else {
709
+ if (isBackspaceKey && !chunkNums.length) {
710
+ // 回退到上一个数字块
711
+ for (let i = currKeyIndex - 1; i >= 0; i--) {
712
+ const prveChunkKey = allMaskedKeys[i];
713
+ const prveSkRest = dateMaskedFormat.match(new RegExp(`${prveChunkKey}+`));
714
+ if (prveSkRest) {
715
+ const prveChunkFormat = prveSkRest[0];
716
+ const prveChunkStartIndex = prveSkRest.index || 0;
717
+ const prveChunkEndIndex = prveChunkStartIndex + prveChunkFormat.length;
718
+ let prveChunkValue = restValue.slice(prveChunkStartIndex, prveChunkEndIndex);
719
+ const prveChunkNums = (prveChunkValue.match(/\d/g) || []);
720
+ if (prveChunkNums.length) {
721
+ prveChunkNums.pop();
722
+ prveChunkValue = prveChunkNums.join('').padEnd(prveChunkFormat.length, maskChar);
723
+ restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
724
+ targetElem.value = restValue;
725
+ handleInputLabel(restValue, false);
726
+ targetElem.setSelectionRange(prveChunkStartIndex, prveChunkEndIndex);
727
+ return;
728
+ }
729
+ }
730
+ }
731
+ const firstMaskedKeys = allMaskedKeys[0];
732
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
733
+ if (firstSkRest) {
734
+ const firstChunkFormat = firstSkRest[0];
735
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
736
+ targetElem.value = restValue;
737
+ handleInputLabel(restValue, false);
738
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
739
+ internalData.isTriggerMasked = true;
740
+ return;
741
+ }
742
+ return;
743
+ }
744
+ }
745
+ let maskStartIndex = skRest.index || 0;
746
+ let maskEndIndex = maskStartIndex + skRest[0].length;
747
+ // 如果输入完成,跳转下一个
748
+ if (chunkNumList.length >= chunkValue.length) {
749
+ const nextKeys = allMaskedKeys.slice(currKeyIndex + 1);
750
+ if (currKeyIndex > -1) {
751
+ const nextRest = nextKeys.length ? dateMaskedFormat.match(new RegExp(`(${nextKeys.join('|')})+`)) : null;
752
+ // 如果当前数字块已输入,则跳转下一个数字块
753
+ if (nextRest) {
754
+ maskStartIndex = nextRest.index || 0;
755
+ maskEndIndex = maskStartIndex + nextRest[0].length;
756
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
757
+ }
758
+ else {
759
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
760
+ }
761
+ }
762
+ internalData.isTriggerMasked = true;
763
+ return;
764
+ }
765
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
766
+ internalData.isTriggerMasked = false;
767
+ };
768
+ const handleMaskedSelectedDate = (evnt, isFocus) => {
769
+ const { type, multiple, modelValue } = props;
770
+ if (multiple) {
771
+ return;
772
+ }
773
+ if (!maskedTypes.includes(type)) {
774
+ return;
775
+ }
776
+ const targetElem = refInputTarget.value;
777
+ if (!targetElem) {
778
+ return;
779
+ }
780
+ const { laseFocusMasked } = internalData;
781
+ if (laseFocusMasked && Date.now() - laseFocusMasked < 100) {
782
+ return;
783
+ }
784
+ const dateMaskedFormat = computeDateMaskedFormat.value;
785
+ const maskChar = computeMaskChar.value;
786
+ const selectionStart = targetElem.selectionStart || 0;
787
+ const selectionEnd = targetElem.selectionEnd || 0;
788
+ const inpValue = targetElem.value;
789
+ const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
790
+ // 如果为空
791
+ if (!inpValue) {
792
+ let restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
793
+ // 还原值
794
+ if (isFocus && modelValue) {
795
+ const chunkNums = (('' + XEUtils.toNumber(modelValue)).match(/\d/g) || []);
796
+ let useNumIndex = 0;
797
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), (txt) => chunkNums[useNumIndex++] || txt);
798
+ }
799
+ const firstMaskedKeys = allMaskedKeys[0];
800
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
801
+ if (firstSkRest) {
802
+ evnt.preventDefault();
803
+ const firstChunkFormat = firstSkRest[0];
804
+ targetElem.value = restValue;
805
+ handleInputLabel(restValue, false);
806
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
807
+ internalData.laseFocusMasked = Date.now();
808
+ return;
809
+ }
810
+ }
811
+ // 全选 | 如果无效字符
812
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
813
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
814
+ if (isAllSelected || isNotMasked) {
815
+ let restValue = '';
816
+ // 还原值
817
+ if (isNotMasked && inpValue) {
818
+ const chunkNums = inpValue.match(/\d/g) || [];
819
+ let useNumIndex = 0;
820
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), () => chunkNums[useNumIndex++] || maskChar);
821
+ }
822
+ else {
823
+ dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
824
+ }
825
+ const firstMaskedKeys = allMaskedKeys[0];
826
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
827
+ if (firstSkRest) {
828
+ evnt.preventDefault();
829
+ const firstChunkFormat = firstSkRest[0];
830
+ targetElem.value = restValue;
831
+ handleInputLabel(restValue, false);
832
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
833
+ internalData.laseFocusMasked = Date.now();
834
+ return;
835
+ }
836
+ }
837
+ // 是否选择数字块
838
+ let selectKey = dateMaskedFormat[selectionStart];
839
+ if (!parseInputKayMaps[selectKey]) {
840
+ selectKey = dateMaskedFormat[selectionStart - 1];
841
+ }
842
+ if (selectKey) {
843
+ evnt.preventDefault();
844
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
845
+ if (skRest) {
846
+ const chunkFormat = skRest[0] || '';
847
+ const chunkStartIndex = skRest.index || 0;
848
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
849
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
850
+ internalData.isTriggerMasked = true;
851
+ internalData.laseFocusMasked = Date.now();
852
+ }
853
+ }
854
+ };
399
855
  const blurEvent = (evnt) => {
400
856
  const $datePanel = refDatePanel.value;
401
857
  const { inputValue } = reactData;
@@ -405,10 +861,14 @@ export default defineVxeComponent({
405
861
  handleChange(value, evnt);
406
862
  }
407
863
  if (!reactData.visiblePanel) {
864
+ const { inputLabel } = internalData;
408
865
  reactData.isActivated = false;
409
866
  // 未打开面板时才校验
410
867
  if ($datePanel) {
411
- $datePanel.checkValue(reactData.inputLabel);
868
+ $datePanel.checkValue(inputLabel);
869
+ }
870
+ else {
871
+ afterCheckValue(inputLabel);
412
872
  }
413
873
  }
414
874
  dispatchEvent('blur', { value }, evnt);
@@ -417,7 +877,81 @@ export default defineVxeComponent({
417
877
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
418
878
  }
419
879
  };
880
+ const focusEvent = (evnt) => {
881
+ const { multiple, editable, maskedConfig } = props;
882
+ const maskedOpts = computeMaskedOpts.value;
883
+ const popupOpts = computePopupOpts.value;
884
+ const { trigger } = popupOpts;
885
+ reactData.isActivated = true;
886
+ if (!trigger || trigger === 'default') {
887
+ datePickerOpenEvent(evnt);
888
+ setTimeout(() => {
889
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
890
+ handleMaskedSelectedDate(evnt, true);
891
+ }
892
+ }, 15);
893
+ }
894
+ else if (trigger === 'icon') {
895
+ hidePanel();
896
+ setTimeout(() => {
897
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
898
+ handleMaskedSelectedDate(evnt, true);
899
+ }
900
+ }, 15);
901
+ }
902
+ else {
903
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
904
+ handleMaskedSelectedDate(evnt, true);
905
+ }
906
+ }
907
+ triggerEvent(evnt);
908
+ };
909
+ const clickEvent = (evnt) => {
910
+ const { editable, maskedConfig } = props;
911
+ const maskedOpts = computeMaskedOpts.value;
912
+ if (editable && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
913
+ handleMaskedSelectedDate(evnt);
914
+ }
915
+ triggerEvent(evnt);
916
+ };
420
917
  const keydownEvent = (evnt) => {
918
+ const { type, editable, maskedConfig } = props;
919
+ const { visiblePanel } = reactData;
920
+ const maskedOpts = computeMaskedOpts.value;
921
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
922
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
923
+ const isLtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
924
+ const isRtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
925
+ const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
926
+ if (editable) {
927
+ if (isEnter) {
928
+ const $datePanel = refDatePanel.value;
929
+ const { inputLabel } = internalData;
930
+ const targetElem = refInputTarget.value;
931
+ if (visiblePanel) {
932
+ hidePanel();
933
+ }
934
+ if ($datePanel) {
935
+ $datePanel.checkValue(inputLabel);
936
+ }
937
+ else {
938
+ afterCheckValue(inputLabel);
939
+ }
940
+ if (targetElem) {
941
+ targetElem.blur();
942
+ }
943
+ }
944
+ else if (maskedTypes.includes(type)) {
945
+ if (isEnableConf(maskedConfig) || maskedOpts.enabled) {
946
+ if (maskedOpts.isArrow && (isUpArrow || isDwArrow || isLtArrow || isRtArrow)) {
947
+ handleArrowInputDate(evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow);
948
+ }
949
+ else if (maskedOpts.isMasked) {
950
+ handleMaskedInputDate(evnt);
951
+ }
952
+ }
953
+ }
954
+ }
421
955
  triggerEvent(evnt);
422
956
  };
423
957
  const keyupEvent = (evnt) => {
@@ -445,7 +979,7 @@ export default defineVxeComponent({
445
979
  dispatchEvent('confirm', params, params.$event);
446
980
  };
447
981
  const panelRevertEvent = (params) => {
448
- reactData.inputLabel = params.label;
982
+ handleInputLabel(params.label, true);
449
983
  };
450
984
  // 全局事件
451
985
  const handleGlobalMousedownEvent = (evnt) => {
@@ -455,25 +989,34 @@ export default defineVxeComponent({
455
989
  const panelWrapperElem = refPanelWrapper.value;
456
990
  const isDisabled = computeIsDisabled.value;
457
991
  if (!isDisabled && isActivated) {
458
- reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
459
- if (!reactData.isActivated) {
992
+ const currActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
993
+ if (currActivated !== isActivated) {
994
+ reactData.isActivated = currActivated;
995
+ }
996
+ if (!currActivated) {
460
997
  if (visiblePanel) {
461
998
  hidePanel();
999
+ const { inputLabel } = internalData;
462
1000
  if ($datePanel) {
463
- $datePanel.checkValue(reactData.inputLabel);
1001
+ $datePanel.checkValue(inputLabel);
1002
+ }
1003
+ else {
1004
+ afterCheckValue(inputLabel);
464
1005
  }
465
1006
  }
466
1007
  }
467
1008
  }
468
1009
  };
469
1010
  const handleGlobalKeydownEvent = (evnt) => {
470
- const { visiblePanel } = reactData;
1011
+ const { isActivated, visiblePanel } = reactData;
471
1012
  const isDisabled = computeIsDisabled.value;
472
1013
  if (!isDisabled) {
473
1014
  const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
474
1015
  const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
475
1016
  if (isTab) {
476
- reactData.isActivated = false;
1017
+ if (isActivated) {
1018
+ reactData.isActivated = false;
1019
+ }
477
1020
  }
478
1021
  if (visiblePanel) {
479
1022
  if (isEsc || isTab) {
@@ -508,7 +1051,7 @@ export default defineVxeComponent({
508
1051
  }
509
1052
  if (visiblePanel || isActivated) {
510
1053
  if ($datePanel) {
511
- $datePanel.checkValue(reactData.inputLabel);
1054
+ $datePanel.checkValue(internalData.inputLabel);
512
1055
  }
513
1056
  const targetElem = refInputTarget.value;
514
1057
  if (targetElem) {
@@ -538,6 +1081,9 @@ export default defineVxeComponent({
538
1081
  const { panelIndex } = reactData;
539
1082
  const targetElem = refInputTarget.value;
540
1083
  const panelElem = refInputPanel.value;
1084
+ if (!panelElem) {
1085
+ return nextTick();
1086
+ }
541
1087
  const btnTransfer = computeBtnTransfer.value;
542
1088
  const popupOpts = computePopupOpts.value;
543
1089
  const handleStyle = () => {
@@ -585,15 +1131,18 @@ export default defineVxeComponent({
585
1131
  }
586
1132
  };
587
1133
  const clickIconEvent = (evnt) => {
1134
+ const { visiblePanel } = reactData;
588
1135
  const popupOpts = computePopupOpts.value;
589
1136
  const { trigger } = popupOpts;
590
1137
  if (!trigger || trigger === 'default' || trigger === 'icon') {
591
- datePickerOpenEvent(evnt);
1138
+ if (visiblePanel) {
1139
+ hidePanel();
1140
+ }
1141
+ else {
1142
+ datePickerOpenEvent(evnt);
1143
+ }
592
1144
  }
593
1145
  };
594
- const clickEvent = (evnt) => {
595
- triggerEvent(evnt);
596
- };
597
1146
  const handleShortcutEvent = ({ option, $event }) => {
598
1147
  const { type } = props;
599
1148
  const { inputValue } = reactData;
@@ -632,7 +1181,7 @@ export default defineVxeComponent({
632
1181
  break;
633
1182
  }
634
1183
  default:
635
- errLog('vxe.error.notCommands', [`[date-picker] ${code}`]);
1184
+ errLog('vxe.error.notCommands', [code]);
636
1185
  break;
637
1186
  }
638
1187
  }
@@ -703,6 +1252,10 @@ export default defineVxeComponent({
703
1252
  return renderEmptyElement($xeDatePicker);
704
1253
  };
705
1254
  const renderPanel = () => {
1255
+ const popupOpts = computePopupOpts.value;
1256
+ if (popupOpts.enabled === false) {
1257
+ return renderEmptyElement($xeDatePicker);
1258
+ }
706
1259
  const { type, multiple, showClearButton, showConfirmButton } = props;
707
1260
  const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, inputValue } = reactData;
708
1261
  const vSize = computeSize.value;
@@ -712,7 +1265,6 @@ export default defineVxeComponent({
712
1265
  const isDateTimeType = computeIsDateTimeType.value;
713
1266
  const shortcutList = computeShortcutList.value;
714
1267
  const timeOpts = computeTimeOpts.value;
715
- const popupOpts = computePopupOpts.value;
716
1268
  const { position } = shortcutOpts;
717
1269
  const headerSlot = slots.header;
718
1270
  const footerSlot = slots.footer;
@@ -914,7 +1466,8 @@ export default defineVxeComponent({
914
1466
  };
915
1467
  const renderVN = () => {
916
1468
  const { className, type, name, autoComplete } = props;
917
- const { inputValue, inputLabel, visiblePanel, isActivated } = reactData;
1469
+ const { inputValue, visiblePanel, isActivated, labelFlag } = reactData;
1470
+ const { inputLabel } = internalData;
918
1471
  const vSize = computeSize.value;
919
1472
  const isDisabled = computeIsDisabled.value;
920
1473
  const formReadonly = computeFormReadonly.value;
@@ -950,7 +1503,7 @@ export default defineVxeComponent({
950
1503
  h('input', {
951
1504
  ref: refInputTarget,
952
1505
  class: 'vxe-date-picker--inner',
953
- value: inputLabel,
1506
+ value: labelFlag ? inputLabel : '',
954
1507
  name,
955
1508
  type: 'text',
956
1509
  placeholder: inpPlaceholder,
@@ -972,7 +1525,7 @@ export default defineVxeComponent({
972
1525
  ]);
973
1526
  };
974
1527
  watch(computePanelLabel, (val) => {
975
- reactData.inputLabel = val;
1528
+ handleInputLabel(val, true);
976
1529
  });
977
1530
  watch(() => props.modelValue, () => {
978
1531
  updateModelValue();
@@ -984,6 +1537,17 @@ export default defineVxeComponent({
984
1537
  globalEvents.on($xeDatePicker, 'blur', handleGlobalBlurEvent);
985
1538
  globalEvents.on($xeDatePicker, 'resize', handleGlobalResizeEvent);
986
1539
  });
1540
+ onMounted(() => {
1541
+ const { type, multiple, maskedConfig } = props;
1542
+ if (isEnableConf(maskedConfig)) {
1543
+ if (multiple) {
1544
+ errLog('vxe.error.notSupportProp', ['multiple', 'control-config.enabled=true', 'control-config.enabled=false']);
1545
+ }
1546
+ if (!maskedTypes.includes(type)) {
1547
+ warnLog('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
1548
+ }
1549
+ }
1550
+ });
987
1551
  onUnmounted(() => {
988
1552
  globalEvents.off($xeDatePicker, 'mousewheel');
989
1553
  globalEvents.off($xeDatePicker, 'mousedown');