vxe-pc-ui 4.16.5 → 4.16.7

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 (56) hide show
  1. package/dist/all.esm.js +177 -108
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/list/src/list.js +21 -9
  6. package/es/menu/src/menu.js +64 -17
  7. package/es/menu/style.css +16 -7
  8. package/es/menu/style.min.css +1 -1
  9. package/es/style.css +1 -1
  10. package/es/style.min.css +1 -1
  11. package/es/tree/src/tree.js +12 -2
  12. package/es/ui/index.js +3 -3
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-menu/style.css +16 -7
  15. package/es/vxe-menu/style.min.css +1 -1
  16. package/lib/icon/style/style.css +1 -1
  17. package/lib/icon/style/style.min.css +1 -1
  18. package/lib/index.umd.js +102 -28
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/list/src/list.js +21 -9
  21. package/lib/list/src/list.min.js +1 -1
  22. package/lib/menu/src/menu.js +65 -13
  23. package/lib/menu/src/menu.min.js +1 -1
  24. package/lib/menu/style/style.css +16 -7
  25. package/lib/menu/style/style.min.css +1 -1
  26. package/lib/style.css +1 -1
  27. package/lib/style.min.css +1 -1
  28. package/lib/tree/src/tree.js +12 -2
  29. package/lib/tree/src/tree.min.js +1 -1
  30. package/lib/ui/index.js +3 -3
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-menu/style/style.css +16 -7
  35. package/lib/vxe-menu/style/style.min.css +1 -1
  36. package/package.json +1 -1
  37. package/packages/list/src/list.ts +25 -13
  38. package/packages/menu/src/menu.ts +70 -17
  39. package/packages/tree/src/tree.ts +12 -2
  40. package/packages/ui/index.ts +2 -2
  41. package/styles/components/menu.scss +10 -4
  42. package/types/components/list.d.ts +12 -0
  43. package/types/components/menu.d.ts +6 -0
  44. package/types/components/tree.d.ts +12 -0
  45. /package/es/icon/{iconfont.1783670404729.ttf → iconfont.1783873713408.ttf} +0 -0
  46. /package/es/icon/{iconfont.1783670404729.woff → iconfont.1783873713408.woff} +0 -0
  47. /package/es/icon/{iconfont.1783670404729.woff2 → iconfont.1783873713408.woff2} +0 -0
  48. /package/es/{iconfont.1783670404729.ttf → iconfont.1783873713408.ttf} +0 -0
  49. /package/es/{iconfont.1783670404729.woff → iconfont.1783873713408.woff} +0 -0
  50. /package/es/{iconfont.1783670404729.woff2 → iconfont.1783873713408.woff2} +0 -0
  51. /package/lib/icon/style/{iconfont.1783670404729.ttf → iconfont.1783873713408.ttf} +0 -0
  52. /package/lib/icon/style/{iconfont.1783670404729.woff → iconfont.1783873713408.woff} +0 -0
  53. /package/lib/icon/style/{iconfont.1783670404729.woff2 → iconfont.1783873713408.woff2} +0 -0
  54. /package/lib/{iconfont.1783670404729.ttf → iconfont.1783873713408.ttf} +0 -0
  55. /package/lib/{iconfont.1783670404729.woff → iconfont.1783873713408.woff} +0 -0
  56. /package/lib/{iconfont.1783670404729.woff2 → iconfont.1783873713408.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4657,7 +4657,7 @@ function checkDynamic() {
4657
4657
  const {
4658
4658
  log: log_log
4659
4659
  } = VxeUI;
4660
- const uiVersion = `ui v${"4.16.5"}`;
4660
+ const uiVersion = `ui v${"4.16.7"}`;
4661
4661
  function createComponentLog(name) {
4662
4662
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
4663
4663
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -4675,7 +4675,7 @@ const errLog = log_log.create('error', uiVersion);
4675
4675
 
4676
4676
 
4677
4677
 
4678
- const ui_version = "4.16.5";
4678
+ const ui_version = "4.16.7";
4679
4679
  VxeUI.uiVersion = ui_version;
4680
4680
  VxeUI.dynamicApp = dynamicApp;
4681
4681
  function config(options) {
@@ -5171,8 +5171,8 @@ setIcon({
5171
5171
  BUTTON_LOADING: iconPrefix + 'spinner roll',
5172
5172
  BUTTON_TOOLTIP_ICON: iconPrefix + 'question-circle-fill',
5173
5173
  // menu
5174
- MENU_ITEM_EXPAND_OPEN: iconPrefix + 'arrow-down rotate180',
5175
- MENU_ITEM_EXPAND_CLOSE: iconPrefix + 'arrow-down',
5174
+ MENU_ITEM_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
5175
+ MENU_ITEM_EXPAND_CLOSE: iconPrefix + 'arrow-right',
5176
5176
  // select
5177
5177
  SELECT_LOADED: iconPrefix + 'spinner roll',
5178
5178
  SELECT_OPEN: iconPrefix + 'caret-down rotate180',
@@ -12524,7 +12524,12 @@ let crossListDragRowObj = null;
12524
12524
  const el = refElem.value;
12525
12525
  if (el) {
12526
12526
  const parentEl = el.parentElement;
12527
- reactData.parentHeight = parentEl ? parentEl.clientHeight : 0;
12527
+ let parentHeight = 0;
12528
+ if (parentEl) {
12529
+ const parentStyle = getComputedStyle(parentEl);
12530
+ parentHeight = parentEl.clientHeight - Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(parentStyle.paddingLeft) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(parentStyle.paddingRight));
12531
+ }
12532
+ reactData.parentHeight = parentHeight;
12528
12533
  updateHeight();
12529
12534
  if (el.clientWidth && el.clientHeight) {
12530
12535
  return computeScrollLoad();
@@ -13318,7 +13323,7 @@ let crossListDragRowObj = null;
13318
13323
  emitCheckboxMode(value);
13319
13324
  return updateCheckboxStatus();
13320
13325
  };
13321
- const getCheckboxRows = () => {
13326
+ const getCheckboxRecords = () => {
13322
13327
  const {
13323
13328
  updateCheckboxFlag
13324
13329
  } = reactData;
@@ -13738,7 +13743,8 @@ let crossListDragRowObj = null;
13738
13743
  clearRadioRow,
13739
13744
  setCheckboxRow,
13740
13745
  setCheckboxRowByKey,
13741
- getCheckboxRows,
13746
+ getCheckboxRecords,
13747
+ getCheckboxRows: getCheckboxRecords,
13742
13748
  getCheckboxRowKeys,
13743
13749
  clearCheckboxRow,
13744
13750
  setAllCheckboxRow,
@@ -13850,6 +13856,12 @@ let crossListDragRowObj = null;
13850
13856
  isRemoveByRow(row) {
13851
13857
  const rowid = getRowId(row);
13852
13858
  return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid];
13859
+ },
13860
+ getRecordset() {
13861
+ return {
13862
+ insertRecords: $xeList.getInsertRecords(),
13863
+ removeRecords: $xeList.getRemoveRecords()
13864
+ };
13853
13865
  }
13854
13866
  };
13855
13867
  const listPrivateMethods = {
@@ -14216,6 +14228,12 @@ let crossListDragRowObj = null;
14216
14228
  isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
14217
14229
  }
14218
14230
  const ctVNs = [];
14231
+ if (showRadio) {
14232
+ ctVNs.push(renderRadio(row, rowid, isRadioChecked));
14233
+ }
14234
+ if (showCheckbox) {
14235
+ ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
14236
+ }
14219
14237
  let isDragDisabled = false;
14220
14238
  if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
14221
14239
  const handleOns = {};
@@ -14238,12 +14256,6 @@ let crossListDragRowObj = null;
14238
14256
  class: icon || getIcon().LIST_DRAG
14239
14257
  })])]));
