vxe-pc-ui 4.17.7 → 4.17.8

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 (55) hide show
  1. package/dist/all.esm.js +205 -222
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/button-group/style.css +1 -1
  5. package/es/button-group/style.min.css +1 -1
  6. package/es/icon/style.css +1 -1
  7. package/es/style.css +1 -1
  8. package/es/style.min.css +1 -1
  9. package/es/tooltip/src/tooltip.js +80 -134
  10. package/es/tree/src/tree.js +2 -2
  11. package/es/ui/index.js +4 -4
  12. package/es/ui/src/dom.js +118 -81
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-button-group/style.css +1 -1
  15. package/es/vxe-button-group/style.min.css +1 -1
  16. package/lib/button-group/style/style.css +1 -1
  17. package/lib/button-group/style/style.min.css +1 -1
  18. package/lib/icon/style/style.css +1 -1
  19. package/lib/icon/style/style.min.css +1 -1
  20. package/lib/index.umd.js +210 -225
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/tooltip/src/tooltip.js +91 -140
  25. package/lib/tooltip/src/tooltip.min.js +1 -1
  26. package/lib/tree/src/tree.js +2 -1
  27. package/lib/tree/src/tree.min.js +1 -1
  28. package/lib/ui/index.js +4 -4
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/dom.js +113 -79
  31. package/lib/ui/src/dom.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-button-group/style/style.css +1 -1
  35. package/lib/vxe-button-group/style/style.min.css +1 -1
  36. package/package.json +3 -2
  37. package/packages/tooltip/src/tooltip.ts +83 -134
  38. package/packages/tree/src/tree.ts +2 -2
  39. package/packages/ui/index.ts +3 -3
  40. package/packages/ui/src/dom.ts +128 -83
  41. package/styles/components/button-group.scss +4 -2
  42. package/types/components/table.d.ts +6 -0
  43. package/types/components/tooltip.d.ts +4 -0
  44. /package/es/icon/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
  45. /package/es/icon/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
  46. /package/es/icon/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
  47. /package/es/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
  48. /package/es/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
  49. /package/es/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
  50. /package/lib/icon/style/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
  51. /package/lib/icon/style/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
  52. /package/lib/icon/style/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
  53. /package/lib/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
  54. /package/lib/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
  55. /package/lib/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4658,7 +4658,7 @@ function checkDynamic() {
4658
4658
  const {
4659
4659
  log: log_log
4660
4660
  } = VxeUI;
4661
- const uiVersion = `ui v${"4.17.7"}`;
4661
+ const uiVersion = `ui v${"4.17.8"}`;
4662
4662
  function createComponentLog(name) {
4663
4663
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
4664
4664
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -4676,7 +4676,7 @@ const errLog = log_log.create('error', uiVersion);
4676
4676
 
4677
4677
 
4678
4678
 
4679
- const ui_version = "4.17.7";
4679
+ const ui_version = "4.17.8";
4680
4680
  VxeUI.uiVersion = ui_version;
4681
4681
  VxeUI.dynamicApp = dynamicApp;
4682
4682
  function config(options) {
@@ -5093,7 +5093,8 @@ setConfig({
5093
5093
  theme: 'dark',
5094
5094
  enterDelay: 500,
5095
5095
  leaveDelay: 300,
5096
- isArrow: true
5096
+ isArrow: true,
5097
+ defaultPlacement: 'top'
5097
5098
  },
5098
5099
  transfer: {},
5099
5100
  tree: {
@@ -5107,8 +5108,7 @@ setConfig({
5107
5108
  tooltipConfig: {
5108
5109
  mode: 'tooltip',
5109
5110
  enterable: true,
5110
- leaveDelay: 300,
5111
- defaultPlacement: 'top'
5111
+ leaveDelay: 300
5112
5112
  },
5113
5113
  dragConfig: {
5114
5114
  showIcon: true,
@@ -6590,8 +6590,13 @@ function dom_triggerEvent(targetElem, type) {
6590
6590
  function isNodeElement(elem) {
6591
6591
  return elem && elem.nodeType === 1;
6592
6592
  }
6593
+ /**
6594
+ * 通用定位计算
6595
+ */
6593
6596
  function updatePanelPlacement(targetElem, panelElem, options) {
6594
6597
  const {
6598
+ defaultTop,
6599
+ defaultLeft,
6595
6600
  placement,
6596
6601
  defaultPlacement,
6597
6602
  teleportTo,
@@ -6605,110 +6610,138 @@ function updatePanelPlacement(targetElem, panelElem, options) {
6605
6610
  let panelPlacement = 'bottom';
6606
6611
  let top = '';
6607
6612
  let bottom = '';
6608
- let left = '';
6609
- const right = '';
6613
+ let left = 0;
6610
6614
  let minWidth = '';
6615
+ let arrowLeft = '';
6611
6616
  const stys = {};
6612
6617
  if (panelElem && targetElem) {
6613
- const documentElement = document.documentElement;
6614
- const bodyElem = document.body;
6615
- const targetHeight = targetElem.offsetHeight;
6616
- const panelHeight = panelElem.offsetHeight;
6617
- const panelWidth = panelElem.offsetWidth;
6618
- const panelRect = panelElem.getBoundingClientRect();
6619
- const targetRect = targetElem.getBoundingClientRect();
6620
- const visibleHeight = documentElement.clientHeight || bodyElem.clientHeight;
6621
- const visibleWidth = documentElement.clientWidth || bodyElem.clientWidth;
6622
- minWidth = targetElem.offsetWidth;
6623
- if (teleportTo) {
6624
- left = targetRect.left;
6625
- top = targetRect.top + targetHeight;
6626
- if (placement === 'top') {
6627
- panelPlacement = 'top';
6628
- top = targetRect.top - panelHeight;
6629
- } else if (!placement) {
6630
- if (defaultPlacement === 'top') {
6618
+ const parentEl = panelElem.parentElement;
6619
+ const parentWrapperEl = parentEl === document.body ? document.documentElement : parentEl;
6620
+ if (parentWrapperEl) {
6621
+ const targetWidth = targetElem.offsetWidth;
6622
+ const targetHeight = targetElem.offsetHeight;
6623
+ const panelHeight = panelElem.offsetHeight;
6624
+ const panelWidth = panelElem.offsetWidth;
6625
+ const parentWrapperRect = parentWrapperEl.getBoundingClientRect();
6626
+ const panelRect = panelElem.getBoundingClientRect();
6627
+ const targetRect = targetElem.getBoundingClientRect();
6628
+ const visibleHeight = parentWrapperEl.clientHeight;
6629
+ const visibleWidth = parentWrapperEl.clientWidth;
6630
+ const offsetLeft = parentWrapperRect.left;
6631
+ const offsetTop = parentWrapperRect.top;
6632
+ const targetLeft = targetRect.left;
6633
+ const targetTop = targetRect.top;
6634
+ minWidth = targetElem.offsetWidth;
6635
+ if (teleportTo) {
6636
+ left = defaultLeft || targetLeft;
6637
+ top = defaultTop || targetTop + targetHeight;
6638
+ if (placement === 'top') {
6631
6639
  panelPlacement = 'top';
6632
- top = targetRect.top - panelHeight;
6633
- // 如果上面不够放,则向下
6634
- if (top < marginSize) {
6635
- panelPlacement = 'bottom';
6636
- top = targetRect.top + targetHeight;
6637
- }
6638
- // 如果下面不够放,则向上(优先)
6639
- if (top + panelHeight + marginSize > visibleHeight) {
6640
+ top = targetTop - panelHeight;
6641
+ } else if (!placement) {
6642
+ if (defaultPlacement === 'top') {
6640
6643
  panelPlacement = 'top';
6641
- top = targetRect.top - panelHeight;
6644
+ top = targetTop - panelHeight;
6645
+ // 如果上面不够放,则向下
6646
+ if (top < marginSize) {
6647
+ panelPlacement = 'bottom';
6648
+ top = targetTop + targetHeight;
6649
+ }
6650
+ // 如果下面不够放,则向上(优先)
6651
+ if (top + panelHeight + marginSize > visibleHeight) {
6652
+ panelPlacement = 'top';
6653
+ top = targetTop - panelHeight;
6654
+ }
6655
+ } else {
6656
+ // 如果下面不够放,则向上
6657
+ if (top + panelHeight + marginSize > visibleHeight) {
6658
+ panelPlacement = 'top';
6659
+ top = targetTop - panelHeight;
6660
+ }
6661
+ // 如果上面不够放,则向下(优先)
6662
+ if (top < marginSize) {
6663
+ panelPlacement = 'bottom';
6664
+ top = targetTop + targetHeight;
6665
+ }
6642
6666
  }
6643
- } else {
6667
+ }
6668
+ // 如果溢出右边
6669
+ if (left + panelWidth + marginSize > visibleWidth) {
6670
+ left -= left + panelWidth + marginSize - visibleWidth;
6671
+ }
6672
+ // 如果溢出左边
6673
+ if (left < marginSize) {
6674
+ left = marginSize;
6675
+ }
6676
+ // 偏移
6677
+ top -= offsetTop;
6678
+ left -= offsetLeft;
6679
+ } else {
6680
+ if (placement === 'top') {
6681
+ panelPlacement = 'top';
6682
+ bottom = targetHeight;
6683
+ } else if (!placement) {
6644
6684
  // 如果下面不够放,则向上
6645
- if (top + panelHeight + marginSize > visibleHeight) {
6646
- panelPlacement = 'top';
6647
- top = targetRect.top - panelHeight;
6648
- }
6649
- // 如果上面不够放,则向下(优先)
6650
- if (top < marginSize) {
6651
- panelPlacement = 'bottom';
6652
- top = targetRect.top + targetHeight;
6685
+ top = targetHeight;
6686
+ if (targetTop + targetHeight + panelHeight + marginSize > visibleHeight) {
6687
+ // 如果上面不够放,则向下(优先)
6688
+ if (targetTop - targetHeight - panelHeight > marginSize) {
6689
+ panelPlacement = 'top';
6690
+ top = '';
6691
+ bottom = targetHeight;
6692
+ }
6653
6693
  }
6654
6694
  }
6695
+ // 是否超出右侧
6696
+ if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
6697
+ left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
6698
+ }
6655
6699
  }
6656
- // 如果溢出右边
6657
- if (left + panelWidth + marginSize > visibleWidth) {
6658
- left -= left + panelWidth + marginSize - visibleWidth;
6700
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(top)) {
6701
+ stys.top = toCssUnit(top);
6659
6702
  }
6660
- // 如果溢出左边
6661
- if (left < marginSize) {
6662
- left = marginSize;
6703
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(bottom)) {
6704
+ stys.bottom = toCssUnit(bottom);
6663
6705
  }
6664
- } else {
6665
- if (placement === 'top') {
6666
- panelPlacement = 'top';
6667
- bottom = targetHeight;
6668
- } else if (!placement) {
6669
- // 如果下面不够放,则向上
6670
- top = targetHeight;
6671
- if (targetRect.top + targetHeight + panelHeight + marginSize > visibleHeight) {
6672
- // 如果上面不够放,则向下(优先)
6673
- if (targetRect.top - targetHeight - panelHeight > marginSize) {
6674
- panelPlacement = 'top';
6675
- top = '';
6676
- bottom = targetHeight;
6677
- }
6678
- }
6706
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(left)) {
6707
+ stys.left = toCssUnit(left);
6679
6708
  }
6680
- // 是否超出右侧
6681
- if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
6682
- left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
6709
+ if (isMinWidth && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(minWidth)) {
6710
+ stys.minWidth = toCssUnit(minWidth);
6711
+ }
6712
+ // 箭头
6713
+ if (left === targetLeft) {
6714
+ if (targetWidth <= panelWidth) {
6715
+ arrowLeft = targetWidth / 2;
6716
+ }
6717
+ } else if (left < targetLeft) {
6718
+ if (left + panelWidth > targetLeft + targetWidth) {
6719
+ arrowLeft = targetLeft - left + targetWidth / 2;
6720
+ } else {
6721
+ arrowLeft = targetLeft - left + (panelWidth - (targetLeft - left)) / 2;
6722
+ }
6683
6723
  }
6684
- }
6685
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(top)) {
6686
- stys.top = toCssUnit(top);
6687
- }
6688
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(bottom)) {
6689
- stys.bottom = toCssUnit(bottom);
6690
- }
6691
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(left)) {
6692
- stys.left = toCssUnit(left);
6693
- }
6694
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(right)) {
6695
- stys.right = toCssUnit(right);
6696
- }
6697
- if (isMinWidth && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(minWidth)) {
6698
- stys.minWidth = toCssUnit(minWidth);
6699
6724
  }
6700
6725
  }
6701
6726
  return {
6702
6727
  top: top || 0,
6703
6728
  bottom: bottom || 0,
6704
6729
  left: left || 0,
6705
- right: right || 0,
6730
+ arrowLeft: arrowLeft || 0,
6706
6731
  style: stys,
6707
6732
  placement: panelPlacement
6708
6733
  };
6709
6734
  }
6710
6735
  function getPopupContainer(appendTo) {
6711
- return appendTo ? (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(appendTo) ? appendTo({}) : appendTo) || 'body' : 'body';
6736
+ const selectElem = appendTo && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(appendTo) ? appendTo({}) : appendTo;
6737
+ return selectElem || 'body';
6738
+ }
6739
+ function getPopupAppendElement(appendTo) {
6740
+ const selectElem = getPopupContainer(appendTo);
6741
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(selectElem)) {
6742
+ return document.querySelector(selectElem) || document.body;
6743
+ }
6744
+ return selectElem;
6712
6745
  }
6713
6746
  ;// ./packages/anchor/src/util.ts
6714
6747
 
@@ -7402,6 +7435,10 @@ function createInternalData() {
7402
7435
  leaveDelay: {
7403
7436
  type: Number,
7404
7437
  default: () => getConfig().tooltip.leaveDelay
7438
+ },
7439
+ appendTo: {
7440
+ type: [String, Function],
7441
+ default: () => getConfig().tooltip.appendTo
7405
7442
  }
7406
7443
  },
7407
7444
  emits: ['update:modelValue'],
@@ -7459,101 +7496,10 @@ function createInternalData() {
7459
7496
  internalData,
7460
7497
  getRefMaps: () => refMaps
7461
7498
  };
7462
- let tooltipMethods = {};
7463
- const updateTipStyle = () => {
7464
- const {
7465
- isArrow,
7466
- placement,
7467
- defaultPlacement
7468
- } = props;
7469
- const {
7470
- tipTarget: targetElem,
7471
- tipStore,
7472
- tipPos
7473
- } = reactData;
7474
- let top = '';
7475
- let left = '';
7476
- let panelPlacement = 'bottom';
7477
- let arrowLeft = '';
7478
- const panelElem = refElem.value;
7479
- if (panelElem && targetElem) {
7480
- const documentElement = document.documentElement;
7481
- const bodyElem = document.body;
7482
- const targetWidth = targetElem.offsetWidth;
7483
- const targetHeight = targetElem.offsetHeight;
7484
- const panelHeight = panelElem.offsetHeight;
7485
- const panelWidth = panelElem.offsetWidth;
7486
- const targetRect = targetElem.getBoundingClientRect();
7487
- const visibleHeight = documentElement.clientHeight || bodyElem.clientHeight;
7488
- const visibleWidth = documentElement.clientWidth || bodyElem.clientWidth;
7489
- const marginSize = 6;
7490
- left = targetRect.left;
7491
- top = targetRect.top + targetHeight;
7492
- if (tipPos && (tipPos.oLeft || tipPos.oTop)) {
7493
- if (isArrow) {
7494
- left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2;
7495
- } else {
7496
- left = tipPos.x + 1;
7497
- top = tipPos.y + 1;
7498
- }
7499
- } else {
7500
- left = targetRect.left + (targetWidth - panelWidth) / 2;
7501
- }
7502
- if (placement === 'top') {
7503
- panelPlacement = 'top';
7504
- top = targetRect.top - panelHeight;
7505
- } else if (!placement) {
7506
- if (defaultPlacement === 'top') {
7507
- panelPlacement = 'top';
7508
- top = targetRect.top - panelHeight;
7509
- // 如果上面不够放,则向下
7510
- if (top < marginSize) {
7511
- panelPlacement = 'bottom';
7512
- top = targetRect.top + targetHeight;
7513
- }
7514
- // 如果下面不够放,则向上(优先)
7515
- if (top + panelHeight + marginSize > visibleHeight) {
7516
- panelPlacement = 'top';
7517
- top = targetRect.top - panelHeight;
7518
- }
7519
- } else {
7520
- // 如果下面不够放,则向上
7521
- if (top + panelHeight + marginSize > visibleHeight) {
7522
- panelPlacement = 'top';
7523
- top = targetRect.top - panelHeight;
7524
- }
7525
- // 如果上面不够放,则向下(优先)
7526
- if (top < marginSize) {
7527
- panelPlacement = 'bottom';
7528
- top = targetRect.top + targetHeight;
7529
- }
7530
- }
7531
- }
7532
- // 如果溢出右边
7533
- if (left + panelWidth + marginSize > visibleWidth) {
7534
- left -= left + panelWidth + marginSize - visibleWidth;
7535
- }
7536
- // 如果溢出左边
7537
- if (left < marginSize) {
7538
- left = marginSize;
7539
- }
7540
- // 箭头
7541
- if (left === targetRect.left) {
7542
- if (targetWidth <= panelWidth) {
7543
- arrowLeft = targetWidth / 2;
7544
- }
7545
- } else if (left < targetRect.left) {
7546
- if (left + panelWidth > targetRect.left + targetWidth) {
7547
- arrowLeft = targetRect.left - left + targetWidth / 2;
7548
- } else {
7549
- arrowLeft = targetRect.left - left + (panelWidth - (targetRect.left - left)) / 2;
7550
- }
7551
- }
7552
- tipStore.placement = panelPlacement;
7553
- tipStore.style.top = `${top}px`;
7554
- tipStore.style.left = `${left}px`;
7555
- tipStore.arrowStyle.left = `${arrowLeft}px`;
7556
- }
7499
+ const dispatchEvent = (type, params, evnt) => {
7500
+ emit(type, createEvent(evnt, {
7501
+ $tooltip: $xeTooltip
7502
+ }, params));
7557
7503
  };
7558
7504
  const updateValue = value => {
7559
7505
  if (value !== reactData.visible) {
@@ -7562,14 +7508,19 @@ function createInternalData() {
7562
7508
  emit('update:modelValue', value);
7563
7509
  }
7564
7510
  };
7565
- const updateZindex = () => {
7566
- if (reactData.tipZindex < getLastZIndex()) {
7511
+ const updateZIndex = () => {
7512
+ const {
7513
+ zIndex
7514
+ } = props;
7515
+ if (zIndex) {
7516
+ reactData.tipZindex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(zIndex);
7517
+ } else if (reactData.tipZindex < getLastZIndex()) {
7567
7518
  reactData.tipZindex = nextZIndex();
7568
7519
  }
7569
7520
  };
7570
7521
  const clickEvent = () => {
7571
7522
  if (reactData.visible) {
7572
- tooltipMethods.close();
7523
+ $xeTooltip.close();
7573
7524
  } else {
7574
7525
  handleVisible(reactData.target || getSelectorEl(), props.content);
7575
7526
  }
@@ -7587,11 +7538,11 @@ function createInternalData() {
7587
7538
  if (enterable && trigger === 'hover') {
7588
7539
  setTimeout(() => {
7589
7540
  if (!reactData.tipActive) {
7590
- tooltipMethods.close();
7541
+ $xeTooltip.close();
7591
7542
  }
7592
7543
  }, leaveDelay);
7593
7544
  } else {
7594
- tooltipMethods.close();
7545
+ $xeTooltip.close();
7595
7546
  }
7596
7547
  };
7597
7548
  const wrapperMouseenterEvent = () => {
@@ -7607,24 +7558,27 @@ function createInternalData() {
7607
7558
  if (enterable && trigger === 'hover') {
7608
7559
  setTimeout(() => {
7609
7560
  if (!reactData.tipActive) {
7610
- tooltipMethods.close();
7561
+ $xeTooltip.close();
7611
7562
  }
7612
7563
  }, leaveDelay);
7613
7564
  }
7614
7565
  };
7615
7566
  const showTip = () => {
7567
+ const {
7568
+ appendTo
7569
+ } = props;
7616
7570
  const {
7617
7571
  tipStore
7618
7572
  } = reactData;
7619
- const el = refElem.value;
7620
- if (el) {
7621
- const parentNode = el.parentNode;
7573
+ const panelElem = refElem.value;
7574
+ if (panelElem) {
7575
+ const parentNode = panelElem.parentNode;
7622
7576
  if (!parentNode) {
7623
- document.body.appendChild(el);
7577
+ getPopupAppendElement(appendTo).appendChild(panelElem);
7624
7578
  }
7625
7579
  }
7626
7580
  updateValue(true);
7627
- updateZindex();
7581
+ updateZIndex();
7628
7582
  tipStore.placement = 'top';
7629
7583
  tipStore.style = {
7630
7584
  width: 'auto',
@@ -7700,12 +7654,57 @@ function createInternalData() {
7700
7654
  }
7701
7655
  return null;
7702
7656
  };
7703
- tooltipMethods = {
7704
- dispatchEvent(type, params, evnt) {
7705
- emit(type, createEvent(evnt, {
7706
- $tooltip: $xeTooltip
7707
- }, params));
7708
- },
7657
+ const updateTipStyle = () => {
7658
+ const {
7659
+ placement,
7660
+ defaultPlacement,
7661
+ isArrow
7662
+ } = props;
7663
+ const {
7664
+ tipTarget: targetElem,
7665
+ tipStore,
7666
+ tipPos,
7667
+ tipZindex
7668
+ } = reactData;
7669
+ const panelElem = refElem.value;
7670
+ if (!targetElem || !panelElem) {
7671
+ return;
7672
+ }
7673
+ const targetRect = targetElem.getBoundingClientRect();
7674
+ const targetWidth = targetElem.offsetWidth;
7675
+ const targetHeight = targetElem.offsetHeight;
7676
+ const panelWidth = panelElem.offsetWidth;
7677
+ const targetLeft = targetRect.left;
7678
+ const targetTop = targetRect.top;
7679
+ // 支持特殊定位逻辑
7680
+ let left = targetLeft;
7681
+ let top = targetTop + targetHeight;
7682
+ if (tipPos && (tipPos.oLeft || tipPos.oTop)) {
7683
+ if (isArrow) {
7684
+ left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2;
7685
+ } else {
7686
+ left = tipPos.x + 1;
7687
+ top = tipPos.y + 1;
7688
+ }
7689
+ } else {
7690
+ left = targetLeft + (targetWidth - panelWidth) / 2;
7691
+ }
7692
+ const ppObj = updatePanelPlacement(targetElem, panelElem, {
7693
+ defaultTop: top,
7694
+ defaultLeft: left,
7695
+ placement: placement,
7696
+ defaultPlacement: defaultPlacement,
7697
+ teleportTo: true
7698
+ });
7699
+ const panelStyle = Object.assign(ppObj.style, {
7700
+ zIndex: tipZindex
7701
+ });
7702
+ tipStore.placement = ppObj.placement;
7703
+ tipStore.style = panelStyle;
7704
+ tipStore.arrowStyle.left = `${ppObj.arrowLeft}px`;
7705
+ };
7706
+ const tooltipMethods = {
7707
+ dispatchEvent,
7709
7708
  openByEvent(evnt, target, content) {
7710
7709
  return handleVisible(target || reactData.target || getSelectorEl(), content, evnt);
7711
7710
  },
@@ -7728,23 +7727,8 @@ function createInternalData() {
7728
7727
  return handleVisible(target, content);
7729
7728
  },
7730
7729
  updatePlacement() {
7731
- const {
7732
- visible,
7733
- tipTarget
7734
- } = reactData;
7735
- let el = refElem.value;
7736
- if (visible && tipTarget && el) {
7737
- updateTipStyle();
7738
- }
7739
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
7740
- el = refElem.value;
7741
- if (tipTarget && el) {
7742
- updateTipStyle();
7743
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
7744
- updateTipStyle();
7745
- });
7746
- }
7747
- });
7730
+ updateTipStyle();
7731
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(updateTipStyle);
7748
7732
  },
7749
7733
  isActived() {
7750
7734
  return reactData.tipActive;
@@ -7843,7 +7827,7 @@ function createInternalData() {
7843
7827
  if (val) {
7844
7828
  handleVisible(reactData.target || getSelectorEl(), props.content);
7845
7829
  } else {
7846
- tooltipMethods.close();
7830
+ $xeTooltip.close();
7847
7831
  }
7848
7832
  }
7849
7833
  reactData.isUpdate = false;
@@ -7861,21 +7845,21 @@ function createInternalData() {
7861
7845
  trigger,
7862
7846
  content
7863
7847
  } = props;
7864
- const wrapperElem = refElem.value;
7865
- if (wrapperElem) {
7866
- const parentNode = wrapperElem.parentNode;
7848
+ const panelElem = refElem.value;
7849
+ if (panelElem) {
7850
+ const parentNode = panelElem.parentNode;
7867
7851
  if (parentNode) {
7868
7852
  reactData.tipContent = content;
7869
7853
  reactData.tipZindex = nextZIndex();
7870
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(wrapperElem.children, (elem, index) => {
7854
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(panelElem.children, (elem, index) => {
7871
7855
  if (index) {
7872
- parentNode.insertBefore(elem, wrapperElem);
7856
+ parentNode.insertBefore(elem, panelElem);
7873
7857
  if (!reactData.target) {
7874
7858
  reactData.target = elem;
7875
7859
  }
7876
7860
  }
7877
7861
  });
7878
- parentNode.removeChild(wrapperElem);
7862
+ parentNode.removeChild(panelElem);
7879
7863
  const {
7880
7864
  target
7881
7865
  } = reactData;
@@ -7898,7 +7882,7 @@ function createInternalData() {
7898
7882
  const {
7899
7883
  target
7900
7884
  } = reactData;
7901
- const wrapperElem = refElem.value;
7885
+ const panelElem = refElem.value;
7902
7886
  if (target) {
7903
7887
  target.onmouseenter = null;
7904
7888
  target.onmouseleave = null;
@@ -7908,10 +7892,10 @@ function createInternalData() {
7908
7892
  if (contentWrapperfEl) {
7909
7893
  contentWrapperfEl.removeEventListener('wheel', wheelEvent);
7910
7894
  }
7911
- if (wrapperElem) {
7912
- const parentNode = wrapperElem.parentNode;
7895
+ if (panelElem) {
7896
+ const parentNode = panelElem.parentNode;
7913
7897
  if (parentNode) {
7914
- parentNode.removeChild(wrapperElem);
7898
+ parentNode.removeChild(panelElem);
7915
7899
  }
7916
7900
  }
7917
7901
  });
@@ -54139,6 +54123,7 @@ let crossTreeDragNodeObj = null;
54139
54123
  };
54140
54124
  const renderList = treeList => {
54141
54125
  const {
54126
+ loading,
54142
54127
  transform,
54143
54128
  emptyText
54144
54129
  } = props;
@@ -54147,7 +54132,7 @@ let crossTreeDragNodeObj = null;
54147
54132
  } = internalData;
54148
54133
  const childrenField = computeChildrenField.value;
54149
54134
  const emptySlot = slots.empty;
54150
- if (!treeList.length) {
54135
+ if (!loading && !treeList.length) {
54151
54136
  return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
54152
54137
  class: 'vxe-tree--empty-placeholder'
54153
54138
  }, emptySlot ? emptySlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {