@done-coding/admin-core 0.0.1-alpha.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/form/FormMain.vue.mjs +65 -61
- package/es/components/form/FormSearch.vue2.mjs +24 -23
- package/es/components/list-page/ListPage.vue.mjs +1 -1
- package/es/components/list-page/ListPage.vue2.mjs +105 -93
- package/es/components/modal/DetailModal.vue.mjs +31 -29
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +154 -117
- package/es/components/table/TableToolbar.vue.mjs +7 -0
- package/es/components/table/TableToolbar.vue2.mjs +95 -0
- package/es/helpers/list-helper.mjs +66 -0
- package/es/hooks/timeout.mjs +21 -0
- package/es/index.mjs +43 -37
- package/es/style.css +1 -1
- package/package.json +3 -3
- package/types/components/form/FormMain.vue.d.ts +3 -0
- package/types/components/form/types.d.ts +1 -0
- package/types/components/list-page/ListPage.vue.d.ts +18 -2
- package/types/components/modal/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +13 -1
- package/types/components/table/TableToolbar.vue.d.ts +43 -0
- package/types/components/table/types.d.ts +18 -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
|
@@ -1,94 +1,98 @@
|
|
|
1
|
-
import { ElForm as
|
|
1
|
+
import { ElForm as M, ElRow as A, ElCol as B } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/form/style/css";
|
|
4
4
|
import "element-plus/es/components/row/style/css";
|
|
5
5
|
import "element-plus/es/components/col/style/css";
|
|
6
|
-
import { defineComponent as
|
|
6
|
+
import { defineComponent as H, shallowRef as N, ref as _, computed as i, provide as P, watch as h, openBlock as p, createBlock as L, unref as y, withCtx as m, createVNode as O, createElementBlock as D, Fragment as T, renderList as q, withDirectives as z, mergeProps as V, renderSlot as j, vShow as J } from "vue";
|
|
7
7
|
import Q from "./FormItem.vue.mjs";
|
|
8
8
|
import { FORM_ITEM_CHANGE_LOADING as U } from "./utils.mjs";
|
|
9
|
-
const ue = /* @__PURE__ */
|
|
9
|
+
const ue = /* @__PURE__ */ H({
|
|
10
10
|
name: "FormMain",
|
|
11
11
|
inheritAttrs: !0,
|
|
12
12
|
__name: "FormMain",
|
|
13
13
|
props: {
|
|
14
14
|
list: {},
|
|
15
15
|
data: {},
|
|
16
|
-
layout: {}
|
|
16
|
+
layout: {},
|
|
17
|
+
rowGutter: { default: 0 }
|
|
17
18
|
},
|
|
18
19
|
emits: ["loadingChange", "visibleChange", "submit"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
(e) =>
|
|
22
|
-
)), R = i(() =>
|
|
23
|
-
|
|
20
|
+
setup(f, { expose: S, emit: x }) {
|
|
21
|
+
const d = f, v = x, a = N(), c = _([]), u = _({}), b = i(() => !!c.value.length), w = i(() => Object.keys(u.value).filter(
|
|
22
|
+
(e) => u.value[e]
|
|
23
|
+
)), R = i(() => d.list.filter((e) => !w.value.includes(e.key))), $ = i(() => R.value.length > 0), G = (e) => e;
|
|
24
|
+
S({
|
|
24
25
|
validate: () => a.value ? new Promise((e, t) => {
|
|
25
|
-
var
|
|
26
|
-
(
|
|
27
|
-
if (
|
|
26
|
+
var l;
|
|
27
|
+
(l = a.value) == null || l.validate((r, s) => {
|
|
28
|
+
if (r)
|
|
28
29
|
e();
|
|
29
30
|
else {
|
|
30
|
-
const
|
|
31
|
-
Object.keys(
|
|
31
|
+
const o = { ...s || {} };
|
|
32
|
+
Object.keys(o).forEach((n) => {
|
|
32
33
|
var C;
|
|
33
|
-
|
|
34
|
-
}), Object.keys(
|
|
34
|
+
w.value.includes(n) && (console.log(`当前${n}被隐藏,移除校验`, o[n]), delete o[n], (C = a.value) == null || C.clearValidate(n));
|
|
35
|
+
}), Object.keys(o).length === 0 ? e() : t(s);
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
}) : Promise.reject(new Error("实例化未完成")),
|
|
38
39
|
resetFields: () => a.value ? a.value.resetFields() : console.error("实例化未完成"),
|
|
39
40
|
clearValidate: (e) => a.value ? a.value.clearValidate(e) : console.error("实例化未完成")
|
|
40
41
|
});
|
|
41
|
-
const g = i(() =>
|
|
42
|
-
data:
|
|
42
|
+
const g = i(() => d.list), k = i(() => g.value.reduce((e, t) => (t.rules && (typeof t.rules == "function" ? e[t.key] = t.rules({
|
|
43
|
+
data: d.data,
|
|
43
44
|
config: t
|
|
44
|
-
}) : e[t.key] = t.rules), e), {})),
|
|
45
|
+
}) : e[t.key] = t.rules), e), {})), F = i(() => c.value.reduce(
|
|
45
46
|
(e, t) => (e[t.key] = [
|
|
46
47
|
{
|
|
47
48
|
validator: () => [new Error(`${t.label}${t.message}`)]
|
|
48
49
|
}
|
|
49
50
|
], e),
|
|
50
51
|
{}
|
|
51
|
-
)),
|
|
52
|
-
const e = Object.keys(
|
|
53
|
-
return [...new Set(e.concat(t))].reduce((
|
|
54
|
-
...
|
|
55
|
-
...
|
|
56
|
-
],
|
|
52
|
+
)), I = i(() => {
|
|
53
|
+
const e = Object.keys(k.value), t = Object.keys(F.value);
|
|
54
|
+
return [...new Set(e.concat(t))].reduce((r, s) => (r[s] = [
|
|
55
|
+
...k.value[s] || [],
|
|
56
|
+
...F.value[s] || []
|
|
57
|
+
], r), {});
|
|
57
58
|
});
|
|
58
|
-
|
|
59
|
+
P(U, ({ key: e, message: t }) => {
|
|
59
60
|
if (!e)
|
|
60
61
|
return console.error("更新状态未传入key, 此处忽略");
|
|
61
|
-
const
|
|
62
|
-
|
|
62
|
+
const l = c.value.findIndex((r) => r.key === e);
|
|
63
|
+
l === -1 ? t && c.value.push({
|
|
63
64
|
key: e,
|
|
64
65
|
message: t,
|
|
65
|
-
label:
|
|
66
|
-
}) : t ?
|
|
66
|
+
label: d.list.find((r) => r.key === e).label
|
|
67
|
+
}) : t ? c.value.splice(l, 1, {
|
|
67
68
|
key: e,
|
|
68
69
|
message: t,
|
|
69
|
-
label:
|
|
70
|
-
}) :
|
|
70
|
+
label: d.list.find((r) => r.key === e).label
|
|
71
|
+
}) : c.value.splice(l, 1);
|
|
71
72
|
});
|
|
72
|
-
const
|
|
73
|
+
const K = ({
|
|
73
74
|
status: e,
|
|
74
75
|
config: { key: t }
|
|
75
76
|
}) => {
|
|
76
|
-
(
|
|
77
|
-
},
|
|
78
|
-
...
|
|
77
|
+
(u.value[t] || !1) !== e && (u.value[t] = e);
|
|
78
|
+
}, E = (e) => ({
|
|
79
|
+
...d.layout || {},
|
|
79
80
|
...e || {}
|
|
80
81
|
});
|
|
81
|
-
return
|
|
82
|
+
return h(
|
|
82
83
|
g,
|
|
83
|
-
() => {
|
|
84
|
-
|
|
84
|
+
(e) => {
|
|
85
|
+
const t = e.map((l) => l.key);
|
|
86
|
+
Object.keys(u.value).forEach((l) => {
|
|
87
|
+
t.includes(l) || delete u.value[l];
|
|
88
|
+
});
|
|
85
89
|
},
|
|
86
90
|
{
|
|
87
91
|
immediate: !0
|
|
88
92
|
}
|
|
89
|
-
),
|
|
93
|
+
), h(b, () => {
|
|
90
94
|
v("loadingChange", b.value);
|
|
91
|
-
}),
|
|
95
|
+
}), h(
|
|
92
96
|
$,
|
|
93
97
|
(e) => {
|
|
94
98
|
v("visibleChange", e);
|
|
@@ -97,40 +101,40 @@ const ue = /* @__PURE__ */ N({
|
|
|
97
101
|
immediate: !0
|
|
98
102
|
}
|
|
99
103
|
), (e, t) => {
|
|
100
|
-
const
|
|
101
|
-
return
|
|
104
|
+
const l = B, r = A, s = M;
|
|
105
|
+
return p(), L(s, {
|
|
102
106
|
ref_key: "elForm",
|
|
103
107
|
ref: a,
|
|
104
|
-
model:
|
|
105
|
-
rules: y(
|
|
108
|
+
model: f.data,
|
|
109
|
+
rules: y(I)
|
|
106
110
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
|
|
109
|
-
default:
|
|
110
|
-
(
|
|
111
|
-
key:
|
|
112
|
-
}, { ref_for: !0 },
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
data:
|
|
116
|
-
config:
|
|
117
|
-
onViewHideChange:
|
|
111
|
+
default: m(() => [
|
|
112
|
+
O(r, { gutter: f.rowGutter }, {
|
|
113
|
+
default: m(() => [
|
|
114
|
+
(p(!0), D(T, null, q(y(g), (o) => z((p(), L(l, V({
|
|
115
|
+
key: o.key
|
|
116
|
+
}, { ref_for: !0 }, E(o.layout)), {
|
|
117
|
+
default: m(() => [
|
|
118
|
+
O(Q, {
|
|
119
|
+
data: f.data,
|
|
120
|
+
config: G(o),
|
|
121
|
+
onViewHideChange: K,
|
|
118
122
|
onSubmit: t[0] || (t[0] = (n) => v("submit", n))
|
|
119
123
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
124
|
+
default: m((n) => [
|
|
125
|
+
j(e.$slots, o.key, V({ ref_for: !0 }, n))
|
|
122
126
|
]),
|
|
123
127
|
_: 2
|
|
124
128
|
}, 1032, ["data", "config"])
|
|
125
129
|
]),
|
|
126
130
|
_: 2
|
|
127
131
|
}, 1040)), [
|
|
128
|
-
[J, !(y(
|
|
132
|
+
[J, !(y(u)[o.key] ?? !1)]
|
|
129
133
|
])), 128)),
|
|
130
|
-
|
|
134
|
+
j(e.$slots, "default", { mergeLayout: E })
|
|
131
135
|
]),
|
|
132
136
|
_: 3
|
|
133
|
-
})
|
|
137
|
+
}, 8, ["gutter"])
|
|
134
138
|
]),
|
|
135
139
|
_: 3
|
|
136
140
|
}, 8, ["model", "rules"]);
|
|
@@ -3,7 +3,7 @@ import { ElCol as k, ElButton as M } from "element-plus/es";
|
|
|
3
3
|
import "element-plus/es/components/base/style/css";
|
|
4
4
|
import "element-plus/es/components/col/style/css";
|
|
5
5
|
import "element-plus/es/components/button/style/css";
|
|
6
|
-
import { defineComponent as B, useAttrs as R, ref as W, computed as $, shallowRef as D, openBlock as N, createBlock as Q, normalizeClass as z, unref as i, withCtx as r, withDirectives as A, createVNode as m, mergeProps as
|
|
6
|
+
import { defineComponent as B, useAttrs as R, ref as W, computed as $, shallowRef as D, openBlock as N, createBlock as Q, normalizeClass as z, unref as i, withCtx as r, withDirectives as A, createVNode as m, mergeProps as G, createSlots as H, normalizeProps as g, guardReactiveProps as v, createElementVNode as L, createTextVNode as y, renderList as T, renderSlot as j, vShow as q } from "vue";
|
|
7
7
|
import { stringifyFormData as I } from "./utils.mjs";
|
|
8
8
|
import J from "../display/WatchSize.vue.mjs";
|
|
9
9
|
const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
@@ -22,21 +22,22 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
22
22
|
md: 12,
|
|
23
23
|
lg: 8,
|
|
24
24
|
xl: 6
|
|
25
|
-
}) }
|
|
25
|
+
}) },
|
|
26
|
+
rowGutter: {}
|
|
26
27
|
},
|
|
27
28
|
emits: ["search", "heightChange", "visibleChange"],
|
|
28
|
-
setup(
|
|
29
|
-
const s =
|
|
29
|
+
setup(a, { expose: b, emit: w }) {
|
|
30
|
+
const s = a, l = w, C = R(), u = W(!1), x = $(() => s.data), S = (e) => {
|
|
30
31
|
l("heightChange", e);
|
|
31
|
-
},
|
|
32
|
+
}, o = D(), d = (e) => ({
|
|
32
33
|
...s.staticQuery || {},
|
|
33
34
|
...I(e, s.list)
|
|
34
35
|
}), h = () => {
|
|
35
36
|
var e;
|
|
36
|
-
(e =
|
|
37
|
+
(e = o.value) == null || e.resetFields(), l("search", d(s.data), "reset");
|
|
37
38
|
}, c = (e = "search") => {
|
|
38
39
|
var t;
|
|
39
|
-
(t =
|
|
40
|
+
(t = o.value) == null || t.validate().then(() => {
|
|
40
41
|
l("search", d(s.data), e);
|
|
41
42
|
});
|
|
42
43
|
}, F = (e) => {
|
|
@@ -44,17 +45,17 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
44
45
|
};
|
|
45
46
|
b({
|
|
46
47
|
validate: () => {
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
48
|
+
if (o.value)
|
|
49
|
+
return o.value.validate();
|
|
49
50
|
throw new Error("实例化未完成");
|
|
50
51
|
},
|
|
51
52
|
resetFields: () => {
|
|
52
53
|
var e;
|
|
53
|
-
return (e =
|
|
54
|
+
return (e = o.value) == null ? void 0 : e.resetFields();
|
|
54
55
|
},
|
|
55
56
|
clearValidate: (e) => {
|
|
56
57
|
var t;
|
|
57
|
-
return (t =
|
|
58
|
+
return (t = o.value) == null ? void 0 : t.clearValidate(e);
|
|
58
59
|
},
|
|
59
60
|
triggerReset: h,
|
|
60
61
|
triggerSearch: () => c()
|
|
@@ -71,22 +72,22 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
71
72
|
onHeightChange: S
|
|
72
73
|
}, {
|
|
73
74
|
default: r(() => [
|
|
74
|
-
A(m(E,
|
|
75
|
+
A(m(E, G({
|
|
75
76
|
ref_key: "formMain",
|
|
76
|
-
ref:
|
|
77
|
-
list:
|
|
77
|
+
ref: o,
|
|
78
|
+
list: a.list,
|
|
78
79
|
data: i(x)
|
|
79
|
-
}, i(
|
|
80
|
-
layout:
|
|
81
|
-
labelPosition:
|
|
82
|
-
labelWidth:
|
|
80
|
+
}, i(C), {
|
|
81
|
+
layout: a.layout,
|
|
82
|
+
labelPosition: a.labelPosition,
|
|
83
|
+
labelWidth: a.labelWidth,
|
|
83
84
|
onSubmit: F,
|
|
84
85
|
onVisibleChange: _
|
|
85
|
-
}),
|
|
86
|
+
}), H({
|
|
86
87
|
default: r(({ mergeLayout: n }) => [
|
|
87
88
|
m(P, g(v(n())), {
|
|
88
89
|
default: r(() => [
|
|
89
|
-
|
|
90
|
+
L("div", K, [
|
|
90
91
|
m(f, {
|
|
91
92
|
type: "primary",
|
|
92
93
|
onMousedown: h
|
|
@@ -112,14 +113,14 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
112
113
|
]),
|
|
113
114
|
_: 2
|
|
114
115
|
}, [
|
|
115
|
-
|
|
116
|
+
T(a.list, (n) => ({
|
|
116
117
|
name: n.key,
|
|
117
118
|
fn: r((p) => [
|
|
118
|
-
|
|
119
|
+
j(e.$slots, n.key, g(v(p)), void 0, !0)
|
|
119
120
|
])
|
|
120
121
|
}))
|
|
121
122
|
]), 1040, ["list", "data", "layout", "labelPosition", "labelWidth"]), [
|
|
122
|
-
[
|
|
123
|
+
[q, i(u)]
|
|
123
124
|
])
|
|
124
125
|
]),
|
|
125
126
|
_: 3
|
|
@@ -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-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-767c1592"]]);
|
|
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 S, 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 Se = {
|
|
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,47 +29,55 @@ const he = {
|
|
|
29
29
|
injectInfo: {},
|
|
30
30
|
beforeSearch: {},
|
|
31
31
|
clearTableFilterOnReset: { type: Boolean }
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
+
v036568fb: a(q)
|
|
36
40
|
}));
|
|
37
|
-
const
|
|
41
|
+
const o = n, b = B, m = oe(n, "isAutoRefresh"), p = c({}), v = c(
|
|
38
42
|
{}
|
|
39
|
-
),
|
|
40
|
-
|
|
43
|
+
), C = c(!1), i = O(), u = O(), E = ne(
|
|
44
|
+
ye,
|
|
41
45
|
500
|
|
42
|
-
),
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
})), w = c(!1),
|
|
46
|
-
|
|
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,
|
|
47
51
|
200
|
|
48
|
-
) : void 0),
|
|
49
|
-
var
|
|
52
|
+
) : void 0), M = (e, t = "search") => {
|
|
53
|
+
var r, l, h;
|
|
50
54
|
let f = e;
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)),
|
|
55
|
-
return ["reset", "search"].includes(
|
|
56
|
-
|
|
55
|
+
if (o.beforeSearch && (f = o.beforeSearch(
|
|
56
|
+
ve(e),
|
|
57
|
+
t
|
|
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 = {
|
|
57
61
|
...f
|
|
58
62
|
};
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
b
|
|
63
|
-
},
|
|
63
|
+
}, J = (e) => {
|
|
64
|
+
b("dataChange", e);
|
|
65
|
+
}, Q = (e) => {
|
|
66
|
+
b("pageInfoChange", e);
|
|
67
|
+
}, z = (e) => {
|
|
68
|
+
C.value = e;
|
|
69
|
+
}, G = (e) => {
|
|
64
70
|
H.value = e;
|
|
65
|
-
},
|
|
71
|
+
}, U = (e) => {
|
|
72
|
+
R.value = e;
|
|
73
|
+
}, W = s(() => o.list), Y = s(() => o.rowKey), P = s(() => p.value), D = {
|
|
66
74
|
refresh: (e = !1) => {
|
|
67
|
-
var
|
|
68
|
-
return (
|
|
75
|
+
var t;
|
|
76
|
+
return (t = u.value) == null ? void 0 : t.refresh(e);
|
|
69
77
|
},
|
|
70
78
|
reload: (e = !1) => {
|
|
71
|
-
var
|
|
72
|
-
return (
|
|
79
|
+
var t;
|
|
80
|
+
return (t = u.value) == null ? void 0 : t.reload(e);
|
|
73
81
|
},
|
|
74
82
|
getTableInstance: () => {
|
|
75
83
|
var e;
|
|
@@ -85,8 +93,8 @@ const he = {
|
|
|
85
93
|
return (e = i.value) == null ? void 0 : e.resetFields();
|
|
86
94
|
},
|
|
87
95
|
clearValidate: (e) => {
|
|
88
|
-
var
|
|
89
|
-
return (
|
|
96
|
+
var t;
|
|
97
|
+
return (t = i.value) == null ? void 0 : t.clearValidate(e);
|
|
90
98
|
},
|
|
91
99
|
triggerReset: () => {
|
|
92
100
|
var e;
|
|
@@ -96,99 +104,103 @@ const he = {
|
|
|
96
104
|
var e;
|
|
97
105
|
return (e = i.value) == null ? void 0 : e.triggerSearch();
|
|
98
106
|
},
|
|
99
|
-
update: (e,
|
|
100
|
-
|
|
107
|
+
update: (e, t) => {
|
|
108
|
+
p.value[e] = t;
|
|
101
109
|
}
|
|
102
|
-
},
|
|
103
|
-
const e =
|
|
110
|
+
}, X = s(() => {
|
|
111
|
+
const e = pe(D, [
|
|
104
112
|
"triggerReset",
|
|
105
113
|
"triggerSearch",
|
|
106
114
|
"update"
|
|
107
115
|
]);
|
|
108
116
|
return {
|
|
109
|
-
...
|
|
117
|
+
...o.injectInfo || {},
|
|
110
118
|
...e
|
|
111
119
|
};
|
|
112
|
-
}),
|
|
120
|
+
}), Z = (e) => e, _ = (e) => e, ee = (e) => {
|
|
113
121
|
w.value = e;
|
|
114
122
|
};
|
|
115
|
-
return
|
|
116
|
-
() =>
|
|
123
|
+
return x(D), se(
|
|
124
|
+
() => o.list,
|
|
117
125
|
(e) => {
|
|
118
|
-
const
|
|
119
|
-
|
|
126
|
+
const t = he(e);
|
|
127
|
+
p.value = t, M(ge(t, e));
|
|
120
128
|
},
|
|
121
129
|
{
|
|
122
130
|
immediate: !0
|
|
123
131
|
}
|
|
124
|
-
), (e,
|
|
125
|
-
const f =
|
|
126
|
-
return
|
|
127
|
-
|
|
132
|
+
), (e, t) => {
|
|
133
|
+
const f = te;
|
|
134
|
+
return ie((j(), le("div", Se, [
|
|
135
|
+
k(a(fe), y({
|
|
128
136
|
ref_key: "formSearch",
|
|
129
137
|
ref: i,
|
|
130
|
-
list:
|
|
131
|
-
data:
|
|
132
|
-
},
|
|
133
|
-
onSearch:
|
|
134
|
-
onHeightChange:
|
|
135
|
-
onVisibleChange:
|
|
136
|
-
}),
|
|
137
|
-
|
|
138
|
-
name:
|
|
138
|
+
list: a(W),
|
|
139
|
+
data: a(P)
|
|
140
|
+
}, n.formSearchProps, {
|
|
141
|
+
onSearch: M,
|
|
142
|
+
onHeightChange: G,
|
|
143
|
+
onVisibleChange: ee
|
|
144
|
+
}), F({ _: 2 }, [
|
|
145
|
+
S(n.list, (r) => ({
|
|
146
|
+
name: r.key,
|
|
139
147
|
fn: g((l) => [
|
|
140
|
-
|
|
148
|
+
d(e.$slots, `form-${r.key}`, T($(l)), void 0, !0)
|
|
141
149
|
])
|
|
142
150
|
}))
|
|
143
151
|
]), 1040, ["list", "data"]),
|
|
144
|
-
|
|
152
|
+
n.showOperation ? (j(), ue(a(de), {
|
|
145
153
|
key: 0,
|
|
146
154
|
class: "list-page-operation",
|
|
147
|
-
onHeightChange:
|
|
155
|
+
onHeightChange: U
|
|
148
156
|
}, {
|
|
149
157
|
default: g(() => [
|
|
150
|
-
|
|
158
|
+
d(e.$slots, "operation", {}, void 0, !0)
|
|
151
159
|
]),
|
|
152
160
|
_: 3
|
|
153
|
-
})) :
|
|
154
|
-
|
|
161
|
+
})) : ce("", !0),
|
|
162
|
+
k(a(me), y({
|
|
155
163
|
ref_key: "tableMain",
|
|
156
164
|
ref: u,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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, {
|
|
163
173
|
refine: !1,
|
|
164
|
-
injectInfo:
|
|
165
|
-
onLoadingChange:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
174
|
+
injectInfo: a(X),
|
|
175
|
+
onLoadingChange: z,
|
|
176
|
+
onDataChange: J,
|
|
177
|
+
onPageInfoChange: Q
|
|
178
|
+
}), F({ _: 2 }, [
|
|
179
|
+
S(n.columns, (r) => ({
|
|
180
|
+
name: r.prop,
|
|
169
181
|
fn: g((l) => [
|
|
170
|
-
|
|
182
|
+
d(e.$slots, `table-${r.prop}`, T($(Z(l))), void 0, !0)
|
|
171
183
|
])
|
|
172
184
|
})),
|
|
173
|
-
|
|
174
|
-
name: `header-${
|
|
185
|
+
S(n.columns, (r) => ({
|
|
186
|
+
name: `header-${r.prop}`,
|
|
175
187
|
fn: g((l) => {
|
|
176
188
|
var h;
|
|
177
189
|
return [
|
|
178
|
-
|
|
179
|
-
searchFormData:
|
|
180
|
-
triggerSearch: (h =
|
|
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
|
|
181
193
|
}), void 0, !0)
|
|
182
194
|
];
|
|
183
195
|
})
|
|
184
196
|
}))
|
|
185
|
-
]), 1040, ["api", "columns", "query", "maxHeight", "rowKey", "injectInfo"])
|
|
197
|
+
]), 1040, ["is-auto-refresh", "api", "columns", "query", "maxHeight", "rowKey", "injectInfo"])
|
|
186
198
|
])), [
|
|
187
|
-
[f,
|
|
199
|
+
[f, !m.value && a(C)]
|
|
188
200
|
]);
|
|
189
201
|
};
|
|
190
202
|
}
|
|
191
203
|
});
|
|
192
204
|
export {
|
|
193
|
-
|
|
205
|
+
ke as default
|
|
194
206
|
};
|