yuang-framework-ui-pc 1.1.8 → 1.1.10

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.
@@ -95,9 +95,7 @@ const _sfc_main = defineComponent({
95
95
  };
96
96
  const fillTexts = (ctx, drawX, drawY, drawWidth, drawHeight) => {
97
97
  const ratio = getPixelRatio();
98
- const { color, fontSize, fontStyle, fontWeight, fontFamily } = getFont(
99
- props.font
100
- );
98
+ const { color, fontSize, fontStyle, fontWeight, fontFamily } = getFont(props.font);
101
99
  const mergedFontSize = fontSize * ratio;
102
100
  ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${drawHeight}px ${fontFamily}`;
103
101
  ctx.fillStyle = color;
@@ -107,11 +105,7 @@ const _sfc_main = defineComponent({
107
105
  const content = props.content;
108
106
  const contents = Array.isArray(content) ? content : [content];
109
107
  contents.forEach((item, index2) => {
110
- ctx.fillText(
111
- item ?? "",
112
- drawX,
113
- drawY + index2 * (mergedFontSize + props.lineGap * ratio)
114
- );
108
+ ctx.fillText(item ?? "", drawX, drawY + index2 * (mergedFontSize + props.lineGap * ratio));
115
109
  });
116
110
  };
117
111
  const render = () => {
@@ -155,13 +149,7 @@ const _sfc_main = defineComponent({
155
149
  ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
156
150
  ctx.restore();
157
151
  rotateWatermark(ctx, alternateRotateX, alternateRotateY, rotate);
158
- ctx.drawImage(
159
- img,
160
- alternateDrawX,
161
- alternateDrawY,
162
- drawWidth,
163
- drawHeight
164
- );
152
+ ctx.drawImage(img, alternateDrawX, alternateDrawY, drawWidth, drawHeight);
165
153
  updateStyle(canvas.toDataURL(), `${(gapX + markWidth) * SIZE}px`);
166
154
  };
167
155
  img.crossOrigin = "anonymous";
@@ -9,20 +9,7 @@ const LayoutSkeleton = require("./components/layout-skeleton");
9
9
  const LayoutTabs = require("./components/layout-tabs");
10
10
  const props = require("./props");
11
11
  const tabSlots = ["tabTitle", "tabExtra", "tabHome"];
12
- const ownSlots = [
13
- "logo",
14
- "logoTitle",
15
- "left",
16
- "right",
17
- "center",
18
- "breadcrumb",
19
- "top",
20
- "bottom",
21
- "boxTop",
22
- "boxBottom",
23
- "body",
24
- ...tabSlots
25
- ];
12
+ const ownSlots = ["logo", "logoTitle", "left", "right", "center", "breadcrumb", "top", "bottom", "boxTop", "boxBottom", "body", ...tabSlots];
26
13
  const _sfc_main = vue.defineComponent({
27
14
  name: "EleAdminLayout",
28
15
  components: {
@@ -46,56 +33,26 @@ const _sfc_main = vue.defineComponent({
46
33
  const contentRef = vue.shallowRef(null);
47
34
  const modalsRef = vue.shallowRef(null);
48
35
  const isDisableTransition = vue.shallowRef(false);
49
- const layoutHeight = vue.computed(
50
- () => typeof props$1.height === "number" ? `${props$1.height}px` : props$1.height
51
- );
52
- const isFixedHeader = vue.computed(
53
- () => !props$1.fixedBody && props$1.fixedHeader
54
- );
55
- const isFixedSidebar = vue.computed(
56
- () => !props$1.fixedBody && props$1.fixedSidebar
57
- );
36
+ const layoutHeight = vue.computed(() => typeof props$1.height === "number" ? `${props$1.height}px` : props$1.height);
37
+ const isFixedHeader = vue.computed(() => !props$1.fixedBody && props$1.fixedHeader);
38
+ const isFixedSidebar = vue.computed(() => !props$1.fixedBody && props$1.fixedSidebar);
58
39
  const isTopLayout = vue.computed(() => props$1.layout === "top");
59
40
  const isSideLayout = vue.computed(() => props$1.layout === "side");
60
- const isBoxSidebar = vue.computed(
61
- () => props$1.sidebarLayout === "box"
62
- );
63
- const isMixSidebar = vue.computed(
64
- () => !isTopLayout.value && (props$1.sidebarLayout === "mix" || isBoxSidebar.value)
65
- );
41
+ const isBoxSidebar = vue.computed(() => props$1.sidebarLayout === "box");
42
+ const isMixSidebar = vue.computed(() => !isTopLayout.value && (props$1.sidebarLayout === "mix" || isBoxSidebar.value));
66
43
  const isMobile = vue.computed(() => props$1.mobile && !isTopLayout.value);
67
- const isHeaderLogo = vue.computed(
68
- () => (props$1.logoInHeader || isTopLayout.value) && !isSideLayout.value && !isMobile.value
69
- );
70
- const showHeaderMenus = vue.computed(
71
- () => isTopLayout.value || props$1.layout === "mix"
72
- );
44
+ const isHeaderLogo = vue.computed(() => (props$1.logoInHeader || isTopLayout.value) && !isSideLayout.value && !isMobile.value);
45
+ const showHeaderMenus = vue.computed(() => isTopLayout.value || props$1.layout === "mix");
73
46
  const showHeaderTabs = vue.computed(() => props$1.tabBar === "header");
74
- const isDarkHeader = vue.computed(
75
- () => props$1.headerStyle === "dark"
76
- );
77
- const isPrimaryHeader = vue.computed(
78
- () => props$1.headerStyle === "primary"
79
- );
47
+ const isDarkHeader = vue.computed(() => props$1.headerStyle === "dark");
48
+ const isPrimaryHeader = vue.computed(() => props$1.headerStyle === "primary");
80
49
  const isButtonTab = vue.computed(() => props$1.tabStyle === "button");
81
- const isDarkSidebar = vue.computed(
82
- () => props$1.sidebarStyle === "dark"
83
- );
84
- const isDarkMixSidebar = vue.computed(
85
- () => isMixSidebar.value && !isHeaderLogo.value && isDarkSidebar.value && (isDarkHeader.value || isPrimaryHeader.value)
86
- );
87
- const isGhostHeader = vue.computed(
88
- () => !isDarkHeader.value && !isPrimaryHeader.value && showHeaderTabs.value && isButtonTab.value
89
- );
90
- const isGhostSidebar = vue.computed(
91
- () => isGhostHeader.value && !isDarkSidebar.value
92
- );
93
- const isCollapseSidebar = vue.computed(
94
- () => !isMobile.value && props$1.collapse
95
- );
96
- const isCollapseMobile = vue.computed(
97
- () => isMobile.value && props$1.collapse
98
- );
50
+ const isDarkSidebar = vue.computed(() => props$1.sidebarStyle === "dark");
51
+ const isDarkMixSidebar = vue.computed(() => isMixSidebar.value && !isHeaderLogo.value && isDarkSidebar.value && (isDarkHeader.value || isPrimaryHeader.value));
52
+ const isGhostHeader = vue.computed(() => !isDarkHeader.value && !isPrimaryHeader.value && showHeaderTabs.value && isButtonTab.value);
53
+ const isGhostSidebar = vue.computed(() => isGhostHeader.value && !isDarkSidebar.value);
54
+ const isCollapseSidebar = vue.computed(() => !isMobile.value && props$1.collapse);
55
+ const isCollapseMobile = vue.computed(() => isMobile.value && props$1.collapse);
99
56
  const getContentEl = () => {
100
57
  return contentRef.value;
101
58
  };
@@ -215,36 +172,24 @@ const _sfc_main = vue.defineComponent({
215
172
  getBodyWrapperEl
216
173
  });
217
174
  vue.provide(props.LAYOUT_KEY, layoutProvide);
218
- vue.watch(
219
- [
220
- () => props$1.layout,
221
- () => props$1.sidebarLayout,
222
- () => props$1.fixedSidebar,
223
- () => props$1.fixedBody,
224
- () => props$1.logoInHeader,
225
- () => props$1.maximized,
226
- isFixedHeader,
227
- isMobile
228
- ],
229
- () => {
230
- isDisableTransition.value = true;
231
- startDisableTransitionTimer(() => {
232
- isDisableTransition.value = false;
233
- });
234
- if (layoutProvide.layout !== props$1.layout) {
235
- layoutProvide.layout = props$1.layout;
236
- }
237
- if (layoutProvide.maximized !== props$1.maximized) {
238
- layoutProvide.maximized = props$1.maximized;
239
- }
240
- if (layoutProvide.fixedHeader !== isFixedHeader.value) {
241
- layoutProvide.fixedHeader = isFixedHeader.value;
242
- }
243
- if (layoutProvide.fixedBody !== props$1.fixedBody) {
244
- layoutProvide.fixedBody = props$1.fixedBody;
245
- }
175
+ vue.watch([() => props$1.layout, () => props$1.sidebarLayout, () => props$1.fixedSidebar, () => props$1.fixedBody, () => props$1.logoInHeader, () => props$1.maximized, isFixedHeader, isMobile], () => {
176
+ isDisableTransition.value = true;
177
+ startDisableTransitionTimer(() => {
178
+ isDisableTransition.value = false;
179
+ });
180
+ if (layoutProvide.layout !== props$1.layout) {
181
+ layoutProvide.layout = props$1.layout;
182
+ }
183
+ if (layoutProvide.maximized !== props$1.maximized) {
184
+ layoutProvide.maximized = props$1.maximized;
185
+ }
186
+ if (layoutProvide.fixedHeader !== isFixedHeader.value) {
187
+ layoutProvide.fixedHeader = isFixedHeader.value;
246
188
  }
247
- );
189
+ if (layoutProvide.fixedBody !== props$1.fixedBody) {
190
+ layoutProvide.fixedBody = props$1.fixedBody;
191
+ }
192
+ });
248
193
  vue.watch([() => props$1.sidebarActive, () => props$1.collapse], () => {
249
194
  vue.nextTick(() => {
250
195
  sidebarScrollToActive();
@@ -356,14 +301,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
356
301
  const _component_LayoutSkeleton = vue.resolveComponent("LayoutSkeleton");
357
302
  return vue.openBlock(), vue.createBlock(_component_LayoutSkeleton, {
358
303
  isHeaderLogo: _ctx.isHeaderLogo,
359
- class: vue.normalizeClass([
360
- { "is-fixed-body": _ctx.fixedBody },
361
- { "is-transition-disabled": _ctx.isDisableTransition },
362
- { "is-maximized": _ctx.maximized },
363
- { "is-expanded": _ctx.maximized === "expanded" },
364
- { "is-mobile": _ctx.isMobile },
365
- { "is-collapse": _ctx.isCollapseMobile }
366
- ]),
304
+ class: vue.normalizeClass([{ "is-fixed-body": _ctx.fixedBody }, { "is-transition-disabled": _ctx.isDisableTransition }, { "is-maximized": _ctx.maximized }, { "is-expanded": _ctx.maximized === "expanded" }, { "is-mobile": _ctx.isMobile }, { "is-collapse": _ctx.isCollapseMobile }]),
367
305
  style: vue.normalizeStyle({
368
306
  minHeight: _ctx.layoutHeight,
369
307
  height: _ctx.fixedBody ? _ctx.layoutHeight : void 0
@@ -372,14 +310,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
372
310
  head: vue.withCtx(() => [
373
311
  !_ctx.isSideLayout ? (vue.openBlock(), vue.createElementBlock("div", {
374
312
  key: 0,
375
- class: vue.normalizeClass([
376
- "ele-admin-header",
377
- { "is-dark": _ctx.isDarkHeader },
378
- { "is-primary": _ctx.isPrimaryHeader },
379
- { "is-ghost": _ctx.isGhostHeader },
380
- { "show-divider": _ctx.tabBar && !_ctx.showHeaderTabs && !_ctx.isButtonTab },
381
- { "is-fixed": _ctx.isFixedHeader }
382
- ]),
313
+ class: vue.normalizeClass(["ele-admin-header", { "is-dark": _ctx.isDarkHeader }, { "is-primary": _ctx.isPrimaryHeader }, { "is-ghost": _ctx.isGhostHeader }, { "show-divider": _ctx.tabBar && !_ctx.showHeaderTabs && !_ctx.isButtonTab }, { "is-fixed": _ctx.isFixedHeader }]),
383
314
  style: vue.normalizeStyle(_ctx.headerCustomStyle),
384
315
  onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.handleHeadMouseenter && _ctx.handleHeadMouseenter(...args)),
385
316
  onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleHeadMouseleave && _ctx.handleHeadMouseleave(...args))
@@ -458,9 +389,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
458
389
  onTabContextMenu: _ctx.handleTabContextMenu,
459
390
  onTabSortChange: _ctx.handleTabSortChange
460
391
  }, vue.createSlots({ _: 2 }, [
461
- vue.renderList(Object.keys(_ctx.$slots).filter(
462
- (k) => _ctx.tabSlots.includes(k)
463
- ), (name) => {
392
+ vue.renderList(Object.keys(_ctx.$slots).filter((k) => _ctx.tabSlots.includes(k)), (name) => {
464
393
  return {
465
394
  name,
466
395
  fn: vue.withCtx((slotProps) => [
@@ -477,26 +406,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
477
406
  side: vue.withCtx(() => [
478
407
  !_ctx.isTopLayout ? (vue.openBlock(), vue.createElementBlock("div", {
479
408
  key: 0,
480
- class: vue.normalizeClass([
481
- "ele-admin-side",
482
- { "is-fixed": _ctx.isFixedSidebar },
483
- { "show-placeholder": _ctx.isFixedSidebar && _ctx.isHeaderLogo },
484
- { "is-collapse": !_ctx.isMobile && !_ctx.isBoxSidebar && _ctx.isCollapseSidebar },
485
- { "is-mix": !_ctx.isMobile && !_ctx.isBoxSidebar && _ctx.isMixSidebar },
486
- { "is-compact": !_ctx.isMobile && _ctx.compact },
487
- { "is-box": !_ctx.isMobile && _ctx.isBoxSidebar }
488
- ]),
409
+ class: vue.normalizeClass(["ele-admin-side", { "is-fixed": _ctx.isFixedSidebar }, { "show-placeholder": _ctx.isFixedSidebar && _ctx.isHeaderLogo }, { "is-collapse": !_ctx.isMobile && !_ctx.isBoxSidebar && _ctx.isCollapseSidebar }, { "is-mix": !_ctx.isMobile && !_ctx.isBoxSidebar && _ctx.isMixSidebar }, { "is-compact": !_ctx.isMobile && _ctx.compact }, { "is-box": !_ctx.isMobile && _ctx.isBoxSidebar }]),
489
410
  style: vue.normalizeStyle({ height: _ctx.isFixedSidebar ? _ctx.layoutHeight : void 0 })
490
411
  }, [
491
412
  _ctx.isMixSidebar ? (vue.openBlock(), vue.createElementBlock("div", {
492
413
  key: 0,
493
- class: vue.normalizeClass([
494
- "ele-admin-sidebox",
495
- { "is-dark": _ctx.isDarkSidebar },
496
- { "is-ghost": _ctx.isGhostSidebar },
497
- { "show-divider": !_ctx.isCollapseSidebar && !_ctx.isBoxSidebar },
498
- { "is-compact": _ctx.compact }
499
- ]),
414
+ class: vue.normalizeClass(["ele-admin-sidebox", { "is-dark": _ctx.isDarkSidebar }, { "is-ghost": _ctx.isGhostSidebar }, { "show-divider": !_ctx.isCollapseSidebar && !_ctx.isBoxSidebar }, { "is-compact": _ctx.compact }]),
500
415
  style: vue.normalizeStyle(_ctx.sideboxCustomStyle),
501
416
  onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleBoxMouseEnter && _ctx.handleBoxMouseEnter(...args)),
502
417
  onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.handleBoxMouseLeave && _ctx.handleBoxMouseLeave(...args))
@@ -553,13 +468,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
553
468
  ], 38)) : vue.createCommentVNode("", true),
554
469
  !_ctx.isBoxSidebar ? (vue.openBlock(), vue.createElementBlock("div", {
555
470
  key: 1,
556
- class: vue.normalizeClass([
557
- "ele-admin-sidebar",
558
- { "is-dark": _ctx.isMixSidebar ? _ctx.isDarkMixSidebar : _ctx.isDarkSidebar },
559
- { "is-ghost": _ctx.isGhostSidebar },
560
- { "is-mix": _ctx.isMixSidebar },
561
- { "is-collapse": _ctx.isCollapseSidebar }
562
- ]),
471
+ class: vue.normalizeClass(["ele-admin-sidebar", { "is-dark": _ctx.isMixSidebar ? _ctx.isDarkMixSidebar : _ctx.isDarkSidebar }, { "is-ghost": _ctx.isGhostSidebar }, { "is-mix": _ctx.isMixSidebar }, { "is-collapse": _ctx.isCollapseSidebar }]),
563
472
  style: vue.normalizeStyle(_ctx.sidebarCustomStyle),
564
473
  onMouseenter: _cache[4] || (_cache[4] = (...args) => _ctx.handleSideMouseEnter && _ctx.handleSideMouseEnter(...args)),
565
474
  onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleSideMouseLeave && _ctx.handleSideMouseLeave(...args))
@@ -640,20 +549,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
640
549
  tabContextMenu: _ctx.tabContextMenu,
641
550
  tabContextMenus: _ctx.tabContextMenus,
642
551
  tabSortable: _ctx.tabSortable,
643
- class: vue.normalizeClass([
644
- { "is-fixed-home": _ctx.fixedHome },
645
- { "is-fixed": _ctx.isFixedHeader },
646
- { "is-fixed-top": _ctx.isFixedHeader && (_ctx.isSideLayout || _ctx.maximized) }
647
- ]),
552
+ class: vue.normalizeClass([{ "is-fixed-home": _ctx.fixedHome }, { "is-fixed": _ctx.isFixedHeader }, { "is-fixed-top": _ctx.isFixedHeader && (_ctx.isSideLayout || _ctx.maximized) }]),
648
553
  style: vue.normalizeStyle(_ctx.tabsCustomStyle),
649
554
  onTabClick: _ctx.handleTabClick,
650
555
  onTabRemove: _ctx.handleTabRemove,
651
556
  onTabContextMenu: _ctx.handleTabContextMenu,
652
557
  onTabSortChange: _ctx.handleTabSortChange
653
558
  }, vue.createSlots({ _: 2 }, [
654
- vue.renderList(Object.keys(_ctx.$slots).filter(
655
- (k) => _ctx.tabSlots.includes(k)
656
- ), (name) => {
559
+ vue.renderList(Object.keys(_ctx.$slots).filter((k) => _ctx.tabSlots.includes(k)), (name) => {
657
560
  return {
658
561
  name,
659
562
  fn: vue.withCtx((slotProps) => [
@@ -34,12 +34,6 @@ const index = vue.defineComponent({
34
34
  },
35
35
  { deep: true }
36
36
  );
37
- vue.watch(
38
- () => props$1.license,
39
- () => {
40
- config.license = props$1.license;
41
- }
42
- );
43
37
  vue.watch(
44
38
  () => props$1.mapKey,
45
39
  () => {
@@ -13,7 +13,7 @@ function getRowClass(rowClass, param) {
13
13
  }
14
14
  }
15
15
  function getBodyRowClass(rowClass, param) {
16
- const classes = ["ele-table-tr"];
16
+ const classes = ["ele-table-tr", "ele-table-tr-" + param.row.id];
17
17
  const custom = getRowClass(rowClass, param);
18
18
  if (custom != null) {
19
19
  classes.push(custom);
@@ -149,10 +149,10 @@ declare const _default: import('vue').DefineComponent<{
149
149
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
150
150
  onClose?: (() => any) | undefined;
151
151
  onOpen?: (() => any) | undefined;
152
- onOpenAutoFocus?: (() => any) | undefined;
153
- onCloseAutoFocus?: (() => any) | undefined;
154
152
  onOpened?: (() => any) | undefined;
155
153
  onClosed?: (() => any) | undefined;
154
+ onOpenAutoFocus?: (() => any) | undefined;
155
+ onCloseAutoFocus?: (() => any) | undefined;
156
156
  }, {
157
157
  size: import('element-plus/es/utils/index').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
158
158
  title: string;
@@ -43,12 +43,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
43
43
  !_ctx.isCircle ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
44
44
  key: 0,
45
45
  style: vue.normalizeStyle(_ctx.spinnerStyle),
46
- class: vue.normalizeClass([
47
- "ele-loading-spinner",
48
- { "ele-loading-blur": _ctx.blur },
49
- { "ele-loading-small": _ctx.size === "small" },
50
- { "ele-loading-large": _ctx.size === "large" }
51
- ])
46
+ class: vue.normalizeClass(["ele-loading-spinner", { "ele-loading-blur": _ctx.blur }, { "ele-loading-small": _ctx.size === "small" }, { "ele-loading-large": _ctx.size === "large" }])
52
47
  }, [
53
48
  vue.renderSlot(_ctx.$slots, "spinner", {}, () => [
54
49
  _hoisted_1
@@ -207,10 +207,10 @@ declare const _default: import('vue').DefineComponent<{
207
207
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
208
208
  onClose?: (() => any) | undefined;
209
209
  onOpen?: (() => any) | undefined;
210
- onOpenAutoFocus?: (() => any) | undefined;
211
- onCloseAutoFocus?: (() => any) | undefined;
212
210
  onOpened?: (() => any) | undefined;
213
211
  onClosed?: (() => any) | undefined;
212
+ onOpenAutoFocus?: (() => any) | undefined;
213
+ onCloseAutoFocus?: (() => any) | undefined;
214
214
  "onUpdate:fullscreen"?: ((_fullscreen: boolean) => any) | undefined;
215
215
  }, {
216
216
  form: boolean;
@@ -36,6 +36,7 @@ declare const _default: import('vue').DefineComponent<{
36
36
  background: BooleanConstructor;
37
37
  disabled: BooleanConstructor;
38
38
  hideOnSinglePage: BooleanConstructor;
39
+ appendSizeTo: StringConstructor;
39
40
  }, {
40
41
  isInfinite: import('vue').ComputedRef<boolean>;
41
42
  pageTotal: import('vue').ComputedRef<number | undefined>;
@@ -83,6 +84,7 @@ declare const _default: import('vue').DefineComponent<{
83
84
  background: BooleanConstructor;
84
85
  disabled: BooleanConstructor;
85
86
  hideOnSinglePage: BooleanConstructor;
87
+ appendSizeTo: StringConstructor;
86
88
  }>> & {
87
89
  "onUpdate:currentPage"?: ((_currentPage: number) => any) | undefined;
88
90
  "onUpdate:pageSize"?: ((_pageSize: number) => any) | undefined;
@@ -46,6 +46,7 @@ export declare const paginationProps: {
46
46
  background: BooleanConstructor;
47
47
  disabled: BooleanConstructor;
48
48
  hideOnSinglePage: BooleanConstructor;
49
+ appendSizeTo: StringConstructor;
49
50
  };
50
51
  export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
51
52
  /**
@@ -29,6 +29,7 @@ const _sfc_main = vue.defineComponent({
29
29
  props: props.proTableProps,
30
30
  emits: props.proTableEmits,
31
31
  setup(props2, { emit }) {
32
+ const isShowTable = vue.ref(true);
32
33
  const events = util.useEmits(emit);
33
34
  const methods = util.useMethods(() => getTableRef());
34
35
  const globalProps = receiver.useGlobalProps("table");
@@ -145,7 +146,7 @@ const _sfc_main = vue.defineComponent({
145
146
  style: tableMaximized.value ? { zIndex } : void 0
146
147
  };
147
148
  });
148
- const reload = (option, parent, resolve) => {
149
+ const load = (option, parent, resolve) => {
149
150
  if (option) {
150
151
  if (option.currentPage) {
151
152
  tablePage.value = option.currentPage;
@@ -199,6 +200,18 @@ const _sfc_main = vue.defineComponent({
199
200
  resolve && console.error(e);
200
201
  });
201
202
  };
203
+ const reload = (option, parent, resolve) => {
204
+ load(option, parent, resolve);
205
+ };
206
+ const reset = () => {
207
+ methods.doLayout();
208
+ if (props2.lazy) {
209
+ isShowTable.value = false;
210
+ vue.nextTick(() => {
211
+ isShowTable.value = true;
212
+ });
213
+ }
214
+ };
202
215
  const requestCallback = (data, totalCount, parent, response, resolve) => {
203
216
  var _a;
204
217
  if (!Array.isArray(data)) {
@@ -231,9 +244,9 @@ const _sfc_main = vue.defineComponent({
231
244
  }
232
245
  tableLoading.value = false;
233
246
  const result = {
234
- data: tableData.value,
235
- page: tablePage.value,
236
- total: tableTotal.value,
247
+ records: tableData.value,
248
+ currentPage: tablePage.value,
249
+ totalCount: tableTotal.value,
237
250
  response
238
251
  };
239
252
  handleDone(result, parent);
@@ -329,9 +342,6 @@ const _sfc_main = vue.defineComponent({
329
342
  emit("update:selections", selection);
330
343
  }
331
344
  };
332
- const reloadTable = () => {
333
- methods.doLayout();
334
- };
335
345
  const getTableRef = () => {
336
346
  return tableViewRef.value;
337
347
  };
@@ -348,9 +358,9 @@ const _sfc_main = vue.defineComponent({
348
358
  const rowKey = tableRowKey.value;
349
359
  const data = util$1.sortData(props2.datasource, tableState.sorter);
350
360
  const index2 = data.findIndex((d) => core.getValue(d, rowKey) === key);
351
- const page = Math.floor(index2 / tableLimit.value) + 1;
352
- if (tablePage.value !== page) {
353
- reload({ page });
361
+ const currentPage = Math.floor(index2 / tableLimit.value) + 1;
362
+ if (tablePage.value !== currentPage) {
363
+ reload({ currentPage });
354
364
  }
355
365
  };
356
366
  const fetch = (callback) => {
@@ -448,6 +458,7 @@ const _sfc_main = vue.defineComponent({
448
458
  }
449
459
  });
450
460
  return {
461
+ isShowTable,
451
462
  toolsSlotExcludes,
452
463
  tableSlotExcludes,
453
464
  pageSlotExcludes,
@@ -472,7 +483,8 @@ const _sfc_main = vue.defineComponent({
472
483
  handlePageSizeChange,
473
484
  handlePageCurrentChange,
474
485
  reload,
475
- reloadTable,
486
+ reset,
487
+ // reloadTable,
476
488
  getTableRef,
477
489
  getData,
478
490
  setData,
@@ -492,6 +504,8 @@ const _export_sfc = (sfc, props2) => {
492
504
  }
493
505
  return target;
494
506
  };
507
+ const _hoisted_1 = { key: 1 };
508
+ const _hoisted_2 = { key: 2 };
495
509
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
496
510
  vue.resolveComponent("TableTools");
497
511
  const _component_EleToolbar = vue.resolveComponent("EleToolbar");
@@ -510,25 +524,29 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
510
524
  void 0
511
525
  ]), 1040)) : vue.createCommentVNode("", true),
512
526
  vue.renderSlot(_ctx.$slots, "default"),
513
- _ctx.virtual ? (vue.openBlock(), vue.createBlock(_component_EleVirtualTable, vue.mergeProps({ key: 1 }, _ctx.tableProps, { ref: "tableViewRef" }), vue.createSlots({ _: 2 }, [
514
- vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.tableSlotExcludes.includes(k)), (name) => {
515
- return {
516
- name,
517
- fn: vue.withCtx((slotProps) => [
518
- vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
519
- ])
520
- };
521
- })
522
- ]), 1040)) : (vue.openBlock(), vue.createBlock(_component_EleDataTable, vue.mergeProps({ key: 2 }, _ctx.tableProps, { ref: "tableViewRef" }), vue.createSlots({ _: 2 }, [
523
- vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.tableSlotExcludes.includes(k)), (name) => {
524
- return {
525
- name,
526
- fn: vue.withCtx((slotProps) => [
527
- vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
528
- ])
529
- };
530
- })
531
- ]), 1040)),
527
+ _ctx.virtual ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
528
+ vue.createVNode(_component_EleVirtualTable, vue.mergeProps(_ctx.tableProps, { ref: "tableViewRef" }), vue.createSlots({ _: 2 }, [
529
+ vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.tableSlotExcludes.includes(k)), (name) => {
530
+ return {
531
+ name,
532
+ fn: vue.withCtx((slotProps) => [
533
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
534
+ ])
535
+ };
536
+ })
537
+ ]), 1040)
538
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
539
+ _ctx.isShowTable ? (vue.openBlock(), vue.createBlock(_component_EleDataTable, vue.mergeProps({ key: 0 }, _ctx.tableProps, { ref: "tableViewRef" }), vue.createSlots({ _: 2 }, [
540
+ vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.tableSlotExcludes.includes(k)), (name) => {
541
+ return {
542
+ name,
543
+ fn: vue.withCtx((slotProps) => [
544
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
545
+ ])
546
+ };
547
+ })
548
+ ]), 1040)) : vue.createCommentVNode("", true)
549
+ ])),
532
550
  _ctx.paginationProps || _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
533
551
  key: 3,
534
552
  class: "ele-pro-table-footer",
@@ -196,7 +196,7 @@ declare const _default: import('vue').DefineComponent<{
196
196
  handlePageSizeChange: (pageSize: number) => void;
197
197
  handlePageCurrentChange: (page: number) => void;
198
198
  reload: ReloadFunction;
199
- reloadTable: () => void;
199
+ reset: () => void;
200
200
  getTableRef: () => TableViewInstance | undefined;
201
201
  getData: () => DataItem[];
202
202
  setData: (data: DataItem[]) => void;
@@ -216,16 +216,19 @@ declare const _default: import('vue').DefineComponent<{
216
216
  clearFilter: (columnKeys?: string[]) => void;
217
217
  doLayout: () => void;
218
218
  sort: (prop: string, order: string) => void;
219
- scrollTo: (options: number | ScrollToOptions, yCoord? /** 表格当前的排序筛选搜索参数 */: number) => void;
219
+ scrollTo: (options: number | ScrollToOptions, yCoord?: number) => void;
220
220
  setScrollTop: (top?: number) => void;
221
- setScrollLeft: (left?: number) => void;
221
+ setScrollLeft: (left? /** 表格当前的排序筛选搜索参数 */: number) => void;
222
222
  setCurrentRowKey: (key?: import('../ele-data-table/types').DataKey | null) => void;
223
223
  getCurrentRow: () => DataItem | undefined;
224
224
  setSelectedRows: (rows?: DataItem[]) => void;
225
- setSelectedRowKeys: (keys?: import('../ele-data-table/types').DataKey[], rows? /** 当前页数据 */: DataItem[]) => void;
225
+ setSelectedRowKeys: (keys?: import('../ele-data-table/types').DataKey[], rows?: DataItem[]) => void;
226
226
  toggleRowExpansionAll: (expanded?: boolean) => void;
227
227
  updateSelectedAndChecked: () => void;
228
228
  updateKeyChildren: (key?: import('../ele-data-table/types').DataKey | null, rows?: DataItem[]) => void;
229
+ isShowTable: Ref<{
230
+ valueOf: () => boolean;
231
+ }>;
229
232
  toolsSlotExcludes: string[];
230
233
  tableSlotExcludes: string[];
231
234
  pageSlotExcludes: string[];
@@ -80,6 +80,14 @@ export interface ReloadParams {
80
80
  filter?: Filter;
81
81
  }
82
82
 
83
+ /**
84
+ * 加载方法
85
+ * @param option 刷新参数
86
+ * @param parent 树表格父级数据
87
+ * @param resolve 树表格懒加载方法
88
+ */
89
+ export type LoadFunction = (option?: ReloadParams, parent?: DataItem, resolve?: ResolveFunction) => void;
90
+
83
91
  /**
84
92
  * 刷新方法
85
93
  * @param option 刷新参数
@@ -143,11 +151,11 @@ export interface OrderItem {
143
151
  */
144
152
  export interface DoneParams<T> {
145
153
  /** 当前页数据 */
146
- data: T[];
154
+ records: T[];
147
155
  /** 总数量 */
148
- total?: PaginationTotal;
156
+ totalCount?: PaginationTotal;
149
157
  /** 当前页码 */
150
- page?: number;
158
+ currentPage?: number;
151
159
  /** 数据源原始数据 */
152
160
  response?: any;
153
161
  }
@@ -204,7 +204,6 @@ function sortData(datasource, sorter) {
204
204
  return data;
205
205
  }
206
206
  function reloadData(datasource, sorter, currentPage, pageSize) {
207
- debugger;
208
207
  const records = sortData(datasource, sorter);
209
208
  const totalCount = records.length;
210
209
  if (!currentPage || !pageSize) {
@@ -122,6 +122,11 @@ declare const _default: import('vue').DefineComponent<{
122
122
  scrollbarAlwaysOn: BooleanConstructor;
123
123
  flexible: BooleanConstructor;
124
124
  showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
125
+ appendFilterPanelTo: StringConstructor;
126
+ scrollbarTabindex: {
127
+ type: (NumberConstructor | StringConstructor)[];
128
+ default: undefined;
129
+ };
125
130
  }, {
126
131
  ownSlots: string[];
127
132
  rootRef: Ref<HTMLElement | null>;
@@ -333,6 +338,11 @@ declare const _default: import('vue').DefineComponent<{
333
338
  scrollbarAlwaysOn: BooleanConstructor;
334
339
  flexible: BooleanConstructor;
335
340
  showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
341
+ appendFilterPanelTo: StringConstructor;
342
+ scrollbarTabindex: {
343
+ type: (NumberConstructor | StringConstructor)[];
344
+ default: undefined;
345
+ };
336
346
  }>> & {
337
347
  onSelect?: ((_selection: DataItem[], _row: DataItem) => any) | undefined;
338
348
  onExpandChange?: ((_row: DataItem, _expanded: boolean) => any) | undefined;
@@ -371,6 +381,7 @@ declare const _default: import('vue').DefineComponent<{
371
381
  tableLayout: "auto" | "fixed";
372
382
  scrollbarAlwaysOn: boolean;
373
383
  flexible: boolean;
384
+ scrollbarTabindex: string | number;
374
385
  sticky: boolean;
375
386
  headerEllipsis: boolean;
376
387
  slotNormalize: boolean;
@@ -123,6 +123,11 @@ export declare const virtualTableProps: {
123
123
  scrollbarAlwaysOn: BooleanConstructor;
124
124
  flexible: BooleanConstructor;
125
125
  showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
126
+ appendFilterPanelTo: StringConstructor;
127
+ scrollbarTabindex: {
128
+ type: (NumberConstructor | StringConstructor)[];
129
+ default: undefined;
130
+ };
126
131
  };
127
132
  export type VirtualTableProps = ExtractPropTypes<typeof virtualTableProps>;
128
133
  /**