@done-coding/admin-core 0.1.1-alpha.3 → 0.1.1-alpha.5

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 (34) hide show
  1. package/es/components/form/FormDatePicker.vue.mjs +7 -0
  2. package/es/components/form/FormDatePicker.vue2.mjs +50 -0
  3. package/es/components/form/index.mjs +19 -19
  4. package/es/components/form/utils.mjs +82 -61
  5. package/es/components/misc/ActionButton.vue.mjs +52 -0
  6. package/es/components/misc/ActionButton.vue2.mjs +4 -0
  7. package/es/components/misc/ActionButtonDanger.vue.mjs +32 -0
  8. package/es/components/misc/ActionButtonDanger.vue2.mjs +4 -0
  9. package/es/components/misc/ActionButtonWarn.vue.mjs +32 -0
  10. package/es/components/misc/ActionButtonWarn.vue2.mjs +4 -0
  11. package/es/components/misc/index.mjs +21 -9
  12. package/es/components/table/TableMain.vue.mjs +2 -2
  13. package/es/components/table/TableMain.vue2.mjs +146 -149
  14. package/es/components/table/TableToolbar.vue.mjs +2 -2
  15. package/es/components/table/TableToolbar.vue2.mjs +127 -93
  16. package/es/components/table/ToolbarButtons.vue.mjs +49 -0
  17. package/es/components/table/ToolbarButtons.vue2.mjs +4 -0
  18. package/es/index.mjs +104 -97
  19. package/es/style.css +1 -1
  20. package/es/utils/export.mjs +7 -7
  21. package/package.json +2 -2
  22. package/types/components/form/{FormDateTimeRange.vue.d.ts → FormDatePicker.vue.d.ts} +2 -2
  23. package/types/components/form/index.d.ts +2 -2
  24. package/types/components/form/utils.d.ts +3 -1
  25. package/types/components/misc/ActionButton.vue.d.ts +24 -0
  26. package/types/components/misc/ActionButtonDanger.vue.d.ts +19 -0
  27. package/types/components/misc/ActionButtonWarn.vue.d.ts +19 -0
  28. package/types/components/misc/index.d.ts +4 -1
  29. package/types/components/table/TableToolbar.vue.d.ts +49 -15
  30. package/types/components/table/ToolbarButtons.vue.d.ts +19 -0
  31. package/types/components/table/types.d.ts +40 -16
  32. package/types/utils/export.d.ts +8 -1
  33. package/es/components/form/FormDateTimeRange.vue.mjs +0 -46
  34. package/es/components/form/FormDateTimeRange.vue2.mjs +0 -4
@@ -1,65 +1,88 @@
1
- import { ElDropdown as _, ElButton as D, ElIcon as V, ElDropdownMenu as T, ElDropdownItem as $ } from "element-plus/es";
1
+ import { ElDropdown as V, ElButton as $, ElIcon as F, ElDropdownMenu as L, ElDropdownItem as S } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/dropdown/style/css";
4
4
  import "element-plus/es/components/dropdown-menu/style/css";
5
5
  import "element-plus/es/components/dropdown-item/style/css";
6
6
  import "element-plus/es/components/button/style/css";
7
7
  import "element-plus/es/components/icon/style/css";
