vxe-pc-ui 3.9.0 → 3.9.2

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 (51) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/split/src/split-pane.js +3 -3
  3. package/es/split/src/split.js +239 -139
  4. package/es/split/style.css +82 -45
  5. package/es/split/style.min.css +1 -1
  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 +3 -1
  11. package/es/vxe-split/style.css +82 -45
  12. package/es/vxe-split/style.min.css +1 -1
  13. package/lib/icon/style/style.css +1 -1
  14. package/lib/icon/style/style.min.css +1 -1
  15. package/lib/index.umd.js +267 -166
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/split/src/split-pane.js +3 -3
  18. package/lib/split/src/split-pane.min.js +1 -1
  19. package/lib/split/src/split.js +258 -160
  20. package/lib/split/src/split.min.js +1 -1
  21. package/lib/split/style/style.css +82 -45
  22. package/lib/split/style/style.min.css +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/ui/index.js +1 -1
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/upload/src/upload.js +3 -1
  30. package/lib/upload/src/upload.min.js +1 -1
  31. package/lib/vxe-split/style/style.css +82 -45
  32. package/lib/vxe-split/style/style.min.css +1 -1
  33. package/package.json +1 -1
  34. package/packages/split/src/split-pane.ts +4 -3
  35. package/packages/split/src/split.ts +236 -141
  36. package/packages/upload/src/upload.ts +3 -1
  37. package/styles/components/split.scss +109 -88
  38. package/types/components/split-pane.d.ts +11 -2
  39. package/types/components/split.d.ts +26 -20
  40. /package/es/icon/{iconfont.1756083812307.ttf → iconfont.1756133785685.ttf} +0 -0
  41. /package/es/icon/{iconfont.1756083812307.woff → iconfont.1756133785685.woff} +0 -0
  42. /package/es/icon/{iconfont.1756083812307.woff2 → iconfont.1756133785685.woff2} +0 -0
  43. /package/es/{iconfont.1756083812307.ttf → iconfont.1756133785685.ttf} +0 -0
  44. /package/es/{iconfont.1756083812307.woff → iconfont.1756133785685.woff} +0 -0
  45. /package/es/{iconfont.1756083812307.woff2 → iconfont.1756133785685.woff2} +0 -0
  46. /package/lib/icon/style/{iconfont.1756083812307.ttf → iconfont.1756133785685.ttf} +0 -0
  47. /package/lib/icon/style/{iconfont.1756083812307.woff → iconfont.1756133785685.woff} +0 -0
  48. /package/lib/icon/style/{iconfont.1756083812307.woff2 → iconfont.1756133785685.woff2} +0 -0
  49. /package/lib/{iconfont.1756083812307.ttf → iconfont.1756133785685.ttf} +0 -0
  50. /package/lib/{iconfont.1756083812307.woff → iconfont.1756133785685.woff} +0 -0
  51. /package/lib/{iconfont.1756083812307.woff2 → iconfont.1756133785685.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -12426,14 +12426,14 @@ function checkDynamic() {
12426
12426
  }
12427
12427
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
12428
12428
 
12429
- var log_version = "ui v".concat("3.9.0");
12429
+ var log_version = "ui v".concat("3.9.2");
12430
12430
  var warnLog = log.create('warn', log_version);
12431
12431
  var errLog = log.create('error', log_version);
12432
12432
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
12433
12433
 
12434
12434
 
12435
12435
 
12436
- var ui_version = "3.9.0";
12436
+ var ui_version = "3.9.2";
12437
12437
  index_esm_VxeUI.uiVersion = ui_version;
12438
12438
  index_esm_VxeUI.dynamicApp = dynamicApp;
12439
12439
  function config(options) {
@@ -45562,6 +45562,7 @@ var es_string_split = __webpack_require__(744);
45562
45562
 
45563
45563
 
45564
45564
 
45565
+
45565
45566
  /* harmony default export */ var split = (/* define-vxe-component start */defineVxeComponent({
45566
45567
  name: 'VxeSplit',
45567
45568
  mixins: [globalMixins.sizeMixin],
@@ -45602,7 +45603,9 @@ var es_string_split = __webpack_require__(744);
45602
45603
  var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
45603
45604
  var reactData = {
45604
45605
  staticItems: [],
45605
- itemList: []
45606
+ itemList: [],
45607
+ barWidth: 0,
45608
+ barHeight: 0
45606
45609
  };
45607
45610
  var internalData = {
45608
45611
  wrapperWidth: 0,
@@ -45651,7 +45654,7 @@ var es_string_split = __webpack_require__(744);
45651
45654
  var $xeSplit = this;
45652
45655
  var reactData = $xeSplit.reactData;
45653
45656
  return reactData.itemList.filter(function (item) {
45654
- return item.isVisible;
45657
+ return item.isExpand;
45655
45658
  });
45656
45659
  },
45657
45660
  computeAutoItems: function computeAutoItems() {
@@ -45702,10 +45705,21 @@ var es_string_split = __webpack_require__(744);
45702
45705
  var $xeSplit = this;
45703
45706
  var props = $xeSplit;
45704
45707
  var reactData = $xeSplit.reactData;
45708
+ var actionOpts = $xeSplit.computeActionOpts;
45709
+ var showPrevButton = actionOpts.showPrevButton,
45710
+ showNextButton = actionOpts.showNextButton;
45705
45711
  if (props.items && props.items.length) {
45706
45712
  errLog('vxe.error.errConflicts', ['<vxe-split-pane ...>', 'items']);
45707
45713
  }
45708
- reactData.itemList = reactData.staticItems;
45714
+ reactData.itemList = reactData.staticItems || [];
45715
+ if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
45716
+ errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-split-pane ...> Only supports 2 panel']);
45717
+ }
45718
+ reactData.itemList.forEach(function (item) {
45719
+ if (item.showAction) {
45720
+ warnLog('vxe.error.removeProp', ['showAction']);
45721
+ }
45722
+ });
45709
45723
  $xeSplit.recalculate();
45710
45724
  }
45711
45725
  },
@@ -45738,7 +45752,6 @@ var es_string_split = __webpack_require__(744);
45738
45752
  var itemList = reactData.itemList;
45739
45753
  itemList.forEach(function (item) {
45740
45754
  item.isExpand = true;
45741
- item.isVisible = true;
45742
45755
  item.foldHeight = 0;
45743
45756
  item.foldWidth = 0;
45744
45757
  item.resizeHeight = 0;
@@ -45752,7 +45765,6 @@ var es_string_split = __webpack_require__(744);
45752
45765
  var reactData = $xeSplit.reactData;
45753
45766
  var staticItems = reactData.staticItems;
45754
45767
  var itemDef = {
45755
- isVisible: true,
45756
45768
  isExpand: true,
45757
45769
  renderWidth: 0,
45758
45770
  resizeWidth: 0,
@@ -45797,6 +45809,7 @@ var es_string_split = __webpack_require__(744);
45797
45809
  var vertical = props.vertical;
45798
45810
  var itemList = reactData.itemList;
45799
45811
  var el = $xeSplit.$refs.refElem;
45812
+ var barInfoElem = $xeSplit.$refs.refBarInfoElem;
45800
45813
  if (!el) {
45801
45814
  return;
45802
45815
  }
@@ -45805,6 +45818,12 @@ var es_string_split = __webpack_require__(744);
45805
45818
  if (!wWidth || !wHeight) {
45806
45819
  return;
45807
45820
  }
45821
+ if (barInfoElem) {
45822
+ reactData.barWidth = barInfoElem.offsetWidth;
45823
+ reactData.barHeight = barInfoElem.offsetHeight;
45824
+ }
45825
+ var contentWidth = wWidth - (vertical ? 0 : reactData.barWidth * (itemList.length - 1));
45826
+ var contentHeight = wHeight - (vertical ? reactData.barHeight * (itemList.length - 1) : 0);
45808
45827
  var itemOpts = $xeSplit.computeItemOpts;
45809
45828
  var allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45810
45829
  var allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
@@ -45816,7 +45835,7 @@ var es_string_split = __webpack_require__(744);
45816
45835
  var itemHeight = 0;
45817
45836
  if (height) {
45818
45837
  if (isScale(height)) {
45819
- itemHeight = wHeight * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(height) / 100;
45838
+ itemHeight = contentHeight * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(height) / 100;
45820
45839
  } else {
45821
45840
  itemHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(height);
45822
45841
  }
@@ -45827,7 +45846,7 @@ var es_string_split = __webpack_require__(744);
45827
45846
  countHeight += itemHeight;
45828
45847
  });
45829
45848
  if (residueItems.length) {
45830
- var reMeanHeight = (wHeight - countHeight) / residueItems.length;
45849
+ var reMeanHeight = (contentHeight - countHeight) / residueItems.length;
45831
45850
  residueItems.forEach(function (item) {
45832
45851
  item.renderHeight = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight)), reMeanHeight);
45833
45852
  });
@@ -45839,7 +45858,7 @@ var es_string_split = __webpack_require__(744);
45839
45858
  var itemWidth = 0;
45840
45859
  if (width) {
45841
45860
  if (isScale(width)) {
45842
- itemWidth = wWidth * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(width) / 100;
45861
+ itemWidth = contentWidth * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(width) / 100;
45843
45862
  } else {
45844
45863
  itemWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(width);
45845
45864
  }
@@ -45850,14 +45869,14 @@ var es_string_split = __webpack_require__(744);
45850
45869
  countWidth += itemWidth;
45851
45870
  });
45852
45871
  if (residueItems.length) {
45853
- var reMeanWidth = (wWidth - countWidth) / residueItems.length;
45872
+ var reMeanWidth = (contentWidth - countWidth) / residueItems.length;
45854
45873
  residueItems.forEach(function (item) {
45855
45874
  item.renderWidth = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth)), reMeanWidth);
45856
45875
  });
45857
45876
  }
45858
45877
  }
45859
- internalData.wrapperWidth = wWidth;
45860
- internalData.wrapperHeight = wHeight;
45878
+ internalData.wrapperWidth = contentWidth;
45879
+ internalData.wrapperHeight = contentHeight;
45861
45880
  });
45862
45881
  },
45863
45882
  dragEvent: function dragEvent(evnt) {
@@ -45877,35 +45896,31 @@ var es_string_split = __webpack_require__(744);
45877
45896
  if (!el) {
45878
45897
  return;
45879
45898
  }
45880
- var itemId = handleEl.getAttribute('itemid');
45881
- var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, function (item) {
45882
- return item.id === itemId;
45883
- });
45884
- var item = itemList[itemIndex];
45885
- if (!item) {
45899
+ var prevEl = handleEl.previousElementSibling;
45900
+ var nextEl = handleEl.nextElementSibling;
45901
+ if (!prevEl || !nextEl) {
45886
45902
  return;
45887
45903
  }
45888
- if (!item.isExpand) {
45904
+ var prevId = prevEl.getAttribute('itemid');
45905
+ var nextId = nextEl.getAttribute('itemid');
45906
+ var prevItem = itemList.find(function (item) {
45907
+ return item.id === prevId;
45908
+ });
45909
+ var nextItem = itemList.find(function (item) {
45910
+ return item.id === nextId;
45911
+ });
45912
+ if (!prevItem || !nextItem) {
45889
45913
  return;
45890
45914
  }
45891
45915
  var containerRect = el.getBoundingClientRect();
45892
45916
  var barRect = barEl.getBoundingClientRect();
45893
45917
  var rsSplitLineEl = $xeSplit.$refs.refResizableSplitTip;
45894
45918
  var rsSplitTipEl = rsSplitLineEl ? rsSplitLineEl.children[0] : null;
45895
- var isFoldNext = $xeSplit.computeIsFoldNext;
45896
45919
  var itemOpts = $xeSplit.computeItemOpts;
45897
45920
  var resizeOpts = $xeSplit.computeResizeOpts;
45898
45921
  var immediate = resizeOpts.immediate;
45899
45922
  var allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45900
45923
  var allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
45901
- var targetItem = itemList[itemIndex + (isFoldNext ? 1 : -1)];
45902
- var prevItem = itemList[itemIndex + (isFoldNext ? 0 : -1)];
45903
- var nextItem = itemList[itemIndex + (isFoldNext ? 1 : 0)];
45904
- var prevEl = targetItem ? el.querySelector(".vxe-split-pane[itemid=\"".concat(prevItem.id, "\"]")) : null;
45905
- var nextEl = item ? el.querySelector(".vxe-split-pane[itemid=\"".concat(nextItem.id, "\"]")) : null;
45906
- if (!prevEl || !nextEl) {
45907
- return;
45908
- }
45909
45924
  var barOffsetX = Math.ceil(barRect.width - (evnt.clientX - barRect.left));
45910
45925
  var barOffsetY = Math.ceil(evnt.clientY - barRect.top);
45911
45926
  var prevWidth = prevEl.offsetWidth;
@@ -46042,8 +46057,6 @@ var es_string_split = __webpack_require__(744);
46042
46057
  handleReStyle(evnt);
46043
46058
  }
46044
46059
  $xeSplit.dispatchEvent('resize-drag', {
46045
- item: item,
46046
- name: item.name,
46047
46060
  prevItem: prevItem,
46048
46061
  nextItem: nextItem,
46049
46062
  offsetHeight: targetOffsetHeight,
@@ -46063,8 +46076,6 @@ var es_string_split = __webpack_require__(744);
46063
46076
  handleUpdate();
46064
46077
  removeClass(el, 'is--drag');
46065
46078
  $xeSplit.dispatchEvent('resize-end', {
46066
- item: item,
46067
- name: item.name,
46068
46079
  prevItem: prevItem,
46069
46080
  nextItem: nextItem,
46070
46081
  offsetHeight: targetOffsetHeight,
@@ -46079,173 +46090,250 @@ var es_string_split = __webpack_require__(744);
46079
46090
  handleDrag(evnt);
46080
46091
  addClass(el, 'is--drag');
46081
46092
  $xeSplit.dispatchEvent('resize-start', {
46082
- item: item,
46083
- name: item.name,
46084
46093
  prevItem: prevItem,
46085
46094
  nextItem: nextItem
46086
46095
  }, evnt);
46087
46096
  },
46088
- handleItemActionEvent: function handleItemActionEvent(evnt) {
46097
+ handleItemActionEvent: function handleItemActionEvent(evnt, prevItem, nextItem, isNext) {
46089
46098
  var $xeSplit = this;
46090
46099
  var props = $xeSplit;
46100
+ var vertical = props.vertical;
46101
+ var expanded = false;
46102
+ var item = prevItem;
46103
+ if (isNext) {
46104
+ item = nextItem;
46105
+ expanded = !nextItem.isExpand;
46106
+ nextItem.isExpand = expanded;
46107
+ } else {
46108
+ expanded = !prevItem.isExpand;
46109
+ prevItem.isExpand = expanded;
46110
+ }
46111
+ if (vertical) {
46112
+ if (prevItem.isExpand && nextItem.isExpand) {
46113
+ prevItem.foldHeight = 0;
46114
+ nextItem.foldHeight = 0;
46115
+ } else if (prevItem.isExpand) {
46116
+ nextItem.foldHeight = 0;
46117
+ prevItem.foldHeight = (prevItem.resizeHeight || prevItem.renderHeight) + (nextItem.resizeHeight || nextItem.renderHeight);
46118
+ } else {
46119
+ prevItem.foldHeight = 0;
46120
+ nextItem.foldHeight = (prevItem.resizeHeight || prevItem.renderHeight) + (nextItem.resizeHeight || nextItem.renderHeight);
46121
+ }
46122
+ } else {
46123
+ if (prevItem.isExpand && nextItem.isExpand) {
46124
+ prevItem.foldWidth = 0;
46125
+ nextItem.foldWidth = 0;
46126
+ } else if (prevItem.isExpand) {
46127
+ nextItem.foldWidth = 0;
46128
+ prevItem.foldWidth = (prevItem.resizeWidth || prevItem.renderWidth) + (nextItem.resizeWidth || nextItem.renderWidth);
46129
+ } else {
46130
+ prevItem.foldWidth = 0;
46131
+ nextItem.foldWidth = (prevItem.resizeWidth || prevItem.renderWidth) + (nextItem.resizeWidth || nextItem.renderWidth);
46132
+ }
46133
+ }
46134
+ $xeSplit.dispatchEvent('toggle-expand', {
46135
+ prevItem: prevItem,
46136
+ nextItem: nextItem,
46137
+ expanded: expanded,
46138
+ item: item
46139
+ }, evnt);
46140
+ $xeSplit.recalculate();
46141
+ },
46142
+ handlePrevActionDblclickEvent: function handlePrevActionDblclickEvent(evnt) {
46143
+ var $xeSplit = this;
46091
46144
  var reactData = $xeSplit.reactData;
46092
- var el = $xeSplit.$refs.refElem;
46093
- if (!el) {
46094
- return;
46145
+ var itemList = reactData.itemList;
46146
+ var actionOpts = $xeSplit.computeActionOpts;
46147
+ var btnEl = evnt.currentTarget;
46148
+ var btnWrapperEl = btnEl.parentElement;
46149
+ var handleEl = btnWrapperEl.parentElement;
46150
+ var prevEl = handleEl.previousElementSibling;
46151
+ var prevId = prevEl.getAttribute('itemid');
46152
+ var prevItem = itemList.find(function (item) {
46153
+ return item.id === prevId;
46154
+ });
46155
+ var nextEl = handleEl.nextElementSibling;
46156
+ var nextId = nextEl.getAttribute('itemid');
46157
+ var nextItem = itemList.find(function (item) {
46158
+ return item.id === nextId;
46159
+ });
46160
+ if (actionOpts.trigger === 'dblclick') {
46161
+ if (prevItem && nextItem && nextItem.isExpand) {
46162
+ $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, false);
46163
+ }
46095
46164
  }
46096
- var vertical = props.vertical;
46165
+ $xeSplit.dispatchEvent('action-dblclick', {
46166
+ prevItem: prevItem,
46167
+ nextItem: nextItem
46168
+ }, evnt);
46169
+ },
46170
+ handlePrevActionClickEvent: function handlePrevActionClickEvent(evnt) {
46171
+ var $xeSplit = this;
46172
+ var reactData = $xeSplit.reactData;
46097
46173
  var itemList = reactData.itemList;
46098
- var isFoldNext = $xeSplit.computeIsFoldNext;
46174
+ var actionOpts = $xeSplit.computeActionOpts;
46099
46175
  var btnEl = evnt.currentTarget;
46100
- var handleEl = btnEl.parentElement;
46101
- var itemId = handleEl.getAttribute('itemid');
46102
- var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, function (item) {
46103
- return item.id === itemId;
46176
+ var btnWrapperEl = btnEl.parentElement;
46177
+ var handleEl = btnWrapperEl.parentElement;
46178
+ var prevEl = handleEl.previousElementSibling;
46179
+ var prevId = prevEl.getAttribute('itemid');
46180
+ var prevItem = itemList.find(function (item) {
46181
+ return item.id === prevId;
46104
46182
  });
46105
- var item = itemList[itemIndex];
46106
- var targetItem = itemList[itemIndex + (isFoldNext ? 1 : -1)];
46107
- if (item) {
46108
- var showAction = item.showAction,
46109
- isExpand = item.isExpand;
46110
- if (showAction) {
46111
- if (vertical) {
46112
- if (targetItem) {
46113
- targetItem.isVisible = !isExpand;
46114
- targetItem.foldHeight = 0;
46115
- item.isExpand = !isExpand;
46116
- item.isVisible = true;
46117
- item.foldHeight = isExpand ? (targetItem.resizeHeight || targetItem.renderHeight) + (item.resizeHeight || item.renderHeight) : 0;
46118
- }
46119
- } else {
46120
- if (targetItem) {
46121
- targetItem.isVisible = !isExpand;
46122
- targetItem.foldWidth = 0;
46123
- item.isExpand = !isExpand;
46124
- item.isVisible = true;
46125
- item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
46126
- }
46127
- }
46128
- $xeSplit.dispatchEvent('toggle-expand', {
46129
- item: item,
46130
- name: item.name,
46131
- targetItem: targetItem,
46132
- targetName: targetItem ? targetItem.name : '',
46133
- expanded: item.isExpand
46134
- }, evnt);
46135
- $xeSplit.recalculate();
46183
+ var nextEl = handleEl.nextElementSibling;
46184
+ var nextId = nextEl.getAttribute('itemid');
46185
+ var nextItem = itemList.find(function (item) {
46186
+ return item.id === nextId;
46187
+ });
46188
+ if (actionOpts.trigger !== 'dblclick') {
46189
+ if (prevItem && nextItem && nextItem.isExpand) {
46190
+ $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, false);
46136
46191
  }
46137
46192
  }
46193
+ $xeSplit.dispatchEvent('action-click', {
46194
+ prevItem: prevItem,
46195
+ nextItem: nextItem
46196
+ }, evnt);
46138
46197
  },
46139
- handleActionDblclickEvent: function handleActionDblclickEvent(evnt) {
46198
+ handleNextActionDblclickEvent: function handleNextActionDblclickEvent(evnt) {
46140
46199
  var $xeSplit = this;
46141
46200
  var reactData = $xeSplit.reactData;
46142
46201
  var itemList = reactData.itemList;
46143
46202
  var actionOpts = $xeSplit.computeActionOpts;
46144
46203
  var btnEl = evnt.currentTarget;
46145
- var handleEl = btnEl.parentElement;
46146
- var itemId = handleEl.getAttribute('itemid');
46147
- var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, function (item) {
46148
- return item.id === itemId;
46204
+ var btnWrapperEl = btnEl.parentElement;
46205
+ var handleEl = btnWrapperEl.parentElement;
46206
+ var prevEl = handleEl.previousElementSibling;
46207
+ var prevId = prevEl.getAttribute('itemid');
46208
+ var prevItem = itemList.find(function (item) {
46209
+ return item.id === prevId;
46210
+ });
46211
+ var nextEl = handleEl.nextElementSibling;
46212
+ var nextId = nextEl.getAttribute('itemid');
46213
+ var nextItem = itemList.find(function (item) {
46214
+ return item.id === nextId;
46149
46215
  });
46150
- var item = itemList[itemIndex];
46151
46216
  if (actionOpts.trigger === 'dblclick') {
46152
- $xeSplit.handleItemActionEvent(evnt);
46217
+ if (prevItem && nextItem && prevItem.isExpand) {
46218
+ $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, true);
46219
+ }
46153
46220
  }
46154
46221
  $xeSplit.dispatchEvent('action-dblclick', {
46155
- item: item,
46156
- name: item ? item.name : ''
46222
+ prevItem: prevItem,
46223
+ nextItem: nextItem
46157
46224
  }, evnt);
46158
46225
  },
46159
- handleActionClickEvent: function handleActionClickEvent(evnt) {
46226
+ handleNextActionClickEvent: function handleNextActionClickEvent(evnt) {
46160
46227
  var $xeSplit = this;
46161
46228
  var reactData = $xeSplit.reactData;
46162
46229
  var itemList = reactData.itemList;
46163
46230
  var actionOpts = $xeSplit.computeActionOpts;
46164
46231
  var btnEl = evnt.currentTarget;
46165
- var handleEl = btnEl.parentElement;
46166
- var itemId = handleEl.getAttribute('itemid');
46167
- var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(itemList, function (item) {
46168
- return item.id === itemId;
46232
+ var btnWrapperEl = btnEl.parentElement;
46233
+ var handleEl = btnWrapperEl.parentElement;
46234
+ var prevEl = handleEl.previousElementSibling;
46235
+ var prevId = prevEl.getAttribute('itemid');
46236
+ var prevItem = itemList.find(function (item) {
46237
+ return item.id === prevId;
46238
+ });
46239
+ var nextEl = handleEl.nextElementSibling;
46240
+ var nextId = nextEl.getAttribute('itemid');
46241
+ var nextItem = itemList.find(function (item) {
46242
+ return item.id === nextId;
46169
46243
  });
46170
- var item = itemList[itemIndex];
46171
46244
  if (actionOpts.trigger !== 'dblclick') {
46172
- $xeSplit.handleItemActionEvent(evnt);
46245
+ if (prevItem && nextItem && prevItem.isExpand) {
46246
+ $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, true);
46247
+ }
46173
46248
  }
46174
46249
  $xeSplit.dispatchEvent('action-click', {
46175
- item: item,
46176
- name: item ? item.name : ''
46250
+ prevItem: prevItem,
46251
+ nextItem: nextItem
46177
46252
  }, evnt);
46178
46253
  },
46179
46254
  handleGlobalResizeEvent: function handleGlobalResizeEvent() {
46180
46255
  var $xeSplit = this;
46181
46256
  $xeSplit.recalculate();
46182
46257
  },
46183
- getDefaultActionIcon: function getDefaultActionIcon(item) {
46258
+ getActionIcon: function getActionIcon(prevItem, nextItem, isNext) {
46184
46259
  var $xeSplit = this;
46185
46260
  var props = $xeSplit;
46186
46261
  var vertical = props.vertical;
46187
- var showAction = item.showAction,
46188
- isExpand = item.isExpand;
46189
- var isFoldNext = $xeSplit.computeIsFoldNext;
46190
46262
  var topIcon = 'SPLIT_TOP_ACTION';
46191
46263
  var bottomIcon = 'SPLIT_BOTTOM_ACTION';
46192
46264
  var leftIcon = 'SPLIT_LEFT_ACTION';
46193
46265
  var rightIcon = 'SPLIT_RIGHT_ACTION';
46194
- if (showAction) {
46195
- var iconName = '';
46196
- if (isFoldNext) {
46197
- if (vertical) {
46198
- iconName = isExpand ? bottomIcon : topIcon;
46199
- } else {
46200
- iconName = isExpand ? rightIcon : leftIcon;
46201
- }
46266
+ var iconName = '';
46267
+ if (vertical) {
46268
+ if (isNext) {
46269
+ iconName = nextItem.isExpand ? bottomIcon : topIcon;
46202
46270
  } else {
46203
- if (vertical) {
46204
- iconName = isExpand ? topIcon : bottomIcon;
46205
- } else {
46206
- iconName = isExpand ? leftIcon : rightIcon;
46207
- }
46271
+ iconName = prevItem.isExpand ? topIcon : bottomIcon;
46208
46272
  }
46209
- if (iconName) {
46210
- return getIcon()[iconName];
46273
+ } else {
46274
+ if (isNext) {
46275
+ iconName = nextItem.isExpand ? rightIcon : leftIcon;
46276
+ } else {
46277
+ iconName = prevItem.isExpand ? leftIcon : rightIcon;
46211
46278
  }
46212
46279
  }
46280
+ if (iconName) {
46281
+ return getIcon()[iconName];
46282
+ }
46213
46283
  return '';
46214
46284
  },
46215
46285
  //
46216
46286
  // Render
46217
46287
  //
46218
- renderHandleBar: function renderHandleBar(h, item) {
46288
+ renderHandleBar: function renderHandleBar(h, prevItem, nextItem) {
46219
46289
  var $xeSplit = this;
46290
+ var props = $xeSplit;
46291
+ var reactData = $xeSplit.reactData;
46292
+ var border = props.border,
46293
+ resize = props.resize,
46294
+ vertical = props.vertical;
46295
+ var itemList = reactData.itemList;
46220
46296
  var barStyle = $xeSplit.computeBarStyle;
46221
46297
  var actionOpts = $xeSplit.computeActionOpts;
46222
- var isFoldNext = $xeSplit.computeIsFoldNext;
46223
- var id = item.id,
46224
- isExpand = item.isExpand,
46225
- showAction = item.showAction;
46226
- var btnOns = {};
46227
- if (actionOpts.trigger === 'dblclick') {
46228
- btnOns.dblclick = $xeSplit.handleItemActionEvent;
46229
- } else {
46230
- btnOns.click = $xeSplit.handleItemActionEvent;
46231
- }
46298
+ var direction = actionOpts.direction;
46299
+ var showPrevButton = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(actionOpts.showPrevButton) ? actionOpts.showPrevButton : itemList.some(function (item) {
46300
+ return item.showAction;
46301
+ });
46302
+ var showNextButton = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(actionOpts.showNextButton) ? actionOpts.showNextButton : direction === 'next' && itemList.some(function (item) {
46303
+ return item.showAction;
46304
+ });
46305
+ var resizeOpts = $xeSplit.computeResizeOpts;
46306
+ var immediate = resizeOpts.immediate;
46232
46307
  return h('div', {
46233
- attrs: {
46234
- itemid: id
46235
- },
46236
- class: ['vxe-split-pane-handle', isFoldNext ? 'to--next' : 'to--prev']
46308
+ class: ['vxe-split-pane-handle', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', {
46309
+ 'is--resize': resize,
46310
+ 'is--border': border
46311
+ }]
46237
46312
  }, [h('div', {
46238
46313
  class: 'vxe-split-pane-handle-bar',
46239
46314
  style: barStyle,
46240
46315
  on: {
46241
46316
  mousedown: $xeSplit.dragEvent
46242
46317
  }
46243
- }), showAction ? h('span', {
46318
+ }), itemList.length === 2 ? h('div', {
46319
+ class: 'vxe-split-pane-action-btn-wrapper'
46320
+ }, [showPrevButton && nextItem.isExpand ? h('div', {
46321
+ class: 'vxe-split-pane-action-btn',
46322
+ on: {
46323
+ dblclick: $xeSplit.handlePrevActionDblclickEvent,
46324
+ click: $xeSplit.handlePrevActionClickEvent
46325
+ }
46326
+ }, [h('i', {
46327
+ class: $xeSplit.getActionIcon(prevItem, nextItem, false)
46328
+ })]) : renderEmptyElement($xeSplit), showNextButton && prevItem.isExpand ? h('div', {
46244
46329
  class: 'vxe-split-pane-action-btn',
46245
- on: btnOns
46330
+ on: {
46331
+ dblclick: $xeSplit.handleNextActionDblclickEvent,
46332
+ click: $xeSplit.handleNextActionClickEvent
46333
+ }
46246
46334
  }, [h('i', {
46247
- class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || $xeSplit.getDefaultActionIcon(item)
46248
- })]) : renderEmptyElement($xeSplit)]);
46335
+ class: $xeSplit.getActionIcon(prevItem, nextItem, true)
46336
+ })]) : renderEmptyElement($xeSplit)]) : renderEmptyElement($xeSplit)]);
46249
46337
  },
46250
46338
  renderItems: function renderItems(h) {
46251
46339
  var $xeSplit = this;
@@ -46260,44 +46348,45 @@ var es_string_split = __webpack_require__(744);
46260
46348
  var immediate = resizeOpts.immediate;
46261
46349
  var visibleItems = $xeSplit.computeVisibleItems;
46262
46350
  var autoItems = $xeSplit.computeAutoItems.autoItems;
46263
- var isFoldNext = $xeSplit.computeIsFoldNext;
46264
46351
  var itemVNs = [];
46265
- itemList.forEach(function (item, index) {
46266
- var id = item.id,
46267
- name = item.name,
46268
- slots = item.slots,
46269
- renderHeight = item.renderHeight,
46270
- resizeHeight = item.resizeHeight,
46271
- foldHeight = item.foldHeight,
46272
- renderWidth = item.renderWidth,
46273
- resizeWidth = item.resizeWidth,
46274
- foldWidth = item.foldWidth,
46275
- isVisible = item.isVisible,
46276
- isExpand = item.isExpand;
46352
+ itemList.forEach(function (prevItem, index) {
46353
+ var id = prevItem.id,
46354
+ name = prevItem.name,
46355
+ slots = prevItem.slots,
46356
+ renderHeight = prevItem.renderHeight,
46357
+ resizeHeight = prevItem.resizeHeight,
46358
+ foldHeight = prevItem.foldHeight,
46359
+ renderWidth = prevItem.renderWidth,
46360
+ resizeWidth = prevItem.resizeWidth,
46361
+ foldWidth = prevItem.foldWidth,
46362
+ isExpand = prevItem.isExpand;
46363
+ var nextItem = itemList[index + 1];
46277
46364
  var defaultSlot = slots ? slots.default : null;
46278
46365
  var stys = {};
46279
- var itemWidth = isVisible ? foldWidth || resizeWidth || renderWidth : 0;
46280
- var itemHeight = isVisible ? foldHeight || resizeHeight || renderHeight : 0;
46366
+ var itemWidth = isExpand ? foldWidth || resizeWidth || renderWidth : 0;
46367
+ var itemHeight = isExpand ? foldHeight || resizeHeight || renderHeight : 0;
46281
46368
  // 至少存在一个自适应
46282
46369
  if (autoItems.length === 1) {
46283
46370
  if (vertical) {
46284
- if (!item.height) {
46371
+ if (!prevItem.height) {
46285
46372
  itemHeight = 0;
46286
46373
  }
46287
46374
  } else {
46288
- if (!item.width) {
46375
+ if (!prevItem.width) {
46289
46376
  itemWidth = 0;
46290
46377
  }
46291
46378
  }
46292
46379
  }
46293
- // 当只剩下一个可视区自动占用 100%
46380
+ var isFill = true;
46294
46381
  if (vertical) {
46295
- if (itemHeight) {
46296
- stys.height = visibleItems.length === 1 ? '100%' : toCssUnit(itemHeight);
46382
+ if (itemHeight && visibleItems.length > 1) {
46383
+ isFill = false;
46384
+ stys.height = toCssUnit(itemHeight);
46297
46385
  }
46298
46386
  } else {
46299
- if (itemWidth) {
46300
- stys.width = visibleItems.length === 1 ? '100%' : toCssUnit(itemWidth);
46387
+ if (itemWidth && visibleItems.length > 1) {
46388
+ isFill = false;
46389
+ stys.width = toCssUnit(itemWidth);
46301
46390
  }
46302
46391
  }
46303
46392
  itemVNs.push(h('div', {
@@ -46310,13 +46399,12 @@ var es_string_split = __webpack_require__(744);
46310
46399
  'is--border': border,
46311
46400
  'is--height': itemHeight,
46312
46401
  'is--width': itemWidth,
46313
- 'is--fill': isVisible && !itemHeight && !itemWidth,
46314
- 'is--handle': index > 0,
46315
- 'is--expand': isExpand,
46316
- 'is--hidden': !isVisible
46402
+ 'is--visible': isExpand,
46403
+ 'is--hidden': !isExpand,
46404
+ 'is--fill': isExpand && isFill
46317
46405
  }],
46318
46406
  style: stys
46319
- }, [index && !isFoldNext ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit), h('div', {
46407
+ }, [h('div', {
46320
46408
  attrs: {
46321
46409
  itemid: id
46322
46410
  },
@@ -46325,9 +46413,11 @@ var es_string_split = __webpack_require__(744);
46325
46413
  class: 'vxe-split-pane--inner'
46326
46414
  }, defaultSlot ? $xeSplit.callSlot(defaultSlot, {
46327
46415
  name: name,
46328
- isVisible: isVisible,
46329
46416
  isExpand: isExpand
46330
- }) : [])]), isFoldNext && index < itemList.length - 1 ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit)]));
46417
+ }) : [])])]));
46418
+ if (nextItem) {
46419
+ itemVNs.push($xeSplit.renderHandleBar(h, prevItem, nextItem));
46420
+ }
46331
46421
  });
46332
46422
  return h('div', {
46333
46423
  class: 'vxe-split-wrapper'
@@ -46366,7 +46456,12 @@ var es_string_split = __webpack_require__(744);
46366
46456
  class: 'vxe-split--resizable-split-number-prev'
46367
46457
  }), h('div', {
46368
46458
  class: 'vxe-split--resizable-split-number-next'
46369
- })])] : [])]);
46459
+ })])] : []), h('div', {
46460
+ class: 'vxe-split--render-vars'
46461
+ }, [h('div', {
46462
+ ref: 'refBarInfoElem',
46463
+ class: 'vxe-split--handle-bar-info'
46464
+ })])]);
46370
46465
  }
46371
46466
  },
46372
46467
  created: function created() {
@@ -46387,6 +46482,10 @@ var es_string_split = __webpack_require__(744);
46387
46482
  if (props.items) {
46388
46483
  $xeSplit.loadItem(props.items);
46389
46484
  }
46485
+ var actionOpts = $xeSplit.computeActionOpts;
46486
+ if (actionOpts.direction) {
46487
+ errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
46488
+ }
46390
46489
  $xeSplit.$nextTick(function () {
46391
46490
  $xeSplit.recalculate();
46392
46491
  });
@@ -46455,7 +46554,6 @@ function destroySplitItem($xeSplit, paneConfig) {
46455
46554
  name: [Number, String],
46456
46555
  width: [Number, String],
46457
46556
  height: [Number, String],
46458
- showAction: Boolean,
46459
46557
  minWidth: {
46460
46558
  type: [Number, String],
46461
46559
  default: function _default() {
@@ -46467,7 +46565,9 @@ function destroySplitItem($xeSplit, paneConfig) {
46467
46565
  default: function _default() {
46468
46566
  return null;
46469
46567
  }
46470
- }
46568
+ },
46569
+ // 已废弃
46570
+ showAction: Boolean
46471
46571
  },
46472
46572
  inject: {
46473
46573
  $xeSplit: {
@@ -46491,7 +46591,6 @@ function destroySplitItem($xeSplit, paneConfig) {
46491
46591
  minWidth: 0,
46492
46592
  minHeight: 0,
46493
46593
  showAction: false,
46494
- isVisible: true,
46495
46594
  isExpand: true,
46496
46595
  renderWidth: 0,
46497
46596
  resizeWidth: 0,
@@ -54317,7 +54416,9 @@ function hideDropTip($xeUpload) {
54317
54416
  if (url) {
54318
54417
  var urlObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().parseUrl(url);
54319
54418
  if (!urlObj.searchQuery[nameProp]) {
54320
- return "".concat(url).concat(url.indexOf('?') === -1 ? '?' : '&').concat(encodeURIComponent(item[nameProp] || ''));
54419
+ if (url.indexOf('blob:') === -1) {
54420
+ return "".concat(url).concat(url.indexOf('?') === -1 ? '?' : '&').concat(encodeURIComponent(item[nameProp] || ''));
54421
+ }
54321
54422
  }
54322
54423
  }
54323
54424
  return url;