14240
14258
  }
14241
- if (showRadio) {
14242
- ctVNs.push(renderRadio(row, rowid, isRadioChecked));
14243
- }
14244
- if (showCheckbox) {
14245
- ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
14246
- }
14247
14259
  ctVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
14248
14260
  key: 'ct5',
14249
14261
  class: 'vxe-list--row-content'
@@ -36127,6 +36139,23 @@ const {
36127
36139
  getConfig: menu_getConfig,
36128
36140
  getIcon: menu_getIcon
36129
36141
  } = VxeUI;
36142
+ function menu_createInternalData() {
36143
+ return {
36144
+ menuEffectMaps: {}
36145
+ };
36146
+ }
36147
+ function menu_createReactData() {
36148
+ return {
36149
+ initialized: false,
36150
+ isEnterCollapse: false,
36151
+ collapseStyle: {},
36152
+ collapseZindex: 0,
36153
+ activeName: '',
36154
+ menuList: [],
36155
+ itemHeight: 1
36156
+ };
36157
+ }
36158
+ let nemuUniqueKey = 100000000;
36130
36159
  /* harmony default export */ var menu = (defineVxeComponent({
36131
36160
  name: 'VxeMenu',
36132
36161
  props: {
@@ -36165,15 +36194,8 @@ const {
36165
36194
  const {
36166
36195
  computeSize
36167
36196
  } = useSize(props);
36168
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
36169
- initialized: !!props.collapsed,
36170
- isEnterCollapse: false,
36171
- collapseStyle: {},
36172
- collapseZindex: 0,
36173
- activeName: props.modelValue,
36174
- menuList: [],
36175
- itemHeight: 1
36176
- });
36197
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(menu_createReactData());
36198
+ const internalData = menu_createInternalData();
36177
36199
  const refMaps = {
36178
36200
  refElem
36179
36201
  };
@@ -36256,6 +36278,7 @@ const {
36256
36278
  ...item,
36257
36279
  parentKey: parent ? parent.name || path.slice(0, path.length - 1).join(',') : '',
36258
36280
  level: path.length,
36281
+ itemId: ++nemuUniqueKey,
36259
36282
  itemKey: item.name || path.join(','),
36260
36283
  isExactActive: false,
36261
36284
  isActive: false,
@@ -36325,12 +36348,20 @@ const {
36325
36348
  accordion
36326
36349
  } = props;
36327
36350
  const {
36351
+ menuEffectMaps
36352
+ } = internalData;
36353
+ const {
36354
+ itemId,
36328
36355
  hasChild,
36329
36356
  isExpand
36330
36357
  } = item;
36358
+ const expanded = !isExpand;
36331
36359
  if (hasChild) {
36332
36360
  evnt.stopPropagation();
36333
36361
  evnt.preventDefault();
36362
+ if (menuEffectMaps[itemId]) {
36363
+ clearTimeout(menuEffectMaps[itemId]);
36364
+ }
36334
36365
  if (accordion) {
36335
36366
  itemList.forEach(obj => {
36336
36367
  if (obj !== item) {
@@ -36338,7 +36369,32 @@ const {
36338
36369
  }
36339
36370
  });
36340
36371
  }
36341
- item.isExpand = !isExpand;
36372
+ item.isExpand = expanded;
36373
+ const el = refElem.value;
36374
+ if (el) {
36375
+ const nemuEl = el.querySelector(`.vxe-menu--item-wrapper[data-menu-id="${itemId}"]`);
36376
+ const groupEl = nemuEl ? nemuEl.querySelector('.vxe-menu--item-group') : null;
36377
+ if (groupEl) {
36378
+ if (expanded) {
36379
+ groupEl.style.height = '0';
36380
+ groupEl.setAttribute('data-effect', 'y');
36381
+ requestAnimationFrame(() => {
36382
+ groupEl.style.height = `${groupEl.scrollHeight}px`;
36383
+ });
36384
+ } else {
36385
+ groupEl.style.height = `${groupEl.scrollHeight}px`;
36386
+ groupEl.setAttribute('data-effect', 'y');
36387
+ requestAnimationFrame(() => {
36388
+ groupEl.style.height = '0';
36389
+ });
36390
+ }
36391
+ menuEffectMaps[itemId] = setTimeout(() => {
36392
+ delete menuEffectMaps[itemId];
36393
+ groupEl.removeAttribute('data-effect');
36394
+ groupEl.style.height = '';
36395
+ }, 350);
36396
+ }
36397
+ }
36342
36398
  }
36343
36399
  };
36344
36400
  const emitModel = value => {
@@ -36501,6 +36557,7 @@ const {
36501
36557
  };
36502
36558
  const renderDefaultChildren = (item, itemList) => {
36503
36559
  const {
36560
+ itemId,
36504
36561
  itemKey,
36505
36562
  level,
36506
36563
  hasChild,
@@ -36525,7 +36582,8 @@ const {
36525
36582
  'is--exact-active': isExactActive,
36526
36583
  'is--active': isActive,
36527
36584
  'is--expand': (!isCollapsed || isEnterCollapse) && isExpand
36528
- }]
36585
+ }],
36586
+ 'data-menu-id': itemId
36529
36587
  }, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
36530
36588
  class: 'vxe-menu--item-link',
36531
36589
  to: routerLink,
@@ -36551,6 +36609,7 @@ const {
36551
36609
  };
36552
36610
  const renderCollapseChildren = (item, itemList) => {
36553
36611
  const {
36612
+ itemId,
36554
36613
  itemKey,
36555
36614
  level,
36556
36615
  hasChild,
@@ -36569,7 +36628,8 @@ const {
36569
36628
  class: ['vxe-menu--item-wrapper', `vxe-menu--item-level${level}`, {
36570
36629
  'is--exact-active': isExactActive,
36571
36630
  'is--active': isActive
36572
- }]
36631
+ }],
36632
+ 'data-menu-id': itemId
36573
36633
  }, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
36574
36634
  class: 'vxe-menu--item-link',
36575
36635
  to: routerLink,
@@ -36676,7 +36736,6 @@ const {
36676
36736
  updateCollapseStyle();
36677
36737
  });
36678
36738
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
36679
- globalEvents.off($xeMenu, 'resize');
36680
36739
  const collapseEl = refCollapseElem.value;
36681
36740
  if (collapseEl) {
36682
36741
  const parentNode = collapseEl.parentNode;
@@ -36684,7 +36743,12 @@ const {
36684
36743
  parentNode.removeChild(collapseEl);
36685
36744
  }
36686
36745
  }
36746
+ globalEvents.off($xeMenu, 'resize');
36747
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, menu_createReactData());
36748
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, menu_createInternalData());
36687
36749
  });
36750
+ reactData.initialized = !!props.collapsed;
36751
+ reactData.activeName = props.modelValue;
36688
36752
  updateMenuConfig();
36689
36753
  updateActiveMenu(true);
36690
36754
  $xeMenu.renderVN = renderVN;
@@ -51647,6 +51711,9 @@ let crossTreeDragNodeObj = null;
51647
51711
  return nodeKeys;
51648
51712
  },
51649
51713
  getCheckboxNodes() {
51714
+ return $xeTree.getCheckboxRecords();
51715
+ },
51716
+ getCheckboxRecords() {
51650
51717
  const {
51651
51718
  nodeMaps,
51652
51719
  selectCheckboxMaps
@@ -52135,7 +52202,13 @@ let crossTreeDragNodeObj = null;
52135
52202
  const nodeid = getNodeId(node);
52136
52203
  return !!reactData.removeNodeFlag && !!internalData.removeNodeMaps[nodeid];
52137
52204
  },
52138
- closeTooltip
52205
+ closeTooltip,
52206
+ getRecordset() {
52207
+ return {
52208
+ insertRecords: $xeTree.getInsertRecords(),
52209
+ removeRecords: $xeTree.getRemoveRecords()
52210
+ };
52211
+ }
52139
52212
  };
52140
52213
  const handleNodeDragEndClearStatus = () => {
52141
52214
  clearNodeDragData();
@@ -53210,7 +53283,7 @@ let crossTreeDragNodeObj = null;
53210
53283
  }
53211
53284
  }, iconSlot ? vn_getSlotVNs(iconSlot(nParams)) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
53212
53285
  class: isLazyLoading ? iconLoaded || tree_getIcon().TREE_NODE_LOADED : isExpand ? iconOpen || tree_getIcon().TREE_NODE_OPEN : iconClose || tree_getIcon().TREE_NODE_CLOSE
53213
- })])] : []), renderDragIcon(node, nodeid), renderRadio(node, nodeid, isExistChild, nLevel, isRadioChecked), renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
53286
+ })])] : []), renderRadio(node, nodeid, isExistChild, nLevel, isRadioChecked), renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate), renderDragIcon(node, nodeid), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
53214
53287
  class: 'vxe-tree--node-item-inner'
53215
53288
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
53216
53289
  class: 'vxe-tree--node-item-wrapper'
@@ -53493,6 +53566,7 @@ let crossTreeDragNodeObj = null;
53493
53566
  }
53494
53567
  internalData.resizeObserver = resizeObserver;
53495
53568
  }
53569
+ recalculate();
53496
53570
  globalEvents.on($xeTree, 'resize', handleGlobalResizeEvent);
53497
53571
  });
53498
53572
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {