@done-coding/admin-core 0.8.3-alpha.0 → 0.9.1-alpha.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/docs/nested-config-paradigm.md +80 -0
- package/es/bridge/config-hook.mjs +37 -0
- package/es/bridge/index.mjs +157 -62
- package/es/bridge/plugin.mjs +29 -0
- package/es/bridge/theme.mjs +65 -0
- package/es/components/app-layout/AppBody.vue.mjs +1 -1
- package/es/components/app-layout/AppBody.vue2.mjs +47 -49
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
- package/es/components/app-layout/AppFooter.vue.mjs +2 -2
- package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
- package/es/components/app-layout/AppHeader.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
- package/es/components/app-layout/AppTheme.vue.mjs +7 -0
- package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +36 -36
- package/es/components/display/ActionConfirm.vue2.mjs +16 -16
- package/es/components/display/HeightProvider.vue.mjs +10 -10
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/display/TabsHeader.vue2.mjs +34 -34
- package/es/components/display/TabsMain.vue.mjs +40 -39
- package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
- package/es/components/form/FormItem.vue.mjs +1 -1
- package/es/components/form/FormItem.vue2.mjs +75 -81
- package/es/components/form/FormItemNestForm.vue.mjs +7 -0
- package/es/components/form/FormItemNestForm.vue2.mjs +49 -0
- package/es/components/form/FormItemNestFormList.vue.mjs +7 -0
- package/es/components/form/FormItemNestFormList.vue2.mjs +137 -0
- package/es/components/form/FormMain.vue.mjs +5 -147
- package/es/components/form/FormMain.vue2.mjs +160 -2
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +122 -128
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +29 -28
- package/es/components/form/FormTree.vue.mjs +16 -21
- package/es/components/form/FormVerifyCode.vue.mjs +37 -43
- package/es/components/form/FormVerifyImage.vue.mjs +2 -2
- package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
- package/es/components/form/nest-form-item-list.mjs +71 -0
- package/es/components/form/nest-form-item.mjs +42 -0
- package/es/components/form/nest-registry.mjs +7 -0
- package/es/components/form/use-nest-form-list.mjs +22 -0
- package/es/components/form/use-nest-form.mjs +34 -0
- package/es/components/form/use-nest-layout-scale.mjs +14 -0
- package/es/components/form/utils.mjs +77 -61
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +134 -139
- package/es/components/menu/MenuItemSub.vue.mjs +41 -48
- package/es/components/menu/MenuTree.vue.mjs +58 -65
- package/es/components/misc/AutoRefresh.vue.mjs +2 -2
- package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
- package/es/components/modal/ConfirmModal.vue.mjs +3 -4
- package/es/components/modal/ConfirmModal.vue2.mjs +83 -111
- package/es/components/modal/DetailModal.vue.mjs +38 -41
- package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
- package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
- package/es/components/panel/PanelItemNestForm.vue.mjs +7 -0
- package/es/components/panel/PanelItemNestForm.vue2.mjs +69 -0
- package/es/components/panel/PanelItemNestPanel.vue.mjs +34 -0
- package/es/components/panel/PanelItemNestPanel.vue2.mjs +4 -0
- package/es/components/panel/PanelMain.vue.mjs +1 -1
- package/es/components/panel/PanelMain.vue2.mjs +72 -72
- package/es/components/panel/nest-panel-form.mjs +53 -0
- package/es/components/panel/nest-panel-item.mjs +25 -0
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +221 -229
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +115 -126
- package/es/hooks/use-admin-theme-apply.mjs +84 -0
- package/es/hooks/use-admin-viewport-apply.mjs +27 -0
- package/es/index.mjs +190 -153
- package/es/inject/key.mjs +15 -6
- package/es/store/app.mjs +75 -84
- package/es/style.css +1 -1
- package/es/utils/theme-scale.mjs +37 -0
- package/package.json +2 -4
- package/types/bridge/config-hook.d.ts +91 -0
- package/types/bridge/index.d.ts +108 -8
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +85 -0
- package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
- package/types/components/app-layout/types.d.ts +1 -1
- package/types/components/form/FormItem.vue.d.ts +12 -12
- package/types/components/form/FormItemNestForm.vue.d.ts +36 -0
- package/types/components/form/FormItemNestFormList.vue.d.ts +63 -0
- package/types/components/form/FormMain.vue.d.ts +2 -2
- package/types/components/form/FormSearch.vue.d.ts +2 -2
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/index.d.ts +9 -1
- package/types/components/form/nest-form-item-list.d.ts +63 -0
- package/types/components/form/nest-form-item.d.ts +36 -0
- package/types/components/form/nest-registry.d.ts +22 -0
- package/types/components/form/types.d.ts +2 -0
- package/types/components/form/use-nest-form-list.d.ts +20 -0
- package/types/components/form/use-nest-form.d.ts +26 -0
- package/types/components/form/use-nest-layout-scale.d.ts +17 -0
- package/types/components/form/utils.d.ts +26 -1
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/panel/PanelItemNestForm.vue.d.ts +35 -0
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +22 -0
- package/types/components/panel/index.d.ts +5 -1
- package/types/components/panel/nest-panel-form.d.ts +38 -0
- package/types/components/panel/nest-panel-item.d.ts +28 -0
- package/types/components/panel/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +3 -3
- package/types/hooks/activated.d.ts +2 -2
- package/types/hooks/feel-size.d.ts +1 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/menus-dispatch.d.ts +5 -5
- package/types/hooks/use-admin-theme-apply.d.ts +17 -0
- package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
- package/types/hooks/use-breakpoint.d.ts +1 -1
- package/types/inject/key.d.ts +46 -1
- package/types/store/app.d.ts +138 -59
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import m from "lodash/cloneDeep";
|
|
2
|
+
const l = ["xs", "sm", "md", "lg", "xl"], d = [6, 8, 12, 24], p = (t, n = d) => {
|
|
3
|
+
const e = [...n].sort((o, i) => o - i), s = e[0], r = e[e.length - 1];
|
|
4
|
+
return t <= s ? s : t >= r ? r : e.find((o) => o >= t) ?? r;
|
|
5
|
+
}, O = (t) => {
|
|
6
|
+
if (!t) return 24;
|
|
7
|
+
if (typeof t.span == "number") return t.span;
|
|
8
|
+
for (const n of ["lg", "md", "sm", "xl", "xs"]) {
|
|
9
|
+
const e = t[n];
|
|
10
|
+
if (typeof e == "number") return e;
|
|
11
|
+
}
|
|
12
|
+
return 24;
|
|
13
|
+
}, T = (t, n = 1) => {
|
|
3
14
|
if (!t) return {};
|
|
4
|
-
const
|
|
5
|
-
return t.span !== void 0 &&
|
|
6
|
-
t[
|
|
7
|
-
}), n
|
|
8
|
-
|
|
15
|
+
const e = { ...t };
|
|
16
|
+
return t.span !== void 0 && l.forEach((s) => {
|
|
17
|
+
t[s] === void 0 && (e[s] = t.span);
|
|
18
|
+
}), n === 1 || (typeof e.span == "number" && (e.span = p(e.span * n)), l.forEach((s) => {
|
|
19
|
+
typeof e[s] == "number" && (e[s] = p(e[s] * n));
|
|
20
|
+
})), e;
|
|
21
|
+
}, D = () => {
|
|
9
22
|
const t = /* @__PURE__ */ new Date(), n = new Date(
|
|
10
23
|
t.getFullYear(),
|
|
11
24
|
t.getMonth(),
|
|
12
25
|
t.getDate()
|
|
13
|
-
), e = new Date(n.getTime() + 864e5 - 1), s = new Date(n.getTime() - 864e5), r = new Date(n.getTime() - 1),
|
|
26
|
+
), e = new Date(n.getTime() + 864e5 - 1), s = new Date(n.getTime() - 864e5), r = new Date(n.getTime() - 1), o = new Date(n.getTime() - 6 * 864e5);
|
|
14
27
|
return [
|
|
15
28
|
{
|
|
16
29
|
text: "今日",
|
|
@@ -22,54 +35,54 @@ const m = ["xs", "sm", "md", "lg", "xl"], O = (t) => {
|
|
|
22
35
|
},
|
|
23
36
|
{
|
|
24
37
|
text: "近7日",
|
|
25
|
-
value: () => [
|
|
38
|
+
value: () => [o, e]
|
|
26
39
|
}
|
|
27
40
|
];
|
|
28
|
-
},
|
|
41
|
+
}, f = (t) => {
|
|
29
42
|
const { ignore: n, key: e } = t;
|
|
30
43
|
return n || e.startsWith("__") && e.toUpperCase() === e;
|
|
31
|
-
},
|
|
32
|
-
(n, e) => (
|
|
44
|
+
}, y = (t) => typeof t == "function", E = (t) => t.reduce(
|
|
45
|
+
(n, e) => (f(e) || (typeof e.init == "object" && console.error(
|
|
33
46
|
`表单项${e.label}的初始值不能为对象 请设置为返回值的形式`
|
|
34
|
-
), n[e.key] =
|
|
47
|
+
), n[e.key] = y(e.init) ? e.init() : e.init), n),
|
|
35
48
|
{}
|
|
36
|
-
),
|
|
37
|
-
const e =
|
|
49
|
+
), I = (t, n) => {
|
|
50
|
+
const e = m(t);
|
|
38
51
|
return n.reduce(
|
|
39
52
|
(s, r) => {
|
|
40
|
-
if (
|
|
53
|
+
if (f(r)) return s;
|
|
41
54
|
if (r.parse) {
|
|
42
|
-
const
|
|
55
|
+
const o = r.parse(
|
|
43
56
|
t[r.key],
|
|
44
57
|
s,
|
|
45
58
|
e
|
|
46
59
|
);
|
|
47
|
-
|
|
60
|
+
o !== void 0 && (s[r.key] = o);
|
|
48
61
|
} else
|
|
49
62
|
s[r.key] = t[r.key];
|
|
50
63
|
return s;
|
|
51
64
|
},
|
|
52
65
|
{}
|
|
53
66
|
);
|
|
54
|
-
},
|
|
55
|
-
const e =
|
|
67
|
+
}, _ = (t, n) => {
|
|
68
|
+
const e = m(t);
|
|
56
69
|
return n.reduce(
|
|
57
70
|
(s, r) => {
|
|
58
|
-
if (
|
|
71
|
+
if (f(r)) return s;
|
|
59
72
|
if (r.stringify) {
|
|
60
|
-
const
|
|
73
|
+
const o = r.stringify(
|
|
61
74
|
t[r.key],
|
|
62
75
|
s,
|
|
63
76
|
e
|
|
64
77
|
);
|
|
65
|
-
|
|
78
|
+
o !== void 0 && (s[r.key] = o);
|
|
66
79
|
} else
|
|
67
80
|
s[r.key] = t[r.key];
|
|
68
81
|
return s;
|
|
69
82
|
},
|
|
70
83
|
{}
|
|
71
84
|
);
|
|
72
|
-
},
|
|
85
|
+
}, h = ({
|
|
73
86
|
modelValueKey: t = "modelValue",
|
|
74
87
|
config: n,
|
|
75
88
|
data: e,
|
|
@@ -81,58 +94,58 @@ const m = ["xs", "sm", "md", "lg", "xl"], O = (t) => {
|
|
|
81
94
|
[`onUpdate:${t}`]: (r) => {
|
|
82
95
|
s(r);
|
|
83
96
|
}
|
|
84
|
-
}),
|
|
97
|
+
}), k = (t) => {
|
|
85
98
|
var n, e;
|
|
86
99
|
return (n = t.extra) != null && n.isInput ? {
|
|
87
100
|
placeholder: `请输入${t.label}`
|
|
88
101
|
} : (e = t.extra) != null && e.isSelect ? {
|
|
89
102
|
placeholder: `请选择${t.label}`
|
|
90
103
|
} : {};
|
|
91
|
-
},
|
|
104
|
+
}, C = (t, n) => {
|
|
92
105
|
const { extra: e } = t;
|
|
93
106
|
if (e != null && e.enterSubmit)
|
|
94
107
|
return {
|
|
95
108
|
onKeyup: (s) => {
|
|
96
|
-
var r,
|
|
97
|
-
s.key === "Enter" && (n(), (
|
|
109
|
+
var r, o;
|
|
110
|
+
s.key === "Enter" && (n(), (o = (r = s.target) == null ? void 0 : r.blur) == null || o.call(r));
|
|
98
111
|
}
|
|
99
112
|
};
|
|
100
|
-
},
|
|
113
|
+
}, N = (t, n) => {
|
|
101
114
|
const { extra: e } = t;
|
|
102
115
|
if (e != null && e.isInput && ((e == null ? void 0 : e.blurSubmit) ?? !0))
|
|
103
116
|
return {
|
|
104
117
|
onBlur: n
|
|
105
118
|
};
|
|
106
|
-
},
|
|
119
|
+
}, w = (t, n) => {
|
|
107
120
|
const { extra: e } = t;
|
|
108
121
|
if (e != null && e.isSelect && ((e == null ? void 0 : e.changeSubmit) ?? !0))
|
|
109
122
|
return {
|
|
110
123
|
onChange: n
|
|
111
124
|
};
|
|
112
|
-
},
|
|
113
|
-
p.push(...t);
|
|
114
|
-
}, F = (t) => {
|
|
125
|
+
}, F = Symbol("FORM_ITEM_CHANGE_LOADING"), S = (t) => t.required === !0, a = [], g = [], v = (t) => {
|
|
115
126
|
a.push(...t);
|
|
116
|
-
},
|
|
127
|
+
}, L = (t) => {
|
|
128
|
+
g.push(...t);
|
|
129
|
+
}, M = (t) => {
|
|
117
130
|
const { label: n, type: e, ...s } = t;
|
|
118
131
|
let r;
|
|
119
132
|
if (e)
|
|
120
133
|
r = e;
|
|
121
134
|
else {
|
|
122
|
-
const { render:
|
|
123
|
-
|
|
135
|
+
const { render: u } = t;
|
|
136
|
+
u && (a.includes(u) ? r = "input" : g.includes(u) && (r = "select"));
|
|
124
137
|
}
|
|
125
|
-
let
|
|
126
|
-
r === "input" && (
|
|
138
|
+
let o;
|
|
139
|
+
r === "input" && (o = {
|
|
127
140
|
...s.extra || {},
|
|
128
141
|
isInput: !0
|
|
129
|
-
}), r === "select" && (
|
|
142
|
+
}), r === "select" && (o = {
|
|
130
143
|
...s.extra || {},
|
|
131
144
|
isSelect: !0
|
|
132
145
|
});
|
|
133
|
-
let
|
|
134
|
-
if (
|
|
135
|
-
|
|
146
|
+
let i;
|
|
147
|
+
if (S(t)) {
|
|
148
|
+
i = [
|
|
136
149
|
{
|
|
137
150
|
required: !0,
|
|
138
151
|
message: `请${{
|
|
@@ -143,33 +156,36 @@ const m = ["xs", "sm", "md", "lg", "xl"], O = (t) => {
|
|
|
143
156
|
trigger: "blur"
|
|
144
157
|
}
|
|
145
158
|
];
|
|
146
|
-
const { required:
|
|
159
|
+
const { required: u, ...c } = s;
|
|
147
160
|
return {
|
|
148
161
|
label: n,
|
|
149
|
-
extra:
|
|
150
|
-
rules:
|
|
151
|
-
...
|
|
162
|
+
extra: o,
|
|
163
|
+
rules: i,
|
|
164
|
+
...c
|
|
152
165
|
};
|
|
153
166
|
} else
|
|
154
167
|
return {
|
|
155
168
|
label: n,
|
|
156
|
-
extra:
|
|
169
|
+
extra: o,
|
|
157
170
|
...s
|
|
158
171
|
};
|
|
159
172
|
};
|
|
160
173
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
k as
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
F as FORM_ITEM_CHANGE_LOADING,
|
|
175
|
+
d as NEST_LAYOUT_TIERS,
|
|
176
|
+
p as ceilToTier,
|
|
177
|
+
E as generateFormData,
|
|
178
|
+
N as getBlurSubmit,
|
|
179
|
+
w as getChangeSubmit,
|
|
180
|
+
D as getDatePickerShortcuts,
|
|
181
|
+
C as getEnterSubmit,
|
|
182
|
+
k as getPlaceholder,
|
|
183
|
+
h as getVModelSugar,
|
|
184
|
+
I as parseFormData,
|
|
185
|
+
T as resolveFormLayout,
|
|
186
|
+
O as resolveLayoutSpan,
|
|
187
|
+
v as setInputComponent,
|
|
188
|
+
L as setSelectComponent,
|
|
189
|
+
_ as stringifyFormData,
|
|
190
|
+
M as swiftFormItemConfig
|
|
175
191
|
};
|
|
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc41e3d4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "element-plus/es/components/loading/style/css";
|
|
4
|
-
import { defineComponent as ve, useCssVars as me, unref as a, useSlots as pe, computed as o, useModel as w, ref as u, shallowRef as q, watch as we, withDirectives as Se, openBlock as S, createElementBlock as ye, createBlock as x, withCtx as h, renderSlot as f, createCommentVNode as E, createVNode as L, mergeProps as y, createSlots as N, renderList as C, normalizeProps as b, guardReactiveProps as H, mergeModels as U } from "vue";
|
|
1
|
+
import { defineComponent as ge, useCssVars as de, useSlots as me, computed as a, useModel as p, ref as i, shallowRef as q, watch as pe, withDirectives as we, openBlock as w, createElementBlock as Se, createBlock as x, unref as v, withCtx as c, renderSlot as h, createCommentVNode as L, createVNode as E, mergeProps as S, createSlots as N, renderList as y, normalizeProps as C, guardReactiveProps as H, mergeModels as U } from "vue";
|
|
2
|
+
import { vLoading as ye } from "element-plus";
|
|
5
3
|
import Ce from "../form/FormSearch.vue.mjs";
|
|
6
|
-
import { generateFormData as
|
|
4
|
+
import { generateFormData as He, stringifyFormData as be } from "../form/utils.mjs";
|
|
7
5
|
import J from "../display/WatchSize.vue.mjs";
|
|
8
6
|
import Ve from "../table/TableMain.vue.mjs";
|
|
9
7
|
import Ie from "lodash/pick";
|
|
@@ -12,7 +10,7 @@ import { useChannelViewportHeight as Me } from "../../hooks/use-channel-viewport
|
|
|
12
10
|
const ke = {
|
|
13
11
|
"element-loading-background": "rgba(122, 122, 122, 0.5)",
|
|
14
12
|
class: "list-page"
|
|
15
|
-
},
|
|
13
|
+
}, Te = /* @__PURE__ */ ge({
|
|
16
14
|
__name: "ListPage",
|
|
17
15
|
props: /* @__PURE__ */ U({
|
|
18
16
|
staticQuery: { default: () => ({}) },
|
|
@@ -41,200 +39,197 @@ const ke = {
|
|
|
41
39
|
customViewModifiers: {}
|
|
42
40
|
}),
|
|
43
41
|
emits: /* @__PURE__ */ U(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
|
|
44
|
-
setup(
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
setup(o, { expose: Q, emit: z }) {
|
|
43
|
+
de((e) => ({
|
|
44
|
+
c6e708aa: _.value
|
|
47
45
|
}));
|
|
48
|
-
const
|
|
46
|
+
const s = o, b = z, V = me(), I = a(() => !!V.header), R = a(() => !!V.operation), g = p(o, "isAutoRefresh"), M = p(o, "refreshInterval"), k = p(o, "customView"), d = i({}), m = i(
|
|
49
47
|
{}
|
|
50
|
-
),
|
|
48
|
+
), $ = i(!1), n = q(), u = q(), { viewportHeightFinal: G } = Me(s, {
|
|
51
49
|
fallback: 500
|
|
52
|
-
}), F =
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
})), A =
|
|
56
|
-
var
|
|
57
|
-
let
|
|
58
|
-
if (
|
|
50
|
+
}), F = i(0), P = i(0), j = i(0), W = a(() => ({
|
|
51
|
+
...m.value,
|
|
52
|
+
...s.staticQuery
|
|
53
|
+
})), A = i(!1), X = a(() => A.value ? F.value + 10 : 0), Y = a(() => R.value ? P.value + 10 : 0), Z = a(() => I.value ? j.value + 10 : 0), D = a(() => G.value - s.refineReduceHeight), _ = a(() => s.refine ? `${D.value}px` : "auto"), ee = a(() => s.refine ? D.value - X.value - Y.value - Z.value : void 0), B = (e, t = "search") => {
|
|
54
|
+
var l, f, T;
|
|
55
|
+
let r = e;
|
|
56
|
+
if (s.beforeSearch && (r = s.beforeSearch(
|
|
59
57
|
Re(e),
|
|
60
58
|
t
|
|
61
|
-
)), t === "reset" &&
|
|
62
|
-
return ["reset", "search"].includes(t) ? (
|
|
63
|
-
|
|
64
|
-
...
|
|
59
|
+
)), t === "reset" && s.clearTableFilterOnReset && ((f = (l = u.value) == null ? void 0 : l.getTableInstance()) == null || f.clearFilter()), JSON.stringify(r) === JSON.stringify(m.value))
|
|
60
|
+
return ["reset", "search"].includes(t) ? (T = u.value) == null ? void 0 : T.reload() : void 0;
|
|
61
|
+
m.value = {
|
|
62
|
+
...r
|
|
65
63
|
};
|
|
66
64
|
}, te = (e) => {
|
|
67
|
-
|
|
65
|
+
b("dataChange", e);
|
|
68
66
|
}, re = (e) => {
|
|
69
|
-
|
|
67
|
+
b("pageInfoChange", e);
|
|
70
68
|
}, ae = (e) => {
|
|
71
|
-
|
|
69
|
+
$.value = e;
|
|
72
70
|
}, oe = (e) => {
|
|
73
71
|
F.value = e;
|
|
74
72
|
}, se = (e) => {
|
|
75
73
|
P.value = e;
|
|
76
74
|
}, ne = (e) => {
|
|
77
75
|
j.value = e;
|
|
78
|
-
},
|
|
76
|
+
}, le = a(() => s.list), ie = a(() => s.rowKey), K = a(() => d.value), O = {
|
|
79
77
|
refresh: async (e = !1) => {
|
|
80
78
|
var t;
|
|
81
|
-
return (t =
|
|
79
|
+
return (t = u.value) == null ? void 0 : t.refresh(e);
|
|
82
80
|
},
|
|
83
81
|
reload: async (e = !1) => {
|
|
84
82
|
var t;
|
|
85
|
-
return (t =
|
|
83
|
+
return (t = u.value) == null ? void 0 : t.reload(e);
|
|
86
84
|
},
|
|
87
85
|
getTableInstance: () => {
|
|
88
86
|
var e;
|
|
89
|
-
return (e =
|
|
87
|
+
return (e = u.value) == null ? void 0 : e.getTableInstance();
|
|
90
88
|
},
|
|
91
89
|
validate: () => {
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
90
|
+
if (n.value)
|
|
91
|
+
return n.value.validate();
|
|
94
92
|
throw new Error("实例化未完成");
|
|
95
93
|
},
|
|
96
94
|
resetFields: () => {
|
|
97
95
|
var e;
|
|
98
|
-
return (e =
|
|
96
|
+
return (e = n.value) == null ? void 0 : e.resetFields();
|
|
99
97
|
},
|
|
100
98
|
clearValidate: (e) => {
|
|
101
99
|
var t;
|
|
102
|
-
return (t =
|
|
100
|
+
return (t = n.value) == null ? void 0 : t.clearValidate(e);
|
|
103
101
|
},
|
|
104
102
|
triggerReset: () => {
|
|
105
103
|
var e;
|
|
106
|
-
return (e =
|
|
104
|
+
return (e = n.value) == null ? void 0 : e.triggerReset();
|
|
107
105
|
},
|
|
108
106
|
triggerSearch: () => {
|
|
109
107
|
var e;
|
|
110
|
-
return (e =
|
|
108
|
+
return (e = n.value) == null ? void 0 : e.triggerSearch();
|
|
111
109
|
},
|
|
112
110
|
toggleCollapse: (e) => {
|
|
113
111
|
var t;
|
|
114
|
-
return (t =
|
|
112
|
+
return (t = n.value) == null ? void 0 : t.toggleCollapse(e);
|
|
115
113
|
},
|
|
116
|
-
isCollapsed:
|
|
114
|
+
isCollapsed: a(() => {
|
|
117
115
|
var e;
|
|
118
|
-
return ((e =
|
|
116
|
+
return ((e = n.value) == null ? void 0 : e.isCollapsed.value) ?? !1;
|
|
119
117
|
}),
|
|
120
118
|
update: (e, t) => {
|
|
121
|
-
|
|
119
|
+
d.value[e] = t;
|
|
122
120
|
}
|
|
123
|
-
}, ue =
|
|
124
|
-
const e = Ie(
|
|
121
|
+
}, ue = a(() => {
|
|
122
|
+
const e = Ie(O, [
|
|
125
123
|
"triggerReset",
|
|
126
124
|
"triggerSearch",
|
|
127
125
|
"update"
|
|
128
126
|
]);
|
|
129
127
|
return {
|
|
130
|
-
...
|
|
128
|
+
...s.injectInfo || {},
|
|
131
129
|
...e
|
|
132
130
|
};
|
|
133
|
-
}), ce = (e) => e, he = (e) => e, fe = (e) => e,
|
|
131
|
+
}), ce = (e) => e, he = (e) => e, fe = (e) => e, ve = (e) => {
|
|
134
132
|
A.value = e;
|
|
135
133
|
};
|
|
136
|
-
return Q(
|
|
137
|
-
() =>
|
|
134
|
+
return Q(O), pe(
|
|
135
|
+
() => s.list,
|
|
138
136
|
(e) => {
|
|
139
|
-
const t =
|
|
140
|
-
|
|
137
|
+
const t = He(e);
|
|
138
|
+
d.value = t, B(be(t, e));
|
|
141
139
|
},
|
|
142
140
|
{
|
|
143
141
|
immediate: !0
|
|
144
142
|
}
|
|
145
|
-
), (e, t) =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
f
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
[g, !v.value && a(D)]
|
|
234
|
-
]);
|
|
235
|
-
};
|
|
143
|
+
), (e, t) => we((w(), Se("div", ke, [
|
|
144
|
+
I.value ? (w(), x(v(J), {
|
|
145
|
+
key: 0,
|
|
146
|
+
class: "list-page-header",
|
|
147
|
+
onHeightChange: ne
|
|
148
|
+
}, {
|
|
149
|
+
default: c(() => [
|
|
150
|
+
h(e.$slots, "header", {}, void 0, !0)
|
|
151
|
+
]),
|
|
152
|
+
_: 3
|
|
153
|
+
})) : L("", !0),
|
|
154
|
+
E(v(Ce), S({
|
|
155
|
+
ref_key: "formSearch",
|
|
156
|
+
ref: n,
|
|
157
|
+
list: le.value,
|
|
158
|
+
data: K.value
|
|
159
|
+
}, o.formSearchProps, {
|
|
160
|
+
onSearch: B,
|
|
161
|
+
onHeightChange: oe,
|
|
162
|
+
onVisibleChange: ve
|
|
163
|
+
}), N({ _: 2 }, [
|
|
164
|
+
y(o.list, (r) => ({
|
|
165
|
+
name: r.key,
|
|
166
|
+
fn: c((l) => [
|
|
167
|
+
h(e.$slots, `form-${r.key}`, C(H(l)), void 0, !0)
|
|
168
|
+
])
|
|
169
|
+
}))
|
|
170
|
+
]), 1040, ["list", "data"]),
|
|
171
|
+
R.value ? (w(), x(v(J), {
|
|
172
|
+
key: 1,
|
|
173
|
+
class: "list-page-operation",
|
|
174
|
+
onHeightChange: se
|
|
175
|
+
}, {
|
|
176
|
+
default: c(() => [
|
|
177
|
+
h(e.$slots, "operation", {}, void 0, !0)
|
|
178
|
+
]),
|
|
179
|
+
_: 3
|
|
180
|
+
})) : L("", !0),
|
|
181
|
+
E(v(Ve), S({
|
|
182
|
+
ref_key: "tableMain",
|
|
183
|
+
ref: u,
|
|
184
|
+
"is-auto-refresh": g.value,
|
|
185
|
+
"onUpdate:isAutoRefresh": t[0] || (t[0] = (r) => g.value = r),
|
|
186
|
+
"refresh-interval": M.value,
|
|
187
|
+
"onUpdate:refreshInterval": t[1] || (t[1] = (r) => M.value = r),
|
|
188
|
+
"custom-view": k.value,
|
|
189
|
+
"onUpdate:customView": t[2] || (t[2] = (r) => k.value = r),
|
|
190
|
+
api: o.api,
|
|
191
|
+
columns: o.columns,
|
|
192
|
+
query: W.value,
|
|
193
|
+
maxHeight: ee.value,
|
|
194
|
+
rowKey: ie.value,
|
|
195
|
+
toolbar: o.toolbar,
|
|
196
|
+
showSwitchView: o.showSwitchView
|
|
197
|
+
}, o.tableMainProps, {
|
|
198
|
+
refine: !1,
|
|
199
|
+
injectInfo: ue.value,
|
|
200
|
+
onLoadingChange: ae,
|
|
201
|
+
onDataChange: te,
|
|
202
|
+
onPageInfoChange: re
|
|
203
|
+
}), N({
|
|
204
|
+
"custom-view-item": c((r) => [
|
|
205
|
+
h(e.$slots, "custom-view-item", C(H(fe(r))), void 0, !0)
|
|
206
|
+
]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, [
|
|
209
|
+
y(o.columns, (r) => ({
|
|
210
|
+
name: r.prop,
|
|
211
|
+
fn: c((l) => [
|
|
212
|
+
h(e.$slots, `table-${r.prop}`, C(H(ce(l))), void 0, !0)
|
|
213
|
+
])
|
|
214
|
+
})),
|
|
215
|
+
y(o.columns, (r) => ({
|
|
216
|
+
name: `header-${r.prop}`,
|
|
217
|
+
fn: c((l) => {
|
|
218
|
+
var f;
|
|
219
|
+
return [
|
|
220
|
+
h(e.$slots, `table-header-${r.columnKey || r.prop}`, S(he(l), {
|
|
221
|
+
searchFormData: K.value,
|
|
222
|
+
triggerSearch: (f = n.value) == null ? void 0 : f.triggerSearch
|
|
223
|
+
}), void 0, !0)
|
|
224
|
+
];
|
|
225
|
+
})
|
|
226
|
+
}))
|
|
227
|
+
]), 1040, ["is-auto-refresh", "refresh-interval", "custom-view", "api", "columns", "query", "maxHeight", "rowKey", "toolbar", "showSwitchView", "injectInfo"])
|
|
228
|
+
])), [
|
|
229
|
+
[v(ye), !g.value && $.value]
|
|
230
|
+
]);
|
|
236
231
|
}
|
|
237
232
|
});
|
|
238
233
|
export {
|
|
239
|
-
|
|
234
|
+
Te as default
|
|
240
235
|
};
|