@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,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElAffix as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as E, useAttrs as M, shallowRef as R, ref as T, computed as r, watch as P, 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 h, toDisplayString as C, createCommentVNode as D } from "vue";
|
|
2
|
+
import { ElAffix as K } from "element-plus";
|
|
3
|
+
import Q from "./FormMain.vue.mjs";
|
|
4
|
+
import U from "./FormSubmitBtn.vue.mjs";
|
|
5
|
+
import { useFormSubmit as X } from "./use-form-submit.mjs";
|
|
6
|
+
import F from "../display/ActionBtn.vue.mjs";
|
|
7
|
+
import { parseFormData as Y, generateFormData as Z } from "./utils.mjs";
|
|
8
|
+
const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E({
|
|
8
9
|
name: "FormSubmitPanel",
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "FormSubmitPanel",
|
|
@@ -23,78 +24,97 @@ const U = { class: "form-submit-panel-operation-inner" }, nt = /* @__PURE__ */ V
|
|
|
23
24
|
cancelBtn: {},
|
|
24
25
|
resetBtn: {},
|
|
25
26
|
operationPosition: { default: "bottom-center" },
|
|
26
|
-
operationAffix: { type: [Boolean, Object], default: !1 }
|
|
27
|
+
operationAffix: { type: [Boolean, Object], default: !1 },
|
|
28
|
+
divider: { type: Boolean, default: !0 },
|
|
29
|
+
bare: { type: Boolean, default: !1 },
|
|
30
|
+
rootClass: {}
|
|
27
31
|
},
|
|
28
32
|
emits: ["cancel", "fail", "success", "parseDataChange"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
setup(a, { emit: S }) {
|
|
34
|
+
const t = a, o = S, k = M(), f = R(), s = T({}), x = (e) => e, b = r(() => f.value), $ = r(() => t.operationAffix ? K : "div"), w = r(() => t.operationAffix ? typeof t.operationAffix == "object" ? t.operationAffix : { position: "bottom" } : {}), A = r(() => [
|
|
35
|
+
`form-submit-panel_${t.operationPosition}`,
|
|
36
|
+
{
|
|
37
|
+
"form-submit-panel_no-divider": !t.divider,
|
|
38
|
+
"form-submit-panel_bare": t.bare
|
|
39
|
+
},
|
|
40
|
+
t.rootClass
|
|
41
|
+
]), d = () => t.stringifyData ? Y(t.stringifyData, t.list) : Z(t.list), p = () => o("cancel"), y = () => {
|
|
42
|
+
s.value = d();
|
|
43
|
+
}, B = (e) => o("success", e), v = (e) => o("fail", e), { submitting: N, submit: V } = X({
|
|
44
|
+
getFormMainInstance: () => b.value,
|
|
45
|
+
submitFn: (e) => t.submitFn(e),
|
|
46
|
+
onSuccess: B,
|
|
47
|
+
onFail: v
|
|
48
|
+
});
|
|
49
|
+
return P(s, (e) => {
|
|
50
|
+
o("parseDataChange", e);
|
|
51
|
+
}), P(
|
|
52
|
+
[() => t.stringifyData, () => t.list],
|
|
37
53
|
() => {
|
|
38
|
-
|
|
54
|
+
s.value = d();
|
|
39
55
|
},
|
|
40
56
|
{
|
|
41
57
|
immediate: !0
|
|
42
58
|
}
|
|
43
|
-
), (e,
|
|
44
|
-
class:
|
|
59
|
+
), (e, tt) => (n(), j("div", {
|
|
60
|
+
class: z(["form-submit-panel", A.value])
|
|
45
61
|
}, [
|
|
46
|
-
|
|
62
|
+
G(Q, c({
|
|
47
63
|
ref_key: "formMain",
|
|
48
64
|
ref: f,
|
|
49
65
|
class: "form-submit-panel-form",
|
|
50
|
-
list:
|
|
51
|
-
data:
|
|
52
|
-
"row-gutter":
|
|
53
|
-
},
|
|
54
|
-
layout:
|
|
55
|
-
labelPosition:
|
|
56
|
-
labelWidth:
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
name:
|
|
60
|
-
fn:
|
|
61
|
-
|
|
66
|
+
list: a.list,
|
|
67
|
+
data: x(s.value),
|
|
68
|
+
"row-gutter": a.rowGutter
|
|
69
|
+
}, i(k), {
|
|
70
|
+
layout: a.layout,
|
|
71
|
+
labelPosition: a.labelPosition,
|
|
72
|
+
labelWidth: a.labelWidth
|
|
73
|
+
}), H({ _: 2 }, [
|
|
74
|
+
I(a.list, (g) => ({
|
|
75
|
+
name: g.key,
|
|
76
|
+
fn: l((W) => [
|
|
77
|
+
m(e.$slots, g.key, L(O(W)), void 0, !0)
|
|
62
78
|
])
|
|
63
79
|
}))
|
|
64
80
|
]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]),
|
|
65
|
-
(
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
(n(), u(q($.value), c(w.value, { class: "form-submit-panel-operation" }), {
|
|
82
|
+
default: l(() => [
|
|
83
|
+
J("div", _, [
|
|
84
|
+
m(e.$slots, "cancelBtn", { cancel: p }, () => [
|
|
85
|
+
a.cancelBtn ? (n(), u(i(F), {
|
|
70
86
|
key: 0,
|
|
71
|
-
onClick:
|
|
87
|
+
onClick: p
|
|
72
88
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
|
|
89
|
+
default: l(() => [
|
|
90
|
+
h(C(a.cancelBtn), 1)
|
|
75
91
|
]),
|
|
76
92
|
_: 1
|
|
77
|
-
})) :
|
|
93
|
+
})) : D("", !0)
|
|
78
94
|
], !0),
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
m(e.$slots, "resetBtn", { reset: y }, () => [
|
|
96
|
+
a.resetBtn ? (n(), u(i(F), {
|
|
81
97
|
key: 0,
|
|
82
98
|
type: "warning",
|
|
83
|
-
onClick:
|
|
99
|
+
onClick: y
|
|
84
100
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
|
|
101
|
+
default: l(() => [
|
|
102
|
+
h(C(a.resetBtn), 1)
|
|
87
103
|
]),
|
|
88
104
|
_: 1
|
|
89
|
-
})) :
|
|
105
|
+
})) : D("", !0)
|
|
90
106
|
], !0),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
e.$slots.submitBtn ? m(e.$slots, "submitBtn", {
|
|
108
|
+
key: 0,
|
|
109
|
+
submit: i(V),
|
|
110
|
+
submitting: i(N)
|
|
111
|
+
}, void 0, !0) : (n(), u(U, c({ key: 1 }, a.submitBtnProps, {
|
|
112
|
+
"submit-fn": a.submitFn,
|
|
113
|
+
"submit-text": a.submitText,
|
|
114
|
+
"form-main-instance": b.value,
|
|
115
|
+
onSuccess: B,
|
|
116
|
+
onFail: v
|
|
117
|
+
}), null, 16, ["submit-fn", "submit-text", "form-main-instance"]))
|
|
98
118
|
])
|
|
99
119
|
]),
|
|
100
120
|
_: 3
|
|
@@ -103,5 +123,5 @@ const U = { class: "form-submit-panel-operation-inner" }, nt = /* @__PURE__ */ V
|
|
|
103
123
|
}
|
|
104
124
|
});
|
|
105
125
|
export {
|
|
106
|
-
|
|
126
|
+
lt as default
|
|
107
127
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
|
|
4
|
-
import { defineComponent as m, openBlock as r, createBlock as u } from "vue";
|
|
5
|
-
const i = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as n, openBlock as u, createBlock as c, unref as r } from "vue";
|
|
2
|
+
import { ElTree as m } from "element-plus";
|
|
3
|
+
const s = /* @__PURE__ */ n({
|
|
6
4
|
__name: "FormTree",
|
|
7
5
|
props: {
|
|
8
6
|
modelValue: {},
|
|
@@ -11,24 +9,21 @@ const i = /* @__PURE__ */ m({
|
|
|
11
9
|
defaultExpandAll: { type: Boolean }
|
|
12
10
|
},
|
|
13
11
|
emits: ["update:modelValue"],
|
|
14
|
-
setup(e, { emit:
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
return (d, t) => {
|
|
19
|
-
const n = c;
|
|
20
|
-
return r(), u(n, {
|
|
21
|
-
ref: "elTree",
|
|
22
|
-
data: e.tree,
|
|
23
|
-
showCheckbox: e.showCheckbox,
|
|
24
|
-
nodeKey: "id",
|
|
25
|
-
defaultCheckedKeys: e.modelValue,
|
|
26
|
-
defaultExpandAll: e.defaultExpandAll,
|
|
27
|
-
onCheck: a
|
|
28
|
-
}, null, 8, ["data", "showCheckbox", "defaultCheckedKeys", "defaultExpandAll"]);
|
|
12
|
+
setup(e, { emit: a }) {
|
|
13
|
+
const t = a, o = (d, { checkedKeys: l }) => {
|
|
14
|
+
t("update:modelValue", l);
|
|
29
15
|
};
|
|
16
|
+
return (d, l) => (u(), c(r(m), {
|
|
17
|
+
ref: "elTree",
|
|
18
|
+
data: e.tree,
|
|
19
|
+
showCheckbox: e.showCheckbox,
|
|
20
|
+
nodeKey: "id",
|
|
21
|
+
defaultCheckedKeys: e.modelValue,
|
|
22
|
+
defaultExpandAll: e.defaultExpandAll,
|
|
23
|
+
onCheck: o
|
|
24
|
+
}, null, 8, ["data", "showCheckbox", "defaultCheckedKeys", "defaultExpandAll"]));
|
|
30
25
|
}
|
|
31
26
|
});
|
|
32
27
|
export {
|
|
33
|
-
|
|
28
|
+
s as default
|
|
34
29
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "element-plus/es/components/input/style/css";
|
|
4
|
-
import "element-plus/es/components/button/style/css";
|
|
5
|
-
import { defineComponent as h, ref as u, computed as x, onBeforeUnmount as _, watch as E, openBlock as n, createBlock as I, withCtx as r, createVNode as T, unref as a, createElementBlock as p, toDisplayString as c } from "vue";
|
|
1
|
+
import { defineComponent as b, ref as u, computed as k, onBeforeUnmount as g, watch as h, openBlock as d, createBlock as x, unref as m, withCtx as r, createVNode as B, createElementBlock as f, toDisplayString as p } from "vue";
|
|
2
|
+
import { ElInput as E, ElButton as T } from "element-plus";
|
|
6
3
|
import { timeCountDown as z } from "../../utils/time.mjs";
|
|
7
|
-
const
|
|
4
|
+
const I = { key: 0 }, K = { key: 1 }, F = /* @__PURE__ */ b({
|
|
8
5
|
__name: "FormVerifyCode",
|
|
9
6
|
props: {
|
|
10
7
|
modelValue: {},
|
|
@@ -16,57 +13,54 @@ const K = { key: 0 }, U = { key: 1 }, A = /* @__PURE__ */ h({
|
|
|
16
13
|
btnText: { default: "发送验证码" }
|
|
17
14
|
},
|
|
18
15
|
emits: ["update:modelValue"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
16
|
+
setup(t, { emit: c }) {
|
|
17
|
+
const a = t, v = c, l = u(0), o = u(!1), i = k(() => l.value > 0);
|
|
21
18
|
let e;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const y = () => {
|
|
20
|
+
o.value = !0, console.log("发送验证码"), a.api(a.params).then(() => {
|
|
21
|
+
l.value = a.hz, e == null || e(), e = z(
|
|
22
|
+
l.value,
|
|
26
23
|
(s) => {
|
|
27
|
-
|
|
24
|
+
l.value = s;
|
|
28
25
|
},
|
|
29
26
|
() => {
|
|
30
27
|
console.log("倒计时结束");
|
|
31
28
|
}
|
|
32
29
|
);
|
|
33
30
|
}).finally(() => {
|
|
34
|
-
|
|
31
|
+
o.value = !1;
|
|
35
32
|
});
|
|
36
33
|
};
|
|
37
|
-
return
|
|
34
|
+
return g(() => {
|
|
38
35
|
e == null || e();
|
|
39
|
-
}),
|
|
40
|
-
() =>
|
|
36
|
+
}), h(
|
|
37
|
+
() => a.resetKey,
|
|
41
38
|
() => {
|
|
42
|
-
e == null || e(),
|
|
39
|
+
e == null || e(), l.value = 0;
|
|
43
40
|
}
|
|
44
|
-
), (s,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_: 1
|
|
66
|
-
}, 8, ["modelValue", "disabled"]);
|
|
67
|
-
};
|
|
41
|
+
), (s, n) => (d(), x(m(E), {
|
|
42
|
+
modelValue: t.modelValue,
|
|
43
|
+
disabled: t.disabled,
|
|
44
|
+
"onUpdate:modelValue": n[0] || (n[0] = (V) => v("update:modelValue", V))
|
|
45
|
+
}, {
|
|
46
|
+
suffix: r(() => [
|
|
47
|
+
B(m(T), {
|
|
48
|
+
type: "primary",
|
|
49
|
+
link: "",
|
|
50
|
+
loading: o.value,
|
|
51
|
+
disabled: i.value || t.disabled,
|
|
52
|
+
onClick: y
|
|
53
|
+
}, {
|
|
54
|
+
default: r(() => [
|
|
55
|
+
i.value ? (d(), f("span", I, p(l.value) + "s后可重新发送", 1)) : (d(), f("span", K, p(t.btnText), 1))
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["loading", "disabled"])
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["modelValue", "disabled"]));
|
|
68
62
|
}
|
|
69
63
|
});
|
|
70
64
|
export {
|
|
71
|
-
|
|
65
|
+
F as default
|
|
72
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormVerifyImage.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-669b7ad9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
|
|
4
|
-
import { defineComponent as V, ref as r, computed as s, onMounted as _, openBlock as k, createBlock as U, normalizeStyle as u, unref as o, withCtx as I, createElementVNode as c } from "vue";
|
|
5
|
-
const R = ["disabled"], $ = ["src"], d = "9px", E = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as y, ref as m, computed as n, onMounted as h, openBlock as x, createBlock as V, unref as _, normalizeStyle as s, withCtx as k, createElementVNode as u } from "vue";
|
|
2
|
+
import { ElInput as U } from "element-plus";
|
|
3
|
+
const R = ["disabled"], $ = ["src"], d = "9px", B = /* @__PURE__ */ y({
|
|
6
4
|
__name: "FormVerifyImage",
|
|
7
5
|
props: {
|
|
8
6
|
modelValue: {},
|
|
@@ -12,49 +10,46 @@ const R = ["disabled"], $ = ["src"], d = "9px", E = /* @__PURE__ */ V({
|
|
|
12
10
|
autoRevokeUrl: { type: Boolean }
|
|
13
11
|
},
|
|
14
12
|
emits: ["update:modelValue"],
|
|
15
|
-
setup(a, { emit:
|
|
16
|
-
const e = a,
|
|
13
|
+
setup(a, { emit: c }) {
|
|
14
|
+
const e = a, f = c, l = m(!1), t = m(""), p = n(() => ({
|
|
17
15
|
left: `calc(100% + ${d})`,
|
|
18
16
|
width: `${e.imgWidth}px`
|
|
19
|
-
})), v =
|
|
17
|
+
})), v = n(() => ({
|
|
20
18
|
width: `calc(100% - ${d} - ${e.imgWidth}px)`
|
|
21
|
-
})),
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
})), o = () => {
|
|
20
|
+
l.value || (console.log("获取图片验证码"), l.value = !0, t.value && e.autoRevokeUrl && URL.revokeObjectURL(t.value), e.api(e.params).then((i) => {
|
|
21
|
+
t.value = i;
|
|
24
22
|
}).finally(() => {
|
|
25
|
-
|
|
23
|
+
l.value = !1;
|
|
26
24
|
}));
|
|
27
25
|
};
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}), (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_: 1
|
|
54
|
-
}, 8, ["modelValue", "style"]);
|
|
55
|
-
};
|
|
26
|
+
return h(() => {
|
|
27
|
+
o();
|
|
28
|
+
}), (i, r) => (x(), V(_(U), {
|
|
29
|
+
placeholder: "验证码",
|
|
30
|
+
modelValue: a.modelValue,
|
|
31
|
+
class: "form-verify-image",
|
|
32
|
+
style: s(v.value),
|
|
33
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => f("update:modelValue", g))
|
|
34
|
+
}, {
|
|
35
|
+
suffix: k(() => [
|
|
36
|
+
u("div", {
|
|
37
|
+
class: "form-verify-image-suffix",
|
|
38
|
+
style: s(p.value),
|
|
39
|
+
disabled: l.value,
|
|
40
|
+
onClick: o
|
|
41
|
+
}, [
|
|
42
|
+
u("img", {
|
|
43
|
+
class: "form-verify-image-suffix-main",
|
|
44
|
+
src: t.value,
|
|
45
|
+
alt: ""
|
|
46
|
+
}, null, 8, $)
|
|
47
|
+
], 12, R)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["modelValue", "style"]));
|
|
56
51
|
}
|
|
57
52
|
});
|
|
58
53
|
export {
|
|
59
|
-
|
|
54
|
+
B as default
|
|
60
55
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ref as m } from "vue";
|
|
2
|
+
function i(a) {
|
|
3
|
+
const e = m(!1);
|
|
4
|
+
return { submitting: e, submit: async () => {
|
|
5
|
+
var t, c;
|
|
6
|
+
e.value = !0;
|
|
7
|
+
try {
|
|
8
|
+
const r = a.getFormMainInstance();
|
|
9
|
+
await r.validate();
|
|
10
|
+
const u = r.stringify();
|
|
11
|
+
await a.submitFn(u), (t = a.onSuccess) == null || t.call(a, u);
|
|
12
|
+
} catch (r) {
|
|
13
|
+
(c = a.onFail) == null || c.call(a, r);
|
|
14
|
+
} finally {
|
|
15
|
+
e.value = !1;
|
|
16
|
+
}
|
|
17
|
+
} };
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
i as useFormSubmit
|
|
21
|
+
};
|
|
@@ -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
|
};
|