@done-coding/admin-core 0.1.0 → 0.1.1-alpha.1

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 (36) hide show
  1. package/es/components/display/TabsMain.vue.mjs +61 -0
  2. package/es/components/display/TabsMain.vue2.mjs +4 -0
  3. package/es/components/display/index.mjs +9 -7
  4. package/es/components/form/FormDateTimeRange.vue.mjs +46 -0
  5. package/es/components/form/FormDateTimeRange.vue2.mjs +4 -0
  6. package/es/components/form/FormRadio.vue.mjs +69 -0
  7. package/es/components/form/FormRadio.vue2.mjs +4 -0
  8. package/es/components/form/index.mjs +29 -23
  9. package/es/components/list-page/ListPage.vue.mjs +1 -1
  10. package/es/components/list-page/ListPage.vue2.mjs +12 -12
  11. package/es/components/misc/AutoRefresh.vue.mjs +7 -0
  12. package/es/components/misc/AutoRefresh.vue2.mjs +61 -0
  13. package/es/components/misc/index.mjs +7 -5
  14. package/es/components/table/TableMain.vue.mjs +1 -1
  15. package/es/components/table/TableMain.vue2.mjs +28 -24
  16. package/es/components/table/TableToolbar.vue.mjs +3 -3
  17. package/es/components/table/TableToolbar.vue2.mjs +35 -61
  18. package/es/config/route.mjs +3 -2
  19. package/es/hooks/activated.mjs +32 -26
  20. package/es/index.mjs +90 -81
  21. package/es/style.css +1 -1
  22. package/package.json +2 -2
  23. package/types/components/display/TabsMain.vue.d.ts +52 -0
  24. package/types/components/display/index.d.ts +2 -1
  25. package/types/components/form/FormDateTimeRange.vue.d.ts +18 -0
  26. package/types/components/form/FormRadio.vue.d.ts +35 -0
  27. package/types/components/form/FormSearch.vue.d.ts +1 -1
  28. package/types/components/form/FormSelect.vue.d.ts +2 -6
  29. package/types/components/form/index.d.ts +3 -1
  30. package/types/components/form/types.d.ts +12 -0
  31. package/types/components/misc/AutoRefresh.vue.d.ts +26 -0
  32. package/types/components/misc/index.d.ts +2 -1
  33. package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
  34. package/types/components/table/types.d.ts +4 -2
  35. package/types/config/route.d.ts +2 -0
  36. package/types/hooks/activated.d.ts +12 -3
