@done-coding/admin-core 0.17.0 → 0.18.0

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 (53) hide show
  1. package/es/components/app-layout/AppBody.vue.mjs +2 -2
  2. package/es/components/app-layout/AppBody.vue2.mjs +53 -54
  3. package/es/components/app-layout/keep-alive.mjs +22 -0
  4. package/es/components/data-view/DataListView.vue.mjs +2 -2
  5. package/es/components/data-view/DataListView.vue2.mjs +55 -53
  6. package/es/components/display/ActionConfirm.vue.mjs +2 -2
  7. package/es/components/display/ActionConfirm.vue2.mjs +1 -1
  8. package/es/components/display/TabsRefineFlow.vue.mjs +34 -32
  9. package/es/components/list-page/ListPage.vue.mjs +2 -2
  10. package/es/components/list-page/ListPage.vue2.mjs +74 -75
  11. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  12. package/es/components/misc/AutoRefreshGroup.vue2.mjs +42 -35
  13. package/es/components/modal/{ConfirmModal.vue.mjs → ModalConfirm.vue.mjs} +3 -3
  14. package/es/components/modal/{ConfirmModal.vue2.mjs → ModalConfirm.vue2.mjs} +34 -34
  15. package/es/components/modal/ModalDetail.vue.mjs +63 -0
  16. package/es/components/modal/ModalDetail.vue2.mjs +4 -0
  17. package/es/components/modal/ModalForm.vue.mjs +75 -0
  18. package/es/components/modal/ModalForm.vue2.mjs +4 -0
  19. package/es/components/panel/PanelItem.vue.mjs +5 -81
  20. package/es/components/panel/PanelItem.vue2.mjs +93 -2
  21. package/es/components/panel/PanelMain.vue2.mjs +14 -14
  22. package/es/components/table/TableMain.vue.mjs +2 -2
  23. package/es/components/table/TableMain.vue2.mjs +210 -174
  24. package/es/components/table/TableSkeleton.vue.mjs +7 -0
  25. package/es/components/table/TableSkeleton.vue2.mjs +89 -0
  26. package/es/components/table/TableToolbar.vue.mjs +2 -2
  27. package/es/components/table/TableToolbar.vue2.mjs +22 -21
  28. package/es/components/table/use-fill-height.mjs +14 -0
  29. package/es/components/table/use-table-skeleton.mjs +19 -0
  30. package/es/index.mjs +230 -223
  31. package/es/router/group-redirect.mjs +20 -0
  32. package/es/style.css +1 -1
  33. package/package.json +2 -2
  34. package/types/components/app-layout/keep-alive.d.ts +14 -0
  35. package/types/components/data-view/types.d.ts +1 -0
  36. package/types/components/misc/AutoRefreshGroup.vue.d.ts +2 -1
  37. package/types/components/misc/types.d.ts +1 -0
  38. package/types/components/modal/{ConfirmModal.vue.d.ts → ModalConfirm.vue.d.ts} +1 -1
  39. package/types/components/modal/{DetailModal.vue.d.ts → ModalDetail.vue.d.ts} +2 -2
  40. package/types/components/modal/ModalForm.vue.d.ts +24 -0
  41. package/types/components/modal/index.d.ts +4 -3
  42. package/types/components/modal/types.d.ts +26 -2
  43. package/types/components/panel/PanelItem.vue.d.ts +1 -1
  44. package/types/components/panel/types.d.ts +4 -1
  45. package/types/components/table/TableSkeleton.vue.d.ts +7 -0
  46. package/types/components/table/types.d.ts +10 -0
  47. package/types/components/table/use-fill-height.d.ts +11 -0
  48. package/types/components/table/use-table-skeleton.d.ts +17 -0
  49. package/types/injectInfo.json.d.ts +1 -1
  50. package/types/router/group-redirect.d.ts +5 -0
  51. package/types/router/index.d.ts +1 -0
  52. package/es/components/modal/DetailModal.vue.mjs +0 -74
  53. package/es/components/modal/DetailModal.vue2.mjs +0 -4
@@ -1,7 +1,7 @@
1
1
  import o from "./AppBody.vue2.mjs";
2
2
  /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-f97530b2"]]);
4
+ const _ = /* @__PURE__ */ p(o, [["__scopeId", "data-v-746de972"]]);
5
5
  export {
6
- m as default
6
+ _ as default
7
7
  };
@@ -1,94 +1,93 @@
1
- import { defineComponent as N, useCssVars as H, inject as E, ref as g, computed as o, provide as a, readonly as T, watch as L, resolveComponent as F, openBlock as i, createElementBlock as Y, normalizeStyle as b, createElementVNode as $, createBlock as l, unref as S, withCtx as w, createVNode as A, createCommentVNode as c, KeepAlive as k, resolveDynamicComponent as O, renderSlot as D } from "vue";
2
- import { ElAffix as G } from "element-plus";
3
- import U from "./AppBreadcrumb.vue.mjs";
1
+ import { defineComponent as H, useCssVars as L, inject as E, ref as g, computed as o, provide as r, readonly as A, watch as k, resolveComponent as F, openBlock as l, createElementBlock as Y, normalizeStyle as T, createElementVNode as $, createBlock as d, unref as n, withCtx as b, createVNode as S, createCommentVNode as u, KeepAlive as D, resolveDynamicComponent as w, renderSlot as G } from "vue";
2
+ import { ElAffix as U } from "element-plus";
3
+ import K from "./AppBreadcrumb.vue.mjs";
4
+ import { isKeepAliveRoute as O, keepAliveRouteKey as P } from "./keep-alive.mjs";
4
5
  import M from "lodash/debounce";
5
- import { APP_LAYOUT_APP_STORE_KEY as W, APP_LAYOUT_BRIDGE_KEY as z, BODY_CONTENT_VIEWPORT_HEIGHT as K, SCOPE_VIEWPORT_MAX_HEIGHT as j, BODY_CONTENT_VIEWPORT_RECT as X, BODY_CONTENT_VIEWPORT_INSET as q } from "../../inject/key.mjs";
6
- import { useActivated as J } from "../../hooks/activated.mjs";
7
- const ae = /* @__PURE__ */ N({
6
+ import { APP_LAYOUT_APP_STORE_KEY as W, APP_LAYOUT_BRIDGE_KEY as z, BODY_CONTENT_VIEWPORT_HEIGHT as j, SCOPE_VIEWPORT_MAX_HEIGHT as X, BODY_CONTENT_VIEWPORT_RECT as q, BODY_CONTENT_VIEWPORT_INSET as J } from "../../inject/key.mjs";
7
+ import { useActivated as Q } from "../../hooks/activated.mjs";
8
+ const re = /* @__PURE__ */ H({
8
9
  __name: "AppBody",
9
10
  props: {
10
11
  menuFlatList: { default: () => [] }
11
12
  },
12
- setup(P) {
13
- H((e) => ({
14
- v85c12e9e: s.value
13
+ setup(R) {
14
+ L((e) => ({
15
+ v03873635: p.value
15
16
  }));
16
- const t = E(W), u = E(z), C = u.APP_ROUTER_CONFIG, p = g(!1), m = o(() => u.APP_LAYOUT_BREADCRUMB_CONFIG.height), r = g(0);
17
- a(K, T(r)), a(j, {
17
+ const t = E(W), m = E(z), C = m.APP_ROUTER_CONFIG, y = g(!1), v = o(() => m.APP_LAYOUT_BREADCRUMB_CONFIG.height), s = g(0);
18
+ r(j, A(s)), r(X, {
18
19
  scope: void 0,
19
- viewportMaxHeight: T(r),
20
+ viewportMaxHeight: A(s),
20
21
  parent: void 0
21
22
  });
22
- const y = o(() => t.bodyShimPadding), d = o(() => t.bodyShimStyle), R = o(() => t.bodyStyle), f = o(() => t.showBreadcrumb), V = o(() => parseFloat(`${t.bodyStyle.paddingTop ?? 0}`) || 0), x = o(() => ({
23
+ const f = o(() => t.bodyShimPadding), c = o(() => t.bodyShimStyle), V = o(() => t.bodyStyle), _ = o(() => t.showBreadcrumb), x = o(() => parseFloat(`${t.bodyStyle.paddingTop ?? 0}`) || 0), B = o(() => ({
23
24
  top: t.bodyStyle.paddingTop,
24
25
  left: t.bodyStyle.paddingLeft,
25
26
  right: t.bodyStyle.paddingRight,
26
- bottom: `calc(100vh - ${t.bodyStyle.paddingTop} - ${d.value.minHeight})`,
27
+ bottom: `calc(100vh - ${t.bodyStyle.paddingTop} - ${c.value.minHeight})`,
27
28
  // app-body-shim 内边距:供 AppPage 各插槽 shim 朝 chrome 侧留呼吸
28
- shimPadding: y.value
29
+ shimPadding: f.value
29
30
  }));
30
- a(X, x), a(
31
- q,
31
+ r(q, B), r(
32
+ J,
32
33
  o(() => t.contentViewportInset)
33
34
  );
34
- const s = o(
35
- () => `calc(${d.value.minHeight} - ${f.value && p.value ? m.value : 0}px - ${y.value * 2}px)`
36
- ), B = (e) => {
37
- p.value = e;
38
- }, n = M(() => {
35
+ const p = o(
36
+ () => `calc(${c.value.minHeight} - ${_.value && y.value ? v.value : 0}px - ${f.value * 2}px)`
37
+ ), I = (e) => {
38
+ y.value = e;
39
+ }, i = M(() => {
39
40
  const e = document.createElement("div");
40
- e.style.height = s.value, e.style.position = "fixed", e.style.left = "100%", e.style.top = "100%", e.style.opacity = "0", e.style.pointerEvents = "none", document.body.appendChild(e), r.value = e.clientHeight, e.remove();
41
+ e.style.height = p.value, e.style.position = "fixed", e.style.left = "100%", e.style.top = "100%", e.style.opacity = "0", e.style.pointerEvents = "none", document.body.appendChild(e), s.value = e.clientHeight, e.remove();
41
42
  }, 16);
42
- return L(s, () => {
43
- n();
44
- }), J((e) => {
45
- typeof window > "u" || (e.isActivated ? (n(), window.addEventListener("resize", n)) : (window.removeEventListener("resize", n), n.cancel()));
46
- }), (e, Q) => {
47
- const I = F("RouterView");
48
- return i(), Y("div", {
43
+ return k(p, () => {
44
+ i();
45
+ }), Q((e) => {
46
+ typeof window > "u" || (e.isActivated ? (i(), window.addEventListener("resize", i)) : (window.removeEventListener("resize", i), i.cancel()));
47
+ }), (e, Z) => {
48
+ const N = F("RouterView");
49
+ return l(), Y("div", {
49
50
  class: "app-body",
50
- style: b(R.value)
51
+ style: T(V.value)
51
52
  }, [
52
53
  $("div", {
53
54
  class: "app-body-shim",
54
- style: b(d.value)
55
+ style: T(c.value)
55
56
  }, [
56
- f.value ? (i(), l(S(G), {
57
+ _.value ? (l(), d(n(U), {
57
58
  key: 0,
58
- offset: V.value
59
+ offset: x.value
59
60
  }, {
60
- default: w(() => [
61
- A(U, {
62
- height: m.value,
63
- menuFlatList: P.menuFlatList,
64
- onShow: B
61
+ default: b(() => [
62
+ S(K, {
63
+ height: v.value,
64
+ menuFlatList: R.menuFlatList,
65
+ onShow: I
65
66
  }, null, 8, ["height", "menuFlatList"])
66
67
  ]),
67
68
  _: 1
68
- }, 8, ["offset"])) : c("", !0),
69
- A(I, null, {
70
- default: w(({
71
- Component: v,
72
- route: {
73
- path: _,
74
- meta: { keepAlive: h }
75
- }
76
- }) => [
77
- (i(), l(k, {
78
- max: S(C).keepAliveMaxCount
69
+ }, 8, ["offset"])) : u("", !0),
70
+ S(N, null, {
71
+ default: b(({ Component: h, route: a }) => [
72
+ (l(), d(D, {
73
+ max: n(C).keepAliveMaxCount
79
74
  }, [
80
- h ? (i(), l(O(v), { key: _ })) : c("", !0)
75
+ n(O)(a) ? (l(), d(w(h), {
76
+ key: n(P)(a)
77
+ })) : u("", !0)
81
78
  ], 1032, ["max"])),
82
- h ? c("", !0) : (i(), l(O(v), { key: _ }))
79
+ n(O)(a) ? u("", !0) : (l(), d(w(h), {
80
+ key: n(P)(a)
81
+ }))
83
82
  ]),
84
83
  _: 1
85
84
  })
86
85
  ], 4),
87
- D(e.$slots, "footer", {}, void 0, !0)
86
+ G(e.$slots, "footer", {}, void 0, !0)
88
87
  ], 4);
89
88
  };
90
89
  }
91
90
  });
92
91
  export {
93
- ae as default
92
+ re as default
94
93
  };
@@ -0,0 +1,22 @@
1
+ const o = (t) => {
2
+ const e = t.matched ?? [], n = [];
3
+ return e.forEach((s, c) => {
4
+ s.components && Object.keys(s.components).length > 0 && n.push(c);
5
+ }), n;
6
+ }, a = (t) => {
7
+ const e = o(t);
8
+ return e.length > 0 && e[0] === e[e.length - 1];
9
+ }, p = (t) => {
10
+ var e;
11
+ return a(t) && !!((e = t.meta) != null && e.keepAlive);
12
+ }, i = (t) => {
13
+ var c, h;
14
+ const e = o(t);
15
+ if (e.length === 0) return t.path;
16
+ const n = e[0], s = e[e.length - 1];
17
+ return n === s ? t.path : ((h = (c = t.matched) == null ? void 0 : c[n]) == null ? void 0 : h.path) ?? t.path;
18
+ };
19
+ export {
20
+ p as isKeepAliveRoute,
21
+ i as keepAliveRouteKey
22
+ };
@@ -1,7 +1,7 @@
1
1
  import t from "./DataListView.vue2.mjs";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c66e599d"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-da082546"]]);
5
5
  export {
6
- i as default
6
+ m as default
7
7
  };
@@ -1,41 +1,43 @@
1
- import { defineComponent as S, computed as m, ref as R, watch as A, openBlock as i, createElementBlock as p, normalizeStyle as F, Fragment as H, renderList as z, createBlock as E, withCtx as K, renderSlot as h, createVNode as q, unref as I, markRaw as M, h as c } from "vue";
2
- import { ElEmpty as N } from "element-plus";
3
- import O from "./DataListViewItem.vue.mjs";
4
- import { createDataListViewInstance as P } from "./utils.mjs";
5
- const j = {
1
+ import { defineComponent as w, computed as m, ref as B, watch as R, openBlock as s, createElementBlock as p, normalizeStyle as A, Fragment as F, renderList as z, createBlock as E, withCtx as K, renderSlot as S, createVNode as O, unref as j, markRaw as q, h as c } from "vue";
2
+ import { ElEmpty as I } from "element-plus";
3
+ import M from "./DataListViewItem.vue.mjs";
4
+ import { createDataListViewInstance as N } from "./utils.mjs";
5
+ const P = {
6
6
  key: 1,
7
7
  class: "data-list-view-empty"
8
- }, T = /* @__PURE__ */ S({
8
+ }, T = /* @__PURE__ */ w({
9
9
  __name: "DataListView",
10
10
  props: {
11
11
  data: {},
12
12
  rowKey: {},
13
13
  columns: {},
14
14
  maxHeight: {},
15
+ minHeight: {},
15
16
  selectable: { type: Boolean, default: !1 },
16
17
  getRenderCtxParams: {}
17
18
  },
18
19
  emits: ["selectionChange"],
19
20
  setup(r, { expose: k, emit: C }) {
20
- const o = r, b = C, s = (t) => {
21
- const e = o.rowKey;
22
- return typeof e == "function" ? e(t) : String(t[e]);
23
- }, V = m(
24
- () => o.maxHeight ? { maxHeight: `${o.maxHeight}px`, overflowY: "auto" } : void 0
25
- ), l = R(/* @__PURE__ */ new Set()), D = m(() => l.value.size === o.data.length), f = (t) => o.selectable && l.value.has(s(t)), d = () => {
21
+ const o = r, b = C, i = (e) => {
22
+ const t = o.rowKey;
23
+ return typeof t == "function" ? t(e) : String(e[t]);
24
+ }, H = m(() => {
25
+ const e = {};
26
+ return o.maxHeight && (e.maxHeight = `${o.maxHeight}px`, e.overflowY = "auto"), o.minHeight && (e.minHeight = `${o.minHeight}px`), Object.keys(e).length ? e : void 0;
27
+ }), l = B(/* @__PURE__ */ new Set()), V = m(() => l.value.size === o.data.length), f = (e) => o.selectable && l.value.has(i(e)), d = () => {
26
28
  b("selectionChange", g());
27
- }, g = () => o.selectable ? o.data.filter((t) => l.value.has(s(t))) : [], y = () => {
29
+ }, g = () => o.selectable ? o.data.filter((e) => l.value.has(i(e))) : [], y = () => {
28
30
  l.value = /* @__PURE__ */ new Set(), d();
29
- }, L = () => {
31
+ }, $ = () => {
30
32
  if (!o.selectable) return;
31
- const t = !D.value;
32
- l.value = t ? new Set(o.data.map((e) => s(e))) : /* @__PURE__ */ new Set(), d();
33
- }, v = (t) => {
33
+ const e = !V.value;
34
+ l.value = e ? new Set(o.data.map((t) => i(t))) : /* @__PURE__ */ new Set(), d();
35
+ }, h = (e) => {
34
36
  if (!o.selectable) return;
35
- const e = s(t), n = new Set(l.value);
36
- n.has(e) ? n.delete(e) : n.add(e), l.value = n, d();
37
- }, _ = (t) => M(
38
- S({
37
+ const t = i(e), n = new Set(l.value);
38
+ n.has(t) ? n.delete(t) : n.add(t), l.value = n, d();
39
+ }, D = (e) => q(
40
+ w({
39
41
  name: "DataViewField",
40
42
  props: {
41
43
  row: { type: Object, required: !0 },
@@ -43,82 +45,82 @@ const j = {
43
45
  selected: { type: Boolean, default: !1 },
44
46
  toggleSelect: { type: Function, default: void 0 }
45
47
  },
46
- setup(e) {
48
+ setup(t) {
47
49
  return () => {
48
- const { type: n, render: a, prop: w } = t;
50
+ const { type: n, render: a, prop: x } = e;
49
51
  if (n === "index")
50
- return c("span", String(e.index + 1));
52
+ return c("span", String(t.index + 1));
51
53
  if (n === "selection")
52
54
  return c("input", {
53
55
  type: "checkbox",
54
- checked: e.selected,
56
+ checked: t.selected,
55
57
  onChange: () => {
56
- var x;
57
- return (x = e.toggleSelect) == null ? void 0 : x.call(e);
58
+ var v;
59
+ return (v = t.toggleSelect) == null ? void 0 : v.call(t);
58
60
  }
59
61
  });
60
62
  if (typeof a == "function")
61
63
  return a({
62
64
  ...o.getRenderCtxParams(),
63
- row: e.row,
64
- column: t,
65
- _index: e.index
65
+ row: t.row,
66
+ column: e,
67
+ _index: t.index
66
68
  });
67
69
  if (a)
68
70
  return c(a);
69
- const u = w ? e.row[w] : void 0;
71
+ const u = x ? t.row[x] : void 0;
70
72
  return c("span", u == null ? "" : String(u));
71
73
  };
72
74
  }
73
75
  })
74
- ), $ = m(() => {
75
- const t = {};
76
- for (const e of o.columns) {
77
- if (e.type === "expand") continue;
78
- const n = e.type === "index" ? "$type_index" : e.type === "selection" ? "$type_selection" : e.prop;
76
+ ), L = m(() => {
77
+ const e = {};
78
+ for (const t of o.columns) {
79
+ if (t.type === "expand") continue;
80
+ const n = t.type === "index" ? "$type_index" : t.type === "selection" ? "$type_selection" : t.prop;
79
81
  if (!n) {
80
82
  console.warn(
81
83
  "[DataListView] 列缺少 prop 且非 index/selection,跳过",
82
- e
84
+ t
83
85
  );
84
86
  continue;
85
87
  }
86
- t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] = _(e);
88
+ e[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), e[n] = D(t);
87
89
  }
88
- return t;
89
- }), B = P({
90
+ return e;
91
+ }), _ = N({
90
92
  clearSelection: y,
91
93
  getSelectionRows: g,
92
- toggleRowSelection: v,
93
- toggleAllSelection: L,
94
+ toggleRowSelection: h,
95
+ toggleAllSelection: $,
94
96
  columns: o.columns
95
97
  });
96
- return k(B), A(
98
+ return k(_), R(
97
99
  () => o.data,
98
100
  () => {
99
101
  l.value.size && y();
100
102
  }
101
- ), (t, e) => (i(), p("div", {
103
+ ), (e, t) => (s(), p("div", {
102
104
  class: "data-list-view",
103
- style: F(V.value)
105
+ style: A(H.value)
104
106
  }, [
105
- r.data.length ? (i(!0), p(H, { key: 0 }, z(r.data, (n, a) => (i(), E(O, {
106
- key: s(n),
107
+ r.data.length ? (s(!0), p(F, { key: 0 }, z(r.data, (n, a) => (s(), E(M, {
108
+ key: i(n),
107
109
  selected: f(n)
108
110
  }, {
109
111
  default: K(() => [
110
- h(t.$slots, "item", {
111
- fieldComponentMap: $.value,
112
+ S(e.$slots, "item", {
113
+ fieldComponentMap: L.value,
112
114
  row: n,
113
115
  index: a,
114
116
  selected: f(n),
115
- toggleSelect: () => v(n)
117
+ toggleSelect: () => h(n)
116
118
  }, void 0, !0)
117
119
  ]),
118
120
  _: 2
119
- }, 1032, ["selected"]))), 128)) : (i(), p("div", j, [
120
- h(t.$slots, "empty", {}, () => [
121
- q(I(N))
121
+ }, 1032, ["selected"]))), 128)) : (s(), p("div", P, [
122
+ S(e.$slots, "empty", {}, () => [
123
+ O(j(I))
122
124
  ], !0)
123
125
  ]))
124
126
  ], 4));
@@ -1,7 +1,7 @@
1
1
  import o from "./ActionConfirm.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67d276b0"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e57e5fe0"]]);
5
5
  export {
6
- i as default
6
+ m as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as z, useModel as D, ref as S, computed as s, h as u, openBlock as n, createBlock as f, unref as d, withCtx as c, createElementVNode as x, createElementBlock as m, resolveDynamicComponent as k, createCommentVNode as T, createVNode as v, createTextVNode as b, toDisplayString as N, renderSlot as y, Fragment as A, mergeModels as B } from "vue";
2
2
  import { ElPopover as U, ElButton as M } from "element-plus";
3
- import j from "../modal/ConfirmModal.vue.mjs";
3
+ import j from "../modal/ModalConfirm.vue.mjs";
4
4
  const q = { class: "action-confirm" }, G = {
5
5
  key: 0,
6
6
  class: "action-confirm__title"
@@ -1,8 +1,8 @@
1
- import { defineComponent as H, ref as u, computed as i, provide as f, watch as v, openBlock as w, createBlock as C, createSlots as S, withCtx as a, createElementVNode as V, normalizeStyle as _, renderSlot as r } from "vue";
2
- import b from "./HeightProvider.vue.mjs";
3
- import { useChannelViewportHeight as x } from "../../hooks/use-channel-viewport-height.mjs";
1
+ import { defineComponent as f, ref as H, computed as i, provide as u, watch as v, openBlock as w, createElementBlock as C, createVNode as _, createSlots as V, withCtx as a, createElementVNode as S, normalizeStyle as b, renderSlot as r } from "vue";
2
+ import x from "./HeightProvider.vue.mjs";
3
+ import { useChannelViewportHeight as E } from "../../hooks/use-channel-viewport-height.mjs";
4
4
  import { SCOPE_VIEWPORT_MAX_HEIGHT as $ } from "../../inject/key.mjs";
5
- const k = /* @__PURE__ */ H({
5
+ const y = { class: "tabs-refine-flow" }, z = /* @__PURE__ */ f({
6
6
  __name: "TabsRefineFlow",
7
7
  props: {
8
8
  viewportHeight: {},
@@ -13,50 +13,52 @@ const k = /* @__PURE__ */ H({
13
13
  refineReduceHeight: { default: 0 }
14
14
  },
15
15
  emits: ["viewportHeightChange"],
16
- setup(n, { emit: p }) {
17
- const t = n, h = p, { viewportHeightFinal: d, nearestScope: l } = x(t), o = u(0), s = i(() => t.padding[0] + t.padding[2]), c = i(() => ({
16
+ setup(n, { emit: d }) {
17
+ const t = n, l = d, { viewportHeightFinal: h, nearestScope: p } = E(t), o = H(0), s = i(() => t.padding[0] + t.padding[2]), c = i(() => ({
18
18
  padding: t.padding.map((e) => `${e}px`).join(" "),
19
19
  boxSizing: "border-box"
20
20
  })), g = i(
21
21
  () => Math.max(
22
- d.value - s.value - t.refineReduceHeight,
22
+ h.value - s.value - t.refineReduceHeight,
23
23
  0
24
24
  )
25
25
  ), m = (e) => {
26
- o.value = e, h("viewportHeightChange", e);
26
+ o.value = e, l("viewportHeightChange", e);
27
27
  };
28
- return f($, {
28
+ return u($, {
29
29
  scope: t.channel,
30
30
  viewportMaxHeight: i(() => o.value),
31
- parent: l
31
+ parent: p
32
32
  }), v(
33
33
  // eslint-disable-next-line vue/no-setup-props-destructure
34
34
  () => t.channel,
35
35
  () => console.error("[TabsMain] channel 不支持响应式变更,当前值已忽略。")
36
- ), (e, y) => (w(), C(b, {
37
- viewportHeight: g.value,
38
- minHeight: n.minHeight,
39
- onChildViewportHeightChange: m
40
- }, S({
41
- default: a(() => [
42
- V("div", {
43
- style: _(c.value)
44
- }, [
45
- r(e.$slots, "default")
46
- ], 4)
47
- ]),
48
- _: 2
49
- }, [
50
- e.$slots.header ? {
51
- name: "header",
52
- fn: a(() => [
53
- r(e.$slots, "header")
36
+ ), (e, M) => (w(), C("div", y, [
37
+ _(x, {
38
+ viewportHeight: g.value,
39
+ minHeight: n.minHeight,
40
+ onChildViewportHeightChange: m
41
+ }, V({
42
+ default: a(() => [
43
+ S("div", {
44
+ style: b(c.value)
45
+ }, [
46
+ r(e.$slots, "default")
47
+ ], 4)
54
48
  ]),
55
- key: "0"
56
- } : void 0
57
- ]), 1032, ["viewportHeight", "minHeight"]));
49
+ _: 2
50
+ }, [
51
+ e.$slots.header ? {
52
+ name: "header",
53
+ fn: a(() => [
54
+ r(e.$slots, "header")
55
+ ]),
56
+ key: "0"
57
+ } : void 0
58
+ ]), 1032, ["viewportHeight", "minHeight"])
59
+ ]));
58
60
  }
59
61
  });
60
62
  export {
61
- k as default
63
+ z as default
62
64
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ListPage.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a488e79a"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1ae6f01e"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };