@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
@@ -1,16 +1,13 @@
1
- import { ElInputNumber as g, ElSwitch as w, ElButton as y, ElIcon as C } from "element-plus/es";
1
+ import { ElButton as b, ElIcon as R } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/button/style/css";
4
4
  import "element-plus/es/components/icon/style/css";
5
- import "element-plus/es/components/switch/style/css";
6
- import "element-plus/es/components/input-number/style/css";
7
- import { defineComponent as M, useModel as N, computed as p, ref as T, watch as i, openBlock as a, createElementBlock as h, createElementVNode as m, Fragment as z, createVNode as f, isRef as S, unref as v, createCommentVNode as c, createBlock as b, withCtx as E, normalizeClass as U, mergeModels as F } from "vue";
8
- import { Refresh as j } from "@element-plus/icons-vue";
9
- import { useTimeout as q } from "../../hooks/timeout.mjs";
10
- import { useActivatedExec as D } from "../../hooks/activated.mjs";
11
- const G = { class: "table-toolbar" }, H = { class: "table-toolbar-right" }, $ = /* @__PURE__ */ M({
5
+ import { defineComponent as E, useModel as A, computed as u, ref as B, watch as g, openBlock as s, createElementBlock as k, createElementVNode as x, createBlock as i, createCommentVNode as f, withCtx as d, createVNode as m, normalizeClass as V, unref as C, mergeModels as I } from "vue";
6
+ import { Refresh as w } from "@element-plus/icons-vue";
7
+ import y from "../misc/AutoRefresh.vue.mjs";
8
+ const M = { class: "table-toolbar" }, _ = { class: "table-toolbar-right" }, q = /* @__PURE__ */ E({
12
9
  __name: "TableToolbar",
13
- props: /* @__PURE__ */ F({
10
+ props: /* @__PURE__ */ I({
14
11
  features: { default: () => ["refresh", "autoRefresh"] },
15
12
  refreshInterval: { default: 30 },
16
13
  tableExpose: {},
@@ -20,76 +17,53 @@ const G = { class: "table-toolbar" }, H = { class: "table-toolbar-right" }, $ =
20
17
  isAutoRefreshModifiers: {}
21
18
  }),
22
19
  emits: ["update:isAutoRefresh"],
23
- setup(n) {
24
- const e = n, t = N(n, "isAutoRefresh"), R = p(
20
+ setup(o) {
21
+ const e = o, a = A(o, "isAutoRefresh"), c = u(
25
22
  () => e.features === void 0 || e.features.includes("refresh")
26
- ), d = p(
23
+ ), h = u(
27
24
  () => e.features === void 0 || e.features.includes("autoRefresh")
28
- ), l = T(30);
29
- i(
25
+ ), l = B(30);
26
+ return g(
30
27
  () => e.refreshInterval,
31
- (r) => {
32
- l.value = r;
28
+ (n) => {
29
+ l.value = n;
33
30
  },
34
31
  { immediate: !0 }
35
- );
36
- const [x, V] = q(), s = () => {
37
- x(() => {
38
- e.tableExpose.refresh(), t.value && s();
39
- }, l.value * 1e3);
40
- }, _ = () => {
41
- e.tableExpose.refresh(), t.value && s();
42
- };
43
- return i(t, (r) => {
44
- r ? s() : V();
45
- }), i(l, () => {
46
- t.value && s();
47
- }), D(() => {
48
- t.value && (e.tableExpose.refresh(), s());
49
- }), (r, o) => {
50
- const k = g, A = w, B = C, I = y;
51
- return a(), h("div", G, [
52
- m("div", H, [
53
- d.value && t.value ? (a(), h(z, { key: 0 }, [
54
- o[2] || (o[2] = m("span", { class: "table-toolbar-label" }, "刷新间隔", -1)),
55
- f(k, {
56
- modelValue: v(l),
57
- "onUpdate:modelValue": o[0] || (o[0] = (u) => S(l) ? l.value = u : null),
58
- min: 1,
59
- step: 5,
60
- size: "small",
61
- class: "table-toolbar-interval"
62
- }, null, 8, ["modelValue"]),
63
- o[3] || (o[3] = m("span", { class: "table-toolbar-label" }, "秒", -1))
64
- ], 64)) : c("", !0),
65
- d.value ? (a(), b(A, {
32
+ ), (n, t) => {
33
+ const p = R, v = b;
34
+ return s(), k("div", M, [
35
+ x("div", _, [
36
+ h.value ? (s(), i(y, {
37
+ key: 0,
38
+ modelValue: a.value,
39
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => a.value = r),
40
+ interval: l.value,
41
+ "onUpdate:interval": t[1] || (t[1] = (r) => l.value = r),
42
+ refreshFn: e.tableExpose.refresh,
43
+ enabled: !o.loading
44
+ }, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : f("", !0),
45
+ c.value ? (s(), i(v, {
66
46
  key: 1,
67
- modelValue: t.value,
68
- "onUpdate:modelValue": o[1] || (o[1] = (u) => t.value = u),
69
- "active-text": "自动刷新"
70
- }, null, 8, ["modelValue"])) : c("", !0),
71
- R.value ? (a(), b(I, {
72
- key: 2,
73
47
  circle: "",
74
- onClick: _
48
+ onClick: t[2] || (t[2] = (r) => e.tableExpose.refresh())
75
49
  }, {
76
- default: E(() => [
77
- f(B, {
78
- class: U({ "table-toolbar-icon--rotating": n.loading })
50
+ default: d(() => [
51
+ m(p, {
52
+ class: V({ "table-toolbar-icon--rotating": o.loading })
79
53
  }, {
80
- default: E(() => [
81
- f(v(j))
54
+ default: d(() => [
55
+ m(C(w))
82
56
  ]),
83
57
  _: 1
84
58
  }, 8, ["class"])
85
59
  ]),
86
60
  _: 1
87
- })) : c("", !0)
61
+ })) : f("", !0)
88
62
  ])
89
63
  ]);
90
64
  };
91
65
  }
92
66
  });
93
67
  export {
94
- $ as default
68
+ q as default
95
69
  };
@@ -1,4 +1,5 @@
1
- const E = 1;
1
+ const e = 1, a = "_tab";
2
2
  export {
3
- E as ROUTE_MODULE_LEVEL
3
+ e as ROUTE_MODULE_LEVEL,
4
+ a as TabsMainReplaceQueryKey
4
5
  };
@@ -1,34 +1,40 @@
1
- import { watch as i, ref as s, onMounted as n, onActivated as u, onDeactivated as v, onBeforeUnmount as d } from "vue";
2
- const c = () => {
3
- const e = s(!1);
4
- return n(() => {
5
- e.value = !0, u(() => {
6
- e.value = !0;
1
+ import { watch as d, ref as n, computed as c, onMounted as o, onActivated as s, onDeactivated as r, onBeforeUnmount as u } from "vue";
2
+ const v = () => {
3
+ const e = n({
4
+ isActivated: !1,
5
+ triggerType: "mounted"
6
+ }), i = c(() => e.value.isActivated), t = (a) => {
7
+ e.value = a;
8
+ };
9
+ return o(() => {
10
+ t({ isActivated: !0, triggerType: "mounted" }), s(() => {
11
+ t({ isActivated: !0, triggerType: "activated" });
7
12
  });
8
- }), v(() => {
9
- e.value = !1;
10
- }), d(() => {
11
- e.value = !1;
13
+ }), r(() => {
14
+ t({ isActivated: !1, triggerType: "deactivated" });
15
+ }), u(() => {
16
+ t({ isActivated: !1, triggerType: "unmounted" });
12
17
  }), {
13
- isActivated: e
18
+ isActivated: i,
19
+ activatedInfo: c(() => e.value)
14
20
  };
15
- }, f = (e) => {
16
- const { isActivated: t } = c();
17
- i(
18
- t,
19
- (a) => {
20
- a && e();
21
+ }, g = (e) => {
22
+ const { activatedInfo: i } = v();
23
+ d(
24
+ i,
25
+ (t) => {
26
+ t.isActivated && e(t);
21
27
  },
22
28
  {
23
29
  immediate: !0
24
30
  }
25
31
  );
26
- }, l = (e, t) => {
27
- const { isActivated: a } = c();
28
- i(
29
- a,
30
- (o) => {
31
- o ? e() : t();
32
+ }, m = (e, i) => {
33
+ const { activatedInfo: t } = v();
34
+ d(
35
+ t,
36
+ (a) => {
37
+ a.isActivated ? e(a) : i(a);
32
38
  },
33
39
  {
34
40
  immediate: !0
@@ -36,7 +42,7 @@ const c = () => {
36
42
  );
37
43
  };
38
44
  export {
39
- c as useActivated,
40
- l as useActivatedEvent,
41
- f as useActivatedExec
45
+ v as useActivated,
46
+ m as useActivatedEvent,
47
+ g as useActivatedExec
42
48
  };
package/es/index.mjs CHANGED
@@ -5,99 +5,108 @@ 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 E } from "./components/modal/DetailModal.vue.mjs";
9
- import { default as _ } from "./components/form/FormMain.vue.mjs";
10
- import { default as M } from "./components/form/FormRadioGroup.vue.mjs";
11
- import { default as S } from "./components/form/FormSelect.vue.mjs";
12
- import { default as L } from "./components/form/FormTree.vue.mjs";
13
- import { default as D } from "./components/form/FormVerifyCode.vue.mjs";
14
- import { default as P } from "./components/menu/MenuItemSub.vue.mjs";
15
- import { default as G } from "./components/menu/MenuTree.vue.mjs";
16
- import { default as b } from "./components/misc/TriggerAutoImport.vue.mjs";
17
- import { default as y } from "./components/display/WatchSize.vue.mjs";
18
- import { APP_API_LIST_MODEL_KEY_CONFIG as v } from "./config/list-model.mjs";
19
- import { BODY_CONTENT_VIEWPORT_HEIGHT as H } from "./inject/key.mjs";
20
- import { default as z } from "./components/modal/ConfirmModal.vue.mjs";
21
- import { FORM_CONFIG_SELECT_ALL_VALUE as K, getConfirmPasswordRule as Y, passwordRule as j, setFormComponentType as k } from "./helpers/form.mjs";
22
- import { FORM_ITEM_CHANGE_LOADING as J, generateFormData as Q, getBlurSubmit as X, getChangeSubmit as Z, getEnterSubmit as $, getPlaceholder as ee, getVModelSugar as te, parseFormData as oe, setInputComponent as re, setSelectComponent as ae, stringifyFormData as me, swiftFormItemConfig as fe } from "./components/form/utils.mjs";
23
- import { default as le } from "./components/form/FormSearch.vue.mjs";
24
- import { default as ie } from "./components/form/FormVerifyImage.vue.mjs";
25
- import { default as ne } from "./components/list-page/ListPage.vue.mjs";
26
- import { ROUTE_MODULE_LEVEL as de } from "./config/route.mjs";
27
- import { default as ce } from "./components/table/TableMain.vue.mjs";
28
- import { countAll as Ee, createListApi as Fe, fetchListAll as _e } from "./helpers/list-helper.mjs";
29
- import { createGenerateRouteMetaRawTree as Me } from "./helpers/route.mjs";
30
- import { createStorageWithNamespace as Se } from "./helpers/storage.mjs";
31
- import { createUseState as Le } from "./helpers/state.mjs";
32
- import { flatRouteMetaResolveRaw as De, getRoutePermissionKey as Oe } from "./utils/router.mjs";
33
- import { getId as he } from "./utils/id.mjs";
34
- import { timeCountDown as Ne } from "./utils/time.mjs";
35
- import { useActivated as we, useActivatedEvent as ye, useActivatedExec as Ve } from "./hooks/activated.mjs";
36
- import { useFeelSize as Ue } from "./hooks/feel-size.mjs";
37
- import { useMenusDataDispatch as We } from "./hooks/menus-dispatch.mjs";
38
- import { useTimeout as Be } from "./hooks/timeout.mjs";
8
+ import { default as F } from "./components/modal/DetailModal.vue.mjs";
9
+ import { default as E } 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 S } from "./components/form/FormRadioGroup.vue.mjs";
13
+ import { default as D } from "./components/form/FormSelect.vue.mjs";
14
+ import { default as P } from "./components/form/FormTree.vue.mjs";
15
+ import { default as h } from "./components/form/FormVerifyCode.vue.mjs";
16
+ import { default as G } from "./components/menu/MenuItemSub.vue.mjs";
17
+ import { default as w } 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 Q } from "./components/misc/AutoRefresh.vue.mjs";
23
+ import { BODY_CONTENT_VIEWPORT_HEIGHT as k } from "./inject/key.mjs";
24
+ import { default as J } from "./components/modal/ConfirmModal.vue.mjs";
25
+ import { FORM_CONFIG_SELECT_ALL_VALUE as Z, getConfirmPasswordRule as $, passwordRule as ee, setFormComponentType as te } from "./helpers/form.mjs";
26
+ import { FORM_ITEM_CHANGE_LOADING as re, generateFormData as ae, getBlurSubmit as me, getChangeSubmit as fe, getEnterSubmit as se, getPlaceholder as le, getVModelSugar as ue, parseFormData as ie, setInputComponent as pe, setSelectComponent as ne, stringifyFormData as xe, swiftFormItemConfig as de } from "./components/form/utils.mjs";
27
+ import { default as ce } from "./components/form/FormSearch.vue.mjs";
28
+ import { default as Fe } from "./components/form/FormVerifyImage.vue.mjs";
29
+ import { default as Ee } from "./components/list-page/ListPage.vue.mjs";
30
+ import { ROUTE_MODULE_LEVEL as Re, TabsMainReplaceQueryKey as _e } from "./config/route.mjs";
31
+ import { default as Ae } from "./components/table/TableMain.vue.mjs";
32
+ import { countAll as Le, createListApi as De, fetchListAll as Oe } from "./helpers/list-helper.mjs";
33
+ import { createGenerateRouteMetaRawTree as be } from "./helpers/route.mjs";
34
+ import { createStorageWithNamespace as ye } from "./helpers/storage.mjs";
35
+ import { createUseState as Ne } from "./helpers/state.mjs";
36
+ import { flatRouteMetaResolveRaw as Ve, getRoutePermissionKey as ve } from "./utils/router.mjs";
37
+ import { getId as He } from "./utils/id.mjs";
38
+ import { timeCountDown as We } from "./utils/time.mjs";
39
+ import { useActivated as Be, useActivatedEvent as Ye, useActivatedExec as Qe } from "./hooks/activated.mjs";
40
+ import { useFeelSize as ke } from "./hooks/feel-size.mjs";
41
+ import { useMenusDataDispatch as Je } from "./hooks/menus-dispatch.mjs";
42
+ import { useTimeout as Ze } from "./hooks/timeout.mjs";
39
43
  const I = {
40
44
  install(e) {
41
45
  e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
42
46
  }
43
47
  };
44
48
  export {
45
- v as APP_API_LIST_MODEL_KEY_CONFIG,
46
- H as BODY_CONTENT_VIEWPORT_HEIGHT,
47
- z as ConfirmModal,
48
- E as DetailModal,
49
- K as FORM_CONFIG_SELECT_ALL_VALUE,
50
- J as FORM_ITEM_CHANGE_LOADING,
51
- _ as FormMain,
52
- M as FormRadioGroup,
53
- le as FormSearch,
54
- S as FormSelect,
55
- L as FormTree,
56
- D as FormVerifyCode,
57
- ie as FormVerifyImage,
58
- ne as ListPage,
59
- P as MenuItemSub,
60
- G as MenuTree,
61
- de as ROUTE_MODULE_LEVEL,
62
- ce as TableMain,
63
- b as TriggerAutoImport,
64
- y as WatchSize,
65
- Ee as countAll,
66
- Me as createGenerateRouteMetaRawTree,
67
- Fe as createListApi,
68
- Se as createStorageWithNamespace,
69
- Le as createUseState,
49
+ B as APP_API_LIST_MODEL_KEY_CONFIG,
50
+ Q as AutoRefresh,
51
+ k as BODY_CONTENT_VIEWPORT_HEIGHT,
52
+ J as ConfirmModal,
53
+ F as DetailModal,
54
+ Z as FORM_CONFIG_SELECT_ALL_VALUE,
55
+ re as FORM_ITEM_CHANGE_LOADING,
56
+ E as FormDateTimeRange,
57
+ R as FormMain,
58
+ C as FormRadio,
59
+ S as FormRadioGroup,
60
+ ce as FormSearch,
61
+ D as FormSelect,
62
+ P as FormTree,
63
+ h as FormVerifyCode,
64
+ Fe as FormVerifyImage,
65
+ Ee as ListPage,
66
+ G as MenuItemSub,
67
+ w as MenuTree,
68
+ Re as ROUTE_MODULE_LEVEL,
69
+ Ae as TableMain,
70
+ v as TabsMain,
71
+ _e as TabsMainReplaceQueryKey,
72
+ H as TriggerAutoImport,
73
+ W as WatchSize,
74
+ Le as countAll,
75
+ be as createGenerateRouteMetaRawTree,
76
+ De as createListApi,
77
+ ye as createStorageWithNamespace,
78
+ Ne as createUseState,
70
79
  r as displayInstall,
71
- _e as fetchListAll,
72
- De as flatRouteMetaResolveRaw,
80
+ Oe as fetchListAll,
81
+ Ve as flatRouteMetaResolveRaw,
73
82
  t as formInstall,
74
- Q as generateFormData,
75
- X as getBlurSubmit,
76
- Z as getChangeSubmit,
77
- Y as getConfirmPasswordRule,
78
- $ as getEnterSubmit,
79
- he as getId,
80
- ee as getPlaceholder,
81
- Oe as getRoutePermissionKey,
82
- te as getVModelSugar,
83
+ ae as generateFormData,
84
+ me as getBlurSubmit,
85
+ fe as getChangeSubmit,
86
+ $ as getConfirmPasswordRule,
87
+ se as getEnterSubmit,
88
+ He as getId,
89
+ le as getPlaceholder,
90
+ ve as getRoutePermissionKey,
91
+ ue as getVModelSugar,
83
92
  I as installComponents,
84
93
  s as listPageInstall,
85
94
  o as menuInstall,
86
95
  a as miscInstall,
87
96
  m as modalInstall,
88
- oe as parseFormData,
89
- j as passwordRule,
90
- k as setFormComponentType,
91
- re as setInputComponent,
92
- ae as setSelectComponent,
93
- me as stringifyFormData,
94
- fe as swiftFormItemConfig,
97
+ ie as parseFormData,
98
+ ee as passwordRule,
99
+ te as setFormComponentType,
100
+ pe as setInputComponent,
101
+ ne as setSelectComponent,
102
+ xe as stringifyFormData,
103
+ de as swiftFormItemConfig,
95
104
  f as tableInstall,
96
- Ne as timeCountDown,
97
- we as useActivated,
98
- ye as useActivatedEvent,
99
- Ve as useActivatedExec,
100
- Ue as useFeelSize,
101
- We as useMenusDataDispatch,
102
- Be as useTimeout
105
+ We as timeCountDown,
106
+ Be as useActivated,
107
+ Ye as useActivatedEvent,
108
+ Qe as useActivatedExec,
109
+ ke as useFeelSize,
110
+ Je as useMenusDataDispatch,
111
+ Ze as useTimeout
103
112
  };
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}.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-d2a1aea9]{display:flex;justify-content:flex-end;align-items:center;padding-bottom:8px}.table-toolbar-right[data-v-d2a1aea9]{display:flex;align-items:center;gap:8px}.table-toolbar-label[data-v-d2a1aea9]{font-size:13px;color:var(--el-text-color-regular)}.table-toolbar-interval[data-v-d2a1aea9]{width:80px}.table-toolbar-icon--rotating[data-v-d2a1aea9]{animation:table-toolbar-rotating-d2a1aea9 1s linear infinite}@keyframes table-toolbar-rotating-d2a1aea9{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-08dc9d04]{--el-table-header-bg-color: var(--v1961e86c)}.table-main-pagination[data-v-08dc9d04]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-767c1592]{min-height:var(--v036568fb)}.list-page-operation[data-v-767c1592]{margin-bottom:10px}.list-page[data-v-767c1592] .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}.auto-refresh[data-v-4446ddf0]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-4446ddf0]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-4446ddf0]{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-efbd16f8]{display:flex;justify-content:flex-end;align-items:center;padding-bottom:8px}.table-toolbar-right[data-v-efbd16f8]{display:flex;align-items:center;gap:8px}.table-toolbar-icon--rotating[data-v-efbd16f8]{animation:table-toolbar-rotating-efbd16f8 1s linear infinite}@keyframes table-toolbar-rotating-efbd16f8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-5944984b]{--el-table-header-bg-color: var(--v7c6ca44f)}.table-main-pagination[data-v-5944984b]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-a578c778]{min-height:var(--bb4a2a8e)}.list-page-operation[data-v-a578c778]{margin-bottom:10px}.list-page[data-v-a578c778] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/admin-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-alpha.1",
4
4
  "description": "后台管理核心",
5
5
  "private": false,
6
6
  "main": "lib/index.cjs",
@@ -77,5 +77,5 @@
77
77
  "node": ">=18.0.0",
78
78
  "pnpm": ">=9.0.0"
79
79
  },
80
- "gitHead": "c36a32fd56c54e6450e2abd2124bdc1642c8bb80"
80
+ "gitHead": "702df9158b5cfa3bf2f7c667fb10cbe5168b9a7a"
81
81
  }
@@ -0,0 +1,52 @@
1
+ declare function __VLS_template(): Partial<Record<`content-${string}`, (_: {
2
+ item: {
3
+ value: string;
4
+ title: string;
5
+ };
6
+ currentValue: string | undefined;
7
+ }) => any>>;
8
+ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
9
+ modelValue: import('vue').PropType<string>;
10
+ list: {
11
+ type: globalThis.PropType<{
12
+ value: string;
13
+ title: string;
14
+ }[]>;
15
+ required: true;
16
+ };
17
+ replaceQuery: {
18
+ type: globalThis.PropType<boolean>;
19
+ default: boolean;
20
+ };
21
+ notNull: {
22
+ type: globalThis.PropType<boolean>;
23
+ default: boolean;
24
+ };
25
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
26
+ modelValue: import('vue').PropType<string>;
27
+ list: {
28
+ type: globalThis.PropType<{
29
+ value: string;
30
+ title: string;
31
+ }[]>;
32
+ required: true;
33
+ };
34
+ replaceQuery: {
35
+ type: globalThis.PropType<boolean>;
36
+ default: boolean;
37
+ };
38
+ notNull: {
39
+ type: globalThis.PropType<boolean>;
40
+ default: boolean;
41
+ };
42
+ }>> & Readonly<{}>, {
43
+ replaceQuery: boolean;
44
+ notNull: boolean;
45
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
47
+ export default _default;
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -1,5 +1,6 @@
1
1
  import { Plugin } from 'vue';
2
2
  import { default as WatchSize } from './WatchSize.vue';
3
+ import { default as TabsMain } from './TabsMain.vue';
3
4
 
4
- export { WatchSize };
5
+ export { WatchSize, TabsMain };
5
6
  export declare const displayInstall: Plugin;
@@ -0,0 +1,18 @@
1
+ import { DateTimeRangeSwiftOption } from './types';
2
+
3
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
4
+ modelValue: import('vue').PropType<[Date, Date] | null>;
5
+ swiftOptions: {
6
+ type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
7
+ default: () => never[];
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
10
+ modelValue: import('vue').PropType<[Date, Date] | null>;
11
+ swiftOptions: {
12
+ type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
13
+ default: () => never[];
14
+ };
15
+ }>> & Readonly<{}>, {
16
+ swiftOptions: DateTimeRangeSwiftOption[];
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { OptionItem } from './types';
2
+
3
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
4
+ modelValue: import('vue').PropType<OptionItem["value"]>;
5
+ list: {
6
+ type: globalThis.PropType<OptionItem[]>;
7
+ required: true;
8
+ };
9
+ notNull: {
10
+ type: globalThis.PropType<boolean>;
11
+ default: boolean;
12
+ };
13
+ mode: {
14
+ type: globalThis.PropType<"radio" | "buttonGroup">;
15
+ default: string;
16
+ };
17
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
+ modelValue: import('vue').PropType<OptionItem["value"]>;
19
+ list: {
20
+ type: globalThis.PropType<OptionItem[]>;
21
+ required: true;
22
+ };
23
+ notNull: {
24
+ type: globalThis.PropType<boolean>;
25
+ default: boolean;
26
+ };
27
+ mode: {
28
+ type: globalThis.PropType<"radio" | "buttonGroup">;
29
+ default: string;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ notNull: boolean;
33
+ mode: "radio" | "buttonGroup";
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
35
+ export default _default;
@@ -2,8 +2,8 @@ import { FormSearchInstance, FormSearchProps, FormSearchSearchType } from './typ
2
2
 
3
3
  declare const _default: <PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{
5
- readonly onHeightChange?: ((height: number) => any) | undefined;
6
5
  readonly onSearch?: ((data: import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, type: FormSearchSearchType) => any) | undefined;
6
+ readonly onHeightChange?: ((height: number) => any) | undefined;
7
7
  readonly onVisibleChange?: ((status: boolean) => any) | undefined;
8
8
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & FormSearchProps<PO, SO, SQ>, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
9
9
  expose(exposed: import('vue').ShallowUnwrapRef<FormSearchInstance>): void;
@@ -1,9 +1,5 @@
1
- interface OptionItem extends Record<string, any> {
2
- label: string;
3
- value: string | number;
4
- disabled?: boolean;
5
- [key: string]: any;
6
- }
1
+ import { OptionItem } from './types';
2
+
7
3
  declare function __VLS_template(): {
8
4
  option?(_: {
9
5
  data: OptionItem;
@@ -2,12 +2,14 @@ import { Plugin } from 'vue';
2
2
  import { default as FormMain } from './FormMain.vue';
3
3
  import { default as FormSelect } from './FormSelect.vue';
4
4
  import { default as FormRadioGroup } from './FormRadioGroup.vue';
5
+ import { default as FormRadio } from './FormRadio.vue';
5
6
  import { default as FormTree } from './FormTree.vue';
6
7
  import { default as FormSearch } from './FormSearch.vue';
7
8
  import { default as FormVerifyImage } from './FormVerifyImage.vue';
8
9
  import { default as FormVerifyCode } from './FormVerifyCode.vue';
10
+ import { default as FormDateTimeRange } from './FormDateTimeRange.vue';
9
11
 
10
12
  export * from './types';
11
13
  export * from './utils';
12
- export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, };
14
+ export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormRadio, FormTree, FormVerifyImage, FormVerifyCode, FormDateTimeRange, };
13
15
  export declare const formInstall: Plugin;
@@ -169,6 +169,13 @@ export type FormItemLoadingChangeFunc = (data: {
169
169
  key: string;
170
170
  message?: string;
171
171
  }) => void;
172
+ /** 选项类型 */
173
+ export interface OptionItem extends Record<string, any> {
174
+ label: string | number;
175
+ value: string | number;
176
+ disabled?: boolean;
177
+ [key: string]: any;
178
+ }
172
179
  /** form tree 单项类型 */
173
180
  export interface FormTreeItem {
174
181
  id: string | number;
@@ -181,6 +188,11 @@ export interface FormTreeItem {
181
188
  export type FormItemSubmitType = "blur" | "change" | "enter";
182
189
  /** 表单搜索搜索类型 */
183
190
  export type FormSearchSearchType = "search" | "reset" | FormItemSubmitType;
191
+ /** 日期时间范围选择器快捷选项 */
192
+ export interface DateTimeRangeSwiftOption {
193
+ key: string;
194
+ set: () => [Date, Date];
195
+ }
184
196
  export type FormItemConfigSwiftOptionsCommon<PO extends Record<string, any>,
185
197
  /** 需要格式化的模型 */
186
198
  SO extends Record<string, any>> = Omit<FormItemConfig<PO, SO>, "rules"> & {