@@ -0,0 +1,61 @@
1
+ import { ElTabs as v, ElTabPane as b } from "element-plus/es";
2
+ import "element-plus/es/components/base/style/css";
3
+ import "element-plus/es/components/tabs/style/css";
4
+ import "element-plus/es/components/tab-pane/style/css";
5
+ import { defineComponent as y, useModel as V, computed as _, openBlock as n, createBlock as m, isRef as B, unref as i, withCtx as d, createElementBlock as M, Fragment as T, renderList as g, renderSlot as k, mergeModels as R } from "vue";
6
+ import { useRouter as E } from "vue-router";
7
+ import { TabsMainReplaceQueryKey as Q } from "../../config/route.mjs";
8
+ const F = /* @__PURE__ */ y({
9
+ __name: "TabsMain",
10
+ props: /* @__PURE__ */ R({
11
+ list: {},
12
+ replaceQuery: { type: Boolean, default: !1 },
13
+ notNull: { type: Boolean, default: !0 }
14
+ }, {
15
+ modelValue: {},
16
+ modelModifiers: {}
17
+ }),
18
+ emits: ["update:modelValue"],
19
+ setup(a) {
20
+ const t = a, o = V(a, "modelValue"), s = E(), c = (e) => e === void 0 || e === "" ? !1 : t.list.some((u) => u.value === e), r = _({
21
+ get() {
22
+ return c(o.value) ? o.value : t.notNull && t.list.length > 0 ? t.list[0].value : o.value;
23
+ },
24
+ set(e) {
25
+ o.value = e, t.replaceQuery && s.replace({
26
+ query: {
27
+ ...s.currentRoute.value.query,
28
+ [Q]: e
29
+ }
30
+ });
31
+ }
32
+ });
33
+ return (e, u) => {
34
+ const p = b, f = v;
35
+ return n(), m(f, {
36
+ modelValue: i(r),
37
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => B(r) ? r.value = l : null)
38
+ }, {
39
+ default: d(() => [
40
+ (n(!0), M(T, null, g(a.list, (l) => (n(), m(p, {
41
+ key: l.value,
42
+ label: l.title,
43
+ name: l.value
44
+ }, {
45
+ default: d(() => [
46
+ k(e.$slots, `content-${l.value}`, {
47
+ item: l,
48
+ currentValue: i(r)
49
+ })
50
+ ]),
51
+ _: 2
52
+ }, 1032, ["label", "name"]))), 128))
53
+ ]),
54
+ _: 3
55
+ }, 8, ["modelValue"]);
56
+ };
57
+ }
58
+ });
59
+ export {
60
+ F as default
61
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./TabsMain.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,12 +1,14 @@
1
- import c from "./WatchSize.vue.mjs";
2
- const s = { WatchSize: c }, e = {
3
- install(t) {
4
- Object.entries(s).forEach(([n, o]) => {
5
- t.component(n, o);
1
+ import t from "./WatchSize.vue.mjs";
2
+ import o from "./TabsMain.vue.mjs";
3
+ const i = { WatchSize: t, TabsMain: o }, m = {
4
+ install(a) {
5
+ Object.entries(i).forEach(([n, s]) => {
6
+ a.component(n, s);
6
7
  });
7
8
  }
8
9
  };
9
10
  export {
10
- c as WatchSize,
11
- e as displayInstall
11
+ o as TabsMain,
12
+ t as WatchSize,
13
+ m as displayInstall
12
14
  };
@@ -0,0 +1,46 @@
1
+ import { ElDatePicker as d, ElButton as c } from "element-plus/es";
2
+ import "element-plus/es/components/base/style/css";
3
+ import "element-plus/es/components/button/style/css";
4
+ import "element-plus/es/components/date-picker/style/css";
5
+ import { defineComponent as p, useModel as f, useAttrs as k, openBlock as o, createElementBlock as r, createVNode as V, mergeProps as _, unref as g, Fragment as y, renderList as B, createBlock as C, withCtx as D, createTextVNode as E, toDisplayString as v, mergeModels as w } from "vue";
6
+ const x = { class: "form-date-time-range" }, N = /* @__PURE__ */ p({
7
+ name: "FormDateTimeRange",
8
+ inheritAttrs: !1,
9
+ __name: "FormDateTimeRange",
10
+ props: /* @__PURE__ */ w({
11
+ swiftOptions: { default: () => [] }
12
+ }, {
13
+ modelValue: { default: null },
14
+ modelModifiers: {}
15
+ }),
16
+ emits: ["update:modelValue"],
17
+ setup(l) {
18
+ const t = f(l, "modelValue"), m = k(), i = (n) => {
19
+ t.value = n.set();
20
+ };
21
+ return (n, a) => {
22
+ const s = d, u = c;
23
+ return o(), r("span", x, [
24
+ V(s, _({
25
+ modelValue: t.value,
26
+ "onUpdate:modelValue": a[0] || (a[0] = (e) => t.value = e),
27
+ type: "datetimerange"
28
+ }, g(m)), null, 16, ["modelValue"]),
29
+ (o(!0), r(y, null, B(l.swiftOptions, (e) => (o(), C(u, {
30
+ key: e.key,
31
+ type: "primary",
32
+ link: "",
33
+ onClick: (h) => i(e)
34
+ }, {
35
+ default: D(() => [
36
+ E(v(e.key), 1)
37
+ ]),
38
+ _: 2
39
+ }, 1032, ["onClick"]))), 128))
40
+ ]);
41
+ };
42
+ }
43
+ });
44
+ export {
45
+ N as default
46
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./FormDateTimeRange.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,69 @@
1
+ import { ElRadioGroup as h, ElRadioButton as y, ElRadio as B } from "element-plus/es";
2
+ import "element-plus/es/components/base/style/css";
3
+ import "element-plus/es/components/radio-group/style/css";
4
+ import "element-plus/es/components/radio/style/css";
5
+ import "element-plus/es/components/radio-button/style/css";
6
+ import { defineComponent as V, useModel as _, computed as b, watch as g, openBlock as a, createBlock as r, unref as x, withCtx as d, createElementBlock as m, Fragment as c, renderList as s, createTextVNode as v, toDisplayString as p, createCommentVNode as M, mergeModels as N } from "vue";
7
+ const D = /* @__PURE__ */ V({
8
+ name: "FormRadio",
9
+ inheritAttrs: !0,
10
+ __name: "FormRadio",
11
+ props: /* @__PURE__ */ N({
12
+ list: {},
13
+ mode: { default: "radio" },
14
+ notNull: { type: Boolean, default: !0 }
15
+ }, {
16
+ modelValue: {},
17
+ modelModifiers: {}
18
+ }),
19
+ emits: ["update:modelValue"],
20
+ setup(o) {
21
+ const u = o, l = _(o, "modelValue"), n = b(() => {
22
+ if (u.notNull && u.list.length > 0) {
23
+ const e = u.list.some((i) => i.value === l.value);
24
+ if (l.value === void 0 || !e)
25
+ return u.list[0].value;
26
+ }
27
+ return l.value;
28
+ }), f = (e) => {
29
+ l.value = e;
30
+ };
31
+ return g(
32
+ n,
33
+ (e) => {
34
+ e !== void 0 && e !== l.value && (l.value = e);
35
+ },
36
+ { immediate: !0 }
37
+ ), (e, i) => {
38
+ const R = y, k = B, E = h;
39
+ return a(), r(E, {
40
+ "model-value": x(n),
41
+ "onUpdate:modelValue": f
42
+ }, {
43
+ default: d(() => [
44
+ o.mode === "buttonGroup" ? (a(!0), m(c, { key: 0 }, s(o.list, (t) => (a(), r(R, {
45
+ key: t.value,
46
+ value: t.value
47
+ }, {
48
+ default: d(() => [
49
+ v(p(t.label), 1)
50
+ ]),
51
+ _: 2
52
+ }, 1032, ["value"]))), 128)) : o.mode === "radio" ? (a(!0), m(c, { key: 1 }, s(o.list, (t) => (a(), r(k, {
53
+ key: t.value,
54
+ value: t.value
55
+ }, {
56
+ default: d(() => [
57
+ v(p(t.label), 1)
58
+ ]),
59
+ _: 2
60
+ }, 1032, ["value"]))), 128)) : M("", !0)
61
+ ]),
62
+ _: 1
63
+ }, 8, ["model-value"]);
64
+ };
65
+ }
66
+ });
67
+ export {
68
+ D as default
69
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./FormRadio.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,32 +1,38 @@
1
- import e from "./FormMain.vue.mjs";
1
+ import a from "./FormMain.vue.mjs";
2
2
  import i from "./FormSelect.vue.mjs";
3
- import a from "./FormRadioGroup.vue.mjs";
4
- import t from "./FormTree.vue.mjs";
5
- import f from "./FormSearch.vue.mjs";
6
- import n from "./FormVerifyImage.vue.mjs";
7
- import s from "./FormVerifyCode.vue.mjs";
8
- const c = {
9
- FormMain: e,
3
+ import e from "./FormRadioGroup.vue.mjs";
4
+ import t from "./FormRadio.vue.mjs";
5
+ import f from "./FormTree.vue.mjs";
6
+ import n from "./FormSearch.vue.mjs";
7
+ import s from "./FormVerifyImage.vue.mjs";
8
+ import c from "./FormVerifyCode.vue.mjs";
9
+ import F from "./FormDateTimeRange.vue.mjs";
10
+ const p = {
11
+ FormMain: a,
10
12
  FormSelect: i,
11
- FormRadioGroup: a,
12
- FormTree: t,
13
- FormSearch: f,
14
- FormVerifyImage: n,
15
- FormVerifyCode: s
16
- }, S = {
13
+ FormRadioGroup: e,
14
+ FormRadio: t,
15
+ FormTree: f,
16
+ FormSearch: n,
17
+ FormVerifyImage: s,
18
+ FormVerifyCode: c,
19
+ FormDateTimeRange: F
20
+ }, V = {
17
21
  install(o) {
18
- Object.entries(c).forEach(([r, m]) => {
19
- o.component(r, m);
22
+ Object.entries(p).forEach(([m, r]) => {
23
+ o.component(m, r);
20
24
  });
21
25
  }
22
26
  };
23
27
  export {
24
- e as FormMain,
25
- a as FormRadioGroup,
26
- f as FormSearch,
28
+ F as FormDateTimeRange,
29
+ a as FormMain,
30
+ t as FormRadio,
31
+ e as FormRadioGroup,
32
+ n as FormSearch,
27
33
  i as FormSelect,
28
- t as FormTree,
29
- s as FormVerifyCode,
30
- n as FormVerifyImage,
31
- S as formInstall
34
+ f as FormTree,
35
+ c as FormVerifyCode,
36
+ s as FormVerifyImage,
37
+ V as formInstall
32
38
  };
@@ -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-767c1592"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a578c778"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { ElLoadingDirective as te } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/loading/style/css";
4
- import { defineComponent as re, useCssVars as ae, unref as a, useModel as oe, ref as c, shallowRef as O, inject as ne, computed as s, watch as se, withDirectives as ie, openBlock as j, createElementBlock as le, createVNode as k, mergeProps as y, createSlots as F, renderList as S, withCtx as g, renderSlot as d, normalizeProps as T, guardReactiveProps as $, createBlock as ue, createCommentVNode as ce, mergeModels as A } from "vue";
4
+ import { defineComponent as re, useCssVars as ae, unref as a, useModel as oe, ref as c, shallowRef as O, inject as ne, computed as s, watch as se, withDirectives as ie, openBlock as j, createElementBlock as le, createVNode as k, mergeProps as y, createSlots as F, renderList as b, withCtx as g, renderSlot as d, normalizeProps as T, guardReactiveProps as $, createBlock as ue, createCommentVNode as ce, mergeModels as A } from "vue";
5
5
  import fe from "../form/FormSearch.vue.mjs";
6
6
  import { generateFormData as he, stringifyFormData as ge } from "../form/utils.mjs";
7
7
  import de from "../display/WatchSize.vue.mjs";
@@ -9,7 +9,7 @@ import me from "../table/TableMain.vue.mjs";
9
9
  import pe from "lodash/pick";
10
10
  import ve from "lodash/cloneDeep";
11
11
  import { BODY_CONTENT_VIEWPORT_HEIGHT as ye } from "../../inject/key.mjs";
12
- const Se = {
12
+ const be = {
13
13
  "element-loading-background": "rgba(122, 122, 122, 0.5)",
14
14
  class: "list-page"
15
15
  }, ke = /* @__PURE__ */ re({
@@ -36,9 +36,9 @@ const Se = {
36
36
  emits: /* @__PURE__ */ A(["dataChange", "pageInfoChange"], ["update:isAutoRefresh"]),
37
37
  setup(n, { expose: x, emit: B }) {
38
38
  ae((e) => ({
39
- v036568fb: a(q)
39
+ bb4a2a8e: a(q)
40
40
  }));
41
- const o = n, b = B, m = oe(n, "isAutoRefresh"), p = c({}), v = c(
41
+ const o = n, S = B, m = oe(n, "isAutoRefresh"), p = c({}), v = c(
42
42
  {}
43
43
  ), C = c(!1), i = O(), u = O(), E = ne(
44
44
  ye,
@@ -61,9 +61,9 @@ const Se = {
61
61
  ...f
62
62
  };
63
63
  }, J = (e) => {
64
- b("dataChange", e);
64
+ S("dataChange", e);
65
65
  }, Q = (e) => {
66
- b("pageInfoChange", e);
66
+ S("pageInfoChange", e);
67
67
  }, z = (e) => {
68
68
  C.value = e;
69
69
  }, G = (e) => {
@@ -71,11 +71,11 @@ const Se = {
71
71
  }, U = (e) => {
72
72
  R.value = e;
73
73
  }, W = s(() => o.list), Y = s(() => o.rowKey), P = s(() => p.value), D = {
74
- refresh: (e = !1) => {
74
+ refresh: async (e = !1) => {
75
75
  var t;
76
76
  return (t = u.value) == null ? void 0 : t.refresh(e);
77
77
  },
78
- reload: (e = !1) => {
78
+ reload: async (e = !1) => {
79
79
  var t;
80
80
  return (t = u.value) == null ? void 0 : t.reload(e);
81
81
  },
@@ -131,7 +131,7 @@ const Se = {
131
131
  }
132
132
  ), (e, t) => {
133
133
  const f = te;
134
- return ie((j(), le("div", Se, [
134
+ return ie((j(), le("div", be, [
135
135
  k(a(fe), y({
136
136
  ref_key: "formSearch",
137
137
  ref: i,
@@ -142,7 +142,7 @@ const Se = {
142
142
  onHeightChange: G,
143
143
  onVisibleChange: ee
144
144
  }), F({ _: 2 }, [
145
- S(n.list, (r) => ({
145
+ b(n.list, (r) => ({
146
146
  name: r.key,
147
147
  fn: g((l) => [
148
148
  d(e.$slots, `form-${r.key}`, T($(l)), void 0, !0)
@@ -176,13 +176,13 @@ const Se = {
176
176
  onDataChange: J,
177
177
  onPageInfoChange: Q
178
178
  }), F({ _: 2 }, [
179
- S(n.columns, (r) => ({
179
+ b(n.columns, (r) => ({
180
180
  name: r.prop,
181
181
  fn: g((l) => [
182
182
  d(e.$slots, `table-${r.prop}`, T($(Z(l))), void 0, !0)
183
183
  ])
184
184
  })),
185
- S(n.columns, (r) => ({
185
+ b(n.columns, (r) => ({
186
186
  name: `header-${r.prop}`,
187
187
  fn: g((l) => {
188
188
  var h;
@@ -0,0 +1,7 @@
1
+ import o from "./AutoRefresh.vue2.mjs";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4446ddf0"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,61 @@
1
+ import { ElInputNumber as y, ElSwitch as M } from "element-plus/es";
2
+ import "element-plus/es/components/base/style/css";
3
+ import "element-plus/es/components/switch/style/css";
4
+ import "element-plus/es/components/input-number/style/css";
5
+ import { defineComponent as N, useModel as f, computed as w, watch as x, openBlock as p, createElementBlock as c, Fragment as B, createElementVNode as v, createVNode as V, createCommentVNode as R, mergeModels as k } from "vue";
6
+ import { useTimeout as F } from "../../hooks/timeout.mjs";
7
+ import { useActivatedExec as T } from "../../hooks/activated.mjs";
8
+ const g = { class: "auto-refresh" }, _ = /* @__PURE__ */ N({
9
+ __name: "AutoRefresh",
10
+ props: /* @__PURE__ */ k({
11
+ refreshFn: {},
12
+ enabled: { type: Boolean, default: !0 }
13
+ }, {
14
+ modelValue: { type: Boolean, default: !1 },
15
+ modelModifiers: {},
16
+ interval: { default: 30 },
17
+ intervalModifiers: {}
18
+ }),
19
+ emits: ["update:modelValue", "update:interval"],
20
+ setup(r) {
21
+ const m = r, l = f(r, "modelValue"), t = f(r, "interval"), n = w(() => l.value && m.enabled), [h, i] = F();
22
+ let o = null;
23
+ const d = () => (o || (o = m.refreshFn().catch(() => {
24
+ }).finally(() => {
25
+ o = null;
26
+ })), o), s = () => {
27
+ h(async () => {
28
+ await d(), n.value && s();
29
+ }, t.value * 1e3);
30
+ };
31
+ return x([n, t], ([a]) => {
32
+ a ? s() : i();
33
+ }), T(({ triggerType: a }) => {
34
+ n.value && (a === "activated" && (i(), d()), s());
35
+ }), (a, e) => {
36
+ const E = y, b = M;
37
+ return p(), c("div", g, [
38
+ l.value ? (p(), c(B, { key: 0 }, [
39
+ e[2] || (e[2] = v("span", { class: "auto-refresh-label" }, "刷新间隔", -1)),
40
+ V(E, {
41
+ modelValue: t.value,
42
+ "onUpdate:modelValue": e[0] || (e[0] = (u) => t.value = u),
43
+ min: 1,
44
+ step: 1,
45
+ size: "small",
46
+ class: "auto-refresh-interval"
47
+ }, null, 8, ["modelValue"]),
48
+ e[3] || (e[3] = v("span", { class: "auto-refresh-label" }, "秒", -1))
49
+ ], 64)) : R("", !0),
50
+ V(b, {
51
+ modelValue: l.value,
52
+ "onUpdate:modelValue": e[1] || (e[1] = (u) => l.value = u),
53
+ "active-text": "自动刷新"
54
+ }, null, 8, ["modelValue"])
55
+ ]);
56
+ };
57
+ }
58
+ });
59
+ export {
60
+ _ as default
61
+ };
@@ -1,12 +1,14 @@
1
- import n from "./TriggerAutoImport.vue.mjs";
2
- const s = { TriggerAutoImport: n }, e = {
1
+ import e from "./TriggerAutoImport.vue.mjs";
2
+ import m from "./AutoRefresh.vue.mjs";
3
+ const n = { TriggerAutoImport: e, AutoRefresh: m }, i = {
3
4
  install(o) {
4
- Object.entries(s).forEach(([t, r]) => {
5
+ Object.entries(n).forEach(([t, r]) => {
5
6
  o.component(t, r);
6
7
  });
7
8
  }
8
9
  };
9
10
  export {
10
- n as TriggerAutoImport,
11
- e as miscInstall
11
+ m as AutoRefresh,
12
+ e as TriggerAutoImport,
13
+ i as miscInstall
12
14
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableMain.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-08dc9d04"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5944984b"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -37,11 +37,11 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
37
37
  isAutoRefreshModifiers: {}
38
38
  }),
39
39
  emits: /* @__PURE__ */ G(["pageChange", "pageSizeChange", "dataChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh"]),
40
- setup(s, { expose: W, emit: Z }) {
40
+ setup(i, { expose: W, emit: Z }) {
41
41
  ce((e) => ({
42
- v1961e86c: e.headerColor
42
+ v7c6ca44f: e.headerColor
43
43
  }));
44
- const a = s, m = Z, P = me(s, "isAutoRefresh"), Q = he(), T = g([]), w = g(0), i = g(0), o = g(1), h = g(!1), x = g(!1), O = g(0), X = (e) => {
44
+ const a = i, m = Z, P = me(i, "isAutoRefresh"), Q = he(), T = g([]), w = g(0), s = g(0), o = g(1), h = g(!1), x = g(!1), O = g(0), X = (e) => {
45
45
  O.value = e;
46
46
  }, z = ve(), ee = ye(
47
47
  Pe,
@@ -64,7 +64,7 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
64
64
  ) : void 0;
65
65
  }), S = d(() => {
66
66
  const e = U(a.query || {});
67
- return D(e, E.PAGE_SIZE_KEY, i.value), D(
67
+ return D(e, E.PAGE_SIZE_KEY, s.value), D(
68
68
  e,
69
69
  E.CURRENT_PAGE_KEY,
70
70
  o.value
@@ -80,10 +80,10 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
80
80
  )} => ${JSON.stringify(S.value)}`
81
81
  ), u;
82
82
  }, K = (e = !1) => {
83
- if (!i.value) return;
83
+ if (!s.value) return;
84
84
  h.value ? console.warn("请求并发") : h.value = !0, e || (x.value = !0);
85
85
  const t = U(S.value);
86
- a.api(t).then((u) => {
86
+ return a.api(t).then((u) => {
87
87
  A(t, !1) && (T.value = F(
88
88
  u,
89
89
  E.LIST_KEY
@@ -91,17 +91,21 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
91
91
  u,
92
92
  E.TOTAL_KEY
93
93
  ), m("pageInfoChange", {
94
- pageSize: i.value,
94
+ pageSize: s.value,
95
95
  currentPage: o.value,
96
96
  total: w.value
97
97
  }));
98
98
  }).finally(() => {
99
99
  A(t) && (h.value = !1, x.value = !1);
100
100
  });
101
- }, j = (e = !1) => {
102
- K(e);
103
- }, ae = (e = !1) => {
104
- o.value === 1 ? j(e) : o.value = 1;
101
+ }, j = async (e = !1) => {
102
+ var t;
103
+ return (t = K(e)) == null ? void 0 : t.catch(() => {
104
+ });
105
+ }, ae = async (e = !1) => {
106
+ if (o.value === 1)
107
+ return j(e);
108
+ o.value = 1;
105
109
  }, oe = (e) => e, v = {
106
110
  refresh: j,
107
111
  reload: ae,
@@ -117,10 +121,10 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
117
121
  });
118
122
  W(v);
119
123
  const ne = (e) => {
120
- i.value = e, o.value = 1;
124
+ s.value = e, o.value = 1;
121
125
  }, M = (e) => !e || e === "expand";
122
126
  return be(() => {
123
- i.value = a.pageSizeInit, Ce(() => {
127
+ s.value = a.pageSizeInit, Ce(() => {
124
128
  v.refresh();
125
129
  });
126
130
  }), c(T, (e) => {
@@ -140,12 +144,12 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
140
144
  }
141
145
  ), c(x, (e) => {
142
146
  m("loadingChange", e);
143
- }), c(i, (e) => {
147
+ }), c(s, (e) => {
144
148
  m("pageSizeChange", e);
145
149
  }), c(o, (e) => {
146
150
  m("pageChange", e);
147
151
  }), (e, t) => {
148
- const u = fe, le = ge, ie = ue, se = pe;
152
+ const u = fe, le = ge, se = ue, ie = pe;
149
153
  return n(), y("div", Oe, [
150
154
  l(N) ? (n(), b(l(Re), {
151
155
  key: 0,
@@ -161,7 +165,7 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
161
165
  ]),
162
166
  _: 1
163
167
  })) : Se("", !0),
164
- I(ie, p({
168
+ I(se, p({
165
169
  ref_key: "elTable",
166
170
  ref: z,
167
171
  class: "table-main-table",
@@ -171,7 +175,7 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
171
175
  }, l(re), {
172
176
  maxHeight: l(te),
173
177
  data: l(T),
174
- rowKey: oe(s.rowKey)
178
+ rowKey: oe(i.rowKey)
175
179
  }), {
176
180
  empty: C(() => [
177
181
  l(h) ? (n(), y(_, { key: 0 }, [
@@ -179,7 +183,7 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
179
183
  ], 64)) : (n(), b(le, { key: 1 }))
180
184
  ]),
181
185
  default: C(() => [
182
- (n(!0), y(_, null, _e(s.columns, (r) => (n(), b(u, p({
186
+ (n(!0), y(_, null, _e(i.columns, (r) => (n(), b(u, p({
183
187
  key: r.columnKey || r.prop
184
188
  }, { ref_for: !0 }, r), Ee({ _: 2 }, [
185
189
  M(r.type) ? {
@@ -217,20 +221,20 @@ const Oe = { class: "table-main" }, ze = { class: "table-main-pagination" }, qe
217
221
  _: 3
218
222
  }, 16, ["maxHeight", "data", "rowKey"]),
219
223
  Te(we("div", ze, [
220
- I(se, {
224
+ I(ie, {
221
225
  "current-page": l(o),
222
226
  "onUpdate:currentPage": t[1] || (t[1] = (r) => Y(o) ? o.value = r : null),
223
- "page-size": l(i),
224
- "onUpdate:pageSize": t[2] || (t[2] = (r) => Y(i) ? i.value = r : null),
225
- "page-sizes": s.pageSizeOptions,
227
+ "page-size": l(s),
228
+ "onUpdate:pageSize": t[2] || (t[2] = (r) => Y(s) ? s.value = r : null),
229
+ "page-sizes": i.pageSizeOptions,
226
230
  size: "small",
227
231
  background: "",
228
- layout: s.pageLayout,
232
+ layout: i.pageLayout,
229
233
  total: l(w),
230
234
  onSizeChange: ne
231
235
  }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])
232
236
  ], 512), [
233
- [xe, s.showPager]
237
+ [xe, i.showPager]
234
238
  ])
235
239
  ]);
236
240
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableToolbar.vue2.mjs";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-d2a1aea9"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-efbd16f8"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };