vxe-pc-ui 4.5.2 → 4.5.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 (61) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/list/src/list.js +3 -2
  3. package/es/print/src/util.js +2 -1
  4. package/es/split/src/split-item.js +16 -0
  5. package/es/split/src/split.js +226 -53
  6. package/es/split/style.css +75 -15
  7. package/es/split/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +7 -2
  11. package/es/ui/src/dom.js +0 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-split/style.css +75 -15
  14. package/es/vxe-split/style.min.css +1 -1
  15. package/lib/icon/style/style.css +1 -1
  16. package/lib/icon/style/style.min.css +1 -1
  17. package/lib/index.umd.js +304 -54
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/list/src/list.js +2 -1
  20. package/lib/list/src/list.min.js +1 -1
  21. package/lib/print/src/util.js +2 -1
  22. package/lib/print/src/util.min.js +1 -1
  23. package/lib/split/src/split-item.js +16 -0
  24. package/lib/split/src/split-item.min.js +1 -1
  25. package/lib/split/src/split.js +275 -48
  26. package/lib/split/src/split.min.js +1 -1
  27. package/lib/split/style/style.css +75 -15
  28. package/lib/split/style/style.min.css +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/ui/index.js +7 -2
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/dom.js +0 -2
  34. package/lib/ui/src/dom.min.js +1 -1
  35. package/lib/ui/src/log.js +1 -1
  36. package/lib/ui/src/log.min.js +1 -1
  37. package/lib/vxe-split/style/style.css +75 -15
  38. package/lib/vxe-split/style/style.min.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/list/src/list.ts +4 -2
  41. package/packages/print/src/util.ts +3 -1
  42. package/packages/split/src/split-item.ts +18 -0
  43. package/packages/split/src/split.ts +237 -52
  44. package/packages/ui/index.ts +7 -1
  45. package/packages/ui/src/dom.ts +0 -2
  46. package/styles/components/split.scss +98 -15
  47. package/types/components/split-item.d.ts +5 -1
  48. package/types/components/split.d.ts +87 -1
  49. package/types/ui/global-icon.d.ts +6 -0
  50. /package/es/icon/{iconfont.1743056531953.ttf → iconfont.1743125694154.ttf} +0 -0
  51. /package/es/icon/{iconfont.1743056531953.woff → iconfont.1743125694154.woff} +0 -0
  52. /package/es/icon/{iconfont.1743056531953.woff2 → iconfont.1743125694154.woff2} +0 -0
  53. /package/es/{iconfont.1743056531953.ttf → iconfont.1743125694154.ttf} +0 -0
  54. /package/es/{iconfont.1743056531953.woff → iconfont.1743125694154.woff} +0 -0
  55. /package/es/{iconfont.1743056531953.woff2 → iconfont.1743125694154.woff2} +0 -0
  56. /package/lib/icon/style/{iconfont.1743056531953.ttf → iconfont.1743125694154.ttf} +0 -0
  57. /package/lib/icon/style/{iconfont.1743056531953.woff → iconfont.1743125694154.woff} +0 -0
  58. /package/lib/icon/style/{iconfont.1743056531953.woff2 → iconfont.1743125694154.woff2} +0 -0
  59. /package/lib/{iconfont.1743056531953.ttf → iconfont.1743125694154.ttf} +0 -0
  60. /package/lib/{iconfont.1743056531953.woff → iconfont.1743125694154.woff} +0 -0
  61. /package/lib/{iconfont.1743056531953.woff2 → iconfont.1743125694154.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.2"}`;
4186
+ const log_version = `ui v${"4.5.4"}`;
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.2";
4193
+ const ui_version = "4.5.4";
4194
4194
  index_esm_VxeUI.uiVersion = ui_version;
4195
4195
  index_esm_VxeUI.dynamicApp = dynamicApp;
4196
4196
  function config(options) {
@@ -4709,7 +4709,12 @@ setIcon({
4709
4709
  RATE_UNCHECKED: iconPrefix + 'star',
4710
4710
  // color-picker
4711
4711
  COLOR_COPY: iconPrefix + 'copy',
4712
- EYE_DROPPER: iconPrefix + 'dropper'
4712
+ EYE_DROPPER: iconPrefix + 'dropper',
4713
+ // split
4714
+ SPLIT_TOP_ACTION: iconPrefix + 'arrow-up',
4715
+ SPLIT_BOTTOM_ACTION: iconPrefix + 'arrow-down',
4716
+ SPLIT_LEFT_ACTION: iconPrefix + 'arrow-left',
4717
+ SPLIT_RIGHT_ACTION: iconPrefix + 'arrow-right'
4713
4718
  });
4714
4719
 
4715
4720
  /* harmony default export */ var ui = ((/* unused pure expression or super */ null && (VxeUI)));
@@ -4857,7 +4862,6 @@ const Alert = VxeAlert;
4857
4862
  /* harmony default export */ var packages_alert = (VxeAlert);
4858
4863
  ;// CONCATENATED MODULE: ./packages/ui/src/dom.ts
4859
4864
 
4860
- const dom_browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
4861
4865
  let tpImgEl;
4862
4866
  function initTpImg() {
4863
4867
  if (!tpImgEl) {
@@ -41464,6 +41468,7 @@ const ListView = VxeListView;
41464
41468
  emit
41465
41469
  } = context;
41466
41470
  const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
41471
+ const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
41467
41472
  const {
41468
41473
  computeSize
41469
41474
  } = useSize(props);
@@ -41608,7 +41613,7 @@ const ListView = VxeListView;
41608
41613
  if (scrollYLoad) {
41609
41614
  const scrollBodyElem = refVirtualWrapper.value;
41610
41615
  const visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
41611
- const offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : dom_browse.edge ? 10 : 0;
41616
+ const offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browseObj.edge ? 10 : 0;
41612
41617
  scrollYStore.offsetSize = offsetYSize;
41613
41618
  scrollYStore.visibleSize = visibleYSize;
41614
41619
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
@@ -44014,6 +44019,7 @@ const PasswordInput = VxePasswordInput;
44014
44019
 
44015
44020
 
44016
44021
 
44022
+ const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
44017
44023
  // 打印
44018
44024
  let printFrame;
44019
44025
  // 默认导出或打印的 HTML 样式
@@ -44068,7 +44074,7 @@ function handlePrint(opts, printHtml = '') {
44068
44074
  printHtml = createHtmlPage(opts, printHtml);
44069
44075
  const blob = getExportBlobByString(printHtml, 'html');
44070
44076
  return new Promise(resolve => {
44071
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse().msie) {
44077
+ if (browseObj.msie) {
44072
44078
  removeFrame();
44073
44079
  printFrame = createPrintFrame();
44074
44080
  appendPrintFrame();
@@ -45123,9 +45129,11 @@ const Select = VxeSelect;
45123
45129
  type: Boolean,
45124
45130
  default: () => getConfig().split.padding
45125
45131
  },
45126
- itemConfig: Object
45132
+ itemConfig: Object,
45133
+ barConfig: Object,
45134
+ actionConfig: Object
45127
45135
  },
45128
- emits: [],
45136
+ emits: ['action-dblclick', 'action-click', 'resize-start', 'resize-drag', 'resize-end'],
45129
45137
  setup(props, context) {
45130
45138
  const {
45131
45139
  emit,
@@ -45140,8 +45148,36 @@ const Select = VxeSelect;
45140
45148
  const computeItemOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45141
45149
  return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
45142
45150
  });
45151
+ const computeBarOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45152
+ return Object.assign({}, getConfig().split.barConfig, props.barConfig);
45153
+ });
45154
+ const computeActionOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45155
+ return Object.assign({}, getConfig().split.actionConfig, props.actionConfig);
45156
+ });
45157
+ const computeIsFoldNext = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45158
+ const actionOpts = computeActionOpts.value;
45159
+ return actionOpts.direction === 'next';
45160
+ });
45161
+ const computeBarStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45162
+ const barOpts = computeBarOpts.value;
45163
+ const {
45164
+ width,
45165
+ height
45166
+ } = barOpts;
45167
+ const stys = {};
45168
+ if (height) {
45169
+ stys.height = toCssUnit(height);
45170
+ }
45171
+ if (width) {
45172
+ stys.width = toCssUnit(width);
45173
+ }
45174
+ return stys;
45175
+ });
45143
45176
  const computeMaps = {
45144
- computeItemOpts
45177
+ computeItemOpts,
45178
+ computeBarOpts,
45179
+ computeActionOpts,
45180
+ computeIsFoldNext
45145
45181
  };
45146
45182
  const refMaps = {
45147
45183
  refElem
@@ -45171,6 +45207,54 @@ const Select = VxeSelect;
45171
45207
  }
45172
45208
  return [];
45173
45209
  };
45210
+ const getDefaultActionIcon = item => {
45211
+ const {
45212
+ vertical
45213
+ } = props;
45214
+ const {
45215
+ showAction,
45216
+ isExpand
45217
+ } = item;
45218
+ const isFoldNext = computeIsFoldNext.value;
45219
+ const topIcon = 'SPLIT_TOP_ACTION';
45220
+ const bottomIcon = 'SPLIT_BOTTOM_ACTION';
45221
+ const leftIcon = 'SPLIT_LEFT_ACTION';
45222
+ const rightIcon = 'SPLIT_RIGHT_ACTION';
45223
+ if (showAction) {
45224
+ let iconName = '';
45225
+ if (isFoldNext) {
45226
+ if (vertical) {
45227
+ iconName = isExpand ? bottomIcon : topIcon;
45228
+ } else {
45229
+ iconName = isExpand ? rightIcon : leftIcon;
45230
+ }
45231
+ } else {
45232
+ if (vertical) {
45233
+ iconName = isExpand ? topIcon : bottomIcon;
45234
+ } else {
45235
+ iconName = isExpand ? leftIcon : rightIcon;
45236
+ }
45237
+ }
45238
+ if (iconName) {
45239
+ return getIcon()[iconName];
45240
+ }
45241
+ }
45242
+ return '';
45243
+ };
45244
+ const reset = () => {
45245
+ const {
45246
+ staticItems
45247
+ } = reactData;
45248
+ staticItems.forEach(item => {
45249
+ item.isExpand = true;
45250
+ item.isVisible = true;
45251
+ item.foldHeight = 0;
45252
+ item.foldWidth = 0;
45253
+ item.resizeHeight = 0;
45254
+ item.resizeWidth = 0;
45255
+ });
45256
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
45257
+ };
45174
45258
  const recalculate = () => {
45175
45259
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
45176
45260
  const {
@@ -45253,30 +45337,35 @@ const Select = VxeSelect;
45253
45337
  const {
45254
45338
  staticItems
45255
45339
  } = reactData;
45256
- const handleEl = evnt.currentTarget;
45340
+ const barEl = evnt.currentTarget;
45341
+ const handleEl = barEl.parentElement;
45257
45342
  const el = refElem.value;
45258
45343
  if (!el) {
45259
45344
  return;
45260
45345
  }
45261
- const itemId = handleEl.getAttribute('xid');
45346
+ const itemId = handleEl.getAttribute('itemid');
45262
45347
  const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemId);
45263
45348
  const item = staticItems[itemIndex];
45264
45349
  if (!item) {
45265
45350
  return;
45266
45351
  }
45352
+ if (!item.isExpand) {
45353
+ return;
45354
+ }
45355
+ const isFoldNext = computeIsFoldNext.value;
45267
45356
  const itemOpts = computeItemOpts.value;
45268
45357
  const allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45269
45358
  const allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
45270
- const prevItem = staticItems[itemIndex - 1];
45271
- const prevItemEl = prevItem ? el.querySelector(`.vxe-split-item[xid="${prevItem.id}"]`) : null;
45272
- const currItemEl = item ? el.querySelector(`.vxe-split-item[xid="${item.id}"]`) : null;
45273
- const prevWidth = prevItemEl ? prevItemEl.clientWidth : 0;
45359
+ const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
45360
+ const targetItemEl = targetItem ? el.querySelector(`.vxe-split-item[itemid="${targetItem.id}"]`) : null;
45361
+ const currItemEl = item ? el.querySelector(`.vxe-split-item[itemid="${item.id}"]`) : null;
45362
+ const targetWidth = targetItemEl ? targetItemEl.clientWidth : 0;
45274
45363
  const currWidth = currItemEl ? currItemEl.clientWidth : 0;
45275
- const prevHeight = prevItemEl ? prevItemEl.clientHeight : 0;
45364
+ const targetHeight = targetItemEl ? targetItemEl.clientHeight : 0;
45276
45365
  const currHeight = currItemEl ? currItemEl.clientHeight : 0;
45277
- const prevMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minWidth, allMinWidth) : allMinWidth);
45366
+ const targetMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minWidth, allMinWidth) : allMinWidth);
45278
45367
  const currMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth));
45279
- const prevMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minHeight, allMinHeight) : allMinHeight);
45368
+ const targetMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minHeight, allMinHeight) : allMinHeight);
45280
45369
  const currMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight));
45281
45370
  const disX = evnt.clientX;
45282
45371
  const disY = evnt.clientY;
@@ -45284,53 +45373,185 @@ const Select = VxeSelect;
45284
45373
  document.onmousemove = evnt => {
45285
45374
  evnt.preventDefault();
45286
45375
  if (vertical) {
45287
- const offsetTop = evnt.clientY - disY;
45376
+ const offsetTop = isFoldNext ? disY - evnt.clientY : evnt.clientY - disY;
45288
45377
  if (offsetTop > 0) {
45289
- if (prevItem) {
45378
+ if (targetItem) {
45290
45379
  if (currHeight - offsetTop >= currMinHeight) {
45291
- prevItem.renderHeight = prevHeight + offsetTop;
45292
- item.renderHeight = currHeight - offsetTop;
45380
+ const reHeight = currHeight - offsetTop;
45381
+ targetItem.resizeHeight = targetHeight + offsetTop;
45382
+ item.resizeHeight = reHeight;
45383
+ dispatchEvent('resize-drag', {
45384
+ item,
45385
+ name: item.name,
45386
+ offsetHeight: offsetTop,
45387
+ resizeHeight: reHeight,
45388
+ offsetWidth: 0,
45389
+ resizeWidth: 0
45390
+ }, evnt);
45293
45391
  }
45294
45392
  }
45295
45393
  } else {
45296
- if (prevItem) {
45297
- if (prevHeight + offsetTop >= prevMinHeight) {
45298
- prevItem.renderHeight = prevHeight + offsetTop;
45299
- item.renderHeight = currHeight - offsetTop;
45394
+ if (targetItem) {
45395
+ if (targetHeight + offsetTop >= targetMinHeight) {
45396
+ const reHeight = currHeight - offsetTop;
45397
+ targetItem.resizeHeight = targetHeight + offsetTop;
45398
+ item.resizeHeight = reHeight;
45399
+ dispatchEvent('resize-drag', {
45400
+ item,
45401
+ name: item.name,
45402
+ offsetHeight: offsetTop,
45403
+ resizeHeight: reHeight,
45404
+ offsetWidth: 0,
45405
+ resizeWidth: 0
45406
+ }, evnt);
45300
45407
  }
45301
45408
  }
45302
45409
  }
45303
45410
  } else {
45304
- const offsetLeft = evnt.clientX - disX;
45411
+ const offsetLeft = isFoldNext ? disX - evnt.clientX : evnt.clientX - disX;
45305
45412
  if (offsetLeft > 0) {
45306
- if (prevItem) {
45413
+ if (targetItem) {
45307
45414
  if (currWidth - offsetLeft >= currMinWidth) {
45308
- prevItem.renderWidth = prevWidth + offsetLeft;
45309
- item.renderWidth = currWidth - offsetLeft;
45415
+ const reWidth = currWidth - offsetLeft;
45416
+ targetItem.resizeWidth = targetWidth + offsetLeft;
45417
+ item.resizeWidth = reWidth;
45418
+ dispatchEvent('resize-drag', {
45419
+ item,
45420
+ name: item.name,
45421
+ offsetHeight: 0,
45422
+ resizeHeight: 0,
45423
+ offsetWidth: offsetLeft,
45424
+ resizeWidth: reWidth
45425
+ }, evnt);
45310
45426
  }
45311
45427
  }
45312
45428
  } else {
45313
- if (prevItem) {
45314
- if (prevWidth + offsetLeft >= prevMinWidth) {
45315
- prevItem.renderWidth = prevWidth + offsetLeft;
45316
- item.renderWidth = currWidth - offsetLeft;
45429
+ if (targetItem) {
45430
+ if (targetWidth + offsetLeft >= targetMinWidth) {
45431
+ const reWidth = currWidth - offsetLeft;
45432
+ targetItem.resizeWidth = targetWidth + offsetLeft;
45433
+ item.resizeWidth = reWidth;
45434
+ dispatchEvent('resize-drag', {
45435
+ item,
45436
+ name: item.name,
45437
+ offsetHeight: 0,
45438
+ resizeHeight: 0,
45439
+ offsetWidth: offsetLeft,
45440
+ resizeWidth: reWidth
45441
+ }, evnt);
45317
45442
  }
45318
45443
  }
45319
45444
  }
45320
45445
  }
45321
45446
  };
45322
- document.onmouseup = () => {
45447
+ document.onmouseup = evnt => {
45323
45448
  document.onmousemove = null;
45324
45449
  document.onmouseup = null;
45325
45450
  removeClass(el, 'is--drag');
45451
+ dispatchEvent('resize-end', {
45452
+ item,
45453
+ name: item.name,
45454
+ resizeHeight: item.resizeHeight,
45455
+ resizeWidth: item.resizeWidth
45456
+ }, evnt);
45457
+ recalculate();
45326
45458
  };
45459
+ dispatchEvent('resize-start', {
45460
+ item,
45461
+ name: item.name
45462
+ }, evnt);
45463
+ };
45464
+ const handleItemActionEvent = evnt => {
45465
+ const el = refElem.value;
45466
+ if (!el) {
45467
+ return;
45468
+ }
45469
+ const {
45470
+ vertical
45471
+ } = props;
45472
+ const {
45473
+ staticItems
45474
+ } = reactData;
45475
+ const isFoldNext = computeIsFoldNext.value;
45476
+ const btnEl = evnt.currentTarget;
45477
+ const handleEl = btnEl.parentElement;
45478
+ 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)];
45482
+ if (item) {
45483
+ const {
45484
+ showAction,
45485
+ isExpand
45486
+ } = item;
45487
+ if (showAction) {
45488
+ if (vertical) {
45489
+ if (targetItem) {
45490
+ targetItem.isVisible = !isExpand;
45491
+ targetItem.foldHeight = 0;
45492
+ item.isExpand = !isExpand;
45493
+ item.isVisible = true;
45494
+ item.foldHeight = isExpand ? (targetItem.resizeHeight || targetItem.renderHeight) + (item.resizeHeight || item.renderHeight) : 0;
45495
+ }
45496
+ } else {
45497
+ if (targetItem) {
45498
+ targetItem.isVisible = !isExpand;
45499
+ targetItem.foldWidth = 0;
45500
+ item.isExpand = !isExpand;
45501
+ item.isVisible = true;
45502
+ item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
45503
+ }
45504
+ }
45505
+ dispatchEvent(evnt.type === 'dblclick' ? 'action-dblclick' : 'action-click', {
45506
+ item,
45507
+ name: item.name,
45508
+ targetItem,
45509
+ targetName: targetItem ? targetItem.name : '',
45510
+ expanded: item.isExpand
45511
+ }, evnt);
45512
+ recalculate();
45513
+ }
45514
+ }
45515
+ };
45516
+ const handleGlobalResizeEvent = () => {
45517
+ recalculate();
45327
45518
  };
45328
45519
  const splitMethods = {
45329
45520
  dispatchEvent,
45330
- recalculate
45521
+ recalculate,
45522
+ reset
45331
45523
  };
45332
45524
  const splitPrivateMethods = {};
45333
45525
  Object.assign($xeSplit, splitMethods, splitPrivateMethods);
45526
+ const renderHandleBar = item => {
45527
+ const barStyle = computeBarStyle.value;
45528
+ const actionOpts = computeActionOpts.value;
45529
+ const isFoldNext = computeIsFoldNext.value;
45530
+ const {
45531
+ id,
45532
+ isExpand,
45533
+ showAction
45534
+ } = item;
45535
+ const btnOns = {};
45536
+ if (actionOpts.trigger === 'dblclick') {
45537
+ btnOns.onDblclick = handleItemActionEvent;
45538
+ } else {
45539
+ btnOns.onClick = handleItemActionEvent;
45540
+ }
45541
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45542
+ itemid: id,
45543
+ class: ['vxe-split-item-handle', isFoldNext ? 'to--next' : 'to--prev']
45544
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45545
+ class: 'vxe-split-item-handle-bar',
45546
+ style: barStyle,
45547
+ onMousedown: dragEvent
45548
+ }), showAction ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
45549
+ class: 'vxe-split-item-action-btn',
45550
+ ...btnOns
45551
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
45552
+ class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || getDefaultActionIcon(item)
45553
+ })]) : renderEmptyElement($xeSplit)]);
45554
+ };
45334
45555
  const renderItems = () => {
45335
45556
  const {
45336
45557
  border,
@@ -45340,46 +45561,53 @@ const Select = VxeSelect;
45340
45561
  const {
45341
45562
  staticItems
45342
45563
  } = reactData;
45564
+ const isFoldNext = computeIsFoldNext.value;
45343
45565
  const itemVNs = [];
45344
45566
  staticItems.forEach((item, index) => {
45345
45567
  const {
45346
45568
  id,
45347
45569
  slots,
45348
45570
  renderHeight,
45349
- renderWidth
45571
+ resizeHeight,
45572
+ foldHeight,
45573
+ renderWidth,
45574
+ resizeWidth,
45575
+ foldWidth,
45576
+ isVisible,
45577
+ isExpand
45350
45578
  } = item;
45351
45579
  const defaultSlot = slots ? slots.default : null;
45352
45580
  const stys = {};
45581
+ const itemWidth = isVisible ? foldWidth || resizeWidth || renderWidth : 0;
45582
+ const itemHeight = isVisible ? foldHeight || resizeHeight || renderHeight : 0;
45353
45583
  if (vertical) {
45354
- if (renderHeight) {
45355
- stys.height = toCssUnit(renderHeight);
45584
+ if (itemHeight) {
45585
+ stys.height = toCssUnit(itemHeight);
45356
45586
  }
45357
45587
  } else {
45358
- if (renderWidth) {
45359
- stys.width = toCssUnit(renderWidth);
45588
+ if (itemWidth) {
45589
+ stys.width = toCssUnit(itemWidth);
45360
45590
  }
45361
45591
  }
45362
45592
  itemVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45363
- xid: id,
45593
+ itemid: id,
45364
45594
  class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
45365
45595
  'is--padding': padding,
45366
45596
  'is--border': border,
45367
- 'is--height': renderHeight,
45368
- 'is--width': renderWidth,
45369
- 'is--fill': !renderHeight && !renderWidth,
45370
- 'is--handle': index > 0
45597
+ 'is--height': itemHeight,
45598
+ 'is--width': itemWidth,
45599
+ 'is--fill': isVisible && !itemHeight && !itemWidth,
45600
+ 'is--handle': index > 0,
45601
+ 'is--expand': isExpand,
45602
+ 'is--hidden': !isVisible
45371
45603
  }],
45372
45604
  style: stys
45373
- }, [index ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45374
- xid: id,
45375
- class: 'vxe-split-item-handle',
45376
- onMousedown: dragEvent
45377
- }) : renderEmptyElement($xeSplit), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45378
- xid: id,
45605
+ }, [index && !isFoldNext ? renderHandleBar(item) : renderEmptyElement($xeSplit), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45606
+ itemid: id,
45379
45607
  class: 'vxe-split-item--wrapper'
45380
45608
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45381
45609
  class: 'vxe-split-item--inner'
45382
- }, defaultSlot ? callSlot(defaultSlot, {}) : [])])]));
45610
+ }, defaultSlot ? callSlot(defaultSlot, {}) : [])]), isFoldNext && index < staticItems.length - 1 ? renderHandleBar(item) : renderEmptyElement($xeSplit)]));
45383
45611
  });
45384
45612
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45385
45613
  class: 'vxe-split-wrapper'
@@ -45411,7 +45639,13 @@ const Select = VxeSelect;
45411
45639
  recalculate();
45412
45640
  });
45413
45641
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
45414
- recalculate();
45642
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
45643
+ recalculate();
45644
+ });
45645
+ globalEvents.on($xeSplit, 'resize', handleGlobalResizeEvent);
45646
+ });
45647
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
45648
+ globalEvents.off($xeSplit, 'resize');
45415
45649
  });
45416
45650
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onActivated)(() => {
45417
45651
  recalculate();
@@ -45463,8 +45697,10 @@ function destroySplitItem($xeSplit, chunkConfig) {
45463
45697
  /* harmony default export */ var split_item = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
45464
45698
  name: 'VxeSplitItem',
45465
45699
  props: {
45700
+ name: [Number, String],
45466
45701
  width: [Number, String],
45467
45702
  height: [Number, String],
45703
+ showAction: Boolean,
45468
45704
  minWidth: {
45469
45705
  type: [Number, String],
45470
45706
  default: () => null
@@ -45485,12 +45721,20 @@ function destroySplitItem($xeSplit, chunkConfig) {
45485
45721
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
45486
45722
  const chunkConfig = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
45487
45723
  id: xID,
45724
+ name: props.name,
45488
45725
  width: props.width,
45489
45726
  height: props.height,
45490
45727
  minWidth: props.minWidth,
45491
45728
  minHeight: props.minHeight,
45729
+ showAction: props.showAction,
45730
+ isVisible: true,
45731
+ isExpand: true,
45492
45732
  renderWidth: 0,
45733
+ resizeWidth: 0,
45734
+ foldWidth: 0,
45493
45735
  renderHeight: 0,
45736
+ resizeHeight: 0,
45737
+ foldHeight: 0,
45494
45738
  slots: slots
45495
45739
  });
45496
45740
  const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
@@ -45523,6 +45767,9 @@ function destroySplitItem($xeSplit, chunkConfig) {
45523
45767
  ref: refElem
45524
45768
  });
45525
45769
  };
45770
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.name, val => {
45771
+ chunkConfig.name = val;
45772
+ });
45526
45773
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.width, val => {
45527
45774
  chunkConfig.width = val;
45528
45775
  });
@@ -45535,6 +45782,9 @@ function destroySplitItem($xeSplit, chunkConfig) {
45535
45782
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.minHeight, val => {
45536
45783
  chunkConfig.minHeight = val;
45537
45784
  });
45785
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.showAction, val => {
45786
+ chunkConfig.showAction = val;
45787
+ });
45538
45788
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
45539
45789
  const elem = refElem.value;
45540
45790
  if ($xeSplit && elem) {