@done-coding/admin-core 0.0.1-alpha.1 → 0.0.1-alpha.2
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.
- package/es/components/display/TabsMain.vue.mjs +61 -0
- package/es/components/display/TabsMain.vue2.mjs +4 -0
- package/es/components/display/index.mjs +9 -7
- package/es/components/form/FormDateTimeRange.vue.mjs +46 -0
- package/es/components/form/FormDateTimeRange.vue2.mjs +4 -0
- package/es/components/form/FormRadio.vue.mjs +69 -0
- package/es/components/form/FormRadio.vue2.mjs +4 -0
- package/es/components/form/index.mjs +29 -23
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +102 -97
- package/es/components/misc/AutoRefresh.vue.mjs +7 -0
- package/es/components/misc/AutoRefresh.vue2.mjs +57 -0
- package/es/components/misc/index.mjs +7 -5
- package/es/components/table/TableMain.vue.mjs +3 -3
- package/es/components/table/TableMain.vue2.mjs +158 -121
- package/es/components/table/TableToolbar.vue.mjs +7 -0
- package/es/components/table/TableToolbar.vue2.mjs +75 -0
- package/es/config/route.mjs +3 -2
- package/es/helpers/list-helper.mjs +66 -0
- package/es/hooks/timeout.mjs +21 -0
- package/es/index.mjs +88 -73
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/display/TabsMain.vue.d.ts +52 -0
- package/types/components/display/index.d.ts +2 -1
- package/types/components/form/FormDateTimeRange.vue.d.ts +18 -0
- package/types/components/form/FormRadio.vue.d.ts +35 -0
- package/types/components/form/FormSearch.vue.d.ts +1 -1
- package/types/components/form/FormSelect.vue.d.ts +2 -6
- package/types/components/form/index.d.ts +3 -1
- package/types/components/form/types.d.ts +12 -0
- package/types/components/list-page/ListPage.vue.d.ts +2 -0
- package/types/components/misc/AutoRefresh.vue.d.ts +14 -0
- package/types/components/misc/index.d.ts +2 -1
- package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
- package/types/components/table/TableMain.vue.d.ts +3 -1
- package/types/components/table/TableToolbar.vue.d.ts +43 -0
- package/types/components/table/types.d.ts +22 -2
- package/types/config/route.d.ts +2 -0
- package/types/helpers/index.d.ts +2 -0
- package/types/helpers/list-helper.d.ts +36 -0
- package/types/helpers/types.d.ts +15 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/timeout.d.ts +7 -0
|
@@ -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
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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,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
|
+
};
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./FormMain.vue.mjs";
|
|
2
2
|
import i from "./FormSelect.vue.mjs";
|
|
3
|
-
import
|
|
4
|
-
import t from "./
|
|
5
|
-
import f from "./
|
|
6
|
-
import n from "./
|
|
7
|
-
import s from "./
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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(
|
|
19
|
-
o.component(
|
|
22
|
+
Object.entries(p).forEach(([m, r]) => {
|
|
23
|
+
o.component(m, r);
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
27
|
export {
|
|
24
|
-
|
|
25
|
-
a as
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a578c778"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ElLoadingDirective as
|
|
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
|
|
5
|
-
import
|
|
6
|
-
import { generateFormData as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { BODY_CONTENT_VIEWPORT_HEIGHT as
|
|
12
|
-
const
|
|
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
|
+
import fe from "../form/FormSearch.vue.mjs";
|
|
6
|
+
import { generateFormData as he, stringifyFormData as ge } from "../form/utils.mjs";
|
|
7
|
+
import de from "../display/WatchSize.vue.mjs";
|
|
8
|
+
import me from "../table/TableMain.vue.mjs";
|
|
9
|
+
import pe from "lodash/pick";
|
|
10
|
+
import ve from "lodash/cloneDeep";
|
|
11
|
+
import { BODY_CONTENT_VIEWPORT_HEIGHT as ye } from "../../inject/key.mjs";
|
|
12
|
+
const be = {
|
|
13
13
|
"element-loading-background": "rgba(122, 122, 122, 0.5)",
|
|
14
14
|
class: "list-page"
|
|
15
|
-
},
|
|
15
|
+
}, ke = /* @__PURE__ */ re({
|
|
16
16
|
__name: "ListPage",
|
|
17
|
-
props: {
|
|
17
|
+
props: /* @__PURE__ */ A({
|
|
18
18
|
staticQuery: { default: () => ({}) },
|
|
19
19
|
formSearchProps: {},
|
|
20
20
|
columns: {},
|
|
@@ -29,56 +29,59 @@ const pe = {
|
|
|
29
29
|
injectInfo: {},
|
|
30
30
|
beforeSearch: {},
|
|
31
31
|
clearTableFilterOnReset: { type: Boolean }
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
}, {
|
|
33
|
+
isAutoRefresh: { type: Boolean },
|
|
34
|
+
isAutoRefreshModifiers: {}
|
|
35
|
+
}),
|
|
36
|
+
emits: /* @__PURE__ */ A(["dataChange", "pageInfoChange"], ["update:isAutoRefresh"]),
|
|
37
|
+
setup(n, { expose: x, emit: B }) {
|
|
38
|
+
ae((e) => ({
|
|
39
|
+
bb4a2a8e: a(q)
|
|
37
40
|
}));
|
|
38
|
-
const
|
|
41
|
+
const o = n, S = B, m = oe(n, "isAutoRefresh"), p = c({}), v = c(
|
|
39
42
|
{}
|
|
40
|
-
),
|
|
41
|
-
|
|
43
|
+
), C = c(!1), i = O(), u = O(), E = ne(
|
|
44
|
+
ye,
|
|
42
45
|
500
|
|
43
|
-
),
|
|
44
|
-
...
|
|
45
|
-
...
|
|
46
|
-
})), w =
|
|
47
|
-
I.value -
|
|
46
|
+
), H = c(0), R = c(0), V = s(() => ({
|
|
47
|
+
...v.value,
|
|
48
|
+
...o.staticQuery
|
|
49
|
+
})), w = c(!1), K = s(() => w.value ? H.value + 10 : 0), N = s(() => o.showOperation ? R.value + 10 : 0), I = s(() => E.value - o.refineReduceHeight), q = s(() => o.refine ? `${I.value}px` : "auto"), L = s(() => o.refine ? Math.max(
|
|
50
|
+
I.value - K.value - N.value,
|
|
48
51
|
200
|
|
49
|
-
) : void 0),
|
|
50
|
-
var
|
|
52
|
+
) : void 0), M = (e, t = "search") => {
|
|
53
|
+
var r, l, h;
|
|
51
54
|
let f = e;
|
|
52
|
-
if (
|
|
53
|
-
|
|
55
|
+
if (o.beforeSearch && (f = o.beforeSearch(
|
|
56
|
+
ve(e),
|
|
54
57
|
t
|
|
55
|
-
)), t === "reset" &&
|
|
56
|
-
return ["reset", "search"].includes(t) ? (
|
|
57
|
-
|
|
58
|
+
)), t === "reset" && o.clearTableFilterOnReset && ((l = (r = u.value) == null ? void 0 : r.getTableInstance()) == null || l.clearFilter()), JSON.stringify(f) === JSON.stringify(v.value))
|
|
59
|
+
return ["reset", "search"].includes(t) ? (h = u.value) == null ? void 0 : h.reload() : void 0;
|
|
60
|
+
v.value = {
|
|
58
61
|
...f
|
|
59
62
|
};
|
|
60
|
-
},
|
|
63
|
+
}, J = (e) => {
|
|
61
64
|
S("dataChange", e);
|
|
62
|
-
},
|
|
65
|
+
}, Q = (e) => {
|
|
63
66
|
S("pageInfoChange", e);
|
|
64
|
-
},
|
|
65
|
-
b.value = e;
|
|
66
|
-
}, J = (e) => {
|
|
67
|
+
}, z = (e) => {
|
|
67
68
|
C.value = e;
|
|
68
|
-
},
|
|
69
|
+
}, G = (e) => {
|
|
69
70
|
H.value = e;
|
|
70
|
-
},
|
|
71
|
-
|
|
71
|
+
}, U = (e) => {
|
|
72
|
+
R.value = e;
|
|
73
|
+
}, W = s(() => o.list), Y = s(() => o.rowKey), P = s(() => p.value), D = {
|
|
74
|
+
refresh: async (e = !1) => {
|
|
72
75
|
var t;
|
|
73
|
-
return (t =
|
|
76
|
+
return (t = u.value) == null ? void 0 : t.refresh(e);
|
|
74
77
|
},
|
|
75
|
-
reload: (e = !1) => {
|
|
78
|
+
reload: async (e = !1) => {
|
|
76
79
|
var t;
|
|
77
|
-
return (t =
|
|
80
|
+
return (t = u.value) == null ? void 0 : t.reload(e);
|
|
78
81
|
},
|
|
79
82
|
getTableInstance: () => {
|
|
80
83
|
var e;
|
|
81
|
-
return (e =
|
|
84
|
+
return (e = u.value) == null ? void 0 : e.getTableInstance();
|
|
82
85
|
},
|
|
83
86
|
validate: () => {
|
|
84
87
|
if (i.value)
|
|
@@ -102,100 +105,102 @@ const pe = {
|
|
|
102
105
|
return (e = i.value) == null ? void 0 : e.triggerSearch();
|
|
103
106
|
},
|
|
104
107
|
update: (e, t) => {
|
|
105
|
-
|
|
108
|
+
p.value[e] = t;
|
|
106
109
|
}
|
|
107
|
-
},
|
|
108
|
-
const e =
|
|
110
|
+
}, X = s(() => {
|
|
111
|
+
const e = pe(D, [
|
|
109
112
|
"triggerReset",
|
|
110
113
|
"triggerSearch",
|
|
111
114
|
"update"
|
|
112
115
|
]);
|
|
113
116
|
return {
|
|
114
|
-
...
|
|
117
|
+
...o.injectInfo || {},
|
|
115
118
|
...e
|
|
116
119
|
};
|
|
117
|
-
}),
|
|
120
|
+
}), Z = (e) => e, _ = (e) => e, ee = (e) => {
|
|
118
121
|
w.value = e;
|
|
119
122
|
};
|
|
120
|
-
return
|
|
121
|
-
() =>
|
|
123
|
+
return x(D), se(
|
|
124
|
+
() => o.list,
|
|
122
125
|
(e) => {
|
|
123
|
-
const t =
|
|
124
|
-
|
|
126
|
+
const t = he(e);
|
|
127
|
+
p.value = t, M(ge(t, e));
|
|
125
128
|
},
|
|
126
129
|
{
|
|
127
130
|
immediate: !0
|
|
128
131
|
}
|
|
129
132
|
), (e, t) => {
|
|
130
|
-
const f =
|
|
131
|
-
return
|
|
132
|
-
k(
|
|
133
|
+
const f = te;
|
|
134
|
+
return ie((j(), le("div", be, [
|
|
135
|
+
k(a(fe), y({
|
|
133
136
|
ref_key: "formSearch",
|
|
134
137
|
ref: i,
|
|
135
|
-
list:
|
|
136
|
-
data:
|
|
137
|
-
},
|
|
138
|
-
onSearch:
|
|
139
|
-
onHeightChange:
|
|
140
|
-
onVisibleChange:
|
|
138
|
+
list: a(W),
|
|
139
|
+
data: a(P)
|
|
140
|
+
}, n.formSearchProps, {
|
|
141
|
+
onSearch: M,
|
|
142
|
+
onHeightChange: G,
|
|
143
|
+
onVisibleChange: ee
|
|
141
144
|
}), F({ _: 2 }, [
|
|
142
|
-
|
|
143
|
-
name:
|
|
144
|
-
fn:
|
|
145
|
-
|
|
145
|
+
b(n.list, (r) => ({
|
|
146
|
+
name: r.key,
|
|
147
|
+
fn: g((l) => [
|
|
148
|
+
d(e.$slots, `form-${r.key}`, T($(l)), void 0, !0)
|
|
146
149
|
])
|
|
147
150
|
}))
|
|
148
151
|
]), 1040, ["list", "data"]),
|
|
149
|
-
|
|
152
|
+
n.showOperation ? (j(), ue(a(de), {
|
|
150
153
|
key: 0,
|
|
151
154
|
class: "list-page-operation",
|
|
152
|
-
onHeightChange:
|
|
155
|
+
onHeightChange: U
|
|
153
156
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
157
|
+
default: g(() => [
|
|
158
|
+
d(e.$slots, "operation", {}, void 0, !0)
|
|
156
159
|
]),
|
|
157
160
|
_: 3
|
|
158
|
-
})) :
|
|
159
|
-
k(
|
|
161
|
+
})) : ce("", !0),
|
|
162
|
+
k(a(me), y({
|
|
160
163
|
ref_key: "tableMain",
|
|
161
|
-
ref:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
ref: u,
|
|
165
|
+
"is-auto-refresh": m.value,
|
|
166
|
+
"onUpdate:isAutoRefresh": t[0] || (t[0] = (r) => m.value = r),
|
|
167
|
+
api: n.api,
|
|
168
|
+
columns: n.columns,
|
|
169
|
+
query: a(V),
|
|
170
|
+
maxHeight: a(L),
|
|
171
|
+
rowKey: a(Y)
|
|
172
|
+
}, n.tableMainProps, {
|
|
168
173
|
refine: !1,
|
|
169
|
-
injectInfo:
|
|
170
|
-
onLoadingChange:
|
|
171
|
-
onDataChange:
|
|
172
|
-
onPageInfoChange:
|
|
174
|
+
injectInfo: a(X),
|
|
175
|
+
onLoadingChange: z,
|
|
176
|
+
onDataChange: J,
|
|
177
|
+
onPageInfoChange: Q
|
|
173
178
|
}), F({ _: 2 }, [
|
|
174
|
-
|
|
175
|
-
name:
|
|
176
|
-
fn:
|
|
177
|
-
|
|
179
|
+
b(n.columns, (r) => ({
|
|
180
|
+
name: r.prop,
|
|
181
|
+
fn: g((l) => [
|
|
182
|
+
d(e.$slots, `table-${r.prop}`, T($(Z(l))), void 0, !0)
|
|
178
183
|
])
|
|
179
184
|
})),
|
|
180
|
-
|
|
181
|
-
name: `header-${
|
|
182
|
-
fn:
|
|
183
|
-
var
|
|
185
|
+
b(n.columns, (r) => ({
|
|
186
|
+
name: `header-${r.prop}`,
|
|
187
|
+
fn: g((l) => {
|
|
188
|
+
var h;
|
|
184
189
|
return [
|
|
185
|
-
|
|
186
|
-
searchFormData:
|
|
187
|
-
triggerSearch: (
|
|
190
|
+
d(e.$slots, `table-header-${r.columnKey || r.prop}`, y(_(l), {
|
|
191
|
+
searchFormData: a(P),
|
|
192
|
+
triggerSearch: (h = a(i)) == null ? void 0 : h.triggerSearch
|
|
188
193
|
}), void 0, !0)
|
|
189
194
|
];
|
|
190
195
|
})
|
|
191
196
|
}))
|
|
192
|
-
]), 1040, ["api", "columns", "query", "maxHeight", "rowKey", "injectInfo"])
|
|
197
|
+
]), 1040, ["is-auto-refresh", "api", "columns", "query", "maxHeight", "rowKey", "injectInfo"])
|
|
193
198
|
])), [
|
|
194
|
-
[f,
|
|
199
|
+
[f, !m.value && a(C)]
|
|
195
200
|
]);
|
|
196
201
|
};
|
|
197
202
|
}
|
|
198
203
|
});
|
|
199
204
|
export {
|
|
200
|
-
|
|
205
|
+
ke as default
|
|
201
206
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ElInputNumber as x, 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 m, watch as n, openBlock as i, createElementBlock as d, Fragment as b, createElementVNode as f, createVNode as p, createCommentVNode as k, mergeModels as w } from "vue";
|
|
6
|
+
import { useTimeout as B } from "../../hooks/timeout.mjs";
|
|
7
|
+
import { useActivatedExec as T } from "../../hooks/activated.mjs";
|
|
8
|
+
const y = { class: "auto-refresh" }, F = /* @__PURE__ */ N({
|
|
9
|
+
__name: "AutoRefresh",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: { type: Boolean, default: !1 },
|
|
12
|
+
modelModifiers: {},
|
|
13
|
+
interval: { default: 30 },
|
|
14
|
+
intervalModifiers: {}
|
|
15
|
+
},
|
|
16
|
+
emits: /* @__PURE__ */ w(["refresh"], ["update:modelValue", "update:interval"]),
|
|
17
|
+
setup(s, { expose: v, emit: c }) {
|
|
18
|
+
const r = c, e = m(s, "modelValue"), o = m(s, "interval"), [V, h] = B(), l = () => {
|
|
19
|
+
V(() => {
|
|
20
|
+
r("refresh"), e.value && l();
|
|
21
|
+
}, o.value * 1e3);
|
|
22
|
+
};
|
|
23
|
+
return v({ trigger: () => {
|
|
24
|
+
r("refresh"), e.value && l();
|
|
25
|
+
} }), n(e, (u) => {
|
|
26
|
+
u ? l() : h();
|
|
27
|
+
}), n(o, () => {
|
|
28
|
+
e.value && l();
|
|
29
|
+
}), T(() => {
|
|
30
|
+
e.value && (r("refresh"), l());
|
|
31
|
+
}), (u, t) => {
|
|
32
|
+
const E = x, g = M;
|
|
33
|
+
return i(), d("div", y, [
|
|
34
|
+
e.value ? (i(), d(b, { key: 0 }, [
|
|
35
|
+
t[2] || (t[2] = f("span", { class: "auto-refresh-label" }, "刷新间隔", -1)),
|
|
36
|
+
p(E, {
|
|
37
|
+
modelValue: o.value,
|
|
38
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => o.value = a),
|
|
39
|
+
min: 1,
|
|
40
|
+
step: 5,
|
|
41
|
+
size: "small",
|
|
42
|
+
class: "auto-refresh-interval"
|
|
43
|
+
}, null, 8, ["modelValue"]),
|
|
44
|
+
t[3] || (t[3] = f("span", { class: "auto-refresh-label" }, "秒", -1))
|
|
45
|
+
], 64)) : k("", !0),
|
|
46
|
+
p(g, {
|
|
47
|
+
modelValue: e.value,
|
|
48
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value = a),
|
|
49
|
+
"active-text": "自动刷新"
|
|
50
|
+
}, null, 8, ["modelValue"])
|
|
51
|
+
]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
F as default
|
|
57
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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(
|
|
5
|
+
Object.entries(n).forEach(([t, r]) => {
|
|
5
6
|
o.component(t, r);
|
|
6
7
|
});
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
e as
|
|
11
|
+
m as AutoRefresh,
|
|
12
|
+
e as TriggerAutoImport,
|
|
13
|
+
i as miscInstall
|
|
12
14
|
};
|