@done-coding/admin-core 0.6.0 → 0.7.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 (41) hide show
  1. package/es/components/app-layout/AppBody.vue.mjs +2 -2
  2. package/es/components/app-layout/AppBody.vue2.mjs +33 -35
  3. package/es/components/app-layout/AppBreadcrumb.vue.mjs +2 -2
  4. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +6 -7
  5. package/es/components/app-layout/AppLayout.vue.mjs +1 -1
  6. package/es/components/app-layout/AppLayout.vue2.mjs +25 -28
  7. package/es/components/data-view/DataListView.vue.mjs +2 -2
  8. package/es/components/data-view/DataListView.vue2.mjs +19 -17
  9. package/es/components/display/BooleanTag.vue.mjs +30 -0
  10. package/es/components/display/BooleanTag.vue2.mjs +4 -0
  11. package/es/components/list-page/ListPage.vue.mjs +1 -1
  12. package/es/components/list-page/ListPage.vue2.mjs +101 -89
  13. package/es/components/misc/ActionBtn.vue.mjs +29 -29
  14. package/es/components/misc/AutoRefresh.vue.mjs +2 -2
  15. package/es/components/misc/AutoRefresh.vue2.mjs +50 -42
  16. package/es/components/misc/AutoRefreshGroup.vue.mjs +7 -0
  17. package/es/components/misc/AutoRefreshGroup.vue2.mjs +60 -0
  18. package/es/components/table/TableMain.vue.mjs +3 -3
  19. package/es/components/table/TableMain.vue2.mjs +177 -167
  20. package/es/components/table/TableToolbar.vue.mjs +2 -2
  21. package/es/components/table/TableToolbar.vue2.mjs +98 -109
  22. package/es/index.mjs +148 -144
  23. package/es/style.css +1 -1
  24. package/package.json +2 -2
  25. package/types/components/app-layout/AppBody.vue.d.ts +0 -2
  26. package/types/components/app-layout/AppBreadcrumb.vue.d.ts +0 -1
  27. package/types/components/data-view/DataListView.vue.d.ts +2 -2
  28. package/types/components/data-view/types.d.ts +4 -2
  29. package/types/components/display/BooleanTag.vue.d.ts +8 -0
  30. package/types/components/display/index.d.ts +7 -1
  31. package/types/components/display/types.d.ts +19 -0
  32. package/types/components/list-page/ListPage.vue.d.ts +9 -13
  33. package/types/components/list-page/types.d.ts +1 -1
  34. package/types/components/misc/AutoRefresh.vue.d.ts +3 -9
  35. package/types/components/misc/AutoRefreshGroup.vue.d.ts +17 -0
  36. package/types/components/misc/index.d.ts +2 -1
  37. package/types/components/misc/types.d.ts +15 -0
  38. package/types/components/table/TableMain.vue.d.ts +9 -13
  39. package/types/components/table/TableToolbar.vue.d.ts +6 -2
  40. package/types/components/table/types.d.ts +20 -19
  41. package/types/hooks/activated.d.ts +2 -0
@@ -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 _ = /* @__PURE__ */ p(o, [["__scopeId", "data-v-305d730c"]]);
4
+ const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-265945fd"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
@@ -1,80 +1,78 @@
1
1
  import { ElAffix as V } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/affix/style/css";
4
- import { defineComponent as F, useCssVars as N, unref as t, inject as A, ref as E, provide as H, computed as o, watch as I, resolveComponent as U, openBlock as i, createElementBlock as Y, normalizeStyle as b, createElementVNode as k, createBlock as r, withCtx as P, createVNode as w, createCommentVNode as l, KeepAlive as G, resolveDynamicComponent as S, renderSlot as D } from "vue";
4
+ import { defineComponent as F, useCssVars as N, unref as t, inject as v, ref as A, provide as H, computed as o, watch as I, resolveComponent as U, openBlock as i, createElementBlock as Y, normalizeStyle as E, createElementVNode as k, createBlock as s, withCtx as b, createVNode as P, createCommentVNode as a, KeepAlive as G, resolveDynamicComponent as w, renderSlot as D } from "vue";
5
5
  import $ from "./AppBreadcrumb.vue.mjs";
6
6
  import z from "lodash/debounce";
7
7
  import { APP_LAYOUT_APP_STORE_KEY as K, APP_LAYOUT_BRIDGE_KEY as M, BODY_CONTENT_VIEWPORT_HEIGHT as j } from "../../inject/key.mjs";
8
8
  import { useActivatedExec as W, useActivatedEvent as q } from "../../hooks/activated.mjs";
9
- const se = /* @__PURE__ */ F({
9
+ const re = /* @__PURE__ */ F({
10
10
  __name: "AppBody",
11
11
  props: {
12
- menus: { default: () => [] },
13
12
  menuFlatList: { default: () => [] }
14
13
  },
15
- setup(c) {
14
+ setup(S) {
16
15
  N((e) => ({
17
- v078aa5b4: t(a)
16
+ ba2eb370: t(l)
18
17
  }));
19
- const n = A(K), m = A(M), x = m.APP_LAYOUT_BREADCRUMB_CONFIG, C = m.APP_ROUTER_CONFIG, d = E(!1), u = x.height, p = E(0);
20
- H(j, p);
21
- const g = o(() => n.bodyShimPadding), f = o(() => n.bodyShimStyle), O = o(() => n.bodyStyle), _ = o(() => n.showBreadcrumb), B = o(() => parseFloat(`${n.bodyStyle.paddingTop ?? 0}`) || 0), a = o(
22
- () => `calc(${f.value.minHeight} - ${_.value && d.value ? u : 0}px - ${g.value * 2}px)`
18
+ const n = v(K), c = v(M), x = c.APP_LAYOUT_BREADCRUMB_CONFIG, C = c.APP_ROUTER_CONFIG, d = A(!1), m = x.height, u = A(0);
19
+ H(j, u);
20
+ const g = o(() => n.bodyShimPadding), p = o(() => n.bodyShimStyle), O = o(() => n.bodyStyle), f = o(() => n.showBreadcrumb), B = o(() => parseFloat(`${n.bodyStyle.paddingTop ?? 0}`) || 0), l = o(
21
+ () => `calc(${p.value.minHeight} - ${f.value && d.value ? m : 0}px - ${g.value * 2}px)`
23
22
  ), R = (e) => {
24
23
  d.value = e;
25
- }, s = z(() => {
24
+ }, r = z(() => {
26
25
  const e = document.createElement("div");
27
- e.style.height = a.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), p.value = e.clientHeight, e.remove();
26
+ e.style.height = l.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), u.value = e.clientHeight, e.remove();
28
27
  }, 16);
29
28
  return W(() => {
30
- s();
29
+ r();
31
30
  }), q(
32
31
  () => {
33
- window.addEventListener("resize", s);
32
+ window.addEventListener("resize", r);
34
33
  },
35
34
  () => {
36
- window.removeEventListener("resize", s);
35
+ window.removeEventListener("resize", r);
37
36
  }
38
- ), I(a, () => {
39
- s();
37
+ ), I(l, () => {
38
+ r();
40
39
  }), (e, J) => {
41
40
  const T = V, L = U("RouterView");
42
41
  return i(), Y("div", {
43
42
  class: "app-body",
44
- style: b(t(O))
43
+ style: E(t(O))
45
44
  }, [
46
45
  k("div", {
47
46
  class: "app-body-shim",
48
- style: b(t(f))
47
+ style: E(t(p))
49
48
  }, [
50
- t(_) ? (i(), r(T, {
49
+ t(f) ? (i(), s(T, {
51
50
  key: 0,
52
51
  offset: t(B)
53
52
  }, {
54
- default: P(() => [
55
- w($, {
56
- menus: c.menus,
57
- height: t(u),
58
- menuFlatList: c.menuFlatList,
53
+ default: b(() => [
54
+ P($, {
55
+ height: t(m),
56
+ menuFlatList: S.menuFlatList,
59
57
  onShow: R
60
- }, null, 8, ["menus", "height", "menuFlatList"])
58
+ }, null, 8, ["height", "menuFlatList"])
61
59
  ]),
62
60
  _: 1
63
- }, 8, ["offset"])) : l("", !0),
64
- w(L, null, {
65
- default: P(({
66
- Component: y,
61
+ }, 8, ["offset"])) : a("", !0),
62
+ P(L, null, {
63
+ default: b(({
64
+ Component: _,
67
65
  route: {
68
- path: h,
69
- meta: { keepAlive: v }
66
+ path: y,
67
+ meta: { keepAlive: h }
70
68
  }
71
69
  }) => [
72
- (i(), r(G, {
70
+ (i(), s(G, {
73
71
  max: t(C).keepAliveMaxCount
74
72
  }, [
75
- v ? (i(), r(S(y), { key: h })) : l("", !0)
73
+ h ? (i(), s(w(_), { key: y })) : a("", !0)
76
74
  ], 1032, ["max"])),
77
- v ? l("", !0) : (i(), r(S(y), { key: h }))
75
+ h ? a("", !0) : (i(), s(w(_), { key: y }))
78
76
  ]),
79
77
  _: 1
80
78
  })
@@ -85,5 +83,5 @@ const se = /* @__PURE__ */ F({
85
83
  }
86
84
  });
87
85
  export {
88
- se as default
86
+ re as default
89
87
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AppBreadcrumb.vue2.mjs";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-39d4ee00"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2f677890"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -2,13 +2,12 @@ import { ElBreadcrumb as b, ElBreadcrumbItem as w } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/breadcrumb/style/css";
4
4
  import "element-plus/es/components/breadcrumb-item/style/css";
5
- import { defineComponent as g, computed as o, watch as x, withDirectives as y, openBlock as n, createElementBlock as u, normalizeStyle as E, unref as m, createVNode as k, withCtx as p, Fragment as v, renderList as I, createBlock as F, createTextVNode as L, toDisplayString as S, vShow as A } from "vue";
5
+ import { defineComponent as g, computed as o, watch as x, withDirectives as y, openBlock as n, createElementBlock as p, normalizeStyle as E, unref as m, createVNode as k, withCtx as u, Fragment as v, renderList as I, createBlock as F, createTextVNode as L, toDisplayString as S, vShow as A } from "vue";
6
6
  import { useRoute as C } from "vue-router";
7
7
  const $ = /* @__PURE__ */ g({
8
8
  name: "AppBreadcrumb",
9
9
  __name: "AppBreadcrumb",
10
10
  props: {
11
- menus: {},
12
11
  height: {},
13
12
  menuFlatList: {}
14
13
  },
@@ -16,7 +15,7 @@ const $ = /* @__PURE__ */ g({
16
15
  setup(i, { emit: l }) {
17
16
  const a = i, h = l, d = C(), c = o(() => d.matched.map((t) => a.menuFlatList.find(
18
17
  (e) => e.path === t.path
19
- )).filter((t) => t)), s = o(() => c.value.length > 1), _ = o(() => ({
18
+ )).filter((t) => t)), s = o(() => !!c.value.length), _ = o(() => ({
20
19
  height: `${a.height}px`
21
20
  }));
22
21
  return x(
@@ -29,17 +28,17 @@ const $ = /* @__PURE__ */ g({
29
28
  }
30
29
  ), (t, f) => {
31
30
  const e = w, B = b;
32
- return y((n(), u("div", {
31
+ return y((n(), p("div", {
33
32
  class: "app-breadcrumb",
34
33
  style: E(m(_))
35
34
  }, [
36
35
  k(B, { separator: "/" }, {
37
- default: p(() => [
38
- (n(!0), u(v, null, I(m(c), (r) => (n(), F(e, {
36
+ default: u(() => [
37
+ (n(!0), p(v, null, I(m(c), (r) => (n(), F(e, {
39
38
  key: r.path,
40
39
  to: r.path
41
40
  }, {
42
- default: p(() => [
41
+ default: u(() => [
43
42
  L(S(r.title), 1)
44
43
  ]),
45
44
  _: 2
@@ -1,7 +1,7 @@
1
1
  import o from "./AppLayout.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2952b5fa"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6924f8b7"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { ElWatermark as F } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/watermark/style/css";
4
- import { defineComponent as R, provide as l, computed as n, watch as f, openBlock as E, createElementBlock as P, normalizeClass as B, unref as t, createVNode as a, withCtx as r, renderSlot as u } from "vue";
4
+ import { defineComponent as R, provide as d, computed as n, watch as f, openBlock as E, createElementBlock as P, normalizeClass as B, unref as o, createVNode as a, withCtx as r, renderSlot as u } from "vue";
5
5
  import H from "./AppBody.vue.mjs";
6
6
  import T from "./AppHeader.vue.mjs";
7
7
  import k from "./AppFooter.vue.mjs";
@@ -21,33 +21,33 @@ const te = /* @__PURE__ */ R({
21
21
  sidebarAboveHeader: { type: Boolean, default: !1 }
22
22
  },
23
23
  setup(m) {
24
- const o = m, h = {
24
+ const t = m, h = {
25
25
  color: "rgba(0,0,0,0.08)",
26
26
  fontSize: 12
27
27
  };
28
- l(K, o.adminBridge), l(O, o.appStore), l(U, o.userStore);
29
- const p = n(() => o.adminBridge.generateRouteMetaRawTree(
30
- o.adminBridge.getRoutes(),
28
+ d(K, t.adminBridge), d(O, t.appStore), d(U, t.userStore);
29
+ const l = n(() => t.adminBridge.generateRouteMetaRawTree(
30
+ t.adminBridge.getRoutes(),
31
31
  {
32
32
  parentPath: "",
33
- filterFn: (e, i, d) => e.checkPermission ? e.menuShow && o.userStore.havePermissionByKey(e.permissionKey) : e.menuShow && (!d || i),
33
+ filterFn: (e, i, p) => e.checkPermission ? e.menuShow && t.userStore.havePermissionByKey(e.permissionKey) : e.menuShow && (!p || i),
34
34
  sortFn: (e, i) => e.menuSort - i.menuSort
35
35
  }
36
- )), s = n(() => z(p.value)), {
36
+ )), s = n(() => z(l.value)), {
37
37
  sidebarMenus: c,
38
38
  headerMenus: v,
39
39
  activeMenu: S,
40
40
  activeModuleMenu: _,
41
41
  needRedirectToFirstChildMenu: g
42
42
  } = D({
43
- getMenus: () => p.value,
43
+ getMenus: () => l.value,
44
44
  getMenuFlatList: () => s.value,
45
- getExtractLevel1ToHeader: () => o.appStore.extractLevel1ToHeader
46
- }), M = n(() => o.userStore.isLogin), L = n(() => o.appStore.showHeader), b = n(() => o.appStore.showSidebar);
45
+ getExtractLevel1ToHeader: () => t.appStore.extractLevel1ToHeader
46
+ }), M = n(() => t.userStore.isLogin), L = n(() => t.appStore.showHeader), b = n(() => t.appStore.showSidebar);
47
47
  f(
48
48
  () => c.value.length,
49
49
  (e) => {
50
- o.appStore.changeSidebarHasMenusStatus(!!e);
50
+ t.appStore.changeSidebarHasMenusStatus(!!e);
51
51
  },
52
52
  {
53
53
  immediate: !0
@@ -63,34 +63,31 @@ const te = /* @__PURE__ */ R({
63
63
  immediate: !0
64
64
  }
65
65
  ), (e, i) => {
66
- const d = F;
66
+ const p = F;
67
67
  return E(), P("div", {
68
68
  class: B(["app-layout", {
69
- "app-layout_noLogin": !t(M)
69
+ "app-layout_noLogin": !o(M)
70
70
  }])
71
71
  }, [
72
- a(d, {
72
+ a(p, {
73
73
  content: m.watermarkContent,
74
74
  font: h,
75
75
  zIndex: 1e4
76
76
  }, {
77
77
  default: r(() => [
78
- a(t($), { level: "app" }, {
78
+ a(o($), { level: "app" }, {
79
79
  default: r(() => [
80
- a(H, {
81
- menus: t(p),
82
- menuFlatList: t(s)
83
- }, {
80
+ a(H, { menuFlatList: o(s) }, {
84
81
  footer: r(() => [
85
82
  a(k)
86
83
  ]),
87
84
  _: 1
88
- }, 8, ["menus", "menuFlatList"]),
85
+ }, 8, ["menuFlatList"]),
89
86
  a(y, {
90
- show: t(b),
87
+ show: o(b),
91
88
  aboveHeader: m.sidebarAboveHeader,
92
- menus: t(c),
93
- menuFlatList: t(s)
89
+ menus: o(c),
90
+ menuFlatList: o(s)
94
91
  }, {
95
92
  top: r(() => [
96
93
  u(e.$slots, "sidebar-top", {}, void 0, !0)
@@ -101,11 +98,11 @@ const te = /* @__PURE__ */ R({
101
98
  _: 3
102
99
  }, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
103
100
  a(T, {
104
- show: t(L),
105
- menus: t(v),
106
- activeMenu: t(S),
107
- activeModuleMenu: t(_),
108
- menuFlatList: t(s)
101
+ show: o(L),
102
+ menus: o(v),
103
+ activeMenu: o(S),
104
+ activeModuleMenu: o(_),
105
+ menuFlatList: o(s)
109
106
  }, {
110
107
  left: r(() => [
111
108
  u(e.$slots, "header-left", {}, void 0, !0)
@@ -1,7 +1,7 @@
1
1
  import t from "./DataListView.vue2.mjs";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-83a69ab1"]]);
4
+ const i = /* @__PURE__ */ a(t, [["__scopeId", "data-v-da38bea6"]]);
5
5
  export {
6
- m as default
6
+ i as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as v, computed as m, ref as F, watch as H, openBlock as s, createElementBlock as p, normalizeStyle as z, unref as f, Fragment as E, renderList as K, createBlock as R, withCtx as q, renderSlot as k, createVNode as I, markRaw as M, h as c } from "vue";
1
+ import { defineComponent as v, computed as m, ref as A, watch as F, openBlock as i, createElementBlock as p, normalizeStyle as H, unref as f, Fragment as z, renderList as E, createBlock as K, withCtx as q, renderSlot as k, createVNode as I, markRaw as M, h as c } from "vue";
2
2
  import { ElEmpty as N } from "element-plus";
3
3
  import O from "./DataListViewItem.vue.mjs";
4
- import { createDataListViewInstance as j } from "./utils.mjs";
5
- const Y = {
4
+ import { createDataListViewInstance as P } from "./utils.mjs";
5
+ const j = {
6
6
  key: 1,
7
7
  class: "data-list-view-empty"
8
8
  }, T = /* @__PURE__ */ v({
@@ -12,26 +12,27 @@ const Y = {
12
12
  rowKey: {},
13
13
  columns: {},
14
14
  maxHeight: {},
15
- selectable: { type: Boolean, default: !1 }
15
+ selectable: { type: Boolean, default: !1 },
16
+ getRenderCtxParams: {}
16
17
  },
17
18
  emits: ["selectionChange"],
18
19
  setup(r, { expose: C, emit: b }) {
19
- const o = r, V = b, i = (t) => {
20
+ const o = r, V = b, s = (t) => {
20
21
  const e = o.rowKey;
21
22
  return typeof e == "function" ? e(t) : String(t[e]);
22
23
  }, D = m(
23
24
  () => o.maxHeight ? { maxHeight: `${o.maxHeight}px`, overflowY: "auto" } : void 0
24
- ), l = F(/* @__PURE__ */ new Set()), L = m(() => l.value.size === o.data.length), g = (t) => o.selectable && l.value.has(i(t)), d = () => {
25
+ ), l = A(/* @__PURE__ */ new Set()), L = m(() => l.value.size === o.data.length), g = (t) => o.selectable && l.value.has(s(t)), d = () => {
25
26
  V("selectionChange", y());
26
- }, y = () => o.selectable ? o.data.filter((t) => l.value.has(i(t))) : [], w = () => {
27
+ }, y = () => o.selectable ? o.data.filter((t) => l.value.has(s(t))) : [], w = () => {
27
28
  l.value = /* @__PURE__ */ new Set(), d();
28
29
  }, _ = () => {
29
30
  if (!o.selectable) return;
30
31
  const t = !L.value;
31
- l.value = t ? new Set(o.data.map((e) => i(e))) : /* @__PURE__ */ new Set(), d();
32
+ l.value = t ? new Set(o.data.map((e) => s(e))) : /* @__PURE__ */ new Set(), d();
32
33
  }, x = (t) => {
33
34
  if (!o.selectable) return;
34
- const e = i(t), n = new Set(l.value);
35
+ const e = s(t), n = new Set(l.value);
35
36
  n.has(e) ? n.delete(e) : n.add(e), l.value = n, d();
36
37
  }, $ = (t) => M(
37
38
  v({
@@ -58,8 +59,9 @@ const Y = {
58
59
  });
59
60
  if (typeof a == "function")
60
61
  return a({
62
+ ...o.getRenderCtxParams(),
61
63
  row: e.row,
62
- index: e.index,
64
+ column: t,
63
65
  _index: e.index
64
66
  });
65
67
  if (a)
@@ -84,24 +86,24 @@ const Y = {
84
86
  t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] = $(e);
85
87
  }
86
88
  return t;
87
- }), A = j({
89
+ }), R = P({
88
90
  clearSelection: w,
89
91
  getSelectionRows: y,
90
92
  toggleRowSelection: x,
91
93
  toggleAllSelection: _,
92
94
  columns: o.columns
93
95
  });
94
- return C(A), H(
96
+ return C(R), F(
95
97
  () => o.data,
96
98
  () => {
97
99
  l.value.size && w();
98
100
  }
99
- ), (t, e) => (s(), p("div", {
101
+ ), (t, e) => (i(), p("div", {
100
102
  class: "data-list-view",
101
- style: z(f(D))
103
+ style: H(f(D))
102
104
  }, [
103
- r.data.length ? (s(!0), p(E, { key: 0 }, K(r.data, (n, a) => (s(), R(O, {
104
- key: i(n),
105
+ r.data.length ? (i(!0), p(z, { key: 0 }, E(r.data, (n, a) => (i(), K(O, {
106
+ key: s(n),
105
107
  selected: g(n)
106
108
  }, {
107
109
  default: q(() => [
@@ -114,7 +116,7 @@ const Y = {
114
116
  }, void 0, !0)
115
117
  ]),
116
118
  _: 2
117
- }, 1032, ["selected"]))), 128)) : (s(), p("div", Y, [
119
+ }, 1032, ["selected"]))), 128)) : (i(), p("div", j, [
118
120
  k(t.$slots, "empty", {}, () => [
119
121
  I(f(N))
120
122
  ], !0)
@@ -0,0 +1,30 @@
1
+ import { defineComponent as p, useAttrs as l, toRefs as T, openBlock as f, createBlock as u, unref as e, mergeProps as v, withCtx as g, createTextVNode as m, toDisplayString as d } from "vue";
2
+ import { ElTag as x } from "element-plus";
3
+ const k = /* @__PURE__ */ p({
4
+ name: "BooleanTag",
5
+ // inheritAttrs:false——type 由 value 派生,attrs(size/effect/round 等)经 v-bind 透传到 ElTag,
6
+ // :type 写在 v-bind 之后覆盖:消费方无法用 attrs 覆盖 type(type 是本组件唯一职责)。
7
+ inheritAttrs: !1,
8
+ __name: "BooleanTag",
9
+ props: {
10
+ value: { type: Boolean },
11
+ activeText: { default: "是" },
12
+ inactiveText: { default: "否" },
13
+ activeTagType: { default: "success" },
14
+ inactiveTagType: { default: "info" }
15
+ },
16
+ setup(a) {
17
+ const o = a, n = l(), { value: t, activeText: c, inactiveText: i, activeTagType: r, inactiveTagType: s } = T(o);
18
+ return (y, _) => (f(), u(e(x), v(e(n), {
19
+ type: e(t) ? e(r) : e(s)
20
+ }), {
21
+ default: g(() => [
22
+ m(d(e(t) ? e(c) : e(i)), 1)
23
+ ]),
24
+ _: 1
25
+ }, 16, ["type"]));
26
+ }
27
+ });
28
+ export {
29
+ k as default
30
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./BooleanTag.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8547b0b7"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d70424b6"]]);
5
5
  export {
6
6
  p as default
7
7
  };