vxe-pc-ui 4.5.4 → 4.5.6

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 (61) hide show
  1. package/es/collapse/src/collapse.js +5 -1
  2. package/es/form/src/form.js +12 -16
  3. package/es/icon/style.css +1 -1
  4. package/es/modal/src/modal.js +1 -2
  5. package/es/split/src/split.js +113 -30
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/es/upload/src/upload.js +15 -15
  11. package/es/upload/style.css +1 -1
  12. package/es/upload/style.min.css +1 -1
  13. package/es/vxe-upload/style.css +1 -1
  14. package/es/vxe-upload/style.min.css +1 -1
  15. package/lib/collapse/src/collapse.js +8 -1
  16. package/lib/collapse/src/collapse.min.js +1 -1
  17. package/lib/form/src/form.js +12 -16
  18. package/lib/form/src/form.min.js +1 -1
  19. package/lib/icon/style/style.css +1 -1
  20. package/lib/icon/style/style.min.css +1 -1
  21. package/lib/index.umd.js +164 -65
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/modal/src/modal.js +1 -2
  24. package/lib/modal/src/modal.min.js +1 -1
  25. package/lib/split/src/split.js +128 -30
  26. package/lib/split/src/split.min.js +1 -1
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/ui/index.js +1 -1
  30. package/lib/ui/index.min.js +1 -1
  31. package/lib/ui/src/log.js +1 -1
  32. package/lib/ui/src/log.min.js +1 -1
  33. package/lib/upload/src/upload.js +16 -16
  34. package/lib/upload/src/upload.min.js +1 -1
  35. package/lib/upload/style/style.css +1 -1
  36. package/lib/upload/style/style.min.css +1 -1
  37. package/lib/vxe-upload/style/style.css +1 -1
  38. package/lib/vxe-upload/style/style.min.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/collapse/src/collapse.ts +5 -1
  41. package/packages/form/src/form.ts +12 -16
  42. package/packages/modal/src/modal.ts +1 -2
  43. package/packages/split/src/split.ts +120 -33
  44. package/packages/upload/src/upload.ts +15 -15
  45. package/styles/components/upload.scss +1 -1
  46. package/types/components/carousel.d.ts +13 -3
  47. package/types/components/collapse.d.ts +23 -4
  48. package/types/components/split-item.d.ts +3 -0
  49. package/types/components/split.d.ts +62 -1
  50. /package/es/icon/{iconfont.1743125694154.ttf → iconfont.1743222214469.ttf} +0 -0
  51. /package/es/icon/{iconfont.1743125694154.woff → iconfont.1743222214469.woff} +0 -0
  52. /package/es/icon/{iconfont.1743125694154.woff2 → iconfont.1743222214469.woff2} +0 -0
  53. /package/es/{iconfont.1743125694154.ttf → iconfont.1743222214469.ttf} +0 -0
  54. /package/es/{iconfont.1743125694154.woff → iconfont.1743222214469.woff} +0 -0
  55. /package/es/{iconfont.1743125694154.woff2 → iconfont.1743222214469.woff2} +0 -0
  56. /package/lib/icon/style/{iconfont.1743125694154.ttf → iconfont.1743222214469.ttf} +0 -0
  57. /package/lib/icon/style/{iconfont.1743125694154.woff → iconfont.1743222214469.woff} +0 -0
  58. /package/lib/icon/style/{iconfont.1743125694154.woff2 → iconfont.1743222214469.woff2} +0 -0
  59. /package/lib/{iconfont.1743125694154.ttf → iconfont.1743222214469.ttf} +0 -0
  60. /package/lib/{iconfont.1743125694154.woff → iconfont.1743222214469.woff} +0 -0
  61. /package/lib/{iconfont.1743125694154.woff2 → iconfont.1743222214469.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4183,14 +4183,14 @@ function checkDynamic() {
4183
4183
  }
4184
4184
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
4185
4185
 
4186
- const log_version = `ui v${"4.5.4"}`;
4186
+ const log_version = `ui v${"4.5.6"}`;
4187
4187
  const warnLog = log.create('warn', log_version);
4188
4188
  const errLog = log.create('error', log_version);
4189
4189
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
4190
4190
 
4191
4191
 
4192
4192
 
4193
- const ui_version = "4.5.4";
4193
+ const ui_version = "4.5.6";
4194
4194
  index_esm_VxeUI.uiVersion = ui_version;
4195
4195
  index_esm_VxeUI.dynamicApp = dynamicApp;
4196
4196
  function config(options) {
@@ -9664,7 +9664,7 @@ const Col = VxeCol;
9664
9664
  default: () => getConfig().collapse.size || getConfig().size
9665
9665
  }
9666
9666
  },
9667
- emits: ['update:modelValue', 'load', 'change'],
9667
+ emits: ['update:modelValue', 'load', 'change', 'toggle-expand'],
9668
9668
  setup(props, context) {
9669
9669
  const {
9670
9670
  emit,
@@ -9790,7 +9790,9 @@ const Col = VxeCol;
9790
9790
  } = item;
9791
9791
  if (name) {
9792
9792
  const aIndex = activeNames.indexOf(name);
9793
+ let expanded = false;
9793
9794
  if (aIndex === -1) {
9795
+ expanded = true;
9794
9796
  activeNames.push(name);
9795
9797
  } else {
9796
9798
  activeNames.splice(aIndex, 1);
@@ -9800,6 +9802,11 @@ const Col = VxeCol;
9800
9802
  value: activeNames,
9801
9803
  name
9802
9804
  }, evnt);
9805
+ dispatchEvent('toggle-expand', {
9806
+ value: activeNames,
9807
+ name,
9808
+ expanded
9809
+ }, evnt);
9803
9810
  }
9804
9811
  };
9805
9812
  const collapsePrivateMethods = {};
@@ -18439,19 +18446,17 @@ const validErrorRuleValue = (rule, val) => {
18439
18446
  };
18440
18447
  const loadItem = list => {
18441
18448
  if (list.length) {
18442
- if (true) {
18443
- list.forEach(item => {
18444
- if (item.slots) {
18445
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, func => {
18446
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
18447
- if (!slots[func]) {
18448
- errLog('vxe.error.notSlot', [func]);
18449
- }
18449
+ list.forEach(item => {
18450
+ if (item.slots) {
18451
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, func => {
18452
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
18453
+ if (!slots[func]) {
18454
+ errLog('vxe.error.notSlot', [func]);
18450
18455
  }
18451
- });
18452
- }
18453
- });
18454
- }
18456
+ }
18457
+ });
18458
+ }
18459
+ });
18455
18460
  }
18456
18461
  reactData.staticItems = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(list, item => createItem($xeForm, item), {
18457
18462
  children: 'children'
@@ -19058,10 +19063,8 @@ const validErrorRuleValue = (rule, val) => {
19058
19063
  });
19059
19064
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
19060
19065
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
19061
- if (true) {
19062
- if (props.customLayout && props.items) {
19063
- errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
19064
- }
19066
+ if (props.customLayout && props.items) {
19067
+ errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
19065
19068
  }
19066
19069
  });
19067
19070
  });
@@ -22993,7 +22996,6 @@ const lockScrollCssWidthKey = '--vxe-ui-modal-lock-scroll-view-width';
22993
22996
  showMaximize,
22994
22997
  draggable
22995
22998
  } = props;
22996
- const isMsg = computeIsMsg.value;
22997
22999
  const headerSlot = slots.header || propSlots.header;
22998
23000
  if (props.showHeader) {
22999
23001
  const headerOns = {};
@@ -23006,7 +23008,7 @@ const lockScrollCssWidthKey = '--vxe-ui-modal-lock-scroll-view-width';
23006
23008
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
23007
23009
  ref: refHeaderElem,
23008
23010
  class: ['vxe-modal--header', {
23009
- 'is--ellipsis': !isMsg && props.showTitleOverflow
23011
+ 'is--ellipsis': props.showTitleOverflow
23010
23012
  }],
23011
23013
  ...headerOns
23012
23014
  }, headerSlot ? getSlotVNs(headerSlot({
@@ -34602,7 +34604,7 @@ const saveLocalFile = options => {
34602
34604
  }
34603
34605
  return '';
34604
34606
  });
34605
- const computedDefHintText = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
34607
+ const computedDefTipText = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
34606
34608
  const {
34607
34609
  limitSize,
34608
34610
  fileTypes,
@@ -34615,26 +34617,26 @@ const saveLocalFile = options => {
34615
34617
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(tipText)) {
34616
34618
  return tipText;
34617
34619
  }
34618
- const defHints = [];
34620
+ const defTips = [];
34619
34621
  if (isImage) {
34620
34622
  if (multiple && limitCount) {
34621
- defHints.push(i18n_getI18n('vxe.upload.imgCountHint', [limitCount]));
34623
+ defTips.push(i18n_getI18n('vxe.upload.imgCountHint', [limitCount]));
34622
34624
  }
34623
34625
  if (limitSize && limitSizeUnit) {
34624
- defHints.push(i18n_getI18n('vxe.upload.imgSizeHint', [limitSizeUnit]));
34626
+ defTips.push(i18n_getI18n('vxe.upload.imgSizeHint', [limitSizeUnit]));
34625
34627
  }
34626
34628
  } else {
34627
34629
  if (fileTypes && fileTypes.length) {
34628
- defHints.push(i18n_getI18n('vxe.upload.fileTypeHint', [fileTypes.join('/')]));
34630
+ defTips.push(i18n_getI18n('vxe.upload.fileTypeHint', [fileTypes.join('/')]));
34629
34631
  }
34630
34632
  if (limitSize && limitSizeUnit) {
34631
- defHints.push(i18n_getI18n('vxe.upload.fileSizeHint', [limitSizeUnit]));
34633
+ defTips.push(i18n_getI18n('vxe.upload.fileSizeHint', [limitSizeUnit]));
34632
34634
  }
34633
34635
  if (multiple && limitCount) {
34634
- defHints.push(i18n_getI18n('vxe.upload.fileCountHint', [limitCount]));
34636
+ defTips.push(i18n_getI18n('vxe.upload.fileCountHint', [limitCount]));
34635
34637
  }
34636
34638
  }
34637
- return defHints.join(i18n_getI18n('vxe.base.comma'));
34639
+ return defTips.join(i18n_getI18n('vxe.base.comma'));
34638
34640
  });
34639
34641
  const computeImageOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
34640
34642
  return Object.assign({}, props.imageConfig || props.imageStyle);
@@ -35572,7 +35574,7 @@ const saveLocalFile = options => {
35572
35574
  } = props;
35573
35575
  const isDisabled = computeIsDisabled.value;
35574
35576
  const formReadonly = computeFormReadonly.value;
35575
- const defHintText = computedDefHintText.value;
35577
+ const defTipText = computedDefTipText.value;
35576
35578
  const overCount = computeOverCount.value;
35577
35579
  const defaultSlot = slots.default;
35578
35580
  const tipSlot = slots.tip || slots.hint;
@@ -35591,11 +35593,11 @@ const saveLocalFile = options => {
35591
35593
  content: isMoreView || showButtonText ? buttonText ? `${buttonText}` : i18n_getI18n('vxe.upload.fileBtnText') : '',
35592
35594
  icon: showButtonIcon ? buttonIcon || getIcon().UPLOAD_FILE_ADD : '',
35593
35595
  disabled: isDisabled
35594
- })]), isMoreView && (defHintText || tipSlot) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
35596
+ })]), defTipText || tipSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
35595
35597
  class: 'vxe-upload--file-action-tip'
35596
35598
  }, tipSlot ? getSlotVNs(tipSlot({
35597
35599
  $upload: $xeUpload
35598
- })) : defHintText) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]);
35600
+ })) : defTipText) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]);
35599
35601
  };
35600
35602
  const renderAllMode = () => {
35601
35603
  const {
@@ -35751,11 +35753,11 @@ const saveLocalFile = options => {
35751
35753
  autoHiddenButton
35752
35754
  } = props;
35753
35755
  const formReadonly = computeFormReadonly.value;
35754
- const defHintText = computedDefHintText.value;
35756
+ const defTipText = computedDefTipText.value;
35755
35757
  const overCount = computeOverCount.value;
35756
35758
  const imgStyle = computeImgStyle.value;
35757
35759
  const defaultSlot = slots.default;
35758
- const hintSlot = slots.hint;
35760
+ const tipSlot = slots.tip || slots.hint;
35759
35761
  if (formReadonly || !showUploadButton || autoHiddenButton && overCount) {
35760
35762
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)();
35761
35763
  }
@@ -35776,11 +35778,11 @@ const saveLocalFile = options => {
35776
35778
  class: buttonIcon || getIcon().UPLOAD_IMAGE_ADD
35777
35779
  })]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), isMoreView || showButtonText ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
35778
35780
  class: 'vxe-upload--image-action-content'
35779
- }, buttonText ? `${buttonText}` : i18n_getI18n('vxe.upload.imgBtnText')) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), isMoreView && (defHintText || hintSlot) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
35781
+ }, buttonText ? `${buttonText}` : i18n_getI18n('vxe.upload.imgBtnText')) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), defTipText || tipSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
35780
35782
  class: 'vxe-upload--image-action-hint'
35781
- }, hintSlot ? getSlotVNs(hintSlot({
35783
+ }, tipSlot ? getSlotVNs(tipSlot({
35782
35784
  $upload: $xeUpload
35783
- })) : defHintText) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])])]);
35785
+ })) : defTipText) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])])]);
35784
35786
  };
35785
35787
  const renderImageMode = () => {
35786
35788
  const {
@@ -45112,6 +45114,7 @@ const Select = VxeSelect;
45112
45114
 
45113
45115
 
45114
45116
 
45117
+
45115
45118
  /* harmony default export */ var split = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
45116
45119
  name: 'VxeSplit',
45117
45120
  props: {
@@ -45129,11 +45132,12 @@ const Select = VxeSelect;
45129
45132
  type: Boolean,
45130
45133
  default: () => getConfig().split.padding
45131
45134
  },
45135
+ items: Array,
45132
45136
  itemConfig: Object,
45133
45137
  barConfig: Object,
45134
45138
  actionConfig: Object
45135
45139
  },
45136
- emits: ['action-dblclick', 'action-click', 'resize-start', 'resize-drag', 'resize-end'],
45140
+ emits: ['action-dblclick', 'action-click', 'toggle-expand', 'resize-start', 'resize-drag', 'resize-end'],
45137
45141
  setup(props, context) {
45138
45142
  const {
45139
45143
  emit,
@@ -45142,7 +45146,8 @@ const Select = VxeSelect;
45142
45146
  const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
45143
45147
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
45144
45148
  const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
45145
- staticItems: []
45149
+ staticItems: [],
45150
+ itemList: []
45146
45151
  });
45147
45152
  const internalData = {};
45148
45153
  const computeItemOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
@@ -45243,9 +45248,9 @@ const Select = VxeSelect;
45243
45248
  };
45244
45249
  const reset = () => {
45245
45250
  const {
45246
- staticItems
45251
+ itemList
45247
45252
  } = reactData;
45248
- staticItems.forEach(item => {
45253
+ itemList.forEach(item => {
45249
45254
  item.isExpand = true;
45250
45255
  item.isVisible = true;
45251
45256
  item.foldHeight = 0;
@@ -45255,13 +45260,52 @@ const Select = VxeSelect;
45255
45260
  });
45256
45261
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
45257
45262
  };
45263
+ const handleLoadItem = (list, isReset) => {
45264
+ const {
45265
+ staticItems
45266
+ } = reactData;
45267
+ const itemDef = {
45268
+ isVisible: true,
45269
+ isExpand: true,
45270
+ renderWidth: 0,
45271
+ resizeWidth: 0,
45272
+ foldWidth: 0,
45273
+ renderHeight: 0,
45274
+ resizeHeight: 0,
45275
+ foldHeight: 0
45276
+ };
45277
+ reactData.itemList = list.map(item => {
45278
+ if (item.slots) {
45279
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, func => {
45280
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
45281
+ if (!slots[func]) {
45282
+ errLog('vxe.error.notSlot', [func]);
45283
+ }
45284
+ }
45285
+ });
45286
+ }
45287
+ return Object.assign({}, isReset ? null : itemDef, item, isReset ? itemDef : null, {
45288
+ id: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId()
45289
+ });
45290
+ });
45291
+ if (staticItems.length) {
45292
+ errLog('vxe.error.errConflicts', ['<vxe-split-item ...>', 'items']);
45293
+ }
45294
+ return recalculate();
45295
+ };
45296
+ const loadItem = list => {
45297
+ return handleLoadItem(list || [], false);
45298
+ };
45299
+ const reloadItem = list => {
45300
+ return handleLoadItem(list || [], true);
45301
+ };
45258
45302
  const recalculate = () => {
45259
45303
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
45260
45304
  const {
45261
45305
  vertical
45262
45306
  } = props;
45263
45307
  const {
45264
- staticItems
45308
+ itemList
45265
45309
  } = reactData;
45266
45310
  const el = refElem.value;
45267
45311
  if (!el) {
@@ -45278,7 +45322,7 @@ const Select = VxeSelect;
45278
45322
  const residueItems = [];
45279
45323
  if (vertical) {
45280
45324
  let countHeight = 0;
45281
- staticItems.forEach(item => {
45325
+ itemList.forEach(item => {
45282
45326
  const {
45283
45327
  height
45284
45328
  } = item;
@@ -45303,7 +45347,7 @@ const Select = VxeSelect;
45303
45347
  }
45304
45348
  } else {
45305
45349
  let countWidth = 0;
45306
- staticItems.forEach(item => {
45350
+ itemList.forEach(item => {
45307
45351
  const {
45308
45352
  width
45309
45353
  } = item;
@@ -45335,7 +45379,7 @@ const Select = VxeSelect;
45335
45379
  vertical
45336
45380
  } = props;
45337
45381
  const {
45338
- staticItems
45382
+ itemList
45339
45383
  } = reactData;
45340
45384
  const barEl = evnt.currentTarget;
45341
45385
  const handleEl = barEl.parentElement;
@@ -45344,8 +45388,8 @@ const Select = VxeSelect;
45344
45388
  return;
45345
45389
  }
45346
45390
  const itemId = handleEl.getAttribute('itemid');
45347
- const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemId);
45348
- const item = staticItems[itemIndex];
45391
+ const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, item => item.id === itemId);
45392
+ const item = itemList[itemIndex];
45349
45393
  if (!item) {
45350
45394
  return;
45351
45395
  }
@@ -45356,7 +45400,7 @@ const Select = VxeSelect;
45356
45400
  const itemOpts = computeItemOpts.value;
45357
45401
  const allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45358
45402
  const allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
45359
- const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
45403
+ const targetItem = itemList[itemIndex + (isFoldNext ? 1 : -1)];
45360
45404
  const targetItemEl = targetItem ? el.querySelector(`.vxe-split-item[itemid="${targetItem.id}"]`) : null;
45361
45405
  const currItemEl = item ? el.querySelector(`.vxe-split-item[itemid="${item.id}"]`) : null;
45362
45406
  const targetWidth = targetItemEl ? targetItemEl.clientWidth : 0;
@@ -45470,15 +45514,15 @@ const Select = VxeSelect;
45470
45514
  vertical
45471
45515
  } = props;
45472
45516
  const {
45473
- staticItems
45517
+ itemList
45474
45518
  } = reactData;
45475
45519
  const isFoldNext = computeIsFoldNext.value;
45476
45520
  const btnEl = evnt.currentTarget;
45477
45521
  const handleEl = btnEl.parentElement;
45478
45522
  const itemId = handleEl.getAttribute('itemid');
45479
- const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemId);
45480
- const item = staticItems[itemIndex];
45481
- const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
45523
+ const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, item => item.id === itemId);
45524
+ const item = itemList[itemIndex];
45525
+ const targetItem = itemList[itemIndex + (isFoldNext ? 1 : -1)];
45482
45526
  if (item) {
45483
45527
  const {
45484
45528
  showAction,
@@ -45502,7 +45546,7 @@ const Select = VxeSelect;
45502
45546
  item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
45503
45547
  }
45504
45548
  }
45505
- dispatchEvent(evnt.type === 'dblclick' ? 'action-dblclick' : 'action-click', {
45549
+ dispatchEvent('toggle-expand', {
45506
45550
  item,
45507
45551
  name: item.name,
45508
45552
  targetItem,
@@ -45513,13 +45557,51 @@ const Select = VxeSelect;
45513
45557
  }
45514
45558
  }
45515
45559
  };
45560
+ const handleActionDblclickEvent = evnt => {
45561
+ const {
45562
+ itemList
45563
+ } = reactData;
45564
+ const actionOpts = computeActionOpts.value;
45565
+ const btnEl = evnt.currentTarget;
45566
+ const handleEl = btnEl.parentElement;
45567
+ const itemId = handleEl.getAttribute('itemid');
45568
+ const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, item => item.id === itemId);
45569
+ const item = itemList[itemIndex];
45570
+ if (actionOpts.trigger === 'dblclick') {
45571
+ handleItemActionEvent(evnt);
45572
+ }
45573
+ dispatchEvent('action-dblclick', {
45574
+ item,
45575
+ name: item ? item.name : ''
45576
+ }, evnt);
45577
+ };
45578
+ const handleActionClickEvent = evnt => {
45579
+ const {
45580
+ itemList
45581
+ } = reactData;
45582
+ const actionOpts = computeActionOpts.value;
45583
+ const btnEl = evnt.currentTarget;
45584
+ const handleEl = btnEl.parentElement;
45585
+ const itemId = handleEl.getAttribute('itemid');
45586
+ const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, item => item.id === itemId);
45587
+ const item = itemList[itemIndex];
45588
+ if (actionOpts.trigger !== 'dblclick') {
45589
+ handleItemActionEvent(evnt);
45590
+ }
45591
+ dispatchEvent('action-click', {
45592
+ item,
45593
+ name: item ? item.name : ''
45594
+ }, evnt);
45595
+ };
45516
45596
  const handleGlobalResizeEvent = () => {
45517
45597
  recalculate();
45518
45598
  };
45519
45599
  const splitMethods = {
45520
45600
  dispatchEvent,
45521
45601
  recalculate,
45522
- reset
45602
+ reset,
45603
+ loadItem,
45604
+ reloadItem
45523
45605
  };
45524
45606
  const splitPrivateMethods = {};
45525
45607
  Object.assign($xeSplit, splitMethods, splitPrivateMethods);
@@ -45532,12 +45614,6 @@ const Select = VxeSelect;
45532
45614
  isExpand,
45533
45615
  showAction
45534
45616
  } = item;
45535
- const btnOns = {};
45536
- if (actionOpts.trigger === 'dblclick') {
45537
- btnOns.onDblclick = handleItemActionEvent;
45538
- } else {
45539
- btnOns.onClick = handleItemActionEvent;
45540
- }
45541
45617
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45542
45618
  itemid: id,
45543
45619
  class: ['vxe-split-item-handle', isFoldNext ? 'to--next' : 'to--prev']
@@ -45547,7 +45623,8 @@ const Select = VxeSelect;
45547
45623
  onMousedown: dragEvent
45548
45624
  }), showAction ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
45549
45625
  class: 'vxe-split-item-action-btn',
45550
- ...btnOns
45626
+ onDblclick: handleActionDblclickEvent,
45627
+ onClick: handleActionClickEvent
45551
45628
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
45552
45629
  class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || getDefaultActionIcon(item)
45553
45630
  })]) : renderEmptyElement($xeSplit)]);
@@ -45559,13 +45636,14 @@ const Select = VxeSelect;
45559
45636
  vertical
45560
45637
  } = props;
45561
45638
  const {
45562
- staticItems
45639
+ itemList
45563
45640
  } = reactData;
45564
45641
  const isFoldNext = computeIsFoldNext.value;
45565
45642
  const itemVNs = [];
45566
- staticItems.forEach((item, index) => {
45643
+ itemList.forEach((item, index) => {
45567
45644
  const {
45568
45645
  id,
45646
+ name,
45569
45647
  slots,
45570
45648
  renderHeight,
45571
45649
  resizeHeight,
@@ -45607,7 +45685,11 @@ const Select = VxeSelect;
45607
45685
  class: 'vxe-split-item--wrapper'
45608
45686
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45609
45687
  class: 'vxe-split-item--inner'
45610
- }, defaultSlot ? callSlot(defaultSlot, {}) : [])]), isFoldNext && index < staticItems.length - 1 ? renderHandleBar(item) : renderEmptyElement($xeSplit)]));
45688
+ }, defaultSlot ? callSlot(defaultSlot, {
45689
+ name,
45690
+ isVisible,
45691
+ isExpand
45692
+ }) : [])]), isFoldNext && index < itemList.length - 1 ? renderHandleBar(item) : renderEmptyElement($xeSplit)]));
45611
45693
  });
45612
45694
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45613
45695
  class: 'vxe-split-wrapper'
@@ -45635,7 +45717,21 @@ const Select = VxeSelect;
45635
45717
  class: 'vxe-split-slots'
45636
45718
  }, defaultSlot ? defaultSlot({}) : []), renderItems()]);
45637
45719
  };
45638
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.staticItems, () => {
45720
+ const itemFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
45721
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.items ? props.items.length : -1, () => {
45722
+ itemFlag.value++;
45723
+ });
45724
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.items, () => {
45725
+ itemFlag.value++;
45726
+ });
45727
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(itemFlag, () => {
45728
+ loadItem(props.items || []);
45729
+ });
45730
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.staticItems, val => {
45731
+ if (props.items && props.items.length) {
45732
+ errLog('vxe.error.errConflicts', ['<vxe-split-item ...>', 'items']);
45733
+ }
45734
+ reactData.itemList = val;
45639
45735
  recalculate();
45640
45736
  });
45641
45737
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
@@ -45650,6 +45746,9 @@ const Select = VxeSelect;
45650
45746
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onActivated)(() => {
45651
45747
  recalculate();
45652
45748
  });
45749
+ if (props.items) {
45750
+ loadItem(props.items);
45751
+ }
45653
45752
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeSplit', $xeSplit);
45654
45753
  $xeSplit.renderVN = renderVN;
45655
45754
  return $xeSplit;