@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,12 @@
|
|
|
1
|
-
import L from "
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "element-plus
|
|
5
|
-
import "element-plus/
|
|
6
|
-
import "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { ArrowDown as ue, ArrowUp as me } from "@element-plus/icons-vue";
|
|
11
|
-
import ce from "../display/WatchSize.vue.mjs";
|
|
12
|
-
import { useBreakpoint as de } from "../../hooks/use-breakpoint.mjs";
|
|
13
|
-
const fe = { class: "btn-box" }, Pe = /* @__PURE__ */ j({
|
|
1
|
+
import { defineComponent as z, useAttrs as G, ref as x, computed as i, shallowRef as L, openBlock as d, createBlock as f, normalizeClass as T, withCtx as a, withDirectives as H, createVNode as m, mergeProps as U, unref as l, createSlots as j, normalizeProps as S, guardReactiveProps as k, createElementVNode as q, createTextVNode as w, toDisplayString as J, createCommentVNode as K, renderList as O, renderSlot as X, vShow as Y } from "vue";
|
|
2
|
+
import { stringifyFormData as Z } from "./utils.mjs";
|
|
3
|
+
import { getCurrentSpan as _, computeButtonColProps as ee, computeItemsPerRow as te } from "./form-search-utils.mjs";
|
|
4
|
+
import { ElCol as oe, ElButton as g, ElIcon as re } from "element-plus";
|
|
5
|
+
import { ArrowDown as ae, ArrowUp as le } from "@element-plus/icons-vue";
|
|
6
|
+
import se from "./FormMain.vue.mjs";
|
|
7
|
+
import ne from "../display/WatchSize.vue.mjs";
|
|
8
|
+
import { useBreakpoint as ie } from "../../hooks/use-breakpoint.mjs";
|
|
9
|
+
const ue = { class: "btn-box" }, ge = /* @__PURE__ */ z({
|
|
14
10
|
name: "FormSearch",
|
|
15
11
|
inheritAttrs: !1,
|
|
16
12
|
__name: "FormSearch",
|
|
@@ -28,151 +24,149 @@ const fe = { class: "btn-box" }, Pe = /* @__PURE__ */ j({
|
|
|
28
24
|
lg: 8,
|
|
29
25
|
xl: 6
|
|
30
26
|
}) },
|
|
31
|
-
rowGutter: {}
|
|
27
|
+
rowGutter: {},
|
|
28
|
+
layoutScale: {}
|
|
32
29
|
},
|
|
33
30
|
emits: ["search", "heightChange", "visibleChange"],
|
|
34
|
-
setup(
|
|
35
|
-
const o =
|
|
31
|
+
setup(u, { expose: R, emit: P }) {
|
|
32
|
+
const o = u, c = P, F = G(), h = x(!1), { activeBreakpoint: B } = ie(), s = x(!0), M = i(() => o.data), v = i(() => {
|
|
36
33
|
if (o.maxRows <= 0) return 1 / 0;
|
|
37
|
-
const e =
|
|
38
|
-
return Math.max(0, o.maxRows * t -
|
|
39
|
-
}),
|
|
34
|
+
const e = _(o.layout, B.value), t = te(e), r = t > 1 ? 1 : 0;
|
|
35
|
+
return Math.max(0, o.maxRows * t - r);
|
|
36
|
+
}), V = i(() => o.maxRows <= 0 ? !1 : o.list.filter(
|
|
40
37
|
(t) => t.hide !== !0
|
|
41
|
-
).length > v.value),
|
|
38
|
+
).length > v.value), E = i(() => {
|
|
42
39
|
let e = 0;
|
|
43
40
|
for (let t = 0; t < o.list.length; t++)
|
|
44
|
-
o.list[t].hide !== !0 && (
|
|
41
|
+
o.list[t].hide !== !0 && (s.value && o.maxRows > 0 && t >= v.value || e++);
|
|
45
42
|
return e;
|
|
46
|
-
}),
|
|
47
|
-
if (!
|
|
43
|
+
}), D = i(() => ee(o.layout, E.value)), I = i(() => {
|
|
44
|
+
if (!s.value || o.maxRows <= 0)
|
|
48
45
|
return o.list;
|
|
49
46
|
const e = v.value;
|
|
50
47
|
return o.list.map(
|
|
51
|
-
(t,
|
|
48
|
+
(t, r) => r >= e ? { ...t, hide: !0 } : t
|
|
52
49
|
);
|
|
53
|
-
}),
|
|
54
|
-
|
|
55
|
-
},
|
|
50
|
+
}), y = (e = !s.value) => {
|
|
51
|
+
s.value = e;
|
|
52
|
+
}, A = (e) => {
|
|
56
53
|
c("heightChange", e);
|
|
57
|
-
},
|
|
54
|
+
}, n = L(), b = (e) => ({
|
|
58
55
|
...o.staticQuery || {},
|
|
59
|
-
...
|
|
60
|
-
}),
|
|
56
|
+
...Z(e, o.list)
|
|
57
|
+
}), C = () => {
|
|
61
58
|
var e;
|
|
62
|
-
(e =
|
|
63
|
-
},
|
|
59
|
+
(e = n.value) == null || e.resetFields(), c("search", b(o.data), "reset");
|
|
60
|
+
}, p = (e = "search") => {
|
|
64
61
|
var t;
|
|
65
|
-
(t =
|
|
62
|
+
(t = n.value) == null || t.validate().then(() => {
|
|
66
63
|
c("search", b(o.data), e);
|
|
67
64
|
});
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
},
|
|
65
|
+
}, N = (e) => {
|
|
66
|
+
p(e);
|
|
67
|
+
}, W = {
|
|
71
68
|
validate: () => {
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
69
|
+
if (n.value)
|
|
70
|
+
return n.value.validate();
|
|
74
71
|
throw new Error("实例化未完成");
|
|
75
72
|
},
|
|
76
73
|
resetFields: () => {
|
|
77
74
|
var e;
|
|
78
|
-
return (e =
|
|
75
|
+
return (e = n.value) == null ? void 0 : e.resetFields();
|
|
79
76
|
},
|
|
80
77
|
clearValidate: (e) => {
|
|
81
78
|
var t;
|
|
82
|
-
return (t =
|
|
79
|
+
return (t = n.value) == null ? void 0 : t.clearValidate(e);
|
|
83
80
|
},
|
|
84
|
-
triggerReset:
|
|
85
|
-
triggerSearch: () =>
|
|
86
|
-
toggleCollapse:
|
|
87
|
-
isCollapsed:
|
|
81
|
+
triggerReset: C,
|
|
82
|
+
triggerSearch: () => p(),
|
|
83
|
+
toggleCollapse: y,
|
|
84
|
+
isCollapsed: i(() => s.value)
|
|
88
85
|
};
|
|
89
|
-
|
|
90
|
-
const
|
|
86
|
+
R(W);
|
|
87
|
+
const $ = (e) => {
|
|
91
88
|
h.value = e, c("visibleChange", e);
|
|
92
89
|
};
|
|
93
|
-
return (e, t) => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
_: 3
|
|
172
|
-
}, 8, ["class"]);
|
|
173
|
-
};
|
|
90
|
+
return (e, t) => (d(), f(ne, {
|
|
91
|
+
class: T(["form-search", {
|
|
92
|
+
"form-search_show": h.value
|
|
93
|
+
}]),
|
|
94
|
+
onHeightChange: A
|
|
95
|
+
}, {
|
|
96
|
+
default: a(() => [
|
|
97
|
+
H(m(se, U({
|
|
98
|
+
ref_key: "formMain",
|
|
99
|
+
ref: n,
|
|
100
|
+
list: I.value,
|
|
101
|
+
data: M.value,
|
|
102
|
+
"row-gutter": u.rowGutter
|
|
103
|
+
}, l(F), {
|
|
104
|
+
layout: u.layout,
|
|
105
|
+
labelPosition: u.labelPosition,
|
|
106
|
+
labelWidth: u.labelWidth,
|
|
107
|
+
onSubmit: N,
|
|
108
|
+
onVisibleChange: $
|
|
109
|
+
}), j({
|
|
110
|
+
default: a(() => [
|
|
111
|
+
m(l(oe), S(k(D.value)), {
|
|
112
|
+
default: a(() => [
|
|
113
|
+
q("div", ue, [
|
|
114
|
+
V.value ? (d(), f(l(g), {
|
|
115
|
+
key: 0,
|
|
116
|
+
type: "primary",
|
|
117
|
+
link: "",
|
|
118
|
+
onMousedown: t[0] || (t[0] = (r) => y())
|
|
119
|
+
}, {
|
|
120
|
+
default: a(() => [
|
|
121
|
+
m(l(re), { class: "btn-box-expand-icon" }, {
|
|
122
|
+
default: a(() => [
|
|
123
|
+
s.value ? (d(), f(l(ae), { key: 0 })) : (d(), f(l(le), { key: 1 }))
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}),
|
|
127
|
+
w(" " + J(s.value ? "展开更多" : "收起更多"), 1)
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
})) : K("", !0),
|
|
131
|
+
m(l(g), {
|
|
132
|
+
type: "warning",
|
|
133
|
+
onMousedown: C
|
|
134
|
+
}, {
|
|
135
|
+
default: a(() => [...t[2] || (t[2] = [
|
|
136
|
+
w("重置", -1)
|
|
137
|
+
])]),
|
|
138
|
+
_: 1
|
|
139
|
+
}),
|
|
140
|
+
m(l(g), {
|
|
141
|
+
type: "primary",
|
|
142
|
+
onMousedown: t[1] || (t[1] = (r) => p())
|
|
143
|
+
}, {
|
|
144
|
+
default: a(() => [...t[3] || (t[3] = [
|
|
145
|
+
w("查询", -1)
|
|
146
|
+
])]),
|
|
147
|
+
_: 1
|
|
148
|
+
})
|
|
149
|
+
])
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
}, 16)
|
|
153
|
+
]),
|
|
154
|
+
_: 2
|
|
155
|
+
}, [
|
|
156
|
+
O(u.list, (r) => ({
|
|
157
|
+
name: r.key,
|
|
158
|
+
fn: a((Q) => [
|
|
159
|
+
X(e.$slots, r.key, S(k(Q)), void 0, !0)
|
|
160
|
+
])
|
|
161
|
+
}))
|
|
162
|
+
]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]), [
|
|
163
|
+
[Y, h.value]
|
|
164
|
+
])
|
|
165
|
+
]),
|
|
166
|
+
_: 3
|
|
167
|
+
}, 8, ["class"]));
|
|
174
168
|
}
|
|
175
169
|
});
|
|
176
170
|
export {
|
|
177
|
-
|
|
171
|
+
ge as default
|
|
178
172
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
|
|
4
|
-
import "element-plus/es/components/option/style/css";
|
|
5
|
-
import { defineComponent as k, useAttrs as w, ref as f, computed as n, onMounted as B, watch as F, openBlock as m, createBlock as h, mergeProps as _, unref as r, withCtx as v, createElementBlock as x, Fragment as y, renderList as D, normalizeClass as z, renderSlot as A } from "vue";
|
|
6
|
-
const j = /* @__PURE__ */ k({
|
|
1
|
+
import { defineComponent as C, useAttrs as O, ref as v, computed as n, onMounted as k, watch as S, openBlock as s, createBlock as f, unref as u, mergeProps as w, withCtx as h, createElementBlock as B, Fragment as E, renderList as F, normalizeClass as x, renderSlot as y } from "vue";
|
|
2
|
+
import { ElSelect as D, ElOption as z } from "element-plus";
|
|
3
|
+
const P = /* @__PURE__ */ C({
|
|
7
4
|
name: "FormSelect",
|
|
8
5
|
__name: "FormSelect",
|
|
9
6
|
props: {
|
|
@@ -14,52 +11,49 @@ const j = /* @__PURE__ */ k({
|
|
|
14
11
|
getOptions: {}
|
|
15
12
|
},
|
|
16
13
|
emits: ["update:modelValue", "detailChange"],
|
|
17
|
-
setup(
|
|
18
|
-
const t =
|
|
14
|
+
setup(o, { emit: b }) {
|
|
15
|
+
const t = o, d = b, M = O(), m = v([]), i = v([]), r = n(() => !!t.remoteMethod), V = n(() => t.getOptions ? m.value : t.options), c = n(() => r.value ? i.value : V.value), g = n(() => c.value.find((e) => e.value === t.modelValue)), p = async (e) => {
|
|
19
16
|
i.value = await t.remoteMethod(e);
|
|
20
17
|
};
|
|
21
|
-
return
|
|
18
|
+
return k(() => {
|
|
22
19
|
var e;
|
|
23
20
|
t.remoteMethod ? p() : (e = t.getOptions) == null || e.call(t).then((a) => {
|
|
24
|
-
|
|
21
|
+
m.value = a;
|
|
25
22
|
});
|
|
26
|
-
}),
|
|
27
|
-
|
|
23
|
+
}), S(
|
|
24
|
+
g,
|
|
28
25
|
(e) => {
|
|
29
26
|
d("detailChange", e);
|
|
30
27
|
},
|
|
31
28
|
{
|
|
32
29
|
immediate: !0
|
|
33
30
|
}
|
|
34
|
-
), (e, a) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_: 3
|
|
59
|
-
}, 16, ["modelValue", "remote", "filterable", "remoteMethod"]);
|
|
60
|
-
};
|
|
31
|
+
), (e, a) => (s(), f(u(D), w({
|
|
32
|
+
modelValue: o.modelValue,
|
|
33
|
+
remote: r.value,
|
|
34
|
+
filterable: r.value,
|
|
35
|
+
remoteMethod: o.remoteMethod && p
|
|
36
|
+
}, u(M), {
|
|
37
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => d("update:modelValue", l))
|
|
38
|
+
}), {
|
|
39
|
+
default: h(() => [
|
|
40
|
+
(s(!0), B(E, null, F(c.value, (l) => (s(), f(u(z), {
|
|
41
|
+
key: l.value,
|
|
42
|
+
class: x(o.itemCls),
|
|
43
|
+
label: l.label,
|
|
44
|
+
value: l.value,
|
|
45
|
+
disabled: l.disabled
|
|
46
|
+
}, {
|
|
47
|
+
default: h(() => [
|
|
48
|
+
y(e.$slots, "option", { data: l })
|
|
49
|
+
]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, 1032, ["class", "label", "value", "disabled"]))), 128))
|
|
52
|
+
]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 16, ["modelValue", "remote", "filterable", "remoteMethod"]));
|
|
61
55
|
}
|
|
62
56
|
});
|
|
63
57
|
export {
|
|
64
|
-
|
|
58
|
+
P as default
|
|
65
59
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import F from "lodash/omit";
|
|
7
|
-
const h = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as c, computed as l, openBlock as p, createBlock as u, unref as o, mergeProps as f, withCtx as d, createTextVNode as y, toDisplayString as B } from "vue";
|
|
2
|
+
import { ElButton as b } from "element-plus";
|
|
3
|
+
import { useFormSubmit as g } from "./use-form-submit.mjs";
|
|
4
|
+
import x from "lodash/omit";
|
|
5
|
+
const T = /* @__PURE__ */ c({
|
|
8
6
|
__name: "FormSubmitBtn",
|
|
9
7
|
props: {
|
|
10
8
|
size: {},
|
|
@@ -30,29 +28,26 @@ const h = /* @__PURE__ */ p({
|
|
|
30
28
|
submitFn: {}
|
|
31
29
|
},
|
|
32
30
|
emits: ["success", "fail"],
|
|
33
|
-
setup(n, { emit:
|
|
34
|
-
const
|
|
35
|
-
() =>
|
|
36
|
-
), { submitting: m, submit: r } =
|
|
37
|
-
getFormMainInstance: () =>
|
|
38
|
-
submitFn: (t) =>
|
|
39
|
-
onSuccess: (t) =>
|
|
40
|
-
onFail: (t) =>
|
|
31
|
+
setup(n, { emit: i }) {
|
|
32
|
+
const e = n, a = i, s = l(
|
|
33
|
+
() => x(e, ["formMainInstance", "submitText", "submitFn"])
|
|
34
|
+
), { submitting: m, submit: r } = g({
|
|
35
|
+
getFormMainInstance: () => e.formMainInstance,
|
|
36
|
+
submitFn: (t) => e.submitFn(t),
|
|
37
|
+
onSuccess: (t) => a("success", t),
|
|
38
|
+
onFail: (t) => a("fail", t)
|
|
41
39
|
});
|
|
42
|
-
return (t,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
_: 1
|
|
52
|
-
}, 16, ["loading", "onClick"]);
|
|
53
|
-
};
|
|
40
|
+
return (t, F) => (p(), u(o(b), f(s.value, {
|
|
41
|
+
loading: o(m),
|
|
42
|
+
onClick: o(r)
|
|
43
|
+
}), {
|
|
44
|
+
default: d(() => [
|
|
45
|
+
y(B(n.submitText), 1)
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
}, 16, ["loading", "onClick"]));
|
|
54
49
|
}
|
|
55
50
|
});
|
|
56
51
|
export {
|
|
57
|
-
|
|
52
|
+
T as default
|
|
58
53
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormSubmitPanel.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-93bc9096"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as W, useAttrs as E, shallowRef as R, ref as T, computed as r, watch as F, openBlock as n, createElementBlock as j, normalizeClass as z, createVNode as G, mergeProps as c, unref as i, createSlots as H, renderList as I, withCtx as l, renderSlot as m, normalizeProps as L, guardReactiveProps as O, createBlock as u, resolveDynamicComponent as q, createElementVNode as J, createTextVNode as P, toDisplayString as S, createCommentVNode as h } from "vue";
|
|
2
2
|
import { ElAffix as K } from "element-plus";
|
|
3
3
|
import Q from "./FormMain.vue.mjs";
|
|
4
4
|
import U from "./FormSubmitBtn.vue.mjs";
|
|
5
5
|
import { useFormSubmit as X } from "./use-form-submit.mjs";
|
|
6
|
-
import
|
|
6
|
+
import C from "../display/ActionBtn.vue.mjs";
|
|
7
7
|
import { parseFormData as Y, generateFormData as Z } from "./utils.mjs";
|
|
8
|
-
const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */
|
|
8
|
+
const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ W({
|
|
9
9
|
name: "FormSubmitPanel",
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "FormSubmitPanel",
|
|
@@ -15,6 +15,7 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
|
|
|
15
15
|
span: 24
|
|
16
16
|
}) },
|
|
17
17
|
rowGutter: {},
|
|
18
|
+
layoutScale: {},
|
|
18
19
|
stringifyData: {},
|
|
19
20
|
submitText: {},
|
|
20
21
|
submitFn: {},
|
|
@@ -30,8 +31,8 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
|
|
|
30
31
|
rootClass: {}
|
|
31
32
|
},
|
|
32
33
|
emits: ["cancel", "fail", "success", "parseDataChange"],
|
|
33
|
-
setup(a, { emit:
|
|
34
|
-
const t = a, o =
|
|
34
|
+
setup(a, { emit: D }) {
|
|
35
|
+
const t = a, o = D, k = E(), f = R(), s = T({}), x = (e) => e, b = r(() => f.value), w = r(() => t.operationAffix ? K : "div"), A = r(() => t.operationAffix ? typeof t.operationAffix == "object" ? t.operationAffix : { position: "bottom" } : {}), $ = r(() => [
|
|
35
36
|
`form-submit-panel_${t.operationPosition}`,
|
|
36
37
|
{
|
|
37
38
|
"form-submit-panel_no-divider": !t.divider,
|
|
@@ -40,15 +41,15 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
|
|
|
40
41
|
t.rootClass
|
|
41
42
|
]), d = () => t.stringifyData ? Y(t.stringifyData, t.list) : Z(t.list), p = () => o("cancel"), y = () => {
|
|
42
43
|
s.value = d();
|
|
43
|
-
}, B = (e) => o("success", e),
|
|
44
|
+
}, B = (e) => o("success", e), v = (e) => o("fail", e), { submitting: M, submit: N } = X({
|
|
44
45
|
getFormMainInstance: () => b.value,
|
|
45
46
|
submitFn: (e) => t.submitFn(e),
|
|
46
47
|
onSuccess: B,
|
|
47
|
-
onFail:
|
|
48
|
+
onFail: v
|
|
48
49
|
});
|
|
49
|
-
return
|
|
50
|
+
return F(s, (e) => {
|
|
50
51
|
o("parseDataChange", e);
|
|
51
|
-
}),
|
|
52
|
+
}), F(
|
|
52
53
|
[() => t.stringifyData, () => t.list],
|
|
53
54
|
() => {
|
|
54
55
|
s.value = d();
|
|
@@ -56,64 +57,64 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
|
|
|
56
57
|
{
|
|
57
58
|
immediate: !0
|
|
58
59
|
}
|
|
59
|
-
), (e, tt) => (
|
|
60
|
-
class: z(["form-submit-panel",
|
|
60
|
+
), (e, tt) => (n(), j("div", {
|
|
61
|
+
class: z(["form-submit-panel", $.value])
|
|
61
62
|
}, [
|
|
62
63
|
G(Q, c({
|
|
63
64
|
ref_key: "formMain",
|
|
64
65
|
ref: f,
|
|
65
66
|
class: "form-submit-panel-form",
|
|
66
67
|
list: a.list,
|
|
67
|
-
data: x(
|
|
68
|
+
data: x(s.value),
|
|
68
69
|
"row-gutter": a.rowGutter
|
|
69
|
-
},
|
|
70
|
+
}, i(k), {
|
|
70
71
|
layout: a.layout,
|
|
71
72
|
labelPosition: a.labelPosition,
|
|
72
73
|
labelWidth: a.labelWidth
|
|
73
74
|
}), H({ _: 2 }, [
|
|
74
|
-
I(a.list, (
|
|
75
|
-
name:
|
|
76
|
-
fn: l((
|
|
77
|
-
m(e.$slots,
|
|
75
|
+
I(a.list, (g) => ({
|
|
76
|
+
name: g.key,
|
|
77
|
+
fn: l((V) => [
|
|
78
|
+
m(e.$slots, g.key, L(O(V)), void 0, !0)
|
|
78
79
|
])
|
|
79
80
|
}))
|
|
80
81
|
]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]),
|
|
81
|
-
(
|
|
82
|
+
(n(), u(q(w.value), c(A.value, { class: "form-submit-panel-operation" }), {
|
|
82
83
|
default: l(() => [
|
|
83
84
|
J("div", _, [
|
|
84
85
|
m(e.$slots, "cancelBtn", { cancel: p }, () => [
|
|
85
|
-
a.cancelBtn ? (
|
|
86
|
+
a.cancelBtn ? (n(), u(i(C), {
|
|
86
87
|
key: 0,
|
|
87
88
|
onClick: p
|
|
88
89
|
}, {
|
|
89
90
|
default: l(() => [
|
|
90
|
-
|
|
91
|
+
P(S(a.cancelBtn), 1)
|
|
91
92
|
]),
|
|
92
93
|
_: 1
|
|
93
|
-
})) :
|
|
94
|
+
})) : h("", !0)
|
|
94
95
|
], !0),
|
|
95
96
|
m(e.$slots, "resetBtn", { reset: y }, () => [
|
|
96
|
-
a.resetBtn ? (
|
|
97
|
+
a.resetBtn ? (n(), u(i(C), {
|
|
97
98
|
key: 0,
|
|
98
99
|
type: "warning",
|
|
99
100
|
onClick: y
|
|
100
101
|
}, {
|
|
101
102
|
default: l(() => [
|
|
102
|
-
|
|
103
|
+
P(S(a.resetBtn), 1)
|
|
103
104
|
]),
|
|
104
105
|
_: 1
|
|
105
|
-
})) :
|
|
106
|
+
})) : h("", !0)
|
|
106
107
|
], !0),
|
|
107
108
|
e.$slots.submitBtn ? m(e.$slots, "submitBtn", {
|
|
108
109
|
key: 0,
|
|
109
|
-
submit:
|
|
110
|
-
submitting:
|
|
111
|
-
}, void 0, !0) : (
|
|
110
|
+
submit: i(N),
|
|
111
|
+
submitting: i(M)
|
|
112
|
+
}, void 0, !0) : (n(), u(U, c({ key: 1 }, a.submitBtnProps, {
|
|
112
113
|
"submit-fn": a.submitFn,
|
|
113
114
|
"submit-text": a.submitText,
|
|
114
115
|
"form-main-instance": b.value,
|
|
115
116
|
onSuccess: B,
|
|
116
|
-
onFail:
|
|
117
|
+
onFail: v
|
|
117
118
|
}), null, 16, ["submit-fn", "submit-text", "form-main-instance"]))
|
|
118
119
|
])
|
|
119
120
|
]),
|