@done-coding/admin-core 0.8.2 → 0.9.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/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 +62 -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/FormMain.vue.mjs +81 -88
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +1 -1
- package/es/components/form/FormSearch.vue2.mjs +116 -123
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +24 -35
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +75 -55
- 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/use-form-submit.mjs +21 -0
- 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 -3
- package/es/components/modal/ConfirmModal.vue2.mjs +93 -100
- 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/PanelMain.vue.mjs +2 -2
- package/es/components/panel/PanelMain.vue2.mjs +67 -74
- 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 +125 -117
- package/es/inject/key.mjs +7 -4
- 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 +110 -10
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +66 -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/FormSubmitPanel.vue.d.ts +4 -0
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/types.d.ts +17 -0
- package/types/components/form/use-form-submit.d.ts +25 -0
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/table/TableMain.vue.d.ts +1 -1
- 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 +18 -0
- package/types/store/app.d.ts +138 -59
- package/types/store/user.d.ts +3 -3
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
|
|
4
|
-
import "element-plus/es/components/radio/style/css";
|
|
5
|
-
import "element-plus/es/components/radio-button/style/css";
|
|
6
|
-
import { defineComponent as B, useModel as V, computed as G, watch as _, openBlock as a, createBlock as d, unref as g, withCtx as n, createElementBlock as m, Fragment as s, renderList as c, createTextVNode as p, toDisplayString as v, createCommentVNode as x, mergeModels as M } from "vue";
|
|
7
|
-
const D = /* @__PURE__ */ B({
|
|
1
|
+
import { defineComponent as k, useModel as h, computed as y, watch as V, openBlock as t, createBlock as d, unref as r, withCtx as n, createElementBlock as m, Fragment as v, renderList as c, createTextVNode as p, toDisplayString as f, createCommentVNode as B, mergeModels as R } from "vue";
|
|
2
|
+
import { ElRadioGroup as g, ElRadioButton as x, ElRadio as E } from "element-plus";
|
|
3
|
+
const N = /* @__PURE__ */ k({
|
|
8
4
|
name: "FormRadioGroup",
|
|
9
5
|
inheritAttrs: !0,
|
|
10
6
|
__name: "FormRadioGroup",
|
|
11
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ R({
|
|
12
8
|
options: {},
|
|
13
9
|
mode: { default: "radio" },
|
|
14
10
|
notNull: { type: Boolean, default: !0 }
|
|
@@ -17,57 +13,54 @@ const D = /* @__PURE__ */ B({
|
|
|
17
13
|
modelModifiers: {}
|
|
18
14
|
}),
|
|
19
15
|
emits: ["update:modelValue"],
|
|
20
|
-
setup(
|
|
21
|
-
const u =
|
|
16
|
+
setup(l) {
|
|
17
|
+
const u = l, a = h(l, "modelValue"), i = y(() => {
|
|
22
18
|
if (u.notNull && u.options.length > 0) {
|
|
23
19
|
const o = u.options.some(
|
|
24
|
-
(
|
|
20
|
+
(s) => s.value === a.value
|
|
25
21
|
);
|
|
26
|
-
if (
|
|
22
|
+
if (a.value === void 0 || !o)
|
|
27
23
|
return u.options[0].value;
|
|
28
24
|
}
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
31
|
-
|
|
25
|
+
return a.value;
|
|
26
|
+
}), b = (o) => {
|
|
27
|
+
a.value = o;
|
|
32
28
|
};
|
|
33
|
-
return
|
|
34
|
-
|
|
29
|
+
return V(
|
|
30
|
+
i,
|
|
35
31
|
(o) => {
|
|
36
|
-
o !== void 0 && o !==
|
|
32
|
+
o !== void 0 && o !== a.value && (a.value = o);
|
|
37
33
|
},
|
|
38
34
|
{ immediate: !0 }
|
|
39
|
-
), (o,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_: 1
|
|
67
|
-
}, 8, ["model-value"]);
|
|
68
|
-
};
|
|
35
|
+
), (o, s) => (t(), d(r(g), {
|
|
36
|
+
"model-value": i.value,
|
|
37
|
+
"onUpdate:modelValue": b
|
|
38
|
+
}, {
|
|
39
|
+
default: n(() => [
|
|
40
|
+
l.mode === "buttonGroup" ? (t(!0), m(v, { key: 0 }, c(l.options, (e) => (t(), d(r(x), {
|
|
41
|
+
key: e.value,
|
|
42
|
+
value: e.value,
|
|
43
|
+
disabled: e.disabled
|
|
44
|
+
}, {
|
|
45
|
+
default: n(() => [
|
|
46
|
+
p(f(e.label), 1)
|
|
47
|
+
]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, ["value", "disabled"]))), 128)) : l.mode === "radio" ? (t(!0), m(v, { key: 1 }, c(l.options, (e) => (t(), d(r(E), {
|
|
50
|
+
key: e.value,
|
|
51
|
+
value: e.value,
|
|
52
|
+
disabled: e.disabled
|
|
53
|
+
}, {
|
|
54
|
+
default: n(() => [
|
|
55
|
+
p(f(e.label), 1)
|
|
56
|
+
]),
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1032, ["value", "disabled"]))), 128)) : B("", !0)
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["model-value"]));
|
|
69
62
|
}
|
|
70
63
|
});
|
|
71
64
|
export {
|
|
72
|
-
|
|
65
|
+
N as default
|
|
73
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormSearch.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-72f1475d"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -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 _, createVNode as m, mergeProps as H, unref as s, createSlots as U, normalizeProps as k, guardReactiveProps as R, createElementVNode as j, createTextVNode as w, toDisplayString as q, createCommentVNode as J, renderList as K, renderSlot as O, vShow as X } from "vue";
|
|
2
|
+
import { stringifyFormData as Y } from "./utils.mjs";
|
|
3
|
+
import { getCurrentSpan as Z, 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 se } from "@element-plus/icons-vue";
|
|
6
|
+
import le 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",
|
|
@@ -31,148 +27,145 @@ const fe = { class: "btn-box" }, Pe = /* @__PURE__ */ j({
|
|
|
31
27
|
rowGutter: {}
|
|
32
28
|
},
|
|
33
29
|
emits: ["search", "heightChange", "visibleChange"],
|
|
34
|
-
setup(
|
|
35
|
-
const o =
|
|
30
|
+
setup(u, { expose: S, emit: P }) {
|
|
31
|
+
const o = u, c = P, F = G(), h = x(!1), { activeBreakpoint: B } = ie(), l = x(!0), V = i(() => o.data), v = i(() => {
|
|
36
32
|
if (o.maxRows <= 0) return 1 / 0;
|
|
37
|
-
const e =
|
|
38
|
-
return Math.max(0, o.maxRows * t -
|
|
39
|
-
}),
|
|
33
|
+
const e = Z(o.layout, B.value), t = te(e), r = t > 1 ? 1 : 0;
|
|
34
|
+
return Math.max(0, o.maxRows * t - r);
|
|
35
|
+
}), E = i(() => o.maxRows <= 0 ? !1 : o.list.filter(
|
|
40
36
|
(t) => t.hide !== !0
|
|
41
|
-
).length > v.value),
|
|
37
|
+
).length > v.value), M = i(() => {
|
|
42
38
|
let e = 0;
|
|
43
39
|
for (let t = 0; t < o.list.length; t++)
|
|
44
|
-
o.list[t].hide !== !0 && (
|
|
40
|
+
o.list[t].hide !== !0 && (l.value && o.maxRows > 0 && t >= v.value || e++);
|
|
45
41
|
return e;
|
|
46
|
-
}),
|
|
47
|
-
if (!
|
|
42
|
+
}), D = i(() => ee(o.layout, M.value)), I = i(() => {
|
|
43
|
+
if (!l.value || o.maxRows <= 0)
|
|
48
44
|
return o.list;
|
|
49
45
|
const e = v.value;
|
|
50
46
|
return o.list.map(
|
|
51
|
-
(t,
|
|
47
|
+
(t, r) => r >= e ? { ...t, hide: !0 } : t
|
|
52
48
|
);
|
|
53
|
-
}),
|
|
54
|
-
|
|
49
|
+
}), y = (e = !l.value) => {
|
|
50
|
+
l.value = e;
|
|
55
51
|
}, $ = (e) => {
|
|
56
52
|
c("heightChange", e);
|
|
57
|
-
},
|
|
53
|
+
}, n = L(), b = (e) => ({
|
|
58
54
|
...o.staticQuery || {},
|
|
59
|
-
...
|
|
60
|
-
}),
|
|
55
|
+
...Y(e, o.list)
|
|
56
|
+
}), C = () => {
|
|
61
57
|
var e;
|
|
62
|
-
(e =
|
|
63
|
-
},
|
|
58
|
+
(e = n.value) == null || e.resetFields(), c("search", b(o.data), "reset");
|
|
59
|
+
}, p = (e = "search") => {
|
|
64
60
|
var t;
|
|
65
|
-
(t =
|
|
61
|
+
(t = n.value) == null || t.validate().then(() => {
|
|
66
62
|
c("search", b(o.data), e);
|
|
67
63
|
});
|
|
68
64
|
}, A = (e) => {
|
|
69
|
-
|
|
65
|
+
p(e);
|
|
70
66
|
}, N = {
|
|
71
67
|
validate: () => {
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
68
|
+
if (n.value)
|
|
69
|
+
return n.value.validate();
|
|
74
70
|
throw new Error("实例化未完成");
|
|
75
71
|
},
|
|
76
72
|
resetFields: () => {
|
|
77
73
|
var e;
|
|
78
|
-
return (e =
|
|
74
|
+
return (e = n.value) == null ? void 0 : e.resetFields();
|
|
79
75
|
},
|
|
80
76
|
clearValidate: (e) => {
|
|
81
77
|
var t;
|
|
82
|
-
return (t =
|
|
78
|
+
return (t = n.value) == null ? void 0 : t.clearValidate(e);
|
|
83
79
|
},
|
|
84
|
-
triggerReset:
|
|
85
|
-
triggerSearch: () =>
|
|
86
|
-
toggleCollapse:
|
|
87
|
-
isCollapsed:
|
|
80
|
+
triggerReset: C,
|
|
81
|
+
triggerSearch: () => p(),
|
|
82
|
+
toggleCollapse: y,
|
|
83
|
+
isCollapsed: i(() => l.value)
|
|
88
84
|
};
|
|
89
|
-
|
|
85
|
+
S(N);
|
|
90
86
|
const W = (e) => {
|
|
91
87
|
h.value = e, c("visibleChange", e);
|
|
92
88
|
};
|
|
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
|
-
};
|
|
89
|
+
return (e, t) => (d(), f(ne, {
|
|
90
|
+
class: T(["form-search", {
|
|
91
|
+
"form-search_show": h.value
|
|
92
|
+
}]),
|
|
93
|
+
onHeightChange: $
|
|
94
|
+
}, {
|
|
95
|
+
default: a(() => [
|
|
96
|
+
_(m(le, H({
|
|
97
|
+
ref_key: "formMain",
|
|
98
|
+
ref: n,
|
|
99
|
+
list: I.value,
|
|
100
|
+
data: V.value,
|
|
101
|
+
"row-gutter": u.rowGutter
|
|
102
|
+
}, s(F), {
|
|
103
|
+
layout: u.layout,
|
|
104
|
+
labelPosition: u.labelPosition,
|
|
105
|
+
labelWidth: u.labelWidth,
|
|
106
|
+
onSubmit: A,
|
|
107
|
+
onVisibleChange: W
|
|
108
|
+
}), U({
|
|
109
|
+
default: a(() => [
|
|
110
|
+
m(s(oe), k(R(D.value)), {
|
|
111
|
+
default: a(() => [
|
|
112
|
+
j("div", ue, [
|
|
113
|
+
E.value ? (d(), f(s(g), {
|
|
114
|
+
key: 0,
|
|
115
|
+
type: "primary",
|
|
116
|
+
link: "",
|
|
117
|
+
onMousedown: t[0] || (t[0] = (r) => y())
|
|
118
|
+
}, {
|
|
119
|
+
default: a(() => [
|
|
120
|
+
m(s(re), { class: "btn-box-expand-icon" }, {
|
|
121
|
+
default: a(() => [
|
|
122
|
+
l.value ? (d(), f(s(ae), { key: 0 })) : (d(), f(s(se), { key: 1 }))
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}),
|
|
126
|
+
w(" " + q(l.value ? "展开更多" : "收起更多"), 1)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
})) : J("", !0),
|
|
130
|
+
m(s(g), {
|
|
131
|
+
type: "warning",
|
|
132
|
+
onMousedown: C
|
|
133
|
+
}, {
|
|
134
|
+
default: a(() => [...t[2] || (t[2] = [
|
|
135
|
+
w("重置", -1)
|
|
136
|
+
])]),
|
|
137
|
+
_: 1
|
|
138
|
+
}),
|
|
139
|
+
m(s(g), {
|
|
140
|
+
type: "primary",
|
|
141
|
+
onMousedown: t[1] || (t[1] = (r) => p())
|
|
142
|
+
}, {
|
|
143
|
+
default: a(() => [...t[3] || (t[3] = [
|
|
144
|
+
w("查询", -1)
|
|
145
|
+
])]),
|
|
146
|
+
_: 1
|
|
147
|
+
})
|
|
148
|
+
])
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 16)
|
|
152
|
+
]),
|
|
153
|
+
_: 2
|
|
154
|
+
}, [
|
|
155
|
+
K(u.list, (r) => ({
|
|
156
|
+
name: r.key,
|
|
157
|
+
fn: a((Q) => [
|
|
158
|
+
O(e.$slots, r.key, k(R(Q)), void 0, !0)
|
|
159
|
+
])
|
|
160
|
+
}))
|
|
161
|
+
]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]), [
|
|
162
|
+
[X, h.value]
|
|
163
|
+
])
|
|
164
|
+
]),
|
|
165
|
+
_: 3
|
|
166
|
+
}, 8, ["class"]));
|
|
174
167
|
}
|
|
175
168
|
});
|
|
176
169
|
export {
|
|
177
|
-
|
|
170
|
+
ge as default
|
|
178
171
|
};
|
|
@@ -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,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const w = /* @__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({
|
|
7
6
|
__name: "FormSubmitBtn",
|
|
8
7
|
props: {
|
|
9
8
|
size: {},
|
|
@@ -29,36 +28,26 @@ const w = /* @__PURE__ */ p({
|
|
|
29
28
|
submitFn: {}
|
|
30
29
|
},
|
|
31
30
|
emits: ["success", "fail"],
|
|
32
|
-
setup(
|
|
33
|
-
const e =
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return y(), d(c, B(b(r), {
|
|
51
|
-
loading: o.value,
|
|
52
|
-
onClick: l
|
|
53
|
-
}), {
|
|
54
|
-
default: g(() => [
|
|
55
|
-
x(_(a.submitText), 1)
|
|
56
|
-
]),
|
|
57
|
-
_: 1
|
|
58
|
-
}, 16, ["loading"]);
|
|
59
|
-
};
|
|
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)
|
|
39
|
+
});
|
|
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"]));
|
|
60
49
|
}
|
|
61
50
|
});
|
|
62
51
|
export {
|
|
63
|
-
|
|
52
|
+
T as default
|
|
64
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
|
};
|