vxe-pc-ui 4.15.2 → 4.15.4

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 (129) hide show
  1. package/dist/all.esm.js +866 -257
  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 +72 -29
  6. package/es/checkbox/src/group.js +5 -1
  7. package/es/date-panel/src/util.js +27 -16
  8. package/es/date-picker/src/date-picker.js +572 -74
  9. package/es/date-range-picker/src/date-range-picker.js +3 -2
  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/pager/src/pager.js +4 -3
  18. package/es/radio/src/group.js +5 -1
  19. package/es/select/src/select.js +25 -20
  20. package/es/splitter/src/splitter.js +7 -6
  21. package/es/table-select/src/table-select.js +21 -16
  22. package/es/tabs/src/tabs.js +4 -3
  23. package/es/textarea/src/textarea.js +2 -1
  24. package/es/tree/src/tree.js +3 -2
  25. package/es/tree-select/src/tree-select.js +16 -19
  26. package/es/ui/index.js +4 -1
  27. package/es/ui/src/log.js +14 -4
  28. package/es/upload/src/upload.js +12 -3
  29. package/lib/backtop/src/backtop.js +5 -2
  30. package/lib/backtop/src/backtop.min.js +1 -1
  31. package/lib/button/src/button.js +4 -1
  32. package/lib/button/src/button.min.js +1 -1
  33. package/lib/calendar/src/calendar.js +4 -1
  34. package/lib/calendar/src/calendar.min.js +1 -1
  35. package/lib/cascader/src/cascader.js +80 -30
  36. package/lib/cascader/src/cascader.min.js +1 -1
  37. package/lib/checkbox/src/group.js +5 -1
  38. package/lib/checkbox/src/group.min.js +1 -1
  39. package/lib/date-panel/src/util.js +37 -19
  40. package/lib/date-panel/src/util.min.js +1 -1
  41. package/lib/date-picker/src/date-picker.js +620 -77
  42. package/lib/date-picker/src/date-picker.min.js +1 -1
  43. package/lib/date-range-picker/src/date-range-picker.js +4 -1
  44. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  45. package/lib/drawer/src/drawer.js +2 -0
  46. package/lib/drawer/src/drawer.min.js +1 -1
  47. package/lib/form/render/index.js +4 -1
  48. package/lib/form/render/index.min.js +1 -1
  49. package/lib/form/src/form.js +8 -4
  50. package/lib/form/src/form.min.js +1 -1
  51. package/lib/form/src/itemInfo.js +7 -4
  52. package/lib/form/src/itemInfo.min.js +1 -1
  53. package/lib/index.umd.js +941 -215
  54. package/lib/index.umd.min.js +1 -1
  55. package/lib/input/src/input.js +6 -3
  56. package/lib/input/src/input.min.js +1 -1
  57. package/lib/menu/src/menu.js +4 -1
  58. package/lib/menu/src/menu.min.js +1 -1
  59. package/lib/modal/src/modal.js +8 -2
  60. package/lib/modal/src/modal.min.js +1 -1
  61. package/lib/pager/src/pager.js +6 -2
  62. package/lib/pager/src/pager.min.js +1 -1
  63. package/lib/radio/src/group.js +5 -1
  64. package/lib/radio/src/group.min.js +1 -1
  65. package/lib/select/src/select.js +27 -20
  66. package/lib/select/src/select.min.js +1 -1
  67. package/lib/splitter/src/splitter.js +12 -8
  68. package/lib/splitter/src/splitter.min.js +1 -1
  69. package/lib/table-select/src/table-select.js +22 -15
  70. package/lib/table-select/src/table-select.min.js +1 -1
  71. package/lib/tabs/src/tabs.js +7 -3
  72. package/lib/tabs/src/tabs.min.js +1 -1
  73. package/lib/textarea/src/textarea.js +4 -1
  74. package/lib/textarea/src/textarea.min.js +1 -1
  75. package/lib/tree/src/tree.js +7 -4
  76. package/lib/tree/src/tree.min.js +1 -1
  77. package/lib/tree-select/src/tree-select.js +14 -10
  78. package/lib/tree-select/src/tree-select.min.js +1 -1
  79. package/lib/ui/index.js +4 -1
  80. package/lib/ui/index.min.js +1 -1
  81. package/lib/ui/src/log.js +16 -3
  82. package/lib/ui/src/log.min.js +1 -1
  83. package/lib/upload/src/upload.js +20 -3
  84. package/lib/upload/src/upload.min.js +1 -1
  85. package/package.json +1 -1
  86. package/packages/backtop/src/backtop.ts +3 -1
  87. package/packages/button/src/button.ts +4 -2
  88. package/packages/calendar/src/calendar.ts +3 -1
  89. package/packages/cascader/src/cascader.ts +71 -29
  90. package/packages/checkbox/src/group.ts +6 -2
  91. package/packages/date-panel/src/util.ts +28 -16
  92. package/packages/date-picker/src/date-picker.ts +583 -75
  93. package/packages/date-range-picker/src/date-range-picker.ts +4 -2
  94. package/packages/drawer/src/drawer.ts +2 -0
  95. package/packages/form/render/index.ts +4 -2
  96. package/packages/form/src/form.ts +7 -5
  97. package/packages/form/src/itemInfo.ts +7 -5
  98. package/packages/input/src/input.ts +3 -1
  99. package/packages/menu/src/menu.ts +3 -1
  100. package/packages/modal/src/modal.ts +6 -2
  101. package/packages/pager/src/pager.ts +5 -3
  102. package/packages/radio/src/group.ts +6 -2
  103. package/packages/select/src/select.ts +29 -22
  104. package/packages/splitter/src/splitter.ts +8 -6
  105. package/packages/table-select/src/table-select.ts +24 -17
  106. package/packages/tabs/src/tabs.ts +5 -3
  107. package/packages/textarea/src/textarea.ts +3 -1
  108. package/packages/tree/src/tree.ts +4 -2
  109. package/packages/tree-select/src/tree-select.ts +17 -19
  110. package/packages/ui/index.ts +3 -0
  111. package/packages/ui/src/log.ts +16 -4
  112. package/packages/upload/src/upload.ts +14 -3
  113. package/types/components/cascader.d.ts +4 -0
  114. package/types/components/date-picker.d.ts +14 -6
  115. package/types/components/drawer.d.ts +2 -0
  116. package/types/components/modal.d.ts +2 -0
  117. package/types/components/upload.d.ts +28 -1
  118. /package/es/icon/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
  119. /package/es/icon/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
  120. /package/es/icon/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
  121. /package/es/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
  122. /package/es/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
  123. /package/es/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
  124. /package/lib/icon/style/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
  125. /package/lib/icon/style/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
  126. /package/lib/icon/style/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
  127. /package/lib/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
  128. /package/lib/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
  129. /package/lib/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4646,15 +4646,27 @@ function checkDynamic() {
4646
4646
  }
4647
4647
  ;// ./packages/ui/src/log.ts
4648
4648
 
4649
- const log_version = `ui v${"4.15.2"}`;
4650
- const warnLog = log.create('warn', log_version);
4651
- const errLog = log.create('error', log_version);
4649
+ const {
4650
+ log: log_log
4651
+ } = VxeUI;
4652
+ const uiVersion = `ui v${"4.15.4"}`;
4653
+ function createComponentLog(name) {
4654
+ const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
4655
+ const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
4656
+ const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : '';
4657
+ return {
4658
+ warnLog: log_log.create('warn', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name),
4659
+ errLog: log_log.create('error', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name)
4660
+ };
4661
+ }
4662
+ const warnLog = log_log.create('warn', uiVersion);
4663
+ const errLog = log_log.create('error', uiVersion);
4652
4664
  ;// ./packages/ui/index.ts
4653
4665
  /* unused harmony import specifier */ var ui_VxeUI;
4654
4666
 
4655
4667
 
4656
4668
 
4657
- const ui_version = "4.15.2";
4669
+ const ui_version = "4.15.4";
4658
4670
  VxeUI.uiVersion = ui_version;
4659
4671
  VxeUI.dynamicApp = dynamicApp;
4660
4672
  function config(options) {
@@ -4717,6 +4729,9 @@ setConfig({
4717
4729
  showFullLabel: true,
4718
4730
  treeConfig: {
4719
4731
  showIcon: true
4732
+ },
4733
+ filterConfig: {
4734
+ autoExpandMode: 'first'
4720
4735
  }
4721
4736
  },
4722
4737
  checkbox: {},
@@ -7818,6 +7833,9 @@ const Tooltip = VxeTooltip;
7818
7833
 
7819
7834
 
7820
7835
 
7836
+ const {
7837
+ warnLog: button_warnLog
7838
+ } = createComponentLog('button');
7821
7839
  const VxeButtonComponent = defineVxeComponent({
7822
7840
  name: 'VxeButton',
7823
7841
  props: {
@@ -8615,7 +8633,7 @@ const VxeButtonComponent = defineVxeComponent({
8615
8633
  $xeButton.renderVN = renderVN;
8616
8634
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
8617
8635
  if (props.type === 'text') {
8618
- warnLog('vxe.error.delProp', ['[button] type=text', 'mode=text']);
8636
+ button_warnLog('vxe.error.delProp', ['type=text', 'mode=text']);
8619
8637
  }
8620
8638
  globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
8621
8639
  globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
@@ -8655,6 +8673,9 @@ const Button = VxeButton;
8655
8673
 
8656
8674
 
8657
8675
 
8676
+ const {
8677
+ errLog: backtop_errLog
8678
+ } = createComponentLog('backtop');
8658
8679
  function createInternalData() {
8659
8680
  return {
8660
8681
  targetEl: null
@@ -8857,13 +8878,13 @@ function createReactData() {
8857
8878
  } = props;
8858
8879
  if (!target) {
8859
8880
  removeScrollEvent();
8860
- errLog('vxe.error.reqProp', ['target']);
8881
+ backtop_errLog('vxe.error.reqProp', ['target']);
8861
8882
  return;
8862
8883
  }
8863
8884
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(target)) {
8864
8885
  const tEl = document.querySelector(target);
8865
8886
  if (!tEl) {
8866
- errLog('vxe.error.errProp', [`target=${target}`, 'body']);
8887
+ backtop_errLog('vxe.error.errProp', [`target=${target}`, 'body']);
8867
8888
  }
8868
8889
  const {
8869
8890
  targetEl
@@ -9379,6 +9400,24 @@ const ButtonGroup = VxeButtonGroup;
9379
9400
  /* harmony default export */ var packages_button_group = (VxeButtonGroup);
9380
9401
  ;// ./packages/date-panel/src/util.ts
9381
9402
 
9403
+ function getChunkDefaultNum(selectKey) {
9404
+ const currDate = new Date();
9405
+ switch (selectKey) {
9406
+ case 'y':
9407
+ return currDate.getFullYear();
9408
+ case 'M':
9409
+ return currDate.getMonth() + 1;
9410
+ case 'd':
9411
+ return currDate.getDate();
9412
+ case 'H':
9413
+ return currDate.getHours();
9414
+ case 'm':
9415
+ return currDate.getMinutes();
9416
+ case 's':
9417
+ return currDate.getSeconds();
9418
+ }
9419
+ return 0;
9420
+ }
9382
9421
  function hasTimestampValueType(valueFormat) {
9383
9422
  return valueFormat === 'timestamp';
9384
9423
  }
@@ -9399,18 +9438,6 @@ function handleValueFormat(type, valueFormat) {
9399
9438
  }
9400
9439
  return 'yyyy-MM-dd';
9401
9440
  }
9402
- function handleInputFormat(type, inputFormat) {
9403
- if (inputFormat) {
9404
- return inputFormat;
9405
- }
9406
- if (type === 'time') {
9407
- return 'HH:mm:ss';
9408
- }
9409
- if (type === 'datetime') {
9410
- return 'yyyy-MM-dd HH:mm:ss';
9411
- }
9412
- return 'yyyy-MM-dd';
9413
- }
9414
9441
  function toStringTimeDate(str) {
9415
9442
  const rest = new Date(2e3, 0, 1);
9416
9443
  if (str) {
@@ -9451,7 +9478,7 @@ function getDateQuarter(date) {
9451
9478
  }
9452
9479
  return 4;
9453
9480
  }
9454
- const parseDateValue = (val, type, options) => {
9481
+ function parseDateValue(val, type, options) {
9455
9482
  const {
9456
9483
  valueFormat
9457
9484
  } = options;
@@ -9468,7 +9495,7 @@ const parseDateValue = (val, type, options) => {
9468
9495
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(val, valueFormat);
9469
9496
  }
9470
9497
  return null;
9471
- };
9498
+ }
9472
9499
  const parseDateString = (val, type, options) => {
9473
9500
  const dValue = parseDateValue(val, type, options);
9474
9501
  return dValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, options.valueFormat) : '';
@@ -9620,9 +9647,20 @@ function getRangeDateByCode(code, val, type, options) {
9620
9647
  /**
9621
9648
  * 判断周的年份是否跨年
9622
9649
  */
9623
- const checkWeekOfsetYear = (W, M) => {
9650
+ function checkWeekOfsetYear(W, M) {
9624
9651
  return `${W}` === '1' && `${M}` === '12';
9625
- };
9652
+ }
9653
+ function isAllSameChar(str, char) {
9654
+ if (str.length === 0) {
9655
+ return false;
9656
+ }
9657
+ for (let i = 0; i < str.length; i++) {
9658
+ if (str[i] !== char) {
9659
+ return false;
9660
+ }
9661
+ }
9662
+ return true;
9663
+ }
9626
9664
  ;// ./packages/calendar/src/calendar.ts
9627
9665
 
9628
9666
 
@@ -9639,6 +9677,9 @@ const checkWeekOfsetYear = (W, M) => {
9639
9677
 
9640
9678
 
9641
9679
 
9680
+ const {
9681
+ errLog: calendar_errLog
9682
+ } = createComponentLog('calendar');
9642
9683
  const {
9643
9684
  menus: calendar_menus,
9644
9685
  getConfig: calendar_getConfig,
@@ -11027,7 +11068,7 @@ const {
11027
11068
  } = props;
11028
11069
  const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
11029
11070
  if (menuConfig && !VxeUIContextMenu) {
11030
- errLog('vxe.error.reqComp', ['vxe-context-menu']);
11071
+ calendar_errLog('vxe.error.reqComp', ['vxe-context-menu']);
11031
11072
  }
11032
11073
  dateOpenPanel();
11033
11074
  });
@@ -12365,6 +12406,9 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
12365
12406
 
12366
12407
 
12367
12408
 
12409
+ const {
12410
+ warnLog: input_warnLog
12411
+ } = createComponentLog('input');
12368
12412
  /* harmony default export */ var input = (defineVxeComponent({
12369
12413
  name: 'VxeInput',
12370
12414
  props: {
@@ -15125,11 +15169,11 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
15125
15169
  type
15126
15170
  } = props;
15127
15171
  if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
15128
- warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
15172
+ input_warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
15129
15173
  } else if (['number', 'integer', 'float'].includes(type)) {
15130
- warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
15174
+ input_warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
15131
15175
  } else if (['password'].includes(type)) {
15132
- warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
15176
+ input_warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
15133
15177
  }
15134
15178
  const inputElem = refInputTarget.value;
15135
15179
  if (inputElem) {
@@ -15179,7 +15223,6 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
15179
15223
 
15180
15224
 
15181
15225
 
15182
-
15183
15226
  /**
15184
15227
  * 生成节点的唯一主键
15185
15228
  */
@@ -15823,9 +15866,6 @@ function cascader_createInternalData() {
15823
15866
  return internalData.afterVisibleList;
15824
15867
  };
15825
15868
  const handleData = force => {
15826
- const {
15827
- nodeMaps
15828
- } = internalData;
15829
15869
  let fullList = internalData.afterVisibleList;
15830
15870
  if (force) {
15831
15871
  // 更新数据,处理筛选和排序
@@ -15834,16 +15874,60 @@ function cascader_createInternalData() {
15834
15874
  fullList = handleTreeToList();
15835
15875
  }
15836
15876
  const treeList = fullList.slice(0);
15837
- treeList.forEach((item, $index) => {
15838
- const nodeid = getNodeId(item);
15839
- const itemRest = nodeMaps[nodeid];
15840
- if (itemRest) {
15841
- itemRest.$index = $index;
15842
- }
15843
- });
15844
15877
  reactData.treeList = treeList;
15845
15878
  };
15846
- const triggerSearchEvent = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(() => handleData(true), 350, {
15879
+ /**
15880
+ * 获取第一个拥有子节点的节点
15881
+ */
15882
+ function handleHasChildNodeIds(treeList, type) {
15883
+ const childrenField = computeChildrenField.value;
15884
+ const mapChildrenField = computeMapChildrenField.value;
15885
+ const treeOpts = computeTreeOpts.value;
15886
+ const {
15887
+ transform
15888
+ } = treeOpts;
15889
+ const childField = transform ? mapChildrenField : childrenField;
15890
+ const nodeIds = [];
15891
+ let currList = treeList;
15892
+ while (currList.length) {
15893
+ let targetNode = null;
15894
+ for (const item of currList) {
15895
+ const kids = item[childField];
15896
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(kids) && kids.length > 0) {
15897
+ targetNode = item;
15898
+ break;
15899
+ }
15900
+ }
15901
+ if (targetNode) {
15902
+ nodeIds.push(getNodeId(targetNode));
15903
+ currList = targetNode[childField];
15904
+ } else {
15905
+ const endNode = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[type](currList);
15906
+ nodeIds.push(getNodeId(endNode));
15907
+ break;
15908
+ }
15909
+ }
15910
+ return nodeIds;
15911
+ }
15912
+ const triggerSearchEvent = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(() => {
15913
+ handleData(true);
15914
+ updateModelChecked();
15915
+ const filterOpts = computeFilterOpts.value;
15916
+ const {
15917
+ autoExpandMode
15918
+ } = filterOpts;
15919
+ const {
15920
+ afterTreeList
15921
+ } = internalData;
15922
+ // 默认展开第
15923
+ if (autoExpandMode === 'first' || autoExpandMode === 'last') {
15924
+ const stItems = handleHasChildNodeIds(afterTreeList, autoExpandMode);
15925
+ reactData.currentItems = stItems;
15926
+ } else {
15927
+ handleCurrentItems();
15928
+ }
15929
+ updateCurrentChunk();
15930
+ }, 350, {
15847
15931
  trailing: true
15848
15932
  });
15849
15933
  const loadData = list => {
@@ -15878,18 +15962,23 @@ function cascader_createInternalData() {
15878
15962
  currentItems
15879
15963
  } = reactData;
15880
15964
  const {
15881
- treeFullData
15965
+ afterTreeList
15882
15966
  } = internalData;
15883
15967
  const childrenField = computeChildrenField.value;
15884
- const currentCunkList = [treeFullData];
15968
+ const mapChildrenField = computeMapChildrenField.value;
15969
+ const treeOpts = computeTreeOpts.value;
15970
+ const {
15971
+ transform
15972
+ } = treeOpts;
15973
+ const currentCunkList = [afterTreeList];
15885
15974
  if (currentItems.length) {
15886
15975
  let chunkIndex = 0;
15887
15976
  let stNodeid = currentItems[chunkIndex];
15888
- let optList = treeFullData;
15977
+ let optList = afterTreeList;
15889
15978
  while (stNodeid && optList && optList.length) {
15890
15979
  stNodeid = currentItems[chunkIndex++];
15891
15980
  const currOption = optList.find(item => stNodeid === getNodeId(item));
15892
- optList = currOption ? currOption[childrenField] : [];
15981
+ optList = currOption ? currOption[transform ? mapChildrenField : childrenField] : [];
15893
15982
  if (!optList || !optList.length) {
15894
15983
  break;
15895
15984
  }
@@ -15900,7 +15989,7 @@ function cascader_createInternalData() {
15900
15989
  };
15901
15990
  const handleCurrentItems = () => {
15902
15991
  const {
15903
- treeFullData
15992
+ afterTreeList
15904
15993
  } = internalData;
15905
15994
  const selectVals = computeSelectVals.value;
15906
15995
  const childrenField = computeChildrenField.value;
@@ -15913,7 +16002,7 @@ function cascader_createInternalData() {
15913
16002
  const expandedMaps = {};
15914
16003
  if (selectVals.length) {
15915
16004
  const lastVal = enNodeValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(selectVals));
15916
- const stRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(treeFullData, item => lastVal === getNodeId(item), {
16005
+ const stRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterTreeList, item => lastVal === getNodeId(item), {
15917
16006
  children: transform ? mapChildrenField : childrenField
15918
16007
  });
15919
16008
  if (stRest) {
@@ -16043,10 +16132,11 @@ function cascader_createInternalData() {
16043
16132
  };
16044
16133
  });
16045
16134
  };
16046
- const clearCheckboxNode = () => {
16135
+ const clearSelectedNode = () => {
16047
16136
  internalData.indeterminateRowMaps = {};
16048
16137
  internalData.selectCheckboxMaps = {};
16049
16138
  reactData.updateCheckboxFlag++;
16139
+ reactData.selectRadioKey = null;
16050
16140
  updateCheckboxStatus();
16051
16141
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
16052
16142
  return {
@@ -16112,7 +16202,7 @@ function cascader_createInternalData() {
16112
16202
  checkedClosable
16113
16203
  } = props;
16114
16204
  const value = multiple ? [] : null;
16115
- clearCheckboxNode().then(() => {
16205
+ clearSelectedNode().then(() => {
16116
16206
  if (checkedClosable) {
16117
16207
  hideOptionPanel($event);
16118
16208
  }
@@ -16211,12 +16301,17 @@ function cascader_createInternalData() {
16211
16301
  } = internalData;
16212
16302
  const radioOpts = computeRadioOpts.value;
16213
16303
  const childrenField = computeChildrenField.value;
16304
+ const treeOpts = computeTreeOpts.value;
16305
+ const {
16306
+ transform
16307
+ } = treeOpts;
16308
+ const mapChildrenField = computeMapChildrenField.value;
16214
16309
  const {
16215
16310
  checkMode,
16216
16311
  checkMethod
16217
16312
  } = radioOpts;
16218
16313
  const nodeid = getNodeId(node);
16219
- const childList = node[childrenField];
16314
+ const childList = node[transform ? mapChildrenField : childrenField];
16220
16315
  const isExistChild = childList && childList.length > 0;
16221
16316
  const nodeItem = nodeMaps[nodeid] || {};
16222
16317
  const nLevel = nodeItem.level;
@@ -16429,7 +16524,7 @@ function cascader_createInternalData() {
16429
16524
  const childRowList = [];
16430
16525
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeList, node => {
16431
16526
  const nodeid = getNodeId(node);
16432
- const childList = node[childrenField];
16527
+ const childList = node[transform ? mapChildrenField : childrenField];
16433
16528
  if (childList && childList.length && !childRowMaps[nodeid]) {
16434
16529
  childRowMaps[nodeid] = 1;
16435
16530
  childRowList.unshift([node, nodeid, childList]);
@@ -16535,7 +16630,7 @@ function cascader_createInternalData() {
16535
16630
  transform
16536
16631
  } = treeOpts;
16537
16632
  const nodeid = getNodeId(node);
16538
- const childList = node[childrenField];
16633
+ const childList = node[transform ? mapChildrenField : childrenField];
16539
16634
  const isExistChild = childList && childList.length > 0;
16540
16635
  const nodeItem = nodeMaps[nodeid] || {};
16541
16636
  const nLevel = nodeItem.level;
@@ -16848,14 +16943,16 @@ function cascader_createInternalData() {
16848
16943
  const treeOpts = computeTreeOpts.value;
16849
16944
  const {
16850
16945
  lazy,
16946
+ transform,
16851
16947
  iconLoaded,
16852
16948
  iconOpen,
16853
16949
  iconClose
16854
16950
  } = treeOpts;
16855
16951
  const childrenField = computeChildrenField.value;
16952
+ const mapChildrenField = computeMapChildrenField.value;
16856
16953
  const labelField = computeLabelField.value;
16857
16954
  const hasChildField = computeHasChildField.value;
16858
- const childList = node[childrenField];
16955
+ const childList = node[transform ? mapChildrenField : childrenField];
16859
16956
  const isExistChild = childList && childList.length > 0;
16860
16957
  const iconSlot = slots.icon;
16861
16958
  const titleSlot = slots.title;
@@ -17026,7 +17123,7 @@ function cascader_createInternalData() {
17026
17123
  class: 'vxe-tree-select--panel-header'
17027
17124
  }, headerSlot ? headerSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17028
17125
  class: 'vxe-tree-select--header-button'
17029
- }, [showCheckedButton && showClearButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17126
+ }, [showCheckedButton && multiple || showClearButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17030
17127
  class: 'vxe-tree-select--selected-btns'
17031
17128
  }, [showCheckedButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
17032
17129
  content: getI18n('vxe.treeSelect.allChecked'),
@@ -17059,13 +17156,13 @@ function cascader_createInternalData() {
17059
17156
  });
17060
17157
  }
17061
17158
  })]);
17062
- })])]), footerSlot || showTotalButton || showCloseButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17159
+ })])]), footerSlot || showTotalButton || showCloseButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17063
17160
  class: 'vxe-cascader--panel-footer'
17064
17161
  }, footerSlot ? footerSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17065
17162
  class: 'vxe-cascader--footer-button'
17066
17163
  }, [showTotalButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17067
17164
  class: 'vxe-cascader--total-btns'
17068
- }, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeCascader), showCloseButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17165
+ }, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeCascader), showCloseButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
17069
17166
  class: 'vxe-cascader--oper-btns'
17070
17167
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
17071
17168
  content: getI18n('vxe.select.close'),
@@ -17095,9 +17192,6 @@ function cascader_createInternalData() {
17095
17192
  });
17096
17193
  loadData(props.options || []);
17097
17194
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
17098
- if (props.filterable) {
17099
- errLog('vxe.error.notProp', ['filterable']);
17100
- }
17101
17195
  globalEvents.on($xeCascader, 'mousewheel', handleGlobalMousewheelEvent);
17102
17196
  globalEvents.on($xeCascader, 'mousedown', handleGlobalMousedownEvent);
17103
17197
  globalEvents.on($xeCascader, 'blur', handleGlobalBlurEvent);
@@ -17504,6 +17598,9 @@ const CheckboxButton = VxeCheckboxButton;
17504
17598
 
17505
17599
 
17506
17600
 
17601
+ function group_createReactData() {
17602
+ return {};
17603
+ }
17507
17604
  function group_createInternalData() {
17508
17605
  return {
17509
17606
  // isLoaded: false
@@ -17542,7 +17639,7 @@ function group_createInternalData() {
17542
17639
  const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', null);
17543
17640
  const formItemInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('xeFormItemInfo', null);
17544
17641
  const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
17545
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
17642
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(group_createReactData());
17546
17643
  const internalData = group_createInternalData();
17547
17644
  const computeIsReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
17548
17645
  const {
@@ -17721,6 +17818,7 @@ function group_createInternalData() {
17721
17818
  });
17722
17819
  });
17723
17820
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
17821
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, group_createReactData());
17724
17822
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, group_createInternalData());
17725
17823
  });
17726
17824
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeCheckboxGroup', $xeCheckboxGroup);
@@ -23820,6 +23918,40 @@ const DatePanel = VxeDatePanel;
23820
23918
 
23821
23919
 
23822
23920
 
23921
+
23922
+
23923
+
23924
+
23925
+ const {
23926
+ warnLog: date_picker_warnLog,
23927
+ errLog: date_picker_errLog
23928
+ } = createComponentLog('date-picker');
23929
+ const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
23930
+ const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
23931
+ const parseInputKayMaps = {};
23932
+ inputMaskedKeys.forEach(key => {
23933
+ parseInputKayMaps[key] = true;
23934
+ });
23935
+ function date_picker_createReactData() {
23936
+ return {
23937
+ initialized: false,
23938
+ panelIndex: 0,
23939
+ visiblePanel: false,
23940
+ isAniVisible: false,
23941
+ panelStyle: {},
23942
+ panelPlacement: '',
23943
+ isActivated: false,
23944
+ inputValue: '',
23945
+ labelFlag: 0
23946
+ };
23947
+ }
23948
+ function date_picker_createInternalData() {
23949
+ return {
23950
+ // hpTimeout: undefined,
23951
+ inputLabel: '',
23952
+ laseFocusMasked: 0
23953
+ };
23954
+ }
23823
23955
  /* harmony default export */ var date_picker = (defineVxeComponent({
23824
23956
  name: 'VxeDatePicker',
23825
23957
  props: {
@@ -23882,7 +24014,6 @@ const DatePanel = VxeDatePanel;
23882
24014
  labelFormat: String,
23883
24015
  valueFormat: String,
23884
24016
  timeFormat: String,
23885
- inputFormat: String,
23886
24017
  editable: {
23887
24018
  type: Boolean,
23888
24019
  default: true
@@ -23912,7 +24043,7 @@ const DatePanel = VxeDatePanel;
23912
24043
  type: Boolean,
23913
24044
  default: () => getConfig().datePicker.autoClose
23914
24045
  },
23915
- controlConfig: Object,
24046
+ maskedConfig: Object,
23916
24047
  prefixIcon: String,
23917
24048
  suffixIcon: String,
23918
24049
  placement: String,
@@ -23941,21 +24072,8 @@ const DatePanel = VxeDatePanel;
23941
24072
  const {
23942
24073
  computeSize
23943
24074
  } = useSize(props);
23944
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
23945
- initialized: false,
23946
- panelIndex: 0,
23947
- visiblePanel: false,
23948
- isAniVisible: false,
23949
- panelStyle: {},
23950
- panelPlacement: '',
23951
- isActivated: false,
23952
- inputValue: '',
23953
- inputLabel: ''
23954
- });
23955
- const internalData = {
23956
- // hpTimeout: undefined,
23957
- parseInputKayMaps: {}
23958
- };
24075
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(date_picker_createReactData());
24076
+ const internalData = date_picker_createInternalData();
23959
24077
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
23960
24078
  const refInputTarget = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
23961
24079
  const refInputPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
@@ -24029,6 +24147,50 @@ const DatePanel = VxeDatePanel;
24029
24147
  const computeIsClearable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24030
24148
  return props.clearable;
24031
24149
  });
24150
+ const computeIsDatePanelType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24151
+ const isDateTimeType = computeIsDateTimeType.value;
24152
+ return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
24153
+ });
24154
+ const computeDateListValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24155
+ const {
24156
+ modelValue,
24157
+ type,
24158
+ multiple
24159
+ } = props;
24160
+ const isDatePanelType = computeIsDatePanelType.value;
24161
+ const dateValueFormat = computeDateValueFormat.value;
24162
+ if (multiple && modelValue && isDatePanelType) {
24163
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue).split(',').map(item => {
24164
+ const date = parseDateValue(item, type, {
24165
+ valueFormat: dateValueFormat
24166
+ });
24167
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
24168
+ return date;
24169
+ }
24170
+ return date;
24171
+ });
24172
+ }
24173
+ return [];
24174
+ });
24175
+ const computeLimitMaxCount = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24176
+ return props.multiple ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.limitCount) : 0;
24177
+ });
24178
+ const computeDateMultipleValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24179
+ const dateListValue = computeDateListValue.value;
24180
+ const dateValueFormat = computeDateValueFormat.value;
24181
+ return dateListValue.map(date => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat));
24182
+ });
24183
+ const computeOverCount = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24184
+ const {
24185
+ multiple
24186
+ } = props;
24187
+ const limitMaxCount = computeLimitMaxCount.value;
24188
+ const dateMultipleValue = computeDateMultipleValue.value;
24189
+ if (multiple && limitMaxCount) {
24190
+ return dateMultipleValue.length >= limitMaxCount;
24191
+ }
24192
+ return false;
24193
+ });
24032
24194
  const computeInputReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24033
24195
  const {
24034
24196
  type,
@@ -24093,12 +24255,9 @@ const DatePanel = VxeDatePanel;
24093
24255
  } = props;
24094
24256
  return handleValueFormat(type, valueFormat);
24095
24257
  });
24096
- const computeDateInputFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24097
- const {
24098
- type,
24099
- inputFormat
24100
- } = props;
24101
- return handleInputFormat(type, inputFormat);
24258
+ const computeDateMaskedFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24259
+ const dateLabelFormat = computeDateLabelFormat.value;
24260
+ return dateLabelFormat;
24102
24261
  });
24103
24262
  const computeFirstDayOfWeek = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24104
24263
  const {
@@ -24127,8 +24286,15 @@ const DatePanel = VxeDatePanel;
24127
24286
  return dateObj.label;
24128
24287
  }).join(', ');
24129
24288
  });
24130
- const computeControlOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24131
- return Object.assign({}, getConfig().datePicker.controlConfig, props.controlConfig);
24289
+ const computeMaskedOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24290
+ return Object.assign({}, getConfig().datePicker.maskedConfig, props.maskedConfig);
24291
+ });
24292
+ const computeMaskChar = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24293
+ const maskedOpts = computeMaskedOpts.value;
24294
+ const {
24295
+ maskPlaceholder
24296
+ } = maskedOpts;
24297
+ return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || '*';
24132
24298
  });
24133
24299
  const updateModelValue = () => {
24134
24300
  const {
@@ -24144,6 +24310,12 @@ const DatePanel = VxeDatePanel;
24144
24310
  }
24145
24311
  reactData.inputValue = val;
24146
24312
  };
24313
+ const handleInputLabel = (text, isUpdate) => {
24314
+ internalData.inputLabel = text;
24315
+ if (isUpdate) {
24316
+ reactData.labelFlag++;
24317
+ }
24318
+ };
24147
24319
  const triggerEvent = evnt => {
24148
24320
  const {
24149
24321
  inputValue
@@ -24205,7 +24377,7 @@ const DatePanel = VxeDatePanel;
24205
24377
  const inputEvent = evnt => {
24206
24378
  const inputElem = evnt.target;
24207
24379
  const value = inputElem.value;
24208
- reactData.inputLabel = value;
24380
+ handleInputLabel(value, true);
24209
24381
  dispatchEvent('input', {
24210
24382
  value
24211
24383
  }, evnt);
@@ -24216,19 +24388,6 @@ const DatePanel = VxeDatePanel;
24216
24388
  triggerEvent(evnt);
24217
24389
  }
24218
24390
  };
24219
- const focusEvent = evnt => {
24220
- const popupOpts = computePopupOpts.value;
24221
- const {
24222
- trigger
24223
- } = popupOpts;
24224
- reactData.isActivated = true;
24225
- if (!trigger || trigger === 'default') {
24226
- datePickerOpenEvent(evnt);
24227
- } else if (trigger === 'icon') {
24228
- hidePanel();
24229
- }
24230
- triggerEvent(evnt);
24231
- };
24232
24391
  const clickPrefixEvent = evnt => {
24233
24392
  const isDisabled = computeIsDisabled.value;
24234
24393
  if (!isDisabled) {
@@ -24249,6 +24408,125 @@ const DatePanel = VxeDatePanel;
24249
24408
  }, 350);
24250
24409
  });
24251
24410
  };
24411
+ const dateChange = (date, isReload) => {
24412
+ const {
24413
+ modelValue,
24414
+ multiple
24415
+ } = props;
24416
+ const isDateTimeType = computeIsDateTimeType.value;
24417
+ const dateValueFormat = computeDateValueFormat.value;
24418
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
24419
+ if (props.type === 'week') {
24420
+ const sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.selectDay);
24421
+ date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, sWeek, firstDayOfWeek);
24422
+ }
24423
+ const inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat, {
24424
+ firstDay: firstDayOfWeek
24425
+ });
24426
+ if (multiple) {
24427
+ const overCount = computeOverCount.value;
24428
+ // 如果为多选
24429
+ if (isDateTimeType) {
24430
+ // 如果是datetime特殊类型
24431
+ const dateListValue = isReload ? [] : [...computeDateListValue.value];
24432
+ const datetimeRest = [];
24433
+ const eqIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(dateListValue, val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(date, val, 'yyyyMMdd'));
24434
+ if (eqIndex === -1) {
24435
+ if (overCount) {
24436
+ // 如果超出最大多选数量
24437
+ return;
24438
+ }
24439
+ dateListValue.push(date);
24440
+ } else {
24441
+ dateListValue.splice(eqIndex, 1);
24442
+ }
24443
+ dateListValue.forEach(item => {
24444
+ if (item) {
24445
+ datetimeRest.push(item);
24446
+ }
24447
+ });
24448
+ handleChange(datetimeRest.map(date => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat)).join(','), {
24449
+ type: 'update'
24450
+ });
24451
+ } else {
24452
+ const dateMultipleValue = isReload ? [] : computeDateMultipleValue.value;
24453
+ // 如果是日期类型
24454
+ if (dateMultipleValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal))) {
24455
+ handleChange(dateMultipleValue.filter(val => !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal)).join(','), {
24456
+ type: 'update'
24457
+ });
24458
+ } else {
24459
+ if (overCount) {
24460
+ // 如果超出最大多选数量
24461
+ return;
24462
+ }
24463
+ handleChange(dateMultipleValue.concat([inpVal]).join(','), {
24464
+ type: 'update'
24465
+ });
24466
+ }
24467
+ }
24468
+ } else {
24469
+ // 如果为单选
24470
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(modelValue, inpVal)) {
24471
+ handleChange(inpVal, {
24472
+ type: 'update'
24473
+ });
24474
+ }
24475
+ }
24476
+ };
24477
+ const dateRevert = () => {
24478
+ const panelLabel = computePanelLabel.value;
24479
+ handleInputLabel(panelLabel, true);
24480
+ };
24481
+ const afterCheckValue = inpVal => {
24482
+ const {
24483
+ type
24484
+ } = props;
24485
+ const {
24486
+ inputLabel
24487
+ } = internalData;
24488
+ const dateLabelFormat = computeDateLabelFormat.value;
24489
+ if (!inpVal) {
24490
+ handleChange('', {
24491
+ type: 'check'
24492
+ });
24493
+ return;
24494
+ }
24495
+ let inpDateVal = parseDateValue(inpVal, type, {
24496
+ valueFormat: dateLabelFormat
24497
+ });
24498
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
24499
+ dateRevert();
24500
+ return;
24501
+ }
24502
+ if (type === 'time') {
24503
+ inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat);
24504
+ if (inputLabel !== inpDateVal) {
24505
+ handleChange(inpDateVal, {
24506
+ type: 'check'
24507
+ });
24508
+ }
24509
+ handleInputLabel(inpDateVal, true);
24510
+ return;
24511
+ }
24512
+ let isChange = false;
24513
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
24514
+ if (type === 'datetime') {
24515
+ const dateValue = reactData.inputValue;
24516
+ if (inpVal !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dateValue, dateLabelFormat) || inpVal !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat)) {
24517
+ isChange = true;
24518
+ }
24519
+ } else {
24520
+ isChange = true;
24521
+ }
24522
+ const label = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
24523
+ firstDay: firstDayOfWeek
24524
+ });
24525
+ handleInputLabel(label, true);
24526
+ if (isChange) {
24527
+ dateChange(inpDateVal);
24528
+ }
24529
+ };
24252
24530
  const clearValueEvent = (evnt, value) => {
24253
24531
  const isDatePickerType = computeIsDatePickerType.value;
24254
24532
  if (isDatePickerType) {
@@ -24270,35 +24548,305 @@ const DatePanel = VxeDatePanel;
24270
24548
  }, evnt);
24271
24549
  }
24272
24550
  };
24273
- const handleArrowInputDate = (evnt, isUpArrow) => {
24551
+ const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
24274
24552
  const {
24553
+ type,
24275
24554
  multiple
24276
24555
  } = props;
24277
24556
  if (multiple) {
24278
24557
  return;
24279
24558
  }
24559
+ const targetElem = refInputTarget.value;
24560
+ if (!targetElem) {
24561
+ return;
24562
+ }
24563
+ const inpValue = targetElem.value;
24564
+ if (!inpValue) {
24565
+ return;
24566
+ }
24567
+ const dateMaskedFormat = computeDateMaskedFormat.value;
24568
+ const dateLabelFormat = computeDateLabelFormat.value;
24569
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
24570
+ const maskChar = computeMaskChar.value;
24571
+ const selectionStart = targetElem.selectionStart || 0;
24572
+ let selectKey = dateMaskedFormat[selectionStart];
24573
+ if (!parseInputKayMaps[selectKey]) {
24574
+ selectKey = dateMaskedFormat[selectionStart - 1];
24575
+ }
24576
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
24577
+ if (!skRest) {
24578
+ return;
24579
+ }
24580
+ if (isUpArrow || isDwArrow) {
24581
+ const chunkFormat = skRest[0] || '';
24582
+ const chunkStartIndex = skRest.index || 0;
24583
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
24584
+ const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
24585
+ if (parseInputKayMaps[selectKey]) {
24586
+ const chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
24587
+ const restValue = inpValue.slice(0, chunkStartIndex) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(chunkNum, chunkFormat.length, '0') + inpValue.slice(chunkEndIndex);
24588
+ evnt.preventDefault();
24589
+ if (restValue.indexOf(maskChar) === -1) {
24590
+ // 解析日期
24591
+ const inpDateVal = parseDateValue(restValue, type, {
24592
+ valueFormat: dateLabelFormat
24593
+ });
24594
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
24595
+ const label = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
24596
+ firstDay: firstDayOfWeek
24597
+ });
24598
+ targetElem.value = label;
24599
+ handleInputLabel(label, false);
24600
+ }
24601
+ } else {
24602
+ targetElem.value = restValue;
24603
+ handleInputLabel(restValue, false);
24604
+ }
24605
+ }
24606
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
24607
+ } else if (isLtArrow || isRtArrow) {
24608
+ const currKeyIndex = inputMaskedKeys.indexOf(selectKey);
24609
+ if (currKeyIndex > -1) {
24610
+ const allMaskedKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
24611
+ const currIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(allMaskedKeys, key => selectKey === key[0]);
24612
+ const targetFormatKey = isLtArrow ? allMaskedKeys[currIndex - 1] || allMaskedKeys[0] : allMaskedKeys[currIndex + 1] || allMaskedKeys[allMaskedKeys.length - 1];
24613
+ const targetKey = targetFormatKey ? targetFormatKey[0] : '';
24614
+ const sktRest = dateMaskedFormat.match(new RegExp(targetKey + '+'));
24615
+ if (sktRest) {
24616
+ evnt.preventDefault();
24617
+ const mtStartIndex = sktRest.index || 0;
24618
+ const mtEndIndex = mtStartIndex + sktRest[0].length;
24619
+ targetElem.setSelectionRange(mtStartIndex, mtEndIndex);
24620
+ }
24621
+ }
24622
+ }
24623
+ internalData.isTriggerMasked = true;
24624
+ };
24625
+ const handleMaskedInputDate = evnt => {
24280
24626
  const {
24281
- inputValue
24282
- } = reactData;
24283
- if (!inputValue) {
24627
+ multiple
24628
+ } = props;
24629
+ if (multiple) {
24284
24630
  return;
24285
24631
  }
24286
24632
  const targetElem = refInputTarget.value;
24287
24633
  if (!targetElem) {
24288
24634
  return;
24289
24635
  }
24636
+ const isControlKey = hasControlKey(evnt);
24637
+ if (isControlKey) {
24638
+ return;
24639
+ }
24640
+ evnt.preventDefault();
24641
+ const eKey = evnt.key;
24642
+ const isDeleleKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
24643
+ const isBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE);
24644
+ const isNumKey = eKey >= '0' && eKey <= '9';
24645
+ const numKey = isNumKey ? evnt.key : '';
24646
+ if (!(isDeleleKey || isBackspaceKey || isNumKey)) {
24647
+ return;
24648
+ }
24290
24649
  const {
24291
- parseInputKayMaps
24650
+ isTriggerMasked
24292
24651
  } = internalData;
24293
- const inputFormat = computeDateInputFormat.value;
24652
+ const dateMaskedFormat = computeDateMaskedFormat.value;
24653
+ const maskChar = computeMaskChar.value;
24654
+ let inpValue = targetElem.value || dateMaskedFormat;
24294
24655
  const selectionStart = targetElem.selectionStart || 0;
24295
- let selectKey = inputFormat[selectionStart];
24656
+ const selectionEnd = targetElem.selectionEnd || 0;
24657
+ let selectKey = dateMaskedFormat[selectionStart];
24296
24658
  if (!parseInputKayMaps[selectKey]) {
24297
- selectKey = inputFormat[selectionStart - 1];
24659
+ selectKey = dateMaskedFormat[selectionStart - 1];
24298
24660
  }
24299
- const inputPaesrFn = parseInputKayMaps[selectKey];
24300
- if (inputPaesrFn) {
24301
- inputPaesrFn(evnt, targetElem, isUpArrow);
24661
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
24662
+ if (!skRest) {
24663
+ return;
24664
+ }
24665
+ const allMaskedKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
24666
+ const chunkFormat = skRest[0] || '';
24667
+ const chunkStartIndex = skRest.index || 0;
24668
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
24669
+ const currKeyIndex = allMaskedKeys.indexOf(selectKey);
24670
+ // 全选 | 如果无效字符
24671
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
24672
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
24673
+ if (isAllSelected || isNotMasked) {
24674
+ inpValue = dateMaskedFormat;
24675
+ }
24676
+ let chunkValue = isDeleleKey ? '' : inpValue.slice(chunkStartIndex, chunkEndIndex);
24677
+ const chunkNums = chunkValue.match(/\d/g) || [];
24678
+ const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
24679
+ if (isNumKey) {
24680
+ chunkNumList.push(numKey);
24681
+ } else if (isBackspaceKey) {
24682
+ chunkNumList.pop();
24683
+ }
24684
+ chunkValue = chunkNumList.join('').padEnd(chunkFormat.length, maskChar);
24685
+ let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
24686
+ restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
24687
+ targetElem.value = restValue;
24688
+ handleInputLabel(restValue, false);
24689
+ // 如果是全选/删除
24690
+ if (isAllSelected) {
24691
+ if (isBackspaceKey || isDeleleKey) {
24692
+ const firstMaskedKeys = allMaskedKeys[0];
24693
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
24694
+ if (firstSkRest) {
24695
+ const firstChunkFormat = firstSkRest[0];
24696
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
24697
+ internalData.isTriggerMasked = true;
24698
+ return;
24699
+ }
24700
+ }
24701
+ } else {
24702
+ if (isBackspaceKey && !chunkNums.length) {
24703
+ // 回退到上一个数字块
24704
+ for (let i = currKeyIndex - 1; i >= 0; i--) {
24705
+ const prveChunkKey = allMaskedKeys[i];
24706
+ const prveSkRest = dateMaskedFormat.match(new RegExp(`${prveChunkKey}+`));
24707
+ if (prveSkRest) {
24708
+ const prveChunkFormat = prveSkRest[0];
24709
+ const prveChunkStartIndex = prveSkRest.index || 0;
24710
+ const prveChunkEndIndex = prveChunkStartIndex + prveChunkFormat.length;
24711
+ let prveChunkValue = restValue.slice(prveChunkStartIndex, prveChunkEndIndex);
24712
+ const prveChunkNums = prveChunkValue.match(/\d/g) || [];
24713
+ if (prveChunkNums.length) {
24714
+ prveChunkNums.pop();
24715
+ prveChunkValue = prveChunkNums.join('').padEnd(prveChunkFormat.length, maskChar);
24716
+ restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
24717
+ targetElem.value = restValue;
24718
+ handleInputLabel(restValue, false);
24719
+ targetElem.setSelectionRange(prveChunkStartIndex, prveChunkEndIndex);
24720
+ return;
24721
+ }
24722
+ }
24723
+ }
24724
+ const firstMaskedKeys = allMaskedKeys[0];
24725
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
24726
+ if (firstSkRest) {
24727
+ const firstChunkFormat = firstSkRest[0];
24728
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
24729
+ targetElem.value = restValue;
24730
+ handleInputLabel(restValue, false);
24731
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
24732
+ internalData.isTriggerMasked = true;
24733
+ return;
24734
+ }
24735
+ return;
24736
+ }
24737
+ }
24738
+ let maskStartIndex = skRest.index || 0;
24739
+ let maskEndIndex = maskStartIndex + skRest[0].length;
24740
+ // 如果输入完成,跳转下一个
24741
+ if (chunkNumList.length >= chunkValue.length) {
24742
+ const nextKeys = allMaskedKeys.slice(currKeyIndex + 1);
24743
+ if (currKeyIndex > -1) {
24744
+ const nextRest = nextKeys.length ? dateMaskedFormat.match(new RegExp(`(${nextKeys.join('|')})+`)) : null;
24745
+ // 如果当前数字块已输入,则跳转下一个数字块
24746
+ if (nextRest) {
24747
+ maskStartIndex = nextRest.index || 0;
24748
+ maskEndIndex = maskStartIndex + nextRest[0].length;
24749
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
24750
+ } else {
24751
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
24752
+ }
24753
+ }
24754
+ internalData.isTriggerMasked = true;
24755
+ return;
24756
+ }
24757
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
24758
+ internalData.isTriggerMasked = false;
24759
+ };
24760
+ const handleMaskedSelectedDate = (evnt, isFocus) => {
24761
+ const {
24762
+ type,
24763
+ multiple,
24764
+ modelValue
24765
+ } = props;
24766
+ if (multiple) {
24767
+ return;
24768
+ }
24769
+ if (!maskedTypes.includes(type)) {
24770
+ return;
24771
+ }
24772
+ const targetElem = refInputTarget.value;
24773
+ if (!targetElem) {
24774
+ return;
24775
+ }
24776
+ const {
24777
+ laseFocusMasked
24778
+ } = internalData;
24779
+ if (laseFocusMasked && Date.now() - laseFocusMasked < 100) {
24780
+ return;
24781
+ }
24782
+ const dateMaskedFormat = computeDateMaskedFormat.value;
24783
+ const maskChar = computeMaskChar.value;
24784
+ const selectionStart = targetElem.selectionStart || 0;
24785
+ const selectionEnd = targetElem.selectionEnd || 0;
24786
+ const inpValue = targetElem.value;
24787
+ const allMaskedKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
24788
+ // 如果为空
24789
+ if (!inpValue) {
24790
+ let restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
24791
+ // 还原值
24792
+ if (isFocus && modelValue) {
24793
+ const chunkNums = ('' + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(modelValue)).match(/\d/g) || [];
24794
+ let useNumIndex = 0;
24795
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), txt => chunkNums[useNumIndex++] || txt);
24796
+ }
24797
+ const firstMaskedKeys = allMaskedKeys[0];
24798
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
24799
+ if (firstSkRest) {
24800
+ evnt.preventDefault();
24801
+ const firstChunkFormat = firstSkRest[0];
24802
+ targetElem.value = restValue;
24803
+ handleInputLabel(restValue, false);
24804
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
24805
+ internalData.laseFocusMasked = Date.now();
24806
+ return;
24807
+ }
24808
+ }
24809
+ // 全选 | 如果无效字符
24810
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
24811
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
24812
+ if (isAllSelected || isNotMasked) {
24813
+ let restValue = '';
24814
+ // 还原值
24815
+ if (isNotMasked && inpValue) {
24816
+ const chunkNums = inpValue.match(/\d/g) || [];
24817
+ let useNumIndex = 0;
24818
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), () => chunkNums[useNumIndex++] || maskChar);
24819
+ } else {
24820
+ dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
24821
+ }
24822
+ const firstMaskedKeys = allMaskedKeys[0];
24823
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
24824
+ if (firstSkRest) {
24825
+ evnt.preventDefault();
24826
+ const firstChunkFormat = firstSkRest[0];
24827
+ targetElem.value = restValue;
24828
+ handleInputLabel(restValue, false);
24829
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
24830
+ internalData.laseFocusMasked = Date.now();
24831
+ return;
24832
+ }
24833
+ }
24834
+ // 是否选择数字块
24835
+ let selectKey = dateMaskedFormat[selectionStart];
24836
+ if (!parseInputKayMaps[selectKey]) {
24837
+ selectKey = dateMaskedFormat[selectionStart - 1];
24838
+ }
24839
+ if (selectKey) {
24840
+ evnt.preventDefault();
24841
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
24842
+ if (skRest) {
24843
+ const chunkFormat = skRest[0] || '';
24844
+ const chunkStartIndex = skRest.index || 0;
24845
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
24846
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
24847
+ internalData.isTriggerMasked = true;
24848
+ internalData.laseFocusMasked = Date.now();
24849
+ }
24302
24850
  }
24303
24851
  };
24304
24852
  const blurEvent = evnt => {
@@ -24312,10 +24860,15 @@ const DatePanel = VxeDatePanel;
24312
24860
  handleChange(value, evnt);
24313
24861
  }
24314
24862
  if (!reactData.visiblePanel) {
24863
+ const {
24864
+ inputLabel
24865
+ } = internalData;
24315
24866
  reactData.isActivated = false;
24316
24867
  // 未打开面板时才校验
24317
24868
  if ($datePanel) {
24318
- $datePanel.checkValue(reactData.inputLabel);
24869
+ $datePanel.checkValue(inputLabel);
24870
+ } else {
24871
+ afterCheckValue(inputLabel);
24319
24872
  }
24320
24873
  }
24321
24874
  dispatchEvent('blur', {
@@ -24326,15 +24879,92 @@ const DatePanel = VxeDatePanel;
24326
24879
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
24327
24880
  }
24328
24881
  };
24882
+ const focusEvent = evnt => {
24883
+ const {
24884
+ multiple,
24885
+ editable,
24886
+ maskedConfig
24887
+ } = props;
24888
+ const maskedOpts = computeMaskedOpts.value;
24889
+ const popupOpts = computePopupOpts.value;
24890
+ const {
24891
+ trigger
24892
+ } = popupOpts;
24893
+ reactData.isActivated = true;
24894
+ if (!trigger || trigger === 'default') {
24895
+ datePickerOpenEvent(evnt);
24896
+ setTimeout(() => {
24897
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
24898
+ handleMaskedSelectedDate(evnt, true);
24899
+ }
24900
+ }, 15);
24901
+ } else if (trigger === 'icon') {
24902
+ hidePanel();
24903
+ setTimeout(() => {
24904
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
24905
+ handleMaskedSelectedDate(evnt, true);
24906
+ }
24907
+ }, 15);
24908
+ } else {
24909
+ if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
24910
+ handleMaskedSelectedDate(evnt, true);
24911
+ }
24912
+ }
24913
+ triggerEvent(evnt);
24914
+ };
24915
+ const clickEvent = evnt => {
24916
+ const {
24917
+ editable,
24918
+ maskedConfig
24919
+ } = props;
24920
+ const maskedOpts = computeMaskedOpts.value;
24921
+ if (editable && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
24922
+ handleMaskedSelectedDate(evnt);
24923
+ }
24924
+ triggerEvent(evnt);
24925
+ };
24329
24926
  const keydownEvent = evnt => {
24330
24927
  const {
24331
- controlConfig
24928
+ type,
24929
+ editable,
24930
+ maskedConfig
24332
24931
  } = props;
24333
- const controlOpts = computeControlOpts.value;
24932
+ const {
24933
+ visiblePanel
24934
+ } = reactData;
24935
+ const maskedOpts = computeMaskedOpts.value;
24334
24936
  const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
24335
24937
  const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
24336
- if ((isUpArrow || isDwArrow) && controlOpts.isArrow && (controlConfig || controlOpts.enabled)) {
24337
- handleArrowInputDate(evnt, isUpArrow);
24938
+ const isLtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
24939
+ const isRtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
24940
+ const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
24941
+ if (editable) {
24942
+ if (isEnter) {
24943
+ const $datePanel = refDatePanel.value;
24944
+ const {
24945
+ inputLabel
24946
+ } = internalData;
24947
+ const targetElem = refInputTarget.value;
24948
+ if (visiblePanel) {
24949
+ hidePanel();
24950
+ }
24951
+ if ($datePanel) {
24952
+ $datePanel.checkValue(inputLabel);
24953
+ } else {
24954
+ afterCheckValue(inputLabel);
24955
+ }
24956
+ if (targetElem) {
24957
+ targetElem.blur();
24958
+ }
24959
+ } else if (maskedTypes.includes(type)) {
24960
+ if (isEnableConf(maskedConfig) || maskedOpts.enabled) {
24961
+ if (maskedOpts.isArrow && (isUpArrow || isDwArrow || isLtArrow || isRtArrow)) {
24962
+ handleArrowInputDate(evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow);
24963
+ } else if (maskedOpts.isMasked) {
24964
+ handleMaskedInputDate(evnt);
24965
+ }
24966
+ }
24967
+ }
24338
24968
  }
24339
24969
  triggerEvent(evnt);
24340
24970
  };
@@ -24369,7 +24999,7 @@ const DatePanel = VxeDatePanel;
24369
24999
  dispatchEvent('confirm', params, params.$event);
24370
25000
  };
24371
25001
  const panelRevertEvent = params => {
24372
- reactData.inputLabel = params.label;
25002
+ handleInputLabel(params.label, true);
24373
25003
  };
24374
25004
  // 全局事件
24375
25005
  const handleGlobalMousedownEvent = evnt => {
@@ -24382,12 +25012,20 @@ const DatePanel = VxeDatePanel;
24382
25012
  const panelWrapperElem = refPanelWrapper.value;
24383
25013
  const isDisabled = computeIsDisabled.value;
24384
25014
  if (!isDisabled && isActivated) {
24385
- reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
24386
- if (!reactData.isActivated) {
25015
+ const currActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
25016
+ if (currActivated !== isActivated) {
25017
+ reactData.isActivated = currActivated;
25018
+ }
25019
+ if (!currActivated) {
24387
25020
  if (visiblePanel) {
24388
25021
  hidePanel();
25022
+ const {
25023
+ inputLabel
25024
+ } = internalData;
24389
25025
  if ($datePanel) {
24390
- $datePanel.checkValue(reactData.inputLabel);
25026
+ $datePanel.checkValue(inputLabel);
25027
+ } else {
25028
+ afterCheckValue(inputLabel);
24391
25029
  }
24392
25030
  }
24393
25031
  }
@@ -24395,6 +25033,7 @@ const DatePanel = VxeDatePanel;
24395
25033
  };
24396
25034
  const handleGlobalKeydownEvent = evnt => {
24397
25035
  const {
25036
+ isActivated,
24398
25037
  visiblePanel
24399
25038
  } = reactData;
24400
25039
  const isDisabled = computeIsDisabled.value;
@@ -24402,7 +25041,9 @@ const DatePanel = VxeDatePanel;
24402
25041
  const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
24403
25042
  const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
24404
25043
  if (isTab) {
24405
- reactData.isActivated = false;
25044
+ if (isActivated) {
25045
+ reactData.isActivated = false;
25046
+ }
24406
25047
  }
24407
25048
  if (visiblePanel) {
24408
25049
  if (isEsc || isTab) {
@@ -24441,7 +25082,7 @@ const DatePanel = VxeDatePanel;
24441
25082
  }
24442
25083
  if (visiblePanel || isActivated) {
24443
25084
  if ($datePanel) {
24444
- $datePanel.checkValue(reactData.inputLabel);
25085
+ $datePanel.checkValue(internalData.inputLabel);
24445
25086
  }
24446
25087
  const targetElem = refInputTarget.value;
24447
25088
  if (targetElem) {
@@ -24543,9 +25184,6 @@ const DatePanel = VxeDatePanel;
24543
25184
  }
24544
25185
  }
24545
25186
  };
24546
- const clickEvent = evnt => {
24547
- triggerEvent(evnt);
24548
- };
24549
25187
  const handleShortcutEvent = ({
24550
25188
  option,
24551
25189
  $event
@@ -24596,7 +25234,7 @@ const DatePanel = VxeDatePanel;
24596
25234
  break;
24597
25235
  }
24598
25236
  default:
24599
- errLog('vxe.error.notCommands', [`[date-picker] ${code}`]);
25237
+ date_picker_errLog('vxe.error.notCommands', [code]);
24600
25238
  break;
24601
25239
  }
24602
25240
  }
@@ -24847,10 +25485,13 @@ const DatePanel = VxeDatePanel;
24847
25485
  } = props;
24848
25486
  const {
24849
25487
  inputValue,
24850
- inputLabel,
24851
25488
  visiblePanel,
24852
- isActivated
25489
+ isActivated,
25490
+ labelFlag
24853
25491
  } = reactData;
25492
+ const {
25493
+ inputLabel
25494
+ } = internalData;
24854
25495
  const vSize = computeSize.value;
24855
25496
  const isDisabled = computeIsDisabled.value;
24856
25497
  const formReadonly = computeFormReadonly.value;
@@ -24883,7 +25524,7 @@ const DatePanel = VxeDatePanel;
24883
25524
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('input', {
24884
25525
  ref: refInputTarget,
24885
25526
  class: 'vxe-date-picker--inner',
24886
- value: inputLabel,
25527
+ value: labelFlag ? inputLabel : '',
24887
25528
  name,
24888
25529
  type: 'text',
24889
25530
  placeholder: inpPlaceholder,
@@ -24902,7 +25543,7 @@ const DatePanel = VxeDatePanel;
24902
25543
  renderPanel()]);
24903
25544
  };
24904
25545
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computePanelLabel, val => {
24905
- reactData.inputLabel = val;
25546
+ handleInputLabel(val, true);
24906
25547
  });
24907
25548
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, () => {
24908
25549
  updateModelValue();
@@ -24916,14 +25557,18 @@ const DatePanel = VxeDatePanel;
24916
25557
  });
24917
25558
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
24918
25559
  const {
24919
- parseInputKayMaps
24920
- } = internalData;
24921
- const inputKeys = ['y', 'M', 'd', 'H', 'm', 'n'];
24922
- inputKeys.forEach(key => {
24923
- parseInputKayMaps[key] = evnt => {
24924
- evnt.preventDefault();
24925
- };
24926
- });
25560
+ type,
25561
+ multiple,
25562
+ maskedConfig
25563
+ } = props;
25564
+ if (isEnableConf(maskedConfig)) {
25565
+ if (multiple) {
25566
+ date_picker_errLog('vxe.error.notSupportProp', ['multiple', 'control-config.enabled=true', 'control-config.enabled=false']);
25567
+ }
25568
+ if (!maskedTypes.includes(type)) {
25569
+ date_picker_warnLog('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
25570
+ }
25571
+ }
24927
25572
  });
24928
25573
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
24929
25574
  globalEvents.off($xeDatePicker, 'mousewheel');
@@ -24968,6 +25613,9 @@ const DatePicker = VxeDatePicker;
24968
25613
 
24969
25614
 
24970
25615
 
25616
+ const {
25617
+ errLog: date_range_picker_errLog
25618
+ } = createComponentLog('date-range-picker');
24971
25619
  /* harmony default export */ var date_range_picker = (defineVxeComponent({
24972
25620
  name: 'VxeDateRangePicker',
24973
25621
  props: {
@@ -25979,7 +26627,7 @@ const DatePicker = VxeDatePicker;
25979
26627
  break;
25980
26628
  }
25981
26629
  default:
25982
- errLog('vxe.error.notCommands', [`[date-range-picker] ${code}`]);
26630
+ date_range_picker_errLog('vxe.error.notCommands', [code]);
25983
26631
  break;
25984
26632
  }
25985
26633
  }
@@ -26488,6 +27136,7 @@ const allActiveDrawers = [];
26488
27136
  type: Boolean,
26489
27137
  default: () => getConfig().drawer.showTitleOverflow
26490
27138
  },
27139
+ preload: Boolean,
26491
27140
  width: [Number, String],
26492
27141
  height: [Number, String],
26493
27142
  resize: {
@@ -27036,6 +27685,7 @@ const allActiveDrawers = [];
27036
27685
  }
27037
27686
  });
27038
27687
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
27688
+ reactData.initialized = !!props.preload;
27039
27689
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
27040
27690
  if (props.modelValue) {
27041
27691
  openDrawer();
@@ -27225,6 +27875,9 @@ const Empty = VxeEmpty;
27225
27875
 
27226
27876
 
27227
27877
 
27878
+ const {
27879
+ errLog: itemInfo_errLog
27880
+ } = createComponentLog('form');
27228
27881
  class ItemInfo {
27229
27882
  constructor($xeForm, item) {
27230
27883
  const {
@@ -27236,21 +27889,21 @@ class ItemInfo {
27236
27889
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
27237
27890
  const gFormatOpts = formats.get(formatter);
27238
27891
  if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
27239
- errLog('vxe.error.notFormats', [`[form] ${formatter}`]);
27892
+ itemInfo_errLog('vxe.error.notFormats', [formatter]);
27240
27893
  }
27241
27894
  } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
27242
27895
  const gFormatOpts = formats.get(formatter[0]);
27243
27896
  if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
27244
- errLog('vxe.error.notFormats', [`[form] ${formatter[0]}`]);
27897
+ itemInfo_errLog('vxe.error.notFormats', [formatter[0]]);
27245
27898
  }
27246
27899
  }
27247
27900
  }
27248
27901
  if (field && itemRender) {
27249
27902
  if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
27250
- errLog('vxe.error.modelConflicts', [`[form] field=${field}`, `item-render.startField=${itemRender.startField}`]);
27903
+ itemInfo_errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`]);
27251
27904
  }
27252
27905
  if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
27253
- errLog('vxe.error.modelConflicts', [`[form] field=${field}`, `item-render.endField=${itemRender.endField}`]);
27906
+ itemInfo_errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`]);
27254
27907
  }
27255
27908
  }
27256
27909
  Object.assign(this, {
@@ -28183,6 +28836,9 @@ const VxeFormConfigItem = defineVxeComponent({
28183
28836
 
28184
28837
 
28185
28838
 
28839
+ const {
28840
+ errLog: render_errLog
28841
+ } = createComponentLog('form');
28186
28842
  const componentDefaultModelProp = 'modelValue';
28187
28843
  /**
28188
28844
  * 已废弃
@@ -28287,7 +28943,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
28287
28943
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
28288
28944
  ons[getOnName(key)] = function (...args) {
28289
28945
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
28290
- errLog('vxe.error.errFunc', [`[form] ${func}`]);
28946
+ render_errLog('vxe.error.errFunc', [func]);
28291
28947
  }
28292
28948
  func(params, ...args);
28293
28949
  };
@@ -28896,6 +29552,10 @@ renderer.mixin({
28896
29552
 
28897
29553
 
28898
29554
 
29555
+ const {
29556
+ warnLog: form_warnLog,
29557
+ errLog: form_errLog
29558
+ } = createComponentLog('form');
28899
29559
  class Rule {
28900
29560
  constructor(rule) {
28901
29561
  Object.assign(this, {
@@ -29216,7 +29876,7 @@ function form_createInternalData() {
29216
29876
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, func => {
29217
29877
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
29218
29878
  if (!slots[func]) {
29219
- errLog('vxe.error.notSlot', [`[form] ${func}`]);
29879
+ form_errLog('vxe.error.notSlot', [func]);
29220
29880
  }
29221
29881
  }
29222
29882
  });
@@ -29499,10 +30159,10 @@ function form_createInternalData() {
29499
30159
  if (validatorMethod) {
29500
30160
  customValid = validatorMethod(validParams);
29501
30161
  } else {
29502
- warnLog('vxe.error.notValidators', [`[form] ${validator}`]);
30162
+ form_warnLog('vxe.error.notValidators', [validator]);
29503
30163
  }
29504
30164
  } else {
29505
- errLog('vxe.error.notValidators', [`[form] ${validator}`]);
30165
+ form_errLog('vxe.error.notValidators', [validator]);
29506
30166
  }
29507
30167
  } else {
29508
30168
  customValid = validator(validParams);
@@ -29934,7 +30594,7 @@ function form_createInternalData() {
29934
30594
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
29935
30595
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
29936
30596
  if (props.customLayout && props.items) {
29937
- errLog('vxe.error.errConflicts', ['[form] custom-layout', 'items']);
30597
+ form_errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
29938
30598
  }
29939
30599
  });
29940
30600
  globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent);
@@ -32618,6 +33278,9 @@ const List = VxeList;
32618
33278
 
32619
33279
 
32620
33280
 
33281
+ const {
33282
+ errLog: menu_errLog
33283
+ } = createComponentLog('menu');
32621
33284
  const {
32622
33285
  menus: menu_menus,
32623
33286
  getConfig: menu_getConfig,
@@ -33166,7 +33829,7 @@ const {
33166
33829
  } = props;
33167
33830
  const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
33168
33831
  if (menuConfig && !VxeUIContextMenu) {
33169
- errLog('vxe.error.reqComp', ['vxe-context-menu']);
33832
+ menu_errLog('vxe.error.reqComp', ['vxe-context-menu']);
33170
33833
  }
33171
33834
  globalEvents.on($xeMenu, 'resize', updateCollapseStyle);
33172
33835
  updateCollapseStyle();
@@ -33219,6 +33882,10 @@ const Menu = VxeMenu;
33219
33882
 
33220
33883
 
33221
33884
 
33885
+ const {
33886
+ warnLog: modal_warnLog,
33887
+ errLog: modal_errLog
33888
+ } = createComponentLog('modal');
33222
33889
  const allActiveModals = [];
33223
33890
  const msgQueue = [];
33224
33891
  const notifyQueue = [];
@@ -33305,6 +33972,7 @@ const lockScrollCssWidthKey = '--vxe-ui-modal-lock-scroll-view-width';
33305
33972
  type: Boolean,
33306
33973
  default: () => getConfig().modal.showFooter
33307
33974
  },
33975
+ preload: Boolean,
33308
33976
  showZoom: Boolean,
33309
33977
  zoomConfig: Object,
33310
33978
  showMaximize: {
@@ -34701,11 +35369,12 @@ const lockScrollCssWidthKey = '--vxe-ui-modal-lock-scroll-view-width';
34701
35369
  });
34702
35370
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
34703
35371
  if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
34704
- warnLog('vxe.modal.footPropErr');
35372
+ modal_warnLog('vxe.modal.footPropErr');
34705
35373
  }
35374
+ reactData.initialized = !!props.preload;
34706
35375
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
34707
35376
  if (props.storage && !props.id) {
34708
- errLog('vxe.error.reqProp', ['[modal] id']);
35377
+ modal_errLog('vxe.error.reqProp', ['id']);
34709
35378
  }
34710
35379
  if (props.modelValue) {
34711
35380
  openModal();
@@ -35246,12 +35915,36 @@ const Option = VxeOption;
35246
35915
 
35247
35916
 
35248
35917
 
35918
+ const {
35919
+ errLog: select_errLog
35920
+ } = createComponentLog('select');
35249
35921
  function isOptionVisible(option) {
35250
35922
  return option.visible !== false;
35251
35923
  }
35252
35924
  function getOptUniqueId() {
35253
35925
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('opt_');
35254
35926
  }
35927
+ function select_createReactData() {
35928
+ return {
35929
+ initialized: false,
35930
+ scrollYLoad: false,
35931
+ bodyHeight: 0,
35932
+ topSpaceHeight: 0,
35933
+ optList: [],
35934
+ staticOptions: [],
35935
+ reactFlag: 0,
35936
+ currentOption: null,
35937
+ searchValue: '',
35938
+ searchLoading: false,
35939
+ panelIndex: 0,
35940
+ panelStyle: {},
35941
+ panelPlacement: null,
35942
+ triggerFocusPanel: false,
35943
+ visiblePanel: false,
35944
+ isAniVisible: false,
35945
+ isActivated: false
35946
+ };
35947
+ }
35255
35948
  function select_createInternalData() {
35256
35949
  return {
35257
35950
  // isLoaded: false,
@@ -35421,25 +36114,7 @@ function select_createInternalData() {
35421
36114
  const {
35422
36115
  computeSize
35423
36116
  } = useSize(props);
35424
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
35425
- initialized: false,
35426
- scrollYLoad: false,
35427
- bodyHeight: 0,
35428
- topSpaceHeight: 0,
35429
- optList: [],
35430
- staticOptions: [],
35431
- reactFlag: 0,
35432
- currentOption: null,
35433
- searchValue: '',
35434
- searchLoading: false,
35435
- panelIndex: 0,
35436
- panelStyle: {},
35437
- panelPlacement: null,
35438
- triggerFocusPanel: false,
35439
- visiblePanel: false,
35440
- isAniVisible: false,
35441
- isActivated: false
35442
- });
36117
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(select_createReactData());
35443
36118
  const internalData = select_createInternalData();
35444
36119
  const refMaps = {
35445
36120
  refElem
@@ -36645,7 +37320,7 @@ function select_createInternalData() {
36645
37320
  emitDefaultValue(datas.map(item => item[valueField]));
36646
37321
  });
36647
37322
  } else {
36648
- errLog('vxe.error.notConflictProp', ['default-config.selectMode=all', 'multiple=true']);
37323
+ select_errLog('vxe.error.notConflictProp', ['default-config.selectMode=all', 'multiple=true']);
36649
37324
  }
36650
37325
  } else if (selectMode === 'first' || selectMode === 'last') {
36651
37326
  const selectItem = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[selectMode](datas);
@@ -37117,6 +37792,7 @@ function select_createInternalData() {
37117
37792
  globalEvents.off($xeSelect, 'keydown');
37118
37793
  globalEvents.off($xeSelect, 'blur');
37119
37794
  globalEvents.off($xeSelect, 'resize');
37795
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, select_createReactData());
37120
37796
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, select_createInternalData());
37121
37797
  });
37122
37798
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeSelect', $xeSelect);
@@ -37139,6 +37815,10 @@ function select_createInternalData() {
37139
37815
 
37140
37816
 
37141
37817
 
37818
+ const {
37819
+ warnLog: pager_warnLog,
37820
+ errLog: pager_errLog
37821
+ } = createComponentLog('pager');
37142
37822
  /* harmony default export */ var pager = (defineVxeComponent({
37143
37823
  name: 'VxePager',
37144
37824
  props: {
@@ -37848,7 +38528,7 @@ function select_createInternalData() {
37848
38528
  * @deprecated
37849
38529
  */
37850
38530
  jumpPage(currentPage) {
37851
- warnLog('vxe.error.delFunc', ['[pager] jumpPage', 'setCurrentPage']);
38531
+ pager_warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
37852
38532
  return $xePager.setCurrentPage(currentPage);
37853
38533
  }
37854
38534
  };
@@ -37924,7 +38604,7 @@ function select_createInternalData() {
37924
38604
  if (renderFn) {
37925
38605
  childNodes.push(renderFn());
37926
38606
  } else {
37927
- errLog('vxe.error.notProp', [`[pager] layouts -> ${name}`]);
38607
+ pager_errLog('vxe.error.notProp', [`layouts -> ${name}`]);
37928
38608
  }
37929
38609
  });
37930
38610
  if (slots.right) {
@@ -39851,6 +40531,9 @@ const RadioButton = VxeRadioButton;
39851
40531
 
39852
40532
 
39853
40533
 
40534
+ function src_group_createReactData() {
40535
+ return {};
40536
+ }
39854
40537
  function src_group_createInternalData() {
39855
40538
  return {
39856
40539
  // isLoaded: false
@@ -39893,7 +40576,7 @@ function src_group_createInternalData() {
39893
40576
  const {
39894
40577
  computeSize
39895
40578
  } = useSize(props);
39896
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
40579
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(src_group_createReactData());
39897
40580
  const internalData = src_group_createInternalData();
39898
40581
  const computeIsReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
39899
40582
  const {
@@ -40051,6 +40734,7 @@ function src_group_createInternalData() {
40051
40734
  });
40052
40735
  });
40053
40736
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
40737
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, src_group_createReactData());
40054
40738
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, src_group_createInternalData());
40055
40739
  });
40056
40740
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeRadioGroup', $xeRadioGroup);
@@ -40769,6 +41453,10 @@ const Select = VxeSelect;
40769
41453
 
40770
41454
 
40771
41455
 
41456
+ const {
41457
+ warnLog: splitter_warnLog,
41458
+ errLog: splitter_errLog
41459
+ } = createComponentLog('splitter');
40772
41460
  /* harmony default export */ var splitter = (defineVxeComponent({
40773
41461
  name: 'VxeSplitter',
40774
41462
  props: {
@@ -40989,13 +41677,13 @@ const Select = VxeSelect;
40989
41677
  };
40990
41678
  reactData.itemList = list.map(item => {
40991
41679
  if (item.showAction) {
40992
- warnLog('vxe.error.removeProp', ['[splitter] show-action']);
41680
+ splitter_warnLog('vxe.error.removeProp', ['show-action']);
40993
41681
  }
40994
41682
  if (item.slots) {
40995
41683
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, func => {
40996
41684
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
40997
41685
  if (!slots[func]) {
40998
- errLog('vxe.error.notSlot', [`[splitter] ${func}`]);
41686
+ splitter_errLog('vxe.error.notSlot', [func]);
40999
41687
  }
41000
41688
  }
41001
41689
  });
@@ -41005,10 +41693,10 @@ const Select = VxeSelect;
41005
41693
  });
41006
41694
  });
41007
41695
  if (staticItems.length) {
41008
- errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
41696
+ splitter_errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
41009
41697
  }
41010
41698
  if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
41011
- errLog('vxe.error.errConflicts', ['action-config.showPrevButton | action-config.showNextButton', 'Only supports 2 item']);
41699
+ splitter_errLog('vxe.error.errConflicts', ['action-config.showPrevButton | action-config.showNextButton', 'Only supports 2 item']);
41012
41700
  }
41013
41701
  return recalculate();
41014
41702
  };
@@ -41748,15 +42436,15 @@ const Select = VxeSelect;
41748
42436
  showNextButton
41749
42437
  } = actionOpts;
41750
42438
  if (props.items && props.items.length) {
41751
- errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
42439
+ splitter_errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
41752
42440
  }
41753
42441
  reactData.itemList = val || [];
41754
42442
  if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
41755
- errLog('vxe.error.modelConflicts', ['[splitter] action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
42443
+ splitter_errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
41756
42444
  }
41757
42445
  reactData.itemList.forEach(item => {
41758
42446
  if (item.showAction) {
41759
- warnLog('vxe.error.removeProp', ['[splitter] showAction']);
42447
+ splitter_warnLog('vxe.error.removeProp', ['showAction']);
41760
42448
  }
41761
42449
  });
41762
42450
  recalculate();
@@ -41775,7 +42463,7 @@ const Select = VxeSelect;
41775
42463
  }
41776
42464
  const actionOpts = computeActionOpts.value;
41777
42465
  if (actionOpts.direction) {
41778
- errLog('vxe.error.delProp', ['[splitter] action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
42466
+ splitter_errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
41779
42467
  }
41780
42468
  globalEvents.on($xeSplitter, 'resize', handleGlobalResizeEvent);
41781
42469
  });
@@ -42723,9 +43411,26 @@ const TabPane = VxeTabPane;
42723
43411
 
42724
43412
 
42725
43413
 
43414
+ const {
43415
+ errLog: table_select_errLog
43416
+ } = createComponentLog('table-select');
42726
43417
  function getRowUniqueId() {
42727
43418
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('row_');
42728
43419
  }
43420
+ function table_select_createReactData() {
43421
+ return {
43422
+ initialized: false,
43423
+ tableColumns: [],
43424
+ fullOptionList: [],
43425
+ panelIndex: 0,
43426
+ panelStyle: {},
43427
+ panelPlacement: null,
43428
+ triggerFocusPanel: false,
43429
+ visiblePanel: false,
43430
+ isAniVisible: false,
43431
+ isActivated: false
43432
+ };
43433
+ }
42729
43434
  function table_select_createInternalData() {
42730
43435
  return {
42731
43436
  // hpTimeout: undefined,
@@ -42799,18 +43504,7 @@ function table_select_createInternalData() {
42799
43504
  const refGridWrapper = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
42800
43505
  const refOptionPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
42801
43506
  const refGrid = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
42802
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
42803
- initialized: false,
42804
- tableColumns: [],
42805
- fullOptionList: [],
42806
- panelIndex: 0,
42807
- panelStyle: {},
42808
- panelPlacement: null,
42809
- triggerFocusPanel: false,
42810
- visiblePanel: false,
42811
- isAniVisible: false,
42812
- isActivated: false
42813
- });
43507
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(table_select_createReactData());
42814
43508
  const internalData = table_select_createInternalData();
42815
43509
  const refMaps = {
42816
43510
  refElem
@@ -43101,12 +43795,12 @@ function table_select_createInternalData() {
43101
43795
  rowid = getRowUniqueId();
43102
43796
  }
43103
43797
  if (keyMaps[rowid]) {
43104
- errLog('vxe.error.repeatKey', [`[table-select] ${rowKeyField}`, rowid]);
43798
+ table_select_errLog('vxe.error.repeatKey', [rowKeyField, rowid]);
43105
43799
  }
43106
43800
  keyMaps[rowid] = true;
43107
43801
  const value = item[valueField];
43108
43802
  if (rowMaps[value]) {
43109
- errLog('vxe.error.repeatKey', [`[table-select] ${valueField}`, value]);
43803
+ table_select_errLog('vxe.error.repeatKey', [valueField, value]);
43110
43804
  }
43111
43805
  rowMaps[value] = {
43112
43806
  item,
@@ -43484,11 +44178,12 @@ function table_select_createInternalData() {
43484
44178
  globalEvents.off($xeTableSelect, 'mousedown');
43485
44179
  globalEvents.off($xeTableSelect, 'blur');
43486
44180
  globalEvents.off($xeTableSelect, 'resize');
44181
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, table_select_createReactData());
43487
44182
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, table_select_createInternalData());
43488
44183
  });
43489
44184
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
43490
44185
  if (!VxeTableGridComponent) {
43491
- errLog('vxe.error.reqComp', ['[table-select] vxe-grid']);
44186
+ table_select_errLog('vxe.error.reqComp', ['vxe-grid']);
43492
44187
  }
43493
44188
  });
43494
44189
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeTableSelect', $xeTableSelect);
@@ -43529,6 +44224,10 @@ const TableSelect = VxeTableSelect;
43529
44224
 
43530
44225
 
43531
44226
 
44227
+ const {
44228
+ warnLog: tabs_warnLog,
44229
+ errLog: tabs_errLog
44230
+ } = createComponentLog('tabs');
43532
44231
  const scrollbarOffsetSize = 20;
43533
44232
  /* harmony default export */ var tabs = (defineVxeComponent({
43534
44233
  name: 'VxeTabs',
@@ -43963,7 +44662,7 @@ const scrollbarOffsetSize = 20;
43963
44662
  cacheItem.loading = false;
43964
44663
  });
43965
44664
  } else {
43966
- errLog('vxe.error.notFunc', ['refresh-config.queryMethod']);
44665
+ tabs_errLog('vxe.error.notFunc', ['refresh-config.queryMethod']);
43967
44666
  }
43968
44667
  }
43969
44668
  };
@@ -44180,11 +44879,11 @@ const scrollbarOffsetSize = 20;
44180
44879
  return handlePrevNext(true);
44181
44880
  },
44182
44881
  prevTab() {
44183
- warnLog('vxe.error.delFunc', ['[tabs] prevTab', 'prev']);
44882
+ tabs_warnLog('vxe.error.delFunc', ['prevTab', 'prev']);
44184
44883
  return tabsMethods.prev();
44185
44884
  },
44186
44885
  nextTab() {
44187
- warnLog('vxe.error.delFunc', ['[tabs] nextTab', 'next']);
44886
+ tabs_warnLog('vxe.error.delFunc', ['nextTab', 'next']);
44188
44887
  return tabsMethods.next();
44189
44888
  }
44190
44889
  };
@@ -45007,6 +45706,9 @@ const Text = VxeText;
45007
45706
 
45008
45707
 
45009
45708
 
45709
+ const {
45710
+ warnLog: textarea_warnLog
45711
+ } = createComponentLog('textarea');
45010
45712
  let autoTxtElem;
45011
45713
  /* harmony default export */ var src_textarea = (defineVxeComponent({
45012
45714
  name: 'VxeTextarea',
@@ -45423,7 +46125,7 @@ let autoTxtElem;
45423
46125
  autoSize
45424
46126
  } = props;
45425
46127
  if (autosize) {
45426
- warnLog('vxe.error.delProp', ['autosize', 'auto-size']);
46128
+ textarea_warnLog('vxe.error.delProp', ['autosize', 'auto-size']);
45427
46129
  }
45428
46130
  if (autosize || autoSize) {
45429
46131
  updateAutoTxt();
@@ -45905,6 +46607,9 @@ function clearColAnimate(elem, clss) {
45905
46607
 
45906
46608
 
45907
46609
 
46610
+ const {
46611
+ errLog: tree_errLog
46612
+ } = createComponentLog('tree');
45908
46613
  const {
45909
46614
  menus: tree_menus,
45910
46615
  getConfig: tree_getConfig,
@@ -46692,7 +47397,7 @@ function tree_createReactData() {
46692
47397
  handleData(true);
46693
47398
  if (sYLoad) {
46694
47399
  if (!(props.height || props.maxHeight)) {
46695
- errLog('vxe.error.reqProp', ['[tree] height | max-height | virtual-y-config.enabled=false']);
47400
+ tree_errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false']);
46696
47401
  }
46697
47402
  }
46698
47403
  return computeScrollLoad().then(() => {
@@ -48934,17 +49639,17 @@ function tree_createReactData() {
48934
49639
  } = props;
48935
49640
  const dragOpts = computeDragOpts.value;
48936
49641
  if (drag && !transform) {
48937
- errLog('vxe.error.notSupportProp', ['drag', 'transform=false', 'transform=true']);
49642
+ tree_errLog('vxe.error.notSupportProp', ['drag', 'transform=false', 'transform=true']);
48938
49643
  }
48939
49644
  if (dragOpts.isCrossTreeDrag) {
48940
- errLog('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
49645
+ tree_errLog('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
48941
49646
  }
48942
49647
  // if (valueField) {
48943
49648
  // errLog('vxe.error.delProp', ['value-field', 'value-field'])
48944
49649
  // }
48945
49650
  const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
48946
49651
  if (menuConfig && !VxeUIContextMenu) {
48947
- errLog('vxe.error.reqComp', ['vxe-context-menu']);
49652
+ tree_errLog('vxe.error.reqComp', ['vxe-context-menu']);
48948
49653
  }
48949
49654
  if (props.autoResize) {
48950
49655
  const el = refElem.value;
@@ -49013,6 +49718,10 @@ const Tree = VxeTree;
49013
49718
 
49014
49719
 
49015
49720
 
49721
+ const {
49722
+ warnLog: tree_select_warnLog,
49723
+ errLog: tree_select_errLog
49724
+ } = createComponentLog('tree-select');
49016
49725
  function tree_select_getOptUniqueId() {
49017
49726
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('node_');
49018
49727
  }
@@ -49406,12 +50115,12 @@ function tree_select_createInternalData() {
49406
50115
  nodeid = tree_select_getOptUniqueId();
49407
50116
  }
49408
50117
  if (keyMaps[nodeid]) {
49409
- errLog('vxe.error.repeatKey', [nodeKeyField, nodeid]);
50118
+ tree_select_errLog('vxe.error.repeatKey', [nodeKeyField, nodeid]);
49410
50119
  }
49411
50120
  keyMaps[nodeid] = true;
49412
50121
  const value = item[valueField];
49413
50122
  if (nodeMaps[value]) {
49414
- errLog('vxe.error.repeatKey', [valueField, value]);
50123
+ tree_select_errLog('vxe.error.repeatKey', [valueField, value]);
49415
50124
  }
49416
50125
  nodeMaps[value] = {
49417
50126
  item,
@@ -49934,7 +50643,7 @@ function tree_select_createInternalData() {
49934
50643
  class: 'vxe-tree-select--panel-header'
49935
50644
  }, headerSlot ? headerSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
49936
50645
  class: 'vxe-tree-select--header-button'
49937
- }, [showCheckedButton && showClearButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50646
+ }, [showCheckedButton && multiple || showClearButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
49938
50647
  class: 'vxe-tree-select--selected-btns'
49939
50648
  }, [showCheckedButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
49940
50649
  content: getI18n('vxe.treeSelect.allChecked'),
@@ -49944,17 +50653,17 @@ function tree_select_createInternalData() {
49944
50653
  content: getI18n('vxe.treeSelect.clearChecked'),
49945
50654
  mode: 'text',
49946
50655
  onClick: clearCheckedPanelEvent
49947
- }) : renderEmptyElement($xeTreeSelect)]) : renderEmptyElement($xeTreeSelect), showExpandButton && showExpandButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50656
+ }) : renderEmptyElement($xeTreeSelect)]) : renderEmptyElement($xeTreeSelect), showExpandButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
49948
50657
  class: 'vxe-tree-select--expand-btns'
49949
- }, [showExpandButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
50658
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
49950
50659
  content: getI18n('vxe.treeSelect.allExpand'),
49951
50660
  mode: 'text',
49952
50661
  onClick: allExpandPanelEvent
49953
- }) : renderEmptyElement($xeTreeSelect), showExpandButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
50662
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
49954
50663
  content: getI18n('vxe.treeSelect.clearExpand'),
49955
50664
  mode: 'text',
49956
50665
  onClick: clearExpandPanelEvent
49957
- }) : renderEmptyElement($xeTreeSelect)]) : renderEmptyElement($xeTreeSelect)])]) : renderEmptyElement($xeTreeSelect), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50666
+ })]) : renderEmptyElement($xeTreeSelect)])]) : renderEmptyElement($xeTreeSelect), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
49958
50667
  class: 'vxe-tree-select--panel-body'
49959
50668
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
49960
50669
  ref: refTreeWrapper,
@@ -50006,13 +50715,13 @@ function tree_select_createInternalData() {
50006
50715
  onRadioChange: radioChangeEvent,
50007
50716
  onCheckboxChange: checkboxChangeEvent,
50008
50717
  onLoadSuccess: loadSuccessEvent
50009
- }, treeScopedSlots)])]), footerSlot || showTotalButton || showCloseButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50718
+ }, treeScopedSlots)])]), footerSlot || showTotalButton || showCloseButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50010
50719
  class: 'vxe-tree-select--panel-footer'
50011
50720
  }, footerSlot ? footerSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50012
50721
  class: 'vxe-tree-select--footer-button'
50013
50722
  }, [showTotalButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50014
50723
  class: 'vxe-tree-select--total-btns'
50015
- }, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeTreeSelect), showCloseButton && multiple ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50724
+ }, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeTreeSelect), showCloseButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
50016
50725
  class: 'vxe-tree-select--oper-btns'
50017
50726
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
50018
50727
  content: getI18n('vxe.select.close'),
@@ -50044,7 +50753,7 @@ function tree_select_createInternalData() {
50044
50753
  cacheLazyDataMap();
50045
50754
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
50046
50755
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(props.autoClose)) {
50047
- warnLog('vxe.error.delProp', ['auto-close', 'checked-closable | clear-closable']);
50756
+ tree_select_warnLog('vxe.error.delProp', ['auto-close', 'checked-closable | clear-closable']);
50048
50757
  }
50049
50758
  globalEvents.on($xeTreeSelect, 'mousewheel', handleGlobalMousewheelEvent);
50050
50759
  globalEvents.on($xeTreeSelect, 'mousedown', handleGlobalMousedownEvent);
@@ -50222,6 +50931,10 @@ const saveLocalFile = options => {
50222
50931
 
50223
50932
 
50224
50933
 
50934
+ const {
50935
+ warnLog: upload_warnLog,
50936
+ errLog: upload_errLog
50937
+ } = createComponentLog('upload');
50225
50938
  function upload_createReactData() {
50226
50939
  return {
50227
50940
  isDragUploadStatus: false,
@@ -50422,7 +51135,7 @@ function upload_createInternalData() {
50422
51135
  default: () => getConfig().upload.size || getConfig().size
50423
51136
  }
50424
51137
  },
50425
- emits: ['update:modelValue', 'add', 'remove', 'remove-fail', 'download', 'download-fail', 'upload-success', 'upload-error', 'sort-dragend', 'more-visible'],
51138
+ emits: ['update:modelValue', 'add', 'remove', 'remove-fail', 'download', 'download-fail', 'upload-start', 'upload-success', 'upload-error', 'upload-end', 'upload-queue-start', 'upload-queue-end', 'sort-dragend', 'more-visible'],
50426
51139
  setup(props, context) {
50427
51140
  const {
50428
51141
  emit,
@@ -50803,6 +51516,9 @@ function upload_createInternalData() {
50803
51516
  const fileKey = getFieldKey(item);
50804
51517
  const uploadFn = props.uploadMethod || getConfig().upload.uploadMethod;
50805
51518
  if (uploadFn) {
51519
+ dispatchEvent('upload-start', {
51520
+ option: item
51521
+ }, null);
50806
51522
  return Promise.resolve(uploadFn({
50807
51523
  $upload: $xeUpload,
50808
51524
  file,
@@ -50856,6 +51572,9 @@ function upload_createInternalData() {
50856
51572
  if (cacheItem) {
50857
51573
  cacheItem.loading = false;
50858
51574
  }
51575
+ dispatchEvent('upload-end', {
51576
+ option: item
51577
+ }, null);
50859
51578
  });
50860
51579
  } else {
50861
51580
  const {
@@ -50982,6 +51701,9 @@ function upload_createInternalData() {
50982
51701
  }
50983
51702
  }
50984
51703
  }
51704
+ dispatchEvent('upload-queue-start', {
51705
+ files: selectFiles
51706
+ }, evnt);
50985
51707
  const cacheMaps = Object.assign({}, reactData.fileCacheMaps);
50986
51708
  const newFileList = multiple ? fileList : [];
50987
51709
  const uploadPromiseRests = [];
@@ -51025,6 +51747,10 @@ function upload_createInternalData() {
51025
51747
  });
51026
51748
  Promise.all(urlMode ? uploadPromiseRests : []).then(() => {
51027
51749
  const restFileList = reactData.fileList;
51750
+ dispatchEvent('upload-queue-end', {
51751
+ options: restFileList,
51752
+ files: selectFiles
51753
+ }, evnt);
51028
51754
  handleChange(restFileList);
51029
51755
  // 自动更新校验状态
51030
51756
  if ($xeForm && formItemInfo) {
@@ -52149,10 +52875,10 @@ function upload_createInternalData() {
52149
52875
  });
52150
52876
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
52151
52877
  if (props.multiple && props.singleMode) {
52152
- errLog('vxe.error.errConflicts', ['[upload] multiple', 'single-mode']);
52878
+ upload_errLog('vxe.error.errConflicts', ['multiple', 'single-mode']);
52153
52879
  }
52154
52880
  if (props.imageStyle) {
52155
- warnLog('vxe.error.delProp', ['[upload] image-style', 'image-config']);
52881
+ upload_warnLog('vxe.error.delProp', ['image-style', 'image-config']);
52156
52882
  }
52157
52883
  if (props.dragSort) {
52158
52884
  initTpImg();