@aplus-frontend/ui 0.0.32 → 0.0.34
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/index.mjs +217 -215
- package/es/src/ap-field/select/index.vue.mjs +36 -32
- package/es/src/ap-form/ap-form-item-group/helper.d.ts +7 -0
- package/es/src/ap-form/ap-form-item-group/helper.mjs +30 -25
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +30 -31
- package/es/src/ap-form/ap-form.vue2.mjs +11 -11
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -1
- package/es/src/ap-form/modal-form/index.vue.mjs +43 -39
- package/es/src/ap-form/search-form/index.vue.mjs +79 -78
- package/es/src/ap-modal/utils/createModal.mjs +34 -31
- package/es/src/ap-table/ap-table.vue.d.ts +54 -11
- package/es/src/ap-table/ap-table.vue.mjs +171 -148
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +47 -46
- package/es/src/ap-table/hooks/use-table-row-selection.d.ts +60 -0
- package/es/src/ap-table/hooks/use-table-row-selection.mjs +62 -0
- package/es/src/ap-table/interface.d.ts +14 -2
- package/es/src/ap-table/style/ap-table.css +2 -0
- package/es/src/ap-tag/ap-tag-group.vue.d.ts +16 -6
- package/es/src/ap-tag/ap-tag-group.vue.mjs +81 -61
- package/es/src/ap-tag/interface.d.ts +24 -0
- package/es/src/ap-tag/style/ap-tag-group.css +8 -0
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -3
- package/es/src/ap-upload/hooks/useOss.d.ts +3 -3
- package/es/src/business/ap-select-layout/index.css +117 -0
- package/es/src/business/ap-select-layout/index.d.ts +4 -0
- package/es/src/business/ap-select-layout/interface.d.ts +9 -0
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +76 -0
- package/es/src/business/ap-select-layout/select-layout.vue.mjs +4 -0
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +145 -0
- package/es/src/business/index.d.ts +76 -1
- package/es/src/business/index.mjs +9 -6
- package/es/src/config-provider/config-provider.d.ts +144 -1
- package/es/src/config-provider/config-provider.mjs +35 -29
- package/es/src/config-provider/index.mjs +22 -20
- package/es/src/design-token/index.mjs +6 -2
- package/es/src/editable-table/form-item.vue.d.ts +7 -7
- package/es/src/editable-table/form-item.vue.mjs +2 -2
- package/es/src/editable-table/index.vue.d.ts +7 -7
- package/es/src/editable-table/index.vue.mjs +10 -10
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/index.mjs +188 -186
- package/es/src/theme/ap-select-layout/ap-select-layout.css +117 -0
- package/es/src/theme/ap-table/ap-table.css +2 -0
- package/es/src/theme/ap-tag/ap-tag-group.css +8 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/helper.d.ts +7 -0
- package/lib/src/ap-form/ap-form-item-group/helper.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +54 -11
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +60 -0
- package/lib/src/ap-table/hooks/use-table-row-selection.js +1 -0
- package/lib/src/ap-table/interface.d.ts +14 -2
- package/lib/src/ap-table/style/ap-table.css +2 -0
- package/lib/src/ap-tag/ap-tag-group.vue.d.ts +16 -6
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +24 -0
- package/lib/src/ap-tag/style/ap-tag-group.css +8 -0
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -3
- package/lib/src/ap-upload/hooks/useOss.d.ts +3 -3
- package/lib/src/business/ap-select-layout/index.css +117 -0
- package/lib/src/business/ap-select-layout/index.d.ts +4 -0
- package/lib/src/business/ap-select-layout/interface.d.ts +9 -0
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +76 -0
- package/lib/src/business/ap-select-layout/select-layout.vue.js +1 -0
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -0
- package/lib/src/business/index.d.ts +76 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +144 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/index.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +7 -7
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +7 -7
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-select-layout/ap-select-layout.css +117 -0
- package/lib/src/theme/ap-table/ap-table.css +2 -0
- package/lib/src/theme/ap-tag/ap-tag-group.css +8 -0
- package/package.json +2 -2
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
import { isArray as f } from "lodash-unified";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { isDef as i } from "../../utils/index.mjs";
|
|
3
|
+
const s = (r) => r <= 1 ? 1 : r, n = (r, e = 1) => {
|
|
4
|
+
const t = Math.floor(24 / r), o = t * e;
|
|
5
|
+
return o > 24 ? t : o;
|
|
6
|
+
}, p = (r, e = 1) => ({
|
|
7
|
+
xs: n(s(r - 3), e),
|
|
8
|
+
sm: n(s(r - 2), e),
|
|
9
|
+
md: n(s(r - 1), e),
|
|
10
|
+
lg: n(s(r - 1), e),
|
|
11
|
+
xl: n(r, e),
|
|
12
|
+
xxl: n(r, e)
|
|
12
13
|
});
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
for (const
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
} else if (f(
|
|
20
|
-
const
|
|
21
|
-
|
|
14
|
+
function l(r) {
|
|
15
|
+
const e = [];
|
|
16
|
+
for (const t of r.filter(Boolean).filter((o) => o.type !== Symbol.for("v-cmt")))
|
|
17
|
+
if (t.type === Symbol.for("v-fgt")) {
|
|
18
|
+
const o = l(t.children);
|
|
19
|
+
e.push(...o);
|
|
20
|
+
} else if (f(t)) {
|
|
21
|
+
const o = l(t);
|
|
22
|
+
e.push(...o);
|
|
22
23
|
} else
|
|
23
|
-
|
|
24
|
-
return
|
|
24
|
+
e.push(t);
|
|
25
|
+
return e;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
return
|
|
27
|
+
const a = (r) => {
|
|
28
|
+
const e = [];
|
|
29
|
+
return e.push(...l(r)), e;
|
|
29
30
|
};
|
|
31
|
+
function h(r) {
|
|
32
|
+
return i(r) ? (f(r) ? r : [r]).join("") : Date.now();
|
|
33
|
+
}
|
|
30
34
|
export {
|
|
31
35
|
p as buildColSpan,
|
|
32
|
-
|
|
36
|
+
a as genRealChildren,
|
|
37
|
+
h as getStringName
|
|
33
38
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col as
|
|
3
|
-
import { pick as
|
|
4
|
-
import { apFormItemColPropKeys as
|
|
5
|
-
import { genRealChildren as
|
|
1
|
+
import { isVNode as k, defineComponent as w, useSlots as _, watch as S, shallowRef as b, computed as x, unref as n, createVNode as N, mergeProps as c, openBlock as a, createBlock as u, withCtx as R, createElementBlock as h, Fragment as j, renderList as B, resolveDynamicComponent as P } from "vue";
|
|
2
|
+
import { Col as v, Row as F } from "ant-design-vue";
|
|
3
|
+
import { pick as I } from "lodash-unified";
|
|
4
|
+
import { apFormItemColPropKeys as O } from "../constant.mjs";
|
|
5
|
+
import { genRealChildren as i, buildColSpan as V, getStringName as $ } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import "../style/ap-form-item-group.css";
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
function
|
|
10
|
-
return typeof
|
|
8
|
+
import { useNamespace as A } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
function D(o) {
|
|
10
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !k(o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const M = /* @__PURE__ */ w({
|
|
13
13
|
name: "ApFormItemGroup",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -27,38 +27,37 @@ const J = /* @__PURE__ */ _({
|
|
|
27
27
|
default: 3
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
30
|
+
setup(o) {
|
|
31
31
|
const {
|
|
32
|
-
b:
|
|
33
|
-
} =
|
|
32
|
+
b: s
|
|
33
|
+
} = A("ap-form-item-group"), {
|
|
34
34
|
countPerRow: f,
|
|
35
35
|
...d
|
|
36
|
-
} =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}), h(() => {
|
|
40
|
-
a.value = l(n.default());
|
|
36
|
+
} = o, p = _();
|
|
37
|
+
S(() => p.default(), (t) => {
|
|
38
|
+
l.value = i(t);
|
|
41
39
|
});
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
key: `${
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
const l = b(i(p.default())), g = x(() => n(l).map((t, m) => {
|
|
41
|
+
const e = t.props, r = I(e, O), y = r != null && r.span ? {} : V(f), C = !!(e != null && e.hidden);
|
|
42
|
+
return {
|
|
43
|
+
key: `${m}-${$(e.name)}`,
|
|
44
|
+
node: N(v, c(y, r, {
|
|
45
|
+
class: C ? s("col-hidden") : ""
|
|
46
|
+
}), D(t) ? t : {
|
|
47
|
+
default: () => [t]
|
|
48
|
+
})
|
|
49
|
+
};
|
|
51
50
|
}));
|
|
52
|
-
return (
|
|
53
|
-
class:
|
|
51
|
+
return (t, m) => (a(), u(n(F), c({
|
|
52
|
+
class: n(s)()
|
|
54
53
|
}, d), {
|
|
55
|
-
default:
|
|
56
|
-
key:
|
|
54
|
+
default: R(() => [(a(!0), h(j, null, B(g.value, (e) => (a(), u(P(e.node), {
|
|
55
|
+
key: e.key
|
|
57
56
|
}))), 128))]),
|
|
58
57
|
_: 1
|
|
59
58
|
}, 16, ["class"]));
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
61
|
export {
|
|
63
|
-
|
|
62
|
+
M as default
|
|
64
63
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as A, ref as E, reactive as N, nextTick as O, toRaw as m, computed as w, openBlock as j, createBlock as S, unref as C, mergeProps as W, withCtx as q, renderSlot as z } from "vue";
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useProvideForm as
|
|
4
|
-
import { isArray as g, omit as
|
|
5
|
-
import { INTERNAL_FORM_INSTANCE_MARK as
|
|
2
|
+
import { Form as D } from "ant-design-vue";
|
|
3
|
+
import { useProvideForm as L } from "./context.mjs";
|
|
4
|
+
import { isArray as g, cloneDeep as P, omit as K } from "lodash-unified";
|
|
5
|
+
import { INTERNAL_FORM_INSTANCE_MARK as $ } from "./constant.mjs";
|
|
6
6
|
import { isDef as p } from "../utils/index.mjs";
|
|
7
|
-
const
|
|
7
|
+
const Y = /* @__PURE__ */ A({
|
|
8
8
|
__name: "ap-form",
|
|
9
9
|
props: {
|
|
10
10
|
layout: { default: "horizontal" },
|
|
@@ -53,7 +53,7 @@ const X = /* @__PURE__ */ A({
|
|
|
53
53
|
const R = () => {
|
|
54
54
|
var e;
|
|
55
55
|
(e = i.value) == null || e.resetFields(), O(() => {
|
|
56
|
-
Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, f), d();
|
|
56
|
+
Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, P(f)), d();
|
|
57
57
|
});
|
|
58
58
|
}, B = (e) => {
|
|
59
59
|
var t;
|
|
@@ -91,7 +91,7 @@ const X = /* @__PURE__ */ A({
|
|
|
91
91
|
f[t] = e;
|
|
92
92
|
}
|
|
93
93
|
function x(e) {
|
|
94
|
-
if (e !==
|
|
94
|
+
if (e !== $) {
|
|
95
95
|
console.warn("getInternalInstance should only used at internal");
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
@@ -108,7 +108,7 @@ const X = /* @__PURE__ */ A({
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
return
|
|
111
|
+
return L({
|
|
112
112
|
model: w(() => o),
|
|
113
113
|
updateModel: h,
|
|
114
114
|
internalInstance: {
|
|
@@ -127,10 +127,10 @@ const X = /* @__PURE__ */ A({
|
|
|
127
127
|
setFieldValue: F,
|
|
128
128
|
registerWatch: c,
|
|
129
129
|
getInternalInstance: x
|
|
130
|
-
}), (e, t) => (j(), S(C(
|
|
130
|
+
}), (e, t) => (j(), S(C(D), W({
|
|
131
131
|
ref_key: "formRef",
|
|
132
132
|
ref: i
|
|
133
|
-
}, C(
|
|
133
|
+
}, C(K)(a, ["initialValues"]), { model: o }), {
|
|
134
134
|
default: q(() => [
|
|
135
135
|
z(e.$slots, "default")
|
|
136
136
|
]),
|
|
@@ -139,5 +139,5 @@ const X = /* @__PURE__ */ A({
|
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
Y as default
|
|
143
143
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApFormModalFormProps, ApFormSubmitterConfig } from '../interface';
|
|
1
|
+
import { ApFormModalFormProps, ApFormInternalInstance, ApFormSubmitterConfig } from '../interface';
|
|
2
2
|
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
3
3
|
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
@@ -36,6 +36,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
36
36
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
37
37
|
setFieldValue: (key: string, newValue: any) => void;
|
|
38
38
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
39
|
+
getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
|
|
39
40
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
40
41
|
"update:open": (...args: any[]) => void;
|
|
41
42
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormModalFormProps>, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isVNode as $, defineComponent as q, useSlots as D, ref as
|
|
2
|
-
import { Button as V, Flex as
|
|
1
|
+
import { isVNode as $, defineComponent as q, useSlots as D, ref as h, watch as L, cloneVNode as A, computed as G, createVNode as u, mergeProps as p, unref as n, openBlock as F, createElementBlock as I, Fragment as W, withCtx as y, renderSlot as x, createTextVNode as H, toDisplayString as J, createElementVNode as K, normalizeClass as Q, createBlock as T, resolveDynamicComponent as N, createCommentVNode as X } from "vue";
|
|
2
|
+
import { Button as V, Flex as Y, Space as Z, Modal as ee } from "ant-design-vue";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import { getSingleVNode as te } from "../../utils/slot.mjs";
|
|
@@ -8,14 +8,14 @@ import { omit as le } from "lodash-unified";
|
|
|
8
8
|
import "../style/modal-form.css";
|
|
9
9
|
import { convertReactiveToRaw as ae } from "../../utils/index.mjs";
|
|
10
10
|
import { useControllableValue as oe } from "../../hooks/useControllableValue.mjs";
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
-
import { useNamespace as
|
|
11
|
+
import { useLocale as ne } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useGlobalConfig as ie } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
14
|
import re from "../ap-form.vue2.mjs";
|
|
15
15
|
function P(d) {
|
|
16
16
|
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !$(d);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const Re = /* @__PURE__ */ q({
|
|
19
19
|
__name: "index",
|
|
20
20
|
props: {
|
|
21
21
|
layout: {
|
|
@@ -89,7 +89,7 @@ const _e = /* @__PURE__ */ q({
|
|
|
89
89
|
expose: S,
|
|
90
90
|
emit: _
|
|
91
91
|
}) {
|
|
92
|
-
const a = d, b = D(), R = _, o =
|
|
92
|
+
const a = d, b = D(), R = _, o = h(), c = h(), r = h(!1), {
|
|
93
93
|
value: M,
|
|
94
94
|
updateValue: m
|
|
95
95
|
} = oe(a, R, {
|
|
@@ -97,10 +97,10 @@ const _e = /* @__PURE__ */ q({
|
|
|
97
97
|
defaultValue: !1
|
|
98
98
|
}), {
|
|
99
99
|
t: v
|
|
100
|
-
} =
|
|
100
|
+
} = ne(), g = ie("uiMode", "aplus"), {
|
|
101
101
|
b: j,
|
|
102
102
|
e: C
|
|
103
|
-
} =
|
|
103
|
+
} = se("ap-form-modal-form");
|
|
104
104
|
L(() => o.value, (e) => {
|
|
105
105
|
var t;
|
|
106
106
|
e && c.value && ((t = e.setFieldsValue) == null || t.call(e, c.value), c.value = void 0);
|
|
@@ -110,17 +110,17 @@ const _e = /* @__PURE__ */ q({
|
|
|
110
110
|
m(!0);
|
|
111
111
|
}
|
|
112
112
|
}) : null, O = G(() => {
|
|
113
|
-
var t, l,
|
|
113
|
+
var t, l, s, f;
|
|
114
114
|
const e = [];
|
|
115
115
|
if (a.submitter === !1)
|
|
116
116
|
return null;
|
|
117
117
|
if (a.showCancel) {
|
|
118
|
-
let
|
|
118
|
+
let i;
|
|
119
119
|
e.push(u(V, {
|
|
120
120
|
onClick: w,
|
|
121
121
|
disabled: r.value
|
|
122
|
-
}, P(
|
|
123
|
-
default: () => [
|
|
122
|
+
}, P(i = v("ap.common.cancelText")) ? i : {
|
|
123
|
+
default: () => [i]
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
126
|
return ((t = a.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(u(V, p(((l = a.submitter) == null ? void 0 : l.resetButtonProps) || {}, {
|
|
@@ -129,10 +129,10 @@ const _e = /* @__PURE__ */ q({
|
|
|
129
129
|
onClick: z
|
|
130
130
|
}), {
|
|
131
131
|
default: () => {
|
|
132
|
-
var
|
|
133
|
-
return [((
|
|
132
|
+
var i;
|
|
133
|
+
return [((i = a.submitter) == null ? void 0 : i.resetText) || v("ap.common.resetText")];
|
|
134
134
|
}
|
|
135
|
-
})), ((
|
|
135
|
+
})), ((s = a.submitter) == null ? void 0 : s.submitButtonProps) !== !1 && e.push(u(V, p({
|
|
136
136
|
type: "primary",
|
|
137
137
|
key: "submit"
|
|
138
138
|
}, ((f = a.submitter) == null ? void 0 : f.submitButtonProps) || {}, {
|
|
@@ -140,14 +140,14 @@ const _e = /* @__PURE__ */ q({
|
|
|
140
140
|
onClick: E
|
|
141
141
|
}), {
|
|
142
142
|
default: () => {
|
|
143
|
-
var
|
|
144
|
-
return [((
|
|
143
|
+
var i;
|
|
144
|
+
return [((i = a.submitter) == null ? void 0 : i.submitText) || v("ap.common.okText")];
|
|
145
145
|
}
|
|
146
|
-
})), u(
|
|
146
|
+
})), u(Y, {
|
|
147
147
|
justify: "flex-end",
|
|
148
|
-
class: C(
|
|
148
|
+
class: C(n(g) === "admin" ? "footer-admin" : "footer")
|
|
149
149
|
}, {
|
|
150
|
-
default: () => [b.submitter ? b.submitter(e) : u(
|
|
150
|
+
default: () => [b.submitter ? b.submitter(e) : u(Z, null, P(e) ? e : {
|
|
151
151
|
default: () => [e]
|
|
152
152
|
})]
|
|
153
153
|
});
|
|
@@ -157,20 +157,20 @@ const _e = /* @__PURE__ */ q({
|
|
|
157
157
|
a.submitter !== !1 && ((e = o.value) == null || e.resetFields(), (l = (t = a.submitter) == null ? void 0 : t.onReset) == null || l.call(t));
|
|
158
158
|
}
|
|
159
159
|
async function E() {
|
|
160
|
-
var e, t, l,
|
|
160
|
+
var e, t, l, s;
|
|
161
161
|
if (a.submitter !== !1)
|
|
162
162
|
try {
|
|
163
163
|
const f = await ((e = o.value) == null ? void 0 : e.validateFields());
|
|
164
|
-
(l = (t = a.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((
|
|
164
|
+
(l = (t = a.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((s = a.onFinish) == null ? void 0 : s.call(a, ae(f))) && m(!1);
|
|
165
165
|
} finally {
|
|
166
166
|
r.value = !1;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
function w() {
|
|
170
|
-
|
|
170
|
+
n(r) || m(!1);
|
|
171
171
|
}
|
|
172
172
|
function U(e) {
|
|
173
|
-
!e &&
|
|
173
|
+
!e && n(r) || m(e);
|
|
174
174
|
}
|
|
175
175
|
return S({
|
|
176
176
|
resetFields: () => {
|
|
@@ -198,8 +198,8 @@ const _e = /* @__PURE__ */ q({
|
|
|
198
198
|
(l = o.value) == null || l.scrollToField(e, t);
|
|
199
199
|
},
|
|
200
200
|
setFieldValue: (e, t) => {
|
|
201
|
-
var l,
|
|
202
|
-
(
|
|
201
|
+
var l, s;
|
|
202
|
+
(s = (l = o.value) == null ? void 0 : l.setFieldValue) == null || s.call(l, e, t);
|
|
203
203
|
},
|
|
204
204
|
setFieldsValue: (e) => {
|
|
205
205
|
var t, l;
|
|
@@ -208,36 +208,40 @@ const _e = /* @__PURE__ */ q({
|
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
(l = (t = o.value) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
|
|
211
|
+
},
|
|
212
|
+
getInternalInstance: (e) => {
|
|
213
|
+
var t;
|
|
214
|
+
return (t = o.value) == null ? void 0 : t.getInternalInstance(e);
|
|
211
215
|
}
|
|
212
|
-
}), (e, t) => (
|
|
213
|
-
open:
|
|
216
|
+
}), (e, t) => (F(), I(W, null, [u(n(ee), p(e.modalProps, {
|
|
217
|
+
open: n(M),
|
|
214
218
|
"onUpdate:open": U,
|
|
215
219
|
onCancel: w,
|
|
216
220
|
footer: null,
|
|
217
221
|
width: e.width,
|
|
218
|
-
class:
|
|
222
|
+
class: n(j)(),
|
|
219
223
|
"body-style": {
|
|
220
|
-
padding:
|
|
224
|
+
padding: n(g) === "admin" ? "0px !important" : "20px !important"
|
|
221
225
|
// 这里使用内联样式目的是为了使用最高优先级覆盖设置的全局样式
|
|
222
226
|
// 使用ModalForm你可能无法再自定义body的样式
|
|
223
227
|
}
|
|
224
228
|
}), {
|
|
225
|
-
title: y(() => [x(e.$slots, "title", {}, () => [J(
|
|
226
|
-
default: y(() => [
|
|
227
|
-
class:
|
|
229
|
+
title: y(() => [x(e.$slots, "title", {}, () => [H(J(a.title), 1)])]),
|
|
230
|
+
default: y(() => [K("div", {
|
|
231
|
+
class: Q(n(C)(n(g) === "admin" ? "content-admin" : "content"))
|
|
228
232
|
}, [u(re, p({
|
|
229
233
|
ref_key: "formRef",
|
|
230
234
|
ref: o
|
|
231
|
-
},
|
|
235
|
+
}, n(le)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
232
236
|
default: y(() => [x(e.$slots, "default")]),
|
|
233
237
|
_: 3
|
|
234
|
-
}, 16)], 2), (
|
|
238
|
+
}, 16)], 2), (F(), T(N(O.value)))]),
|
|
235
239
|
_: 3
|
|
236
|
-
}, 16, ["open", "width", "class", "body-style"]),
|
|
240
|
+
}, 16, ["open", "width", "class", "body-style"]), n(k) ? (F(), T(N(n(k)), {
|
|
237
241
|
key: 0
|
|
238
|
-
})) :
|
|
242
|
+
})) : X("", !0)], 64));
|
|
239
243
|
}
|
|
240
244
|
});
|
|
241
245
|
export {
|
|
242
|
-
|
|
246
|
+
Re as default
|
|
243
247
|
};
|