8
- import { defineComponent as L, useModel as N, computed as b, ref as y, watch as z, openBlock as f, createElementBlock as P, createElementVNode as F, createBlock as h, withCtx as r, createVNode as n, createTextVNode as v, unref as B, createCommentVNode as w, normalizeClass as S, mergeModels as U } from "vue";
9
- import { ElMessageBox as X, ElMessage as q } from "element-plus";
10
- import { ArrowDown as O, Refresh as j } from "@element-plus/icons-vue";
11
- import G from "../misc/AutoRefresh.vue.mjs";
12
- import { countAll as H, fetchListAll as k } from "../../helpers/list-helper.mjs";
13
- import { EXPORT_MAX_LIMIT as c, exportCSV as J } from "../../utils/export.mjs";
14
- const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = { class: "table-toolbar-right" }, me = /* @__PURE__ */ L({
8
+ import { defineComponent as z, useModel as P, computed as v, ref as y, watch as N, withDirectives as U, openBlock as c, createElementBlock as X, createElementVNode as R, createBlock as p, withCtx as n, createVNode as r, createTextVNode as h, unref as A, createCommentVNode as g, normalizeClass as q, vShow as O, mergeModels as j } from "vue";
9
+ import { ElMessageBox as G, ElMessage as H } from "element-plus";
10
+ import { ArrowDown as J, Refresh as K } from "@element-plus/icons-vue";
11
+ import Q from "../misc/AutoRefresh.vue.mjs";
12
+ import k from "./ToolbarButtons.vue.mjs";
13
+ import { countAll as W, fetchListAll as M } from "../../helpers/list-helper.mjs";
14
+ import { EXPORT_MAX_LIMIT as f, exportCSV as Y } from "../../utils/export.mjs";
15
+ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee = { class: "table-toolbar-right" }, pe = /* @__PURE__ */ z({
15
16
  __name: "TableToolbar",
16
- props: /* @__PURE__ */ U({
17
- leftFeatures: { default: () => ["export"] },
18
- rightFeatures: { default: () => ["refresh", "autoRefresh"] },
17
+ props: /* @__PURE__ */ j({
18
+ showRefresh: { type: Boolean, default: !0 },
19
+ showAutoRefresh: { type: Boolean, default: !0 },
19
20
  refreshInterval: { default: 30 },
20
21
  exportByFe: { type: Boolean, default: !0 },
21
22
  exportFn: {},
23
+ exportColumns: {},
24
+ leftExtraButtons: {},
25
+ rightExtraButtons: {},
22
26
  tableExpose: {},
23
27
  loading: { type: Boolean },
24
- exportContext: {}
28
+ exportContext: {},
29
+ currentPage: {},
30
+ pageSize: {}
25
31
  }, {
26
32
  isAutoRefresh: { type: Boolean },
27
33
  isAutoRefreshModifiers: {}
28
34
  }),
29
35
  emits: ["update:isAutoRefresh"],
30
- setup(u) {
31
- const t = u, g = N(u, "isAutoRefresh"), R = b(() => {
32
- var o;
33
- return (o = t.leftFeatures) == null ? void 0 : o.includes("export");
34
- }), A = b(
35
- () => t.rightFeatures === void 0 || t.rightFeatures.includes("refresh")
36
- ), C = b(
37
- () => t.rightFeatures === void 0 || t.rightFeatures.includes("autoRefresh")
38
- ), E = y(30);
39
- z(
36
+ setup(o) {
37
+ const t = o, w = P(o, "isAutoRefresh"), B = v(() => {
38
+ var l;
39
+ return !!((l = t.exportColumns) != null && l.length);
40
+ }), C = v(() => ({
41
+ tableExpose: t.tableExpose,
42
+ loading: t.loading,
43
+ exportContext: t.exportContext,
44
+ selectedList: t.exportContext.selectedList,
45
+ pagination: {
46
+ currentPage: t.currentPage,
47
+ pageSize: t.pageSize,
48
+ total: t.exportContext.total
49
+ }
50
+ })), D = v(
51
+ () => {
52
+ var l, e;
53
+ return [
54
+ B.value,
55
+ t.showAutoRefresh,
56
+ t.showRefresh,
57
+ (l = t.leftExtraButtons) == null ? void 0 : l.length,
58
+ (e = t.rightExtraButtons) == null ? void 0 : e.length
59
+ ].filter(Boolean).length;
60
+ }
61
+ ), b = y(30);
62
+ N(
40
63
  () => t.refreshInterval,
41
- (o) => {
42
- E.value = o;
64
+ (l) => {
65
+ b.value = l;
43
66
  },
44
67
  { immediate: !0 }
45
68
  );
46
- const p = y(!1), M = async (o) => {
47
- const { columns: e, selectedList: a, currentPageList: x, api: s, query: m } = t.exportContext;
48
- let i;
49
- switch (o) {
69
+ const x = y(!1), I = async (l) => {
70
+ const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext, E = t.exportColumns;
71
+ let u;
72
+ switch (l) {
50
73
  case "selected":
51
- i = a;
74
+ u = e;
52
75
  break;
53
76
  case "current":
54
- i = x;
77
+ u = s;
55
78
  break;
56
79
  case "all":
57
80
  try {
58
- const l = await H(s, m);
59
- if (l > c) {
81
+ const a = await W(d, i);
82
+ if (a > f) {
60
83
  try {
61
- await X.confirm(
62
- `数据量超过 ${c} 条(共 ${l} 条),是否只导出前 ${c} 条?`,
84
+ await G.confirm(
85
+ `数据量超过 ${f} 条(共 ${a} 条),是否只导出前 ${f} 条?`,
63
86
  "提示",
64
87
  {
65
88
  confirmButtonText: "导出",
@@ -70,57 +93,58 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
70
93
  } catch {
71
94
  return;
72
95
  }
73
- i = await k(s, m, { limit: c });
96
+ u = await M(d, i, { limit: f });
74
97
  } else
75
- i = await k(s, m, { limit: c });
76
- } catch (l) {
77
- q.error(`导出失败:${(l == null ? void 0 : l.message) || (l == null ? void 0 : l.toString())}`);
98
+ u = await M(d, i, { limit: f });
99
+ } catch (a) {
100
+ H.error(`导出失败:${(a == null ? void 0 : a.message) || (a == null ? void 0 : a.toString())}`);
78
101
  return;
79
102
  }
80
103
  break;
81
104
  }
82
- const d = `${document.title}-${Date.now()}`;
83
- J({ columns: e, list: i, filename: d });
84
- }, I = (o) => {
85
- var a;
86
- if (p.value) return;
87
- p.value = !0;
88
- const e = t.exportByFe ? M(o) : (a = t.exportFn) == null ? void 0 : a.call(t, o);
105
+ const m = `${document.title}-${Date.now()}`;
106
+ Y({ columns: E, list: u, filename: m });
107
+ }, T = (l) => {
108
+ var s;
109
+ if (x.value) return;
110
+ x.value = !0;
111
+ const e = t.exportByFe ? I(l) : (s = t.exportFn) == null ? void 0 : s.call(t, l);
89
112
  Promise.resolve(e).catch(() => {
90
113
  }).finally(() => {
91
- p.value = !1;
114
+ x.value = !1;
92
115
  });
93
116
  };
94
- return (o, e) => {
95
- const a = V, x = D, s = $, m = T, i = _;
96
- return f(), P("div", K, [
97
- F("div", Q, [
98
- R.value ? (f(), h(i, {
117
+ return (l, e) => {
118
+ const s = F, d = $, i = S, E = L, u = V;
119
+ return U((c(), X("div", Z, [
120
+ R("div", _, [
121
+ B.value ? (c(), p(u, {
99
122
  key: 0,
100
- disabled: !u.exportContext.total,
101
- onCommand: I
123
+ disabled: !o.exportContext.total,
124
+ onCommand: T
102
125
  }, {
103
- dropdown: r(() => [
104
- n(m, null, {
105
- default: r(() => [
106
- u.exportContext.hasSelection ? (f(), h(s, {
126
+ dropdown: n(() => [
127
+ r(E, null, {
128
+ default: n(() => [
129
+ o.exportContext.hasSelection ? (c(), p(i, {
107
130
  key: 0,
131
+ disabled: !o.exportContext.selectedList.length,
108
132
  command: "selected"
109
133
  }, {
110
- default: r(() => [...e[4] || (e[4] = [
111
- v(" 导出选择 ", -1)
134
+ default: n(() => [...e[4] || (e[4] = [
135
+ h(" 导出选择 ", -1)
112
136
  ])]),
113
137
  _: 1
114
- })) : w("", !0),
115
- n(s, { command: "current" }, {
116
- default: r(() => [...e[5] || (e[5] = [
117
- v("导出本页", -1)
138
+ }, 8, ["disabled"])) : g("", !0),
139
+ r(i, { command: "current" }, {
140
+ default: n(() => [...e[5] || (e[5] = [
141
+ h("导出本页", -1)
118
142
  ])]),
119
143
  _: 1
120
144
  }),
121
- n(s, { command: "all" }, {
122
- default: r(() => [...e[6] || (e[6] = [
123
- v("导出全部", -1)
145
+ r(i, { command: "all" }, {
146
+ default: n(() => [...e[6] || (e[6] = [
147
+ h("导出全部", -1)
124
148
  ])]),
125
149
  _: 1
126
150
  })
@@ -128,17 +152,17 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
128
152
  _: 1
129
153
  })
130
154
  ]),
131
- default: r(() => [
132
- n(x, {
155
+ default: n(() => [
156
+ r(d, {
133
157
  size: "small",
134
158
  type: "primary",
135
- loading: p.value
159
+ loading: x.value
136
160
  }, {
137
- default: r(() => [
138
- e[3] || (e[3] = v(" 导出 ", -1)),
139
- n(a, null, {
140
- default: r(() => [
141
- n(B(O))
161
+ default: n(() => [
162
+ e[3] || (e[3] = h(" 导出 ", -1)),
163
+ r(s, null, {
164
+ default: n(() => [
165
+ r(A(J))
142
166
  ]),
143
167
  _: 1
144
168
  })
@@ -147,41 +171,51 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
147
171
  }, 8, ["loading"])
148
172
  ]),
149
173
  _: 1
150
- }, 8, ["disabled"])) : w("", !0)
174
+ }, 8, ["disabled"])) : g("", !0),
175
+ r(k, {
176
+ buttons: o.leftExtraButtons,
177
+ ctx: C.value
178
+ }, null, 8, ["buttons", "ctx"])
151
179
  ]),
152
- F("div", W, [
153
- C.value ? (f(), h(G, {
180
+ R("div", ee, [
181
+ r(k, {
182
+ buttons: o.rightExtraButtons,
183
+ ctx: C.value
184
+ }, null, 8, ["buttons", "ctx"]),
185
+ o.showAutoRefresh ? (c(), p(Q, {
154
186
  key: 0,
155
- modelValue: g.value,
156
- "onUpdate:modelValue": e[0] || (e[0] = (d) => g.value = d),
157
- interval: E.value,
158
- "onUpdate:interval": e[1] || (e[1] = (d) => E.value = d),
159
- refreshFn: t.tableExpose.refresh,
160
- enabled: !u.loading
161
- }, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : w("", !0),
162
- A.value ? (f(), h(x, {
187
+ modelValue: w.value,
188
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
189
+ interval: b.value,
190
+ "onUpdate:interval": e[1] || (e[1] = (m) => b.value = m),
191
+ refreshFn: o.tableExpose.refresh,
192
+ enabled: !o.loading
193
+ }, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : g("", !0),
194
+ o.showRefresh ? (c(), p(d, {
163
195
  key: 1,
164
196
  size: "small",
165
197
  circle: "",
166
- onClick: e[2] || (e[2] = (d) => t.tableExpose.refresh())
198
+ onClick: e[2] || (e[2] = (m) => o.tableExpose.refresh())
167
199
  }, {
168
- default: r(() => [
169
- n(a, {
170
- class: S({ "table-toolbar-icon--rotating": u.loading })
200
+ default: n(() => [
201
+ r(s, {
202
+ class: q({ "table-toolbar-icon--rotating": o.loading })
171
203
  }, {
172
- default: r(() => [
173
- n(B(j))
204
+ default: n(() => [
205
+ r(A(K))
174
206
  ]),
175
207
  _: 1
176
208
  }, 8, ["class"])
177
209
  ]),
178
210
  _: 1
179
- })) : w("", !0)
211
+ })) : g("", !0)
180
212
  ])
213
+ ], 512)), [
214
+ [O, D.value]
181
215
  ]);
182
216
  };
183
217
  }
184
218
  });
185
219
  export {
186
- me as default
220
+ pe as default
187
221
  };
@@ -0,0 +1,49 @@
1
+ import { ElButton as p } from "element-plus/es";
2
+ import "element-plus/es/components/base/style/css";
3
+ import "element-plus/es/components/button/style/css";
4
+ import { defineComponent as y, openBlock as t, createElementBlock as r, Fragment as n, renderList as d, createBlock as c, resolveDynamicComponent as u, unref as x, mergeProps as l, withCtx as m, createTextVNode as i, toDisplayString as f } from "vue";
5
+ import B from "../misc/ActionButton.vue.mjs";
6
+ const A = /* @__PURE__ */ y({
7
+ __name: "ToolbarButtons",
8
+ props: {
9
+ buttons: {},
10
+ ctx: {}
11
+ },
12
+ setup(o) {
13
+ const s = B;
14
+ return (_, R) => {
15
+ const k = p;
16
+ return t(!0), r(n, null, d(o.buttons, (e) => {
17
+ var a;
18
+ return t(), r(n, {
19
+ key: e.key
20
+ }, [
21
+ e.actionButtonProps ? (t(), c(u(x(s)), l({
22
+ key: 0,
23
+ ref_for: !0
24
+ }, e.actionButtonProps(o.ctx)), {
25
+ default: m(() => [
26
+ e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
27
+ i(f(e.label), 1)
28
+ ], 64))
29
+ ]),
30
+ _: 2
31
+ }, 1040)) : (t(), c(k, l({
32
+ key: 1,
33
+ ref_for: !0
34
+ }, (a = e.props) == null ? void 0 : a.call(e, o.ctx)), {
35
+ default: m(() => [
36
+ e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
37
+ i(f(e.label), 1)
38
+ ], 64))
39
+ ]),
40
+ _: 2
41
+ }, 1040))
42
+ ], 64);
43
+ }), 128);
44
+ };
45
+ }
46
+ });
47
+ export {
48
+ A as default
49
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ToolbarButtons.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
package/es/index.mjs CHANGED
@@ -5,113 +5,120 @@ import { miscInstall as a } from "./components/misc/index.mjs";
5
5
  import { modalInstall as m } from "./components/modal/index.mjs";
6
6
  import { tableInstall as f } from "./components/table/index.mjs";
7
7
  import { listPageInstall as s } from "./components/list-page/index.mjs";
8
- import { default as T } from "./components/modal/DetailModal.vue.mjs";
9
- import { default as g } from "./components/form/FormDateTimeRange.vue.mjs";
10
- import { default as R } from "./components/form/FormMain.vue.mjs";
11
- import { default as C } from "./components/form/FormRadio.vue.mjs";
12
- import { default as L } from "./components/form/FormRadioGroup.vue.mjs";
13
- import { default as S } from "./components/form/FormSelect.vue.mjs";
14
- import { default as D } from "./components/form/FormTree.vue.mjs";
15
- import { default as h } from "./components/form/FormVerifyCode.vue.mjs";
16
- import { default as N } from "./components/menu/MenuItemSub.vue.mjs";
17
- import { default as V } from "./components/menu/MenuTree.vue.mjs";
18
- import { default as v } from "./components/display/TabsMain.vue.mjs";
19
- import { default as H } from "./components/misc/TriggerAutoImport.vue.mjs";
20
- import { default as W } from "./components/display/WatchSize.vue.mjs";
21
- import { APP_API_LIST_MODEL_KEY_CONFIG as B } from "./config/list-model.mjs";
22
- import { default as Y } from "./components/misc/AutoRefresh.vue.mjs";
23
- import { BODY_CONTENT_VIEWPORT_HEIGHT as Q } from "./inject/key.mjs";
24
- import { default as q } from "./components/modal/ConfirmModal.vue.mjs";
25
- import { EXPORT_MAX_LIMIT as Z, OPERATE_COLUMN_PROP as $, exportCSV as ee, pickExportColumns as te } from "./utils/export.mjs";
26
- import { FORM_CONFIG_SELECT_ALL_VALUE as re, getConfirmPasswordRule as ae, passwordRule as me, setFormComponentType as fe } from "./helpers/form.mjs";
27
- import { FORM_ITEM_CHANGE_LOADING as le, generateFormData as ue, getBlurSubmit as pe, getChangeSubmit as ie, getEnterSubmit as ne, getPlaceholder as xe, getVModelSugar as de, parseFormData as Ie, setInputComponent as ce, setSelectComponent as Ee, stringifyFormData as Te, swiftFormItemConfig as _e } from "./components/form/utils.mjs";
28
- import { default as Me } from "./components/form/FormSearch.vue.mjs";
29
- import { default as Fe } from "./components/form/FormVerifyImage.vue.mjs";
30
- import { default as Ae } from "./components/list-page/ListPage.vue.mjs";
31
- import { ROUTE_MODULE_LEVEL as Oe, TabsMainReplaceQueryKey as Se } from "./config/route.mjs";
32
- import { default as De } from "./components/table/TableMain.vue.mjs";
33
- import { countAll as he, createListApi as ye, fetchListAll as Ne } from "./helpers/list-helper.mjs";
34
- import { createGenerateRouteMetaRawTree as Ve } from "./helpers/route.mjs";
35
- import { createStorageWithNamespace as ve } from "./helpers/storage.mjs";
36
- import { createUseState as He } from "./helpers/state.mjs";
37
- import { flatRouteMetaResolveRaw as We, getRoutePermissionKey as ze } from "./utils/router.mjs";
38
- import { getId as Xe } from "./utils/id.mjs";
39
- import { timeCountDown as ke } from "./utils/time.mjs";
40
- import { useActivated as je, useActivatedEvent as qe, useActivatedExec as Je } from "./hooks/activated.mjs";
41
- import { useFeelSize as $e } from "./hooks/feel-size.mjs";
42
- import { useMenusDataDispatch as tt } from "./hooks/menus-dispatch.mjs";
43
- import { useTimeout as rt } from "./hooks/timeout.mjs";
44
- const I = {
8
+ import { default as E } from "./components/misc/ActionButton.vue.mjs";
9
+ import { default as M } from "./components/misc/ActionButtonDanger.vue.mjs";
10
+ import { default as A } from "./components/misc/ActionButtonWarn.vue.mjs";
11
+ import { default as R } from "./components/modal/DetailModal.vue.mjs";
12
+ import { default as O } from "./components/form/FormMain.vue.mjs";
13
+ import { default as L } from "./components/form/FormRadio.vue.mjs";
14
+ import { default as D } from "./components/form/FormRadioGroup.vue.mjs";
15
+ import { default as h } from "./components/form/FormSelect.vue.mjs";
16
+ import { default as N } from "./components/form/FormTree.vue.mjs";
17
+ import { default as G } from "./components/form/FormVerifyCode.vue.mjs";
18
+ import { default as v } from "./components/menu/MenuItemSub.vue.mjs";
19
+ import { default as U } from "./components/menu/MenuTree.vue.mjs";
20
+ import { default as k } from "./components/display/TabsMain.vue.mjs";
21
+ import { default as K } from "./components/misc/TriggerAutoImport.vue.mjs";
22
+ import { default as X } from "./components/display/WatchSize.vue.mjs";
23
+ import { APP_API_LIST_MODEL_KEY_CONFIG as Q } from "./config/list-model.mjs";
24
+ import { default as q } from "./components/misc/AutoRefresh.vue.mjs";
25
+ import { BODY_CONTENT_VIEWPORT_HEIGHT as Z } from "./inject/key.mjs";
26
+ import { default as ee } from "./components/modal/ConfirmModal.vue.mjs";
27
+ import { EXPORT_MAX_LIMIT as oe, OPERATE_COLUMN_PROP as re, exportCSV as ae, pickExportColumns as me } from "./utils/export.mjs";
28
+ import { FORM_CONFIG_SELECT_ALL_VALUE as se, getConfirmPasswordRule as le, passwordRule as ue, setFormComponentType as ie } from "./helpers/form.mjs";
29
+ import { FORM_ITEM_CHANGE_LOADING as ne, generateFormData as xe, getBlurSubmit as de, getChangeSubmit as ce, getDatePickerSwiftOptions as Ie, getEnterSubmit as ge, getPlaceholder as Ee, getVModelSugar as _e, parseFormData as Me, setInputComponent as Te, setSelectComponent as Ae, stringifyFormData as Fe, swiftFormItemConfig as Re } from "./components/form/utils.mjs";
30
+ import { default as Oe } from "./components/form/FormDatePicker.vue.mjs";
31
+ import { default as Le } from "./components/form/FormSearch.vue.mjs";
32
+ import { default as De } from "./components/form/FormVerifyImage.vue.mjs";
33
+ import { default as he } from "./components/list-page/ListPage.vue.mjs";
34
+ import { ROUTE_MODULE_LEVEL as Ne, TabsMainReplaceQueryKey as we } from "./config/route.mjs";
35
+ import { default as Ve } from "./components/table/TableMain.vue.mjs";
36
+ import { countAll as Be, createListApi as Ue, fetchListAll as We } from "./helpers/list-helper.mjs";
37
+ import { createGenerateRouteMetaRawTree as He } from "./helpers/route.mjs";
38
+ import { createStorageWithNamespace as ze } from "./helpers/storage.mjs";
39
+ import { createUseState as Ye } from "./helpers/state.mjs";
40
+ import { flatRouteMetaResolveRaw as je, getRoutePermissionKey as qe } from "./utils/router.mjs";
41
+ import { getId as Ze } from "./utils/id.mjs";
42
+ import { timeCountDown as et } from "./utils/time.mjs";
43
+ import { useActivated as ot, useActivatedEvent as rt, useActivatedExec as at } from "./hooks/activated.mjs";
44
+ import { useFeelSize as ft } from "./hooks/feel-size.mjs";
45
+ import { useMenusDataDispatch as lt } from "./hooks/menus-dispatch.mjs";
46
+ import { useTimeout as it } from "./hooks/timeout.mjs";
47
+ const c = {
45
48
  install(e) {
46
49
  e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
47
50
  }
48
51
  };
49
52
  export {
50
- B as APP_API_LIST_MODEL_KEY_CONFIG,
51
- Y as AutoRefresh,
52
- Q as BODY_CONTENT_VIEWPORT_HEIGHT,
53
- q as ConfirmModal,
54
- T as DetailModal,
55
- Z as EXPORT_MAX_LIMIT,
56
- re as FORM_CONFIG_SELECT_ALL_VALUE,
57
- le as FORM_ITEM_CHANGE_LOADING,
58
- g as FormDateTimeRange,
59
- R as FormMain,
60
- C as FormRadio,
61
- L as FormRadioGroup,
62
- Me as FormSearch,
63
- S as FormSelect,
64
- D as FormTree,
65
- h as FormVerifyCode,
66
- Fe as FormVerifyImage,
67
- Ae as ListPage,
68
- N as MenuItemSub,
69
- V as MenuTree,
70
- $ as OPERATE_COLUMN_PROP,
71
- Oe as ROUTE_MODULE_LEVEL,
72
- De as TableMain,
73
- v as TabsMain,
74
- Se as TabsMainReplaceQueryKey,
75
- H as TriggerAutoImport,
76
- W as WatchSize,
77
- he as countAll,
78
- Ve as createGenerateRouteMetaRawTree,
79
- ye as createListApi,
80
- ve as createStorageWithNamespace,
81
- He as createUseState,
53
+ Q as APP_API_LIST_MODEL_KEY_CONFIG,
54
+ E as ActionButton,
55
+ M as ActionButtonDanger,
56
+ A as ActionButtonWarn,
57
+ q as AutoRefresh,
58
+ Z as BODY_CONTENT_VIEWPORT_HEIGHT,
59
+ ee as ConfirmModal,
60
+ R as DetailModal,
61
+ oe as EXPORT_MAX_LIMIT,
62
+ se as FORM_CONFIG_SELECT_ALL_VALUE,
63
+ ne as FORM_ITEM_CHANGE_LOADING,
64
+ Oe as FormDatePicker,
65
+ O as FormMain,
66
+ L as FormRadio,
67
+ D as FormRadioGroup,
68
+ Le as FormSearch,
69
+ h as FormSelect,
70
+ N as FormTree,
71
+ G as FormVerifyCode,
72
+ De as FormVerifyImage,
73
+ he as ListPage,
74
+ v as MenuItemSub,
75
+ U as MenuTree,
76
+ re as OPERATE_COLUMN_PROP,
77
+ Ne as ROUTE_MODULE_LEVEL,
78
+ Ve as TableMain,
79
+ k as TabsMain,
80
+ we as TabsMainReplaceQueryKey,
81
+ K as TriggerAutoImport,
82
+ X as WatchSize,
83
+ Be as countAll,
84
+ He as createGenerateRouteMetaRawTree,
85
+ Ue as createListApi,
86
+ ze as createStorageWithNamespace,
87
+ Ye as createUseState,
82
88
  r as displayInstall,
83
- ee as exportCSV,
84
- Ne as fetchListAll,
85
- We as flatRouteMetaResolveRaw,
89
+ ae as exportCSV,
90
+ We as fetchListAll,
91
+ je as flatRouteMetaResolveRaw,
86
92
  t as formInstall,
87
- ue as generateFormData,
88
- pe as getBlurSubmit,
89
- ie as getChangeSubmit,
90
- ae as getConfirmPasswordRule,
91
- ne as getEnterSubmit,
92
- Xe as getId,
93
- xe as getPlaceholder,
94
- ze as getRoutePermissionKey,
95
- de as getVModelSugar,
96
- I as installComponents,
93
+ xe as generateFormData,
94
+ de as getBlurSubmit,
95
+ ce as getChangeSubmit,
96
+ le as getConfirmPasswordRule,
97
+ Ie as getDatePickerSwiftOptions,
98
+ ge as getEnterSubmit,
99
+ Ze as getId,
100
+ Ee as getPlaceholder,
101
+ qe as getRoutePermissionKey,
102
+ _e as getVModelSugar,
103
+ c as installComponents,
97
104
  s as listPageInstall,
98
105
  o as menuInstall,
99
106
  a as miscInstall,
100
107
  m as modalInstall,
101
- Ie as parseFormData,
102
- me as passwordRule,
103
- te as pickExportColumns,
104
- fe as setFormComponentType,
105
- ce as setInputComponent,
106
- Ee as setSelectComponent,
107
- Te as stringifyFormData,
108
- _e as swiftFormItemConfig,
108
+ Me as parseFormData,
109
+ ue as passwordRule,
110
+ me as pickExportColumns,
111
+ ie as setFormComponentType,
112
+ Te as setInputComponent,
113
+ Ae as setSelectComponent,
114
+ Fe as stringifyFormData,
115
+ Re as swiftFormItemConfig,
109
116
  f as tableInstall,
110
- ke as timeCountDown,
111
- je as useActivated,
112
- qe as useActivatedEvent,
113
- Je as useActivatedExec,
114
- $e as useFeelSize,
115
- tt as useMenusDataDispatch,
116
- rt as useTimeout
117
+ et as timeCountDown,
118
+ ot as useActivated,
119
+ rt as useActivatedEvent,
120
+ at as useActivatedExec,
121
+ ft as useFeelSize,
122
+ lt as useMenusDataDispatch,
123
+ it as useTimeout
117
124
  };
package/es/style.css CHANGED
@@ -1 +1 @@
1
- .form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-760501d0]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-760501d0],.table-toolbar-right[data-v-760501d0]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-760501d0]{animation:table-toolbar-rotating-760501d0 1s linear infinite}@keyframes table-toolbar-rotating-760501d0{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-f0f7753c]{--el-table-header-bg-color: var(--v16a9ca77)}.table-main-pagination[data-v-f0f7753c]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-182577bf]{min-height:var(--ad28a056)}.list-page-header[data-v-182577bf],.list-page-operation[data-v-182577bf]{margin-bottom:10px}.list-page[data-v-182577bf] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
1
+ .form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.form-date-picker[data-v-cefb4529]{display:flex;align-items:center}.form-date-picker-input[data-v-cefb4529]{width:50%}.form-date-picker-swift[data-v-cefb4529]{width:50%;padding-left:12px;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-ccf5435d]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-ccf5435d],.table-toolbar-right[data-v-ccf5435d]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-ccf5435d]{animation:table-toolbar-rotating-ccf5435d 1s linear infinite}@keyframes table-toolbar-rotating-ccf5435d{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-3d9833b8]{--el-table-header-bg-color: var(--v131e457a)}.table-main-pagination[data-v-3d9833b8]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-182577bf]{min-height:var(--ad28a056)}.list-page-header[data-v-182577bf],.list-page-operation[data-v-182577bf]{margin-bottom:10px}.list-page[data-v-182577bf] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
@@ -4,16 +4,16 @@ const f = "OPERATE", E = 1e4, O = (t) => t.filter((e) => !(!e.prop || e.prop ===
4
4
  })), b = "\uFEFF", R = ({
5
5
  columns: t,
6
6
  list: e,
7
- filename: p = "导出数据"
7
+ filename: a = "导出数据"
8
8
  }) => {
9
- const c = t.map((n) => n.label).join(","), s = e.map(
10
- (n) => t.map((u) => {
11
- const i = n[u.prop] ?? "";
9
+ const s = t.map((r) => r.label).join(","), c = e.map(
10
+ (r) => t.map((o) => {
11
+ const i = o.valueMap ? o.valueMap(r) : r[o.prop] ?? "";
12
12
  return `"${String(i).replace(/"/g, '""')}"`;
13
13
  }).join(",")
14
- ), a = b + [c, ...s].join(`
15
- `), l = new Blob([a], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(l), r = document.createElement("a");
16
- r.href = o, r.download = `${p}.csv`, r.click(), URL.revokeObjectURL(o);
14
+ ), l = b + [s, ...c].join(`
15
+ `), u = new Blob([l], { type: "text/csv;charset=utf-8;" }), p = URL.createObjectURL(u), n = document.createElement("a");
16
+ n.href = p, n.download = `${a}.csv`, n.click(), URL.revokeObjectURL(p);
17
17
  };
18
18
  export {
19
19
  E as EXPORT_MAX_LIMIT,