vxe-pc-ui 3.5.2 → 3.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 +22 -2
  5. package/es/split/src/split.js +241 -52
  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 +317 -56
  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 +22 -2
  24. package/lib/split/src/split-item.min.js +1 -1
  25. package/lib/split/src/split.js +281 -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 +24 -2
  43. package/packages/split/src/split.ts +252 -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.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  51. /package/es/icon/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  52. /package/es/icon/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  53. /package/es/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  54. /package/es/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  55. /package/es/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  56. /package/lib/icon/style/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  57. /package/lib/icon/style/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  58. /package/lib/icon/style/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  59. /package/lib/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  60. /package/lib/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  61. /package/lib/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -13008,14 +13008,14 @@ var defineVxeComponent = function defineVxeComponent(options) {
13008
13008
  };
13009
13009
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
13010
13010
 
13011
- var log_version = "ui v".concat("3.5.2");
13011
+ var log_version = "ui v".concat("3.5.4");
13012
13012
  var warnLog = log.create('warn', log_version);
13013
13013
  var errLog = log.create('error', log_version);
13014
13014
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
13015
13015
 
13016
13016
 
13017
13017
 
13018
- var ui_version = "3.5.2";
13018
+ var ui_version = "3.5.4";
13019
13019
  index_esm_VxeUI.uiVersion = ui_version;
13020
13020
  index_esm_VxeUI.dynamicApp = dynamicApp;
13021
13021
  function config(options) {
@@ -13534,7 +13534,12 @@ setIcon({
13534
13534
  RATE_UNCHECKED: iconPrefix + 'star',
13535
13535
  // color-picker
13536
13536
  COLOR_COPY: iconPrefix + 'copy',
13537
- EYE_DROPPER: iconPrefix + 'dropper'
13537
+ EYE_DROPPER: iconPrefix + 'dropper',
13538
+ // split
13539
+ SPLIT_TOP_ACTION: iconPrefix + 'arrow-up',
13540
+ SPLIT_BOTTOM_ACTION: iconPrefix + 'arrow-down',
13541
+ SPLIT_LEFT_ACTION: iconPrefix + 'arrow-left',
13542
+ SPLIT_RIGHT_ACTION: iconPrefix + 'arrow-right'
13538
13543
  });
13539
13544
 
13540
13545
  /* harmony default export */ var ui = ((/* unused pure expression or super */ null && (VxeUI)));
@@ -13709,7 +13714,6 @@ var es_string_match = __webpack_require__(1761);
13709
13714
 
13710
13715
 
13711
13716
 
13712
- var dom_browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
13713
13717
  var tpImgEl;
13714
13718
  function initTpImg() {
13715
13719
  if (!tpImgEl) {
@@ -32830,6 +32834,7 @@ var Link = VxeLink;
32830
32834
 
32831
32835
 
32832
32836
 
32837
+ var browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
32833
32838
  /* harmony default export */ var list = (/* define-vxe-component start */defineVxeComponent({
32834
32839
  name: 'VxeList',
32835
32840
  mixins: [globalMixins.sizeMixin],
@@ -33045,7 +33050,7 @@ var Link = VxeLink;
33045
33050
  if (scrollYLoad) {
33046
33051
  var scrollBodyElem = $xeList.$refs.refVirtualWrapper;
33047
33052
  var visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
33048
- var offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : dom_browse.edge ? 10 : 0;
33053
+ var offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browseObj.edge ? 10 : 0;
33049
33054
  scrollYStore.offsetSize = offsetYSize;
33050
33055
  scrollYStore.visibleSize = visibleYSize;
33051
33056
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
@@ -40188,6 +40193,7 @@ var web_url_search_params_size = __webpack_require__(8721);
40188
40193
 
40189
40194
 
40190
40195
 
40196
+ var util_browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
40191
40197
  // 打印
40192
40198
  var printFrame;
40193
40199
  // 默认导出或打印的 HTML 样式
@@ -40239,7 +40245,7 @@ function handlePrint(opts) {
40239
40245
  printHtml = createHtmlPage(opts, printHtml);
40240
40246
  var blob = getExportBlobByString(printHtml, 'html');
40241
40247
  return new Promise(function (resolve) {
40242
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse().msie) {
40248
+ if (util_browseObj.msie) {
40243
40249
  removeFrame();
40244
40250
  printFrame = createPrintFrame();
40245
40251
  appendPrintFrame();
@@ -42178,6 +42184,7 @@ var es_string_split = __webpack_require__(744);
42178
42184
 
42179
42185
 
42180
42186
 
42187
+
42181
42188
  /* harmony default export */ var split = (/* define-vxe-component start */defineVxeComponent({
42182
42189
  name: 'VxeSplit',
42183
42190
  mixins: [globalMixins.sizeMixin],
@@ -42202,7 +42209,9 @@ var es_string_split = __webpack_require__(744);
42202
42209
  return getConfig().split.padding;
42203
42210
  }
42204
42211
  },
42205
- itemConfig: Object
42212
+ itemConfig: Object,
42213
+ barConfig: Object,
42214
+ actionConfig: Object
42206
42215
  },
42207
42216
  data: function data() {
42208
42217
  var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
@@ -42227,6 +42236,35 @@ var es_string_split = __webpack_require__(744);
42227
42236
  var $xeSplit = this;
42228
42237
  var props = $xeSplit;
42229
42238
  return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
42239
+ },
42240
+ computeBarOpts: function computeBarOpts() {
42241
+ var $xeSplit = this;
42242
+ var props = $xeSplit;
42243
+ return Object.assign({}, getConfig().split.barConfig, props.barConfig);
42244
+ },
42245
+ computeActionOpts: function computeActionOpts() {
42246
+ var $xeSplit = this;
42247
+ var props = $xeSplit;
42248
+ return Object.assign({}, getConfig().split.actionConfig, props.actionConfig);
42249
+ },
42250
+ computeIsFoldNext: function computeIsFoldNext() {
42251
+ var $xeSplit = this;
42252
+ var actionOpts = $xeSplit.computeActionOpts;
42253
+ return actionOpts.direction === 'next';
42254
+ },
42255
+ computeBarStyle: function computeBarStyle() {
42256
+ var $xeSplit = this;
42257
+ var barOpts = $xeSplit.computeBarOpts;
42258
+ var width = barOpts.width,
42259
+ height = barOpts.height;
42260
+ var stys = {};
42261
+ if (height) {
42262
+ stys.height = toCssUnit(height);
42263
+ }
42264
+ if (width) {
42265
+ stys.width = toCssUnit(width);
42266
+ }
42267
+ return stys;
42230
42268
  }
42231
42269
  }),
42232
42270
  methods: {
@@ -42252,6 +42290,20 @@ var es_string_split = __webpack_require__(744);
42252
42290
  }
42253
42291
  return [];
42254
42292
  },
42293
+ reset: function reset() {
42294
+ var $xeSplit = this;
42295
+ var reactData = $xeSplit.reactData;
42296
+ var staticItems = reactData.staticItems;
42297
+ staticItems.forEach(function (item) {
42298
+ item.isExpand = true;
42299
+ item.isVisible = true;
42300
+ item.foldHeight = 0;
42301
+ item.foldWidth = 0;
42302
+ item.resizeHeight = 0;
42303
+ item.resizeWidth = 0;
42304
+ });
42305
+ return $xeSplit.$nextTick();
42306
+ },
42255
42307
  recalculate: function recalculate() {
42256
42308
  var $xeSplit = this;
42257
42309
  var props = $xeSplit;
@@ -42328,12 +42380,13 @@ var es_string_split = __webpack_require__(744);
42328
42380
  evnt.preventDefault();
42329
42381
  var vertical = props.vertical;
42330
42382
  var staticItems = reactData.staticItems;
42331
- var handleEl = evnt.currentTarget;
42383
+ var barEl = evnt.currentTarget;
42384
+ var handleEl = barEl.parentElement;
42332
42385
  var el = $xeSplit.$refs.refElem;
42333
42386
  if (!el) {
42334
42387
  return;
42335
42388
  }
42336
- var itemId = handleEl.getAttribute('xid');
42389
+ var itemId = handleEl.getAttribute('itemid');
42337
42390
  var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, function (item) {
42338
42391
  return item.id === itemId;
42339
42392
  });
@@ -42341,19 +42394,23 @@ var es_string_split = __webpack_require__(744);
42341
42394
  if (!item) {
42342
42395
  return;
42343
42396
  }
42397
+ if (!item.isExpand) {
42398
+ return;
42399
+ }
42400
+ var isFoldNext = $xeSplit.computeIsFoldNext;
42344
42401
  var itemOpts = $xeSplit.computeItemOpts;
42345
42402
  var allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
42346
42403
  var allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
42347
- var prevItem = staticItems[itemIndex - 1];
42348
- var prevItemEl = prevItem ? el.querySelector(".vxe-split-item[xid=\"".concat(prevItem.id, "\"]")) : null;
42349
- var currItemEl = item ? el.querySelector(".vxe-split-item[xid=\"".concat(item.id, "\"]")) : null;
42350
- var prevWidth = prevItemEl ? prevItemEl.clientWidth : 0;
42404
+ var targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
42405
+ var targetItemEl = targetItem ? el.querySelector(".vxe-split-item[itemid=\"".concat(targetItem.id, "\"]")) : null;
42406
+ var currItemEl = item ? el.querySelector(".vxe-split-item[itemid=\"".concat(item.id, "\"]")) : null;
42407
+ var targetWidth = targetItemEl ? targetItemEl.clientWidth : 0;
42351
42408
  var currWidth = currItemEl ? currItemEl.clientWidth : 0;
42352
- var prevHeight = prevItemEl ? prevItemEl.clientHeight : 0;
42409
+ var targetHeight = targetItemEl ? targetItemEl.clientHeight : 0;
42353
42410
  var currHeight = currItemEl ? currItemEl.clientHeight : 0;
42354
- var prevMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minWidth, allMinWidth) : allMinWidth);
42411
+ var targetMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minWidth, allMinWidth) : allMinWidth);
42355
42412
  var currMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth));
42356
- var prevMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minHeight, allMinHeight) : allMinHeight);
42413
+ var targetMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minHeight, allMinHeight) : allMinHeight);
42357
42414
  var currMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight));
42358
42415
  var disX = evnt.clientX;
42359
42416
  var disY = evnt.clientY;
@@ -42361,50 +42418,216 @@ var es_string_split = __webpack_require__(744);
42361
42418
  document.onmousemove = function (evnt) {
42362
42419
  evnt.preventDefault();
42363
42420
  if (vertical) {
42364
- var offsetTop = evnt.clientY - disY;
42421
+ var offsetTop = isFoldNext ? disY - evnt.clientY : evnt.clientY - disY;
42365
42422
  if (offsetTop > 0) {
42366
- if (prevItem) {
42423
+ if (targetItem) {
42367
42424
  if (currHeight - offsetTop >= currMinHeight) {
42368
- prevItem.renderHeight = prevHeight + offsetTop;
42369
- item.renderHeight = currHeight - offsetTop;
42425
+ var reHeight = currHeight - offsetTop;
42426
+ targetItem.resizeHeight = targetHeight + offsetTop;
42427
+ item.resizeHeight = reHeight;
42428
+ $xeSplit.dispatchEvent('resize-drag', {
42429
+ item: item,
42430
+ name: item.name,
42431
+ offsetHeight: offsetTop,
42432
+ resizeHeight: reHeight,
42433
+ offsetWidth: 0,
42434
+ resizeWidth: 0
42435
+ }, evnt);
42370
42436
  }
42371
42437
  }
42372
42438
  } else {
42373
- if (prevItem) {
42374
- if (prevHeight + offsetTop >= prevMinHeight) {
42375
- prevItem.renderHeight = prevHeight + offsetTop;
42376
- item.renderHeight = currHeight - offsetTop;
42439
+ if (targetItem) {
42440
+ if (targetHeight + offsetTop >= targetMinHeight) {
42441
+ var _reHeight = currHeight - offsetTop;
42442
+ targetItem.resizeHeight = targetHeight + offsetTop;
42443
+ item.resizeHeight = _reHeight;
42444
+ $xeSplit.dispatchEvent('resize-drag', {
42445
+ item: item,
42446
+ name: item.name,
42447
+ offsetHeight: offsetTop,
42448
+ resizeHeight: _reHeight,
42449
+ offsetWidth: 0,
42450
+ resizeWidth: 0
42451
+ }, evnt);
42377
42452
  }
42378
42453
  }
42379
42454
  }
42380
42455
  } else {
42381
- var offsetLeft = evnt.clientX - disX;
42456
+ var offsetLeft = isFoldNext ? disX - evnt.clientX : evnt.clientX - disX;
42382
42457
  if (offsetLeft > 0) {
42383
- if (prevItem) {
42458
+ if (targetItem) {
42384
42459
  if (currWidth - offsetLeft >= currMinWidth) {
42385
- prevItem.renderWidth = prevWidth + offsetLeft;
42386
- item.renderWidth = currWidth - offsetLeft;
42460
+ var reWidth = currWidth - offsetLeft;
42461
+ targetItem.resizeWidth = targetWidth + offsetLeft;
42462
+ item.resizeWidth = reWidth;
42463
+ $xeSplit.dispatchEvent('resize-drag', {
42464
+ item: item,
42465
+ name: item.name,
42466
+ offsetHeight: 0,
42467
+ resizeHeight: 0,
42468
+ offsetWidth: offsetLeft,
42469
+ resizeWidth: reWidth
42470
+ }, evnt);
42387
42471
  }
42388
42472
  }
42389
42473
  } else {
42390
- if (prevItem) {
42391
- if (prevWidth + offsetLeft >= prevMinWidth) {
42392
- prevItem.renderWidth = prevWidth + offsetLeft;
42393
- item.renderWidth = currWidth - offsetLeft;
42474
+ if (targetItem) {
42475
+ if (targetWidth + offsetLeft >= targetMinWidth) {
42476
+ var _reWidth = currWidth - offsetLeft;
42477
+ targetItem.resizeWidth = targetWidth + offsetLeft;
42478
+ item.resizeWidth = _reWidth;
42479
+ $xeSplit.dispatchEvent('resize-drag', {
42480
+ item: item,
42481
+ name: item.name,
42482
+ offsetHeight: 0,
42483
+ resizeHeight: 0,
42484
+ offsetWidth: offsetLeft,
42485
+ resizeWidth: _reWidth
42486
+ }, evnt);
42394
42487
  }
42395
42488
  }
42396
42489
  }
42397
42490
  }
42398
42491
  };
42399
- document.onmouseup = function () {
42492
+ document.onmouseup = function (evnt) {
42400
42493
  document.onmousemove = null;
42401
42494
  document.onmouseup = null;
42402
42495
  removeClass(el, 'is--drag');
42496
+ $xeSplit.dispatchEvent('resize-end', {
42497
+ item: item,
42498
+ name: item.name,
42499
+ resizeHeight: item.resizeHeight,
42500
+ resizeWidth: item.resizeWidth
42501
+ }, evnt);
42502
+ $xeSplit.recalculate();
42403
42503
  };
42504
+ $xeSplit.dispatchEvent('resize-start', {
42505
+ item: item,
42506
+ name: item.name
42507
+ }, evnt);
42508
+ },
42509
+ handleItemActionEvent: function handleItemActionEvent(evnt) {
42510
+ var $xeSplit = this;
42511
+ var props = $xeSplit;
42512
+ var reactData = $xeSplit.reactData;
42513
+ var el = $xeSplit.$refs.refElem;
42514
+ if (!el) {
42515
+ return;
42516
+ }
42517
+ var vertical = props.vertical;
42518
+ var staticItems = reactData.staticItems;
42519
+ var isFoldNext = $xeSplit.computeIsFoldNext;
42520
+ var btnEl = evnt.currentTarget;
42521
+ var handleEl = btnEl.parentElement;
42522
+ var itemId = handleEl.getAttribute('itemid');
42523
+ var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, function (item) {
42524
+ return item.id === itemId;
42525
+ });
42526
+ var item = staticItems[itemIndex];
42527
+ var targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
42528
+ if (item) {
42529
+ var showAction = item.showAction,
42530
+ isExpand = item.isExpand;
42531
+ if (showAction) {
42532
+ if (vertical) {
42533
+ if (targetItem) {
42534
+ targetItem.isVisible = !isExpand;
42535
+ targetItem.foldHeight = 0;
42536
+ item.isExpand = !isExpand;
42537
+ item.isVisible = true;
42538
+ item.foldHeight = isExpand ? (targetItem.resizeHeight || targetItem.renderHeight) + (item.resizeHeight || item.renderHeight) : 0;
42539
+ }
42540
+ } else {
42541
+ if (targetItem) {
42542
+ targetItem.isVisible = !isExpand;
42543
+ targetItem.foldWidth = 0;
42544
+ item.isExpand = !isExpand;
42545
+ item.isVisible = true;
42546
+ item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
42547
+ }
42548
+ }
42549
+ $xeSplit.dispatchEvent(evnt.type === 'dblclick' ? 'action-dblclick' : 'action-click', {
42550
+ item: item,
42551
+ name: item.name,
42552
+ targetItem: targetItem,
42553
+ targetName: targetItem ? targetItem.name : '',
42554
+ expanded: item.isExpand
42555
+ }, evnt);
42556
+ $xeSplit.recalculate();
42557
+ }
42558
+ }
42559
+ },
42560
+ handleGlobalResizeEvent: function handleGlobalResizeEvent() {
42561
+ var $xeSplit = this;
42562
+ $xeSplit.recalculate();
42563
+ },
42564
+ getDefaultActionIcon: function getDefaultActionIcon(item) {
42565
+ var $xeSplit = this;
42566
+ var props = $xeSplit;
42567
+ var vertical = props.vertical;
42568
+ var showAction = item.showAction,
42569
+ isExpand = item.isExpand;
42570
+ var isFoldNext = $xeSplit.computeIsFoldNext;
42571
+ var topIcon = 'SPLIT_TOP_ACTION';
42572
+ var bottomIcon = 'SPLIT_BOTTOM_ACTION';
42573
+ var leftIcon = 'SPLIT_LEFT_ACTION';
42574
+ var rightIcon = 'SPLIT_RIGHT_ACTION';
42575
+ if (showAction) {
42576
+ var iconName = '';
42577
+ if (isFoldNext) {
42578
+ if (vertical) {
42579
+ iconName = isExpand ? bottomIcon : topIcon;
42580
+ } else {
42581
+ iconName = isExpand ? rightIcon : leftIcon;
42582
+ }
42583
+ } else {
42584
+ if (vertical) {
42585
+ iconName = isExpand ? topIcon : bottomIcon;
42586
+ } else {
42587
+ iconName = isExpand ? leftIcon : rightIcon;
42588
+ }
42589
+ }
42590
+ if (iconName) {
42591
+ return getIcon()[iconName];
42592
+ }
42593
+ }
42594
+ return '';
42404
42595
  },
42405
42596
  //
42406
42597
  // Render
42407
42598
  //
42599
+ renderHandleBar: function renderHandleBar(h, item) {
42600
+ var $xeSplit = this;
42601
+ var barStyle = $xeSplit.computeBarStyle;
42602
+ var actionOpts = $xeSplit.computeActionOpts;
42603
+ var isFoldNext = $xeSplit.computeIsFoldNext;
42604
+ var id = item.id,
42605
+ isExpand = item.isExpand,
42606
+ showAction = item.showAction;
42607
+ var btnOns = {};
42608
+ if (actionOpts.trigger === 'dblclick') {
42609
+ btnOns.dblclick = $xeSplit.handleItemActionEvent;
42610
+ } else {
42611
+ btnOns.click = $xeSplit.handleItemActionEvent;
42612
+ }
42613
+ return h('div', {
42614
+ attrs: {
42615
+ itemid: id
42616
+ },
42617
+ class: ['vxe-split-item-handle', isFoldNext ? 'to--next' : 'to--prev']
42618
+ }, [h('div', {
42619
+ class: 'vxe-split-item-handle-bar',
42620
+ style: barStyle,
42621
+ on: {
42622
+ mousedown: $xeSplit.dragEvent
42623
+ }
42624
+ }), showAction ? h('span', {
42625
+ class: 'vxe-split-item-action-btn',
42626
+ on: btnOns
42627
+ }, [h('i', {
42628
+ class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || $xeSplit.getDefaultActionIcon(item)
42629
+ })]) : renderEmptyElement($xeSplit)]);
42630
+ },
42408
42631
  renderItems: function renderItems(h) {
42409
42632
  var $xeSplit = this;
42410
42633
  var props = $xeSplit;
@@ -42413,52 +42636,55 @@ var es_string_split = __webpack_require__(744);
42413
42636
  padding = props.padding,
42414
42637
  vertical = props.vertical;
42415
42638
  var staticItems = reactData.staticItems;
42639
+ var isFoldNext = $xeSplit.computeIsFoldNext;
42416
42640
  var itemVNs = [];
42417
42641
  staticItems.forEach(function (item, index) {
42418
42642
  var id = item.id,
42419
42643
  slots = item.slots,
42420
42644
  renderHeight = item.renderHeight,
42421
- renderWidth = item.renderWidth;
42645
+ resizeHeight = item.resizeHeight,
42646
+ foldHeight = item.foldHeight,
42647
+ renderWidth = item.renderWidth,
42648
+ resizeWidth = item.resizeWidth,
42649
+ foldWidth = item.foldWidth,
42650
+ isVisible = item.isVisible,
42651
+ isExpand = item.isExpand;
42422
42652
  var defaultSlot = slots ? slots.default : null;
42423
42653
  var stys = {};
42654
+ var itemWidth = isVisible ? foldWidth || resizeWidth || renderWidth : 0;
42655
+ var itemHeight = isVisible ? foldHeight || resizeHeight || renderHeight : 0;
42424
42656
  if (vertical) {
42425
- if (renderHeight) {
42426
- stys.height = toCssUnit(renderHeight);
42657
+ if (itemHeight) {
42658
+ stys.height = toCssUnit(itemHeight);
42427
42659
  }
42428
42660
  } else {
42429
- if (renderWidth) {
42430
- stys.width = toCssUnit(renderWidth);
42661
+ if (itemWidth) {
42662
+ stys.width = toCssUnit(itemWidth);
42431
42663
  }
42432
42664
  }
42433
42665
  itemVNs.push(h('div', {
42434
42666
  attrs: {
42435
- xid: id
42667
+ itemid: id
42436
42668
  },
42437
42669
  class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
42438
42670
  'is--padding': padding,
42439
42671
  'is--border': border,
42440
- 'is--height': renderHeight,
42441
- 'is--width': renderWidth,
42442
- 'is--fill': !renderHeight && !renderWidth,
42443
- 'is--handle': index > 0
42672
+ 'is--height': itemHeight,
42673
+ 'is--width': itemWidth,
42674
+ 'is--fill': isVisible && !itemHeight && !itemWidth,
42675
+ 'is--handle': index > 0,
42676
+ 'is--expand': isExpand,
42677
+ 'is--hidden': !isVisible
42444
42678
  }],
42445
42679
  style: stys
42446
- }, [index ? h('div', {
42680
+ }, [index && !isFoldNext ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit), h('div', {
42447
42681
  attrs: {
42448
- xid: id
42449
- },
42450
- class: 'vxe-split-item-handle',
42451
- on: {
42452
- mousedown: $xeSplit.dragEvent
42453
- }
42454
- }) : renderEmptyElement($xeSplit), h('div', {
42455
- attrs: {
42456
- xid: id
42682
+ itemid: id
42457
42683
  },
42458
42684
  class: 'vxe-split-item--wrapper'
42459
42685
  }, [h('div', {
42460
42686
  class: 'vxe-split-item--inner'
42461
- }, defaultSlot ? $xeSplit.callSlot(defaultSlot, {}) : [])])]));
42687
+ }, defaultSlot ? $xeSplit.callSlot(defaultSlot, {}) : [])]), isFoldNext && index < staticItems.length - 1 ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit)]));
42462
42688
  });
42463
42689
  return h('div', {
42464
42690
  class: 'vxe-split-wrapper'
@@ -42488,6 +42714,20 @@ var es_string_split = __webpack_require__(744);
42488
42714
  }, defaultSlot ? defaultSlot({}) : []), $xeSplit.renderItems(h)]);
42489
42715
  }
42490
42716
  },
42717
+ created: function created() {
42718
+ var $xeSplit = this;
42719
+ globalEvents.on($xeSplit, 'resize', $xeSplit.handleGlobalResizeEvent);
42720
+ },
42721
+ mounted: function mounted() {
42722
+ var $xeSplit = this;
42723
+ $xeSplit.$nextTick(function () {
42724
+ $xeSplit.recalculate();
42725
+ });
42726
+ },
42727
+ beforeDestroy: function beforeDestroy() {
42728
+ var $xeSplit = this;
42729
+ globalEvents.off($xeSplit, 'resize');
42730
+ },
42491
42731
  render: function render(h) {
42492
42732
  return this.renderVN(h);
42493
42733
  }
@@ -42537,12 +42777,15 @@ function destroySplitItem($xeSplit, chunkConfig) {
42537
42777
 
42538
42778
 
42539
42779
 
42780
+
42540
42781
  /* harmony default export */ var split_item = (/* define-vxe-component start */defineVxeComponent({
42541
42782
  name: 'VxeSplitItem',
42542
42783
  mixins: [globalMixins.sizeMixin],
42543
42784
  props: {
42785
+ name: [Number, String],
42544
42786
  width: [Number, String],
42545
42787
  height: [Number, String],
42788
+ showAction: Boolean,
42546
42789
  minWidth: {
42547
42790
  type: [Number, String],
42548
42791
  default: function _default() {
@@ -42572,12 +42815,20 @@ function destroySplitItem($xeSplit, chunkConfig) {
42572
42815
  var reactData = {};
42573
42816
  var chunkConfig = {
42574
42817
  id: xID,
42818
+ name: '',
42575
42819
  width: 0,
42576
42820
  height: 0,
42577
42821
  minWidth: 0,
42578
42822
  minHeight: 0,
42823
+ showAction: false,
42824
+ isVisible: true,
42825
+ isExpand: true,
42579
42826
  renderWidth: 0,
42827
+ resizeWidth: 0,
42828
+ foldWidth: 0,
42580
42829
  renderHeight: 0,
42830
+ resizeHeight: 0,
42831
+ foldHeight: 0,
42581
42832
  slots: {}
42582
42833
  };
42583
42834
  return {
@@ -42588,6 +42839,11 @@ function destroySplitItem($xeSplit, chunkConfig) {
42588
42839
  },
42589
42840
  computed: _objectSpread2({}, {}),
42590
42841
  watch: {
42842
+ name: function name(val) {
42843
+ var $xeSplitItem = this;
42844
+ var chunkConfig = $xeSplitItem.chunkConfig;
42845
+ chunkConfig.name = val;
42846
+ },
42591
42847
  width: function width(val) {
42592
42848
  var $xeSplitItem = this;
42593
42849
  var chunkConfig = $xeSplitItem.chunkConfig;
@@ -42607,6 +42863,11 @@ function destroySplitItem($xeSplit, chunkConfig) {
42607
42863
  var $xeSplitItem = this;
42608
42864
  var chunkConfig = $xeSplitItem.chunkConfig;
42609
42865
  chunkConfig.minHeight = val;
42866
+ },
42867
+ showAction: function showAction(val) {
42868
+ var $xeSplitItem = this;
42869
+ var chunkConfig = $xeSplitItem.chunkConfig;
42870
+ chunkConfig.showAction = val;
42610
42871
  }
42611
42872
  },
42612
42873
  methods: {
@@ -42634,12 +42895,12 @@ function destroySplitItem($xeSplit, chunkConfig) {
42634
42895
  var slots = $xeSplitItem.$scopedSlots;
42635
42896
  var chunkConfig = $xeSplitItem.chunkConfig;
42636
42897
  Object.assign(chunkConfig, {
42898
+ name: props.name,
42637
42899
  width: props.width,
42638
42900
  height: props.height,
42639
42901
  minWidth: props.minWidth,
42640
42902
  minHeight: props.minHeight,
42641
- renderWidth: 0,
42642
- renderHeight: 0,
42903
+ showAction: props.showAction,
42643
42904
  slots: slots
42644
42905
  });
42645
42906
  },