xrk-components 2.0.0-beta.76 → 2.0.0-beta.78

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.
package/lib/index.css CHANGED
@@ -20227,6 +20227,11 @@
20227
20227
  width: 100%;
20228
20228
  height: 100%;
20229
20229
  overflow: auto;
20230
+ scrollbar-width: none; /* Firefox */
20231
+ -ms-overflow-style: none; /* IE/Edge */
20232
+ }
20233
+ .base-layout-menu .main-menu[data-v-1bea9a2a]::-webkit-scrollbar {
20234
+ display: none; /* Chrome/Safari/Opera */
20230
20235
  }
20231
20236
  .base-layout-menu .main-menu[data-v-1bea9a2a] .xrk-collapse-item__content {
20232
20237
  padding-bottom: 0;
@@ -20329,16 +20334,27 @@
20329
20334
  -webkit-transition: all 0.15s;
20330
20335
  transition: all 0.15s;
20331
20336
  }
20332
- .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:hover, .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a] {
20337
+ .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:not(.active):hover {
20338
+ color: var(--xrk-color-primary);
20339
+ -webkit-transition: all 0.15s;
20340
+ transition: all 0.15s;
20341
+ }
20342
+ .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:not(.active):hover::before {
20343
+ background-color: var(--xrk-color-primary);
20344
+ }
20345
+ .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:not(.active):hover::after {
20346
+ opacity: 0;
20347
+ }
20348
+ .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a] {
20333
20349
  color: var(--xrk-color-primary);
20334
20350
  background-color: var(--xrk-color-primary-light-9);
20335
20351
  -webkit-transition: all 0.15s;
20336
20352
  transition: all 0.15s;
20337
20353
  }
20338
- .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:hover::before, .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a]::before {
20354
+ .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a]::before {
20339
20355
  background-color: var(--xrk-color-primary);
20340
20356
  }
20341
- .base-layout-menu .main-menu .sub-menu[data-v-1bea9a2a]:hover::after, .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a]::after {
20357
+ .base-layout-menu .main-menu .sub-menu.active[data-v-1bea9a2a]::after {
20342
20358
  opacity: 1;
20343
20359
  -webkit-transform: translateX(0);
20344
20360
  transform: translateX(0);
@@ -20424,6 +20440,7 @@
20424
20440
  -webkit-transform: translateX(0);
20425
20441
  transform: translateX(0);
20426
20442
  }
20443
+ @charset "UTF-8";
20427
20444
  .base-layout-main[data-v-3f66cd84] {
20428
20445
  width: var(--base-layout-main-width, 100vw);
20429
20446
  height: var(--base-layout-main-height, 100vh);
@@ -20455,22 +20472,20 @@
20455
20472
  align-items: center;
20456
20473
  -webkit-box-sizing: border-box;
20457
20474
  box-sizing: border-box;
20475
+ width: 100vw;
20476
+ overflow: auto;
20477
+ overflow-y: hidden;
20478
+ scroll-behavior: smooth;
20479
+ scrollbar-width: none; /* Firefox */
20480
+ -ms-overflow-style: none; /* IE 和 Edge */
20458
20481
  }
20459
- .base-layout-main > .menu-top .home-item[data-v-3f66cd84] {
20460
- -webkit-box-sizing: border-box;
20461
- box-sizing: border-box;
20462
- padding: 5px 20px;
20463
- font-size: 16px;
20464
- color: var(--xrk-color-primary);
20465
- cursor: pointer;
20466
- }
20467
- .base-layout-main > .menu-top .home-item[data-v-3f66cd84]:hover {
20468
- color: var(--xrk-color-primary);
20469
- }
20470
- .base-layout-main > .menu-top .home-item[data-v-3f66cd84]:active {
20471
- opacity: 0.6;
20482
+ .base-layout-main > .menu-top[data-v-3f66cd84]::-webkit-scrollbar {
20483
+ display: none; /* 对于Chrome, Safari */
20472
20484
  }
20473
20485
  .base-layout-main > .menu-top .menu-top-item[data-v-3f66cd84] {
20486
+ -webkit-flex-shrink: 0;
20487
+ -ms-flex-negative: 0;
20488
+ flex-shrink: 0;
20474
20489
  -webkit-box-sizing: border-box;
20475
20490
  box-sizing: border-box;
20476
20491
  padding: 5px 20px;
package/lib/index.esm.js CHANGED
@@ -864,7 +864,7 @@ function easeInOutCubic(t, b, c, d) {
864
864
  }
865
865
 
866
866
  /**
867
- * @vue/shared v3.5.13
867
+ * @vue/shared v3.5.17
868
868
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
869
869
  * @license MIT
870
870
  **/
@@ -21106,8 +21106,9 @@ function getOppositeAxis(axis) {
21106
21106
  function getAxisLength(axis) {
21107
21107
  return axis === 'y' ? 'height' : 'width';
21108
21108
  }
21109
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
21109
21110
  function getSideAxis(placement) {
21110
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
21111
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
21111
21112
  }
21112
21113
  function getAlignmentAxis(placement) {
21113
21114
  return getOppositeAxis(getSideAxis(placement));
@@ -21132,19 +21133,19 @@ function getExpandedPlacements(placement) {
21132
21133
  function getOppositeAlignmentPlacement(placement) {
21133
21134
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
21134
21135
  }
21136
+ const lrPlacement = ['left', 'right'];
21137
+ const rlPlacement = ['right', 'left'];
21138
+ const tbPlacement = ['top', 'bottom'];
21139
+ const btPlacement = ['bottom', 'top'];
21135
21140
  function getSideList(side, isStart, rtl) {
21136
- const lr = ['left', 'right'];
21137
- const rl = ['right', 'left'];
21138
- const tb = ['top', 'bottom'];
21139
- const bt = ['bottom', 'top'];
21140
21141
  switch (side) {
21141
21142
  case 'top':
21142
21143
  case 'bottom':
21143
- if (rtl) return isStart ? rl : lr;
21144
- return isStart ? lr : rl;
21144
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
21145
+ return isStart ? lrPlacement : rlPlacement;
21145
21146
  case 'left':
21146
21147
  case 'right':
21147
- return isStart ? tb : bt;
21148
+ return isStart ? tbPlacement : btPlacement;
21148
21149
  default:
21149
21150
  return [];
21150
21151
  }
@@ -21667,16 +21668,22 @@ const flip$1 = function (options) {
21667
21668
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
21668
21669
  const nextPlacement = placements[nextIndex];
21669
21670
  if (nextPlacement) {
21670
- // Try next placement and re-run the lifecycle.
21671
- return {
21672
- data: {
21673
- index: nextIndex,
21674
- overflows: overflowsData
21675
- },
21676
- reset: {
21677
- placement: nextPlacement
21678
- }
21679
- };
21671
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
21672
+ if (!ignoreCrossAxisOverflow ||
21673
+ // We leave the current main axis only if every placement on that axis
21674
+ // overflows the main axis.
21675
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
21676
+ // Try next placement and re-run the lifecycle.
21677
+ return {
21678
+ data: {
21679
+ index: nextIndex,
21680
+ overflows: overflowsData
21681
+ },
21682
+ reset: {
21683
+ placement: nextPlacement
21684
+ }
21685
+ };
21686
+ }
21680
21687
  }
21681
21688
 
21682
21689
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -21922,6 +21929,8 @@ const inline = function (options) {
21922
21929
  };
21923
21930
  };
21924
21931
 
21932
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
21933
+
21925
21934
  // For type backwards-compatibility, the `OffsetOptions` type was also
21926
21935
  // Derivable.
21927
21936
 
@@ -21935,7 +21944,7 @@ async function convertValueToCoords(state, options) {
21935
21944
  const side = getSide(placement);
21936
21945
  const alignment = getAlignment(placement);
21937
21946
  const isVertical = getSideAxis(placement) === 'y';
21938
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
21947
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
21939
21948
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
21940
21949
  const rawValue = evaluate(options, state);
21941
21950
 
@@ -22135,7 +22144,7 @@ const limitShift = function (options) {
22135
22144
  if (checkCrossAxis) {
22136
22145
  var _middlewareData$offse, _middlewareData$offse2;
22137
22146
  const len = mainAxis === 'y' ? 'width' : 'height';
22138
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
22147
+ const isOriginSide = originSides.has(getSide(placement));
22139
22148
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
22140
22149
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
22141
22150
  if (crossAxisCoord < limitMin) {
@@ -22280,6 +22289,7 @@ function isShadowRoot(value) {
22280
22289
  }
22281
22290
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
22282
22291
  }
22292
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
22283
22293
  function isOverflowElement(element) {
22284
22294
  const {
22285
22295
  overflow,
@@ -22287,27 +22297,32 @@ function isOverflowElement(element) {
22287
22297
  overflowY,
22288
22298
  display
22289
22299
  } = getComputedStyle$1(element);
22290
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
22300
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
22291
22301
  }
22302
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
22292
22303
  function isTableElement(element) {
22293
- return ['table', 'td', 'th'].includes(getNodeName(element));
22304
+ return tableElements.has(getNodeName(element));
22294
22305
  }
22306
+ const topLayerSelectors = [':popover-open', ':modal'];
22295
22307
  function isTopLayer(element) {
22296
- return [':popover-open', ':modal'].some(selector => {
22308
+ return topLayerSelectors.some(selector => {
22297
22309
  try {
22298
22310
  return element.matches(selector);
22299
- } catch (e) {
22311
+ } catch (_e) {
22300
22312
  return false;
22301
22313
  }
22302
22314
  });
22303
22315
  }
22316
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
22317
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
22318
+ const containValues = ['paint', 'layout', 'strict', 'content'];
22304
22319
  function isContainingBlock(elementOrCss) {
22305
22320
  const webkit = isWebKit();
22306
22321
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
22307
22322
 
22308
22323
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
22309
22324
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
22310
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
22325
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
22311
22326
  }
22312
22327
  function getContainingBlock(element) {
22313
22328
  let currentNode = getParentNode(element);
@@ -22325,8 +22340,9 @@ function isWebKit() {
22325
22340
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
22326
22341
  return CSS.supports('-webkit-backdrop-filter', 'none');
22327
22342
  }
22343
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
22328
22344
  function isLastTraversableNode(node) {
22329
- return ['html', 'body', '#document'].includes(getNodeName(node));
22345
+ return lastTraversableNodeNames.has(getNodeName(node));
22330
22346
  }
22331
22347
  function getComputedStyle$1(element) {
22332
22348
  return getWindow(element).getComputedStyle(element);
@@ -22631,6 +22647,7 @@ function getViewportRect(element, strategy) {
22631
22647
  };
22632
22648
  }
22633
22649
 
22650
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
22634
22651
  // Returns the inner client rect, subtracting scrollbars if present.
22635
22652
  function getInnerBoundingClientRect(element, strategy) {
22636
22653
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -22695,7 +22712,7 @@ function getClippingElementAncestors(element, cache) {
22695
22712
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
22696
22713
  currentContainingBlockComputedStyle = null;
22697
22714
  }
22698
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22715
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22699
22716
  if (shouldDropCurrentNode) {
22700
22717
  // Drop non-containing blocks.
22701
22718
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -22758,6 +22775,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22758
22775
  scrollTop: 0
22759
22776
  };
22760
22777
  const offsets = createCoords(0);
22778
+
22779
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22780
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22781
+ function setLeftRTLScrollbarOffset() {
22782
+ offsets.x = getWindowScrollBarX(documentElement);
22783
+ }
22761
22784
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
22762
22785
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
22763
22786
  scroll = getNodeScroll(offsetParent);
@@ -22767,11 +22790,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22767
22790
  offsets.x = offsetRect.x + offsetParent.clientLeft;
22768
22791
  offsets.y = offsetRect.y + offsetParent.clientTop;
22769
22792
  } else if (documentElement) {
22770
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22771
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22772
- offsets.x = getWindowScrollBarX(documentElement);
22793
+ setLeftRTLScrollbarOffset();
22773
22794
  }
22774
22795
  }
22796
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
22797
+ setLeftRTLScrollbarOffset();
22798
+ }
22775
22799
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
22776
22800
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
22777
22801
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -22948,7 +22972,7 @@ function observeMove(element, onMove) {
22948
22972
  // Handle <iframe>s
22949
22973
  root: root.ownerDocument
22950
22974
  });
22951
- } catch (e) {
22975
+ } catch (_e) {
22952
22976
  io = new IntersectionObserver(handleObserve, options);
22953
22977
  }
22954
22978
  io.observe(element);
@@ -73143,7 +73167,7 @@ var script$o = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$m
73143
73167
  filterMethod: { type: Function, required: false },
73144
73168
  maxlength: { type: Number, required: false, default: 50 },
73145
73169
  remoteMethod: { type: Function, required: false },
73146
- notRemoteAutoFilter: { type: Boolean, required: true },
73170
+ notRemoteAutoFilter: { type: Boolean, required: false },
73147
73171
  loadingText: { type: String, required: false, default: '加载中' },
73148
73172
  noMatchText: { type: String, required: false, default: '暂无数据' },
73149
73173
  noDataText: { type: String, required: false, default: '暂无数据' },
@@ -74169,7 +74193,6 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
74169
74193
  render: { type: null, required: false },
74170
74194
  useDefaultRender: { type: Boolean, required: false, default: true }
74171
74195
  }, emits: ["update:modelValue", "change", "expand-change", "blur", "focus", "visible-change", "remove-tag"], setup: function (__props, _a) {
74172
- var _b;
74173
74196
  var expose = _a.expose, emits = _a.emit;
74174
74197
  var _props = __props;
74175
74198
  var cascaderProps = computed(function () {
@@ -74213,8 +74236,12 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
74213
74236
  var handleRemoveTag = function (val) {
74214
74237
  emits('remove-tag', val);
74215
74238
  };
74239
+ var getCheckedNodes = function () {
74240
+ var _a;
74241
+ return (_a = BaseCascaderRef.value) === null || _a === void 0 ? void 0 : _a.getCheckedNodes();
74242
+ };
74216
74243
  expose({
74217
- getCheckedNodes: (_b = BaseCascaderRef.value) === null || _b === void 0 ? void 0 : _b.getCheckedNodes
74244
+ getCheckedNodes: getCheckedNodes
74218
74245
  });
74219
74246
  return function (_ctx, _cache) {
74220
74247
  return (openBlock(), createBlock(unref(ElCascader), {
@@ -75310,7 +75337,12 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
75310
75337
  handleStart: function (file) {
75311
75338
  var _a, _b;
75312
75339
  (_b = (_a = baseUploadRef.value) === null || _a === void 0 ? void 0 : _a.handleStart) === null || _b === void 0 ? void 0 : _b.call(_a, file);
75313
- }
75340
+ },
75341
+ inputClick: function () {
75342
+ var _a;
75343
+ baseUploadRef.value && ((_a = Reflect.get(baseUploadRef.value, 'inputClick')) === null || _a === void 0 ? void 0 : _a());
75344
+ },
75345
+ getBaseUploadRef: function () { return baseUploadRef.value; }
75314
75346
  });
75315
75347
  return function (_ctx, _cache) {
75316
75348
  return (openBlock(), createElementBlock("div", _hoisted_1$6, [
@@ -76804,8 +76836,7 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
76804
76836
  return (openBlock(), createElementBlock("div", {
76805
76837
  key: subIndex,
76806
76838
  class: normalizeClass(["sub-menu", {
76807
- active: activeMenus.value.includes(subMenu.url) ||
76808
- unref(activeSubMenu).url === subMenu.url
76839
+ active: activeMenus.value.includes(subMenu.url)
76809
76840
  }]),
76810
76841
  onClick: function ($event) { return (onMenuClick(subMenu)); },
76811
76842
  name: subMenu.url,
package/lib/index.umd.js CHANGED
@@ -867,7 +867,7 @@
867
867
  }
868
868
 
869
869
  /**
870
- * @vue/shared v3.5.13
870
+ * @vue/shared v3.5.17
871
871
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
872
872
  * @license MIT
873
873
  **/
@@ -21109,8 +21109,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21109
21109
  function getAxisLength(axis) {
21110
21110
  return axis === 'y' ? 'height' : 'width';
21111
21111
  }
21112
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
21112
21113
  function getSideAxis(placement) {
21113
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
21114
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
21114
21115
  }
21115
21116
  function getAlignmentAxis(placement) {
21116
21117
  return getOppositeAxis(getSideAxis(placement));
@@ -21135,19 +21136,19 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21135
21136
  function getOppositeAlignmentPlacement(placement) {
21136
21137
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
21137
21138
  }
21139
+ const lrPlacement = ['left', 'right'];
21140
+ const rlPlacement = ['right', 'left'];
21141
+ const tbPlacement = ['top', 'bottom'];
21142
+ const btPlacement = ['bottom', 'top'];
21138
21143
  function getSideList(side, isStart, rtl) {
21139
- const lr = ['left', 'right'];
21140
- const rl = ['right', 'left'];
21141
- const tb = ['top', 'bottom'];
21142
- const bt = ['bottom', 'top'];
21143
21144
  switch (side) {
21144
21145
  case 'top':
21145
21146
  case 'bottom':
21146
- if (rtl) return isStart ? rl : lr;
21147
- return isStart ? lr : rl;
21147
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
21148
+ return isStart ? lrPlacement : rlPlacement;
21148
21149
  case 'left':
21149
21150
  case 'right':
21150
- return isStart ? tb : bt;
21151
+ return isStart ? tbPlacement : btPlacement;
21151
21152
  default:
21152
21153
  return [];
21153
21154
  }
@@ -21670,16 +21671,22 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21670
21671
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
21671
21672
  const nextPlacement = placements[nextIndex];
21672
21673
  if (nextPlacement) {
21673
- // Try next placement and re-run the lifecycle.
21674
- return {
21675
- data: {
21676
- index: nextIndex,
21677
- overflows: overflowsData
21678
- },
21679
- reset: {
21680
- placement: nextPlacement
21681
- }
21682
- };
21674
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
21675
+ if (!ignoreCrossAxisOverflow ||
21676
+ // We leave the current main axis only if every placement on that axis
21677
+ // overflows the main axis.
21678
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
21679
+ // Try next placement and re-run the lifecycle.
21680
+ return {
21681
+ data: {
21682
+ index: nextIndex,
21683
+ overflows: overflowsData
21684
+ },
21685
+ reset: {
21686
+ placement: nextPlacement
21687
+ }
21688
+ };
21689
+ }
21683
21690
  }
21684
21691
 
21685
21692
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -21925,6 +21932,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21925
21932
  };
21926
21933
  };
21927
21934
 
21935
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
21936
+
21928
21937
  // For type backwards-compatibility, the `OffsetOptions` type was also
21929
21938
  // Derivable.
21930
21939
 
@@ -21938,7 +21947,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21938
21947
  const side = getSide(placement);
21939
21948
  const alignment = getAlignment(placement);
21940
21949
  const isVertical = getSideAxis(placement) === 'y';
21941
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
21950
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
21942
21951
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
21943
21952
  const rawValue = evaluate(options, state);
21944
21953
 
@@ -22138,7 +22147,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22138
22147
  if (checkCrossAxis) {
22139
22148
  var _middlewareData$offse, _middlewareData$offse2;
22140
22149
  const len = mainAxis === 'y' ? 'width' : 'height';
22141
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
22150
+ const isOriginSide = originSides.has(getSide(placement));
22142
22151
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
22143
22152
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
22144
22153
  if (crossAxisCoord < limitMin) {
@@ -22283,6 +22292,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22283
22292
  }
22284
22293
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
22285
22294
  }
22295
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
22286
22296
  function isOverflowElement(element) {
22287
22297
  const {
22288
22298
  overflow,
@@ -22290,27 +22300,32 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22290
22300
  overflowY,
22291
22301
  display
22292
22302
  } = getComputedStyle$1(element);
22293
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
22303
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
22294
22304
  }
22305
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
22295
22306
  function isTableElement(element) {
22296
- return ['table', 'td', 'th'].includes(getNodeName(element));
22307
+ return tableElements.has(getNodeName(element));
22297
22308
  }
22309
+ const topLayerSelectors = [':popover-open', ':modal'];
22298
22310
  function isTopLayer(element) {
22299
- return [':popover-open', ':modal'].some(selector => {
22311
+ return topLayerSelectors.some(selector => {
22300
22312
  try {
22301
22313
  return element.matches(selector);
22302
- } catch (e) {
22314
+ } catch (_e) {
22303
22315
  return false;
22304
22316
  }
22305
22317
  });
22306
22318
  }
22319
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
22320
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
22321
+ const containValues = ['paint', 'layout', 'strict', 'content'];
22307
22322
  function isContainingBlock(elementOrCss) {
22308
22323
  const webkit = isWebKit();
22309
22324
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
22310
22325
 
22311
22326
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
22312
22327
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
22313
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
22328
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
22314
22329
  }
22315
22330
  function getContainingBlock(element) {
22316
22331
  let currentNode = getParentNode(element);
@@ -22328,8 +22343,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22328
22343
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
22329
22344
  return CSS.supports('-webkit-backdrop-filter', 'none');
22330
22345
  }
22346
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
22331
22347
  function isLastTraversableNode(node) {
22332
- return ['html', 'body', '#document'].includes(getNodeName(node));
22348
+ return lastTraversableNodeNames.has(getNodeName(node));
22333
22349
  }
22334
22350
  function getComputedStyle$1(element) {
22335
22351
  return getWindow(element).getComputedStyle(element);
@@ -22634,6 +22650,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22634
22650
  };
22635
22651
  }
22636
22652
 
22653
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
22637
22654
  // Returns the inner client rect, subtracting scrollbars if present.
22638
22655
  function getInnerBoundingClientRect(element, strategy) {
22639
22656
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -22698,7 +22715,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22698
22715
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
22699
22716
  currentContainingBlockComputedStyle = null;
22700
22717
  }
22701
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22718
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22702
22719
  if (shouldDropCurrentNode) {
22703
22720
  // Drop non-containing blocks.
22704
22721
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -22761,6 +22778,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22761
22778
  scrollTop: 0
22762
22779
  };
22763
22780
  const offsets = createCoords(0);
22781
+
22782
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22783
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22784
+ function setLeftRTLScrollbarOffset() {
22785
+ offsets.x = getWindowScrollBarX(documentElement);
22786
+ }
22764
22787
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
22765
22788
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
22766
22789
  scroll = getNodeScroll(offsetParent);
@@ -22770,11 +22793,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22770
22793
  offsets.x = offsetRect.x + offsetParent.clientLeft;
22771
22794
  offsets.y = offsetRect.y + offsetParent.clientTop;
22772
22795
  } else if (documentElement) {
22773
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22774
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22775
- offsets.x = getWindowScrollBarX(documentElement);
22796
+ setLeftRTLScrollbarOffset();
22776
22797
  }
22777
22798
  }
22799
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
22800
+ setLeftRTLScrollbarOffset();
22801
+ }
22778
22802
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
22779
22803
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
22780
22804
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -22951,7 +22975,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22951
22975
  // Handle <iframe>s
22952
22976
  root: root.ownerDocument
22953
22977
  });
22954
- } catch (e) {
22978
+ } catch (_e) {
22955
22979
  io = new IntersectionObserver(handleObserve, options);
22956
22980
  }
22957
22981
  io.observe(element);
@@ -73146,7 +73170,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
73146
73170
  filterMethod: { type: Function, required: false },
73147
73171
  maxlength: { type: Number, required: false, default: 50 },
73148
73172
  remoteMethod: { type: Function, required: false },
73149
- notRemoteAutoFilter: { type: Boolean, required: true },
73173
+ notRemoteAutoFilter: { type: Boolean, required: false },
73150
73174
  loadingText: { type: String, required: false, default: '加载中' },
73151
73175
  noMatchText: { type: String, required: false, default: '暂无数据' },
73152
73176
  noDataText: { type: String, required: false, default: '暂无数据' },
@@ -74172,7 +74196,6 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74172
74196
  render: { type: null, required: false },
74173
74197
  useDefaultRender: { type: Boolean, required: false, default: true }
74174
74198
  }, emits: ["update:modelValue", "change", "expand-change", "blur", "focus", "visible-change", "remove-tag"], setup: function (__props, _a) {
74175
- var _b;
74176
74199
  var expose = _a.expose, emits = _a.emit;
74177
74200
  var _props = __props;
74178
74201
  var cascaderProps = vue.computed(function () {
@@ -74216,8 +74239,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74216
74239
  var handleRemoveTag = function (val) {
74217
74240
  emits('remove-tag', val);
74218
74241
  };
74242
+ var getCheckedNodes = function () {
74243
+ var _a;
74244
+ return (_a = BaseCascaderRef.value) === null || _a === void 0 ? void 0 : _a.getCheckedNodes();
74245
+ };
74219
74246
  expose({
74220
- getCheckedNodes: (_b = BaseCascaderRef.value) === null || _b === void 0 ? void 0 : _b.getCheckedNodes
74247
+ getCheckedNodes: getCheckedNodes
74221
74248
  });
74222
74249
  return function (_ctx, _cache) {
74223
74250
  return (vue.openBlock(), vue.createBlock(vue.unref(ElCascader), {
@@ -75313,7 +75340,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
75313
75340
  handleStart: function (file) {
75314
75341
  var _a, _b;
75315
75342
  (_b = (_a = baseUploadRef.value) === null || _a === void 0 ? void 0 : _a.handleStart) === null || _b === void 0 ? void 0 : _b.call(_a, file);
75316
- }
75343
+ },
75344
+ inputClick: function () {
75345
+ var _a;
75346
+ baseUploadRef.value && ((_a = Reflect.get(baseUploadRef.value, 'inputClick')) === null || _a === void 0 ? void 0 : _a());
75347
+ },
75348
+ getBaseUploadRef: function () { return baseUploadRef.value; }
75317
75349
  });
75318
75350
  return function (_ctx, _cache) {
75319
75351
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
@@ -76807,8 +76839,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
76807
76839
  return (vue.openBlock(), vue.createElementBlock("div", {
76808
76840
  key: subIndex,
76809
76841
  class: vue.normalizeClass(["sub-menu", {
76810
- active: activeMenus.value.includes(subMenu.url) ||
76811
- vue.unref(activeSubMenu).url === subMenu.url
76842
+ active: activeMenus.value.includes(subMenu.url)
76812
76843
  }]),
76813
76844
  onClick: function ($event) { return (onMenuClick(subMenu)); },
76814
76845
  name: subMenu.url,
@@ -96,7 +96,7 @@ declare const _default: import("vue").DefineComponent<{
96
96
  };
97
97
  notRemoteAutoFilter: {
98
98
  type: BooleanConstructor;
99
- required: true;
99
+ required: false;
100
100
  };
101
101
  loadingText: {
102
102
  type: StringConstructor;
@@ -221,7 +221,7 @@ declare const _default: import("vue").DefineComponent<{
221
221
  };
222
222
  notRemoteAutoFilter: {
223
223
  type: BooleanConstructor;
224
- required: true;
224
+ required: false;
225
225
  };
226
226
  loadingText: {
227
227
  type: StringConstructor;
@@ -268,6 +268,7 @@ declare const _default: import("vue").DefineComponent<{
268
268
  allowCreate: boolean;
269
269
  fitInputWidth: boolean;
270
270
  maxlength: number;
271
+ notRemoteAutoFilter: boolean;
271
272
  loadingText: string;
272
273
  noMatchText: string;
273
274
  noDataText: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.76",
3
+ "version": "2.0.0-beta.78",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",