@aplus-frontend/ui 0.0.11 → 0.0.12
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/src/ap-action/item/index.vue2.mjs +21 -20
- package/es/src/ap-action/style/item.css +20 -5
- package/es/src/ap-form/ap-form.vue2.mjs +27 -27
- package/es/src/ap-form/modal-form/index.vue.mjs +104 -104
- package/es/src/ap-form/style/modal-form.css +5 -1
- package/es/src/editable-table/interface.d.ts +2 -0
- package/es/src/editable-table/style/index.css +5 -1
- package/es/src/pro-form/components/form-action.vue2.mjs +8 -8
- package/es/src/theme/ap-action/item.css +20 -5
- package/es/src/theme/ap-form/modal-form.css +5 -1
- package/es/src/theme/editable-table/index.css +5 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/item.css +20 -5
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/modal-form.css +5 -1
- package/lib/src/editable-table/interface.d.ts +2 -0
- package/lib/src/editable-table/style/index.css +5 -1
- package/lib/src/pro-form/components/form-action.vue2.js +1 -1
- package/lib/src/theme/ap-action/item.css +20 -5
- package/lib/src/theme/ap-form/modal-form.css +5 -1
- package/lib/src/theme/editable-table/index.css +5 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as b, unref as n, computed as s, openBlock as t, createElementBlock as c, normalizeClass as v, createBlock as d, createCommentVNode as u, renderSlot as B, isVNode as A, resolveDynamicComponent as x, toDisplayString as h } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import I from "ant-design-vue/es/button/LoadingIcon";
|
|
4
4
|
import "../style/item.css";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
|
|
5
|
+
import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
|
|
7
|
+
const _ = { key: 1 }, G = /* @__PURE__ */ C({
|
|
7
8
|
name: "ApActionItem",
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
@@ -15,35 +16,35 @@ const I = { key: 1 }, V = /* @__PURE__ */ y({
|
|
|
15
16
|
onClick: {},
|
|
16
17
|
loading: { type: Boolean, default: !1 }
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
20
|
-
function
|
|
19
|
+
setup(m) {
|
|
20
|
+
const e = m, { b: f, m: r, bm: p } = L("action-item"), g = N("uiMode"), l = b(!1);
|
|
21
|
+
function k(o) {
|
|
21
22
|
var i;
|
|
22
|
-
|
|
23
|
+
n(a) || e.disabled || ((i = e.onClick) == null || i.call(e, o), e.onAction && (l.value = !0, e.onAction(o).finally(() => l.value = !1)));
|
|
23
24
|
}
|
|
24
|
-
const a = s(() => e.loading ||
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
e.disabled ?
|
|
28
|
-
a.value ?
|
|
25
|
+
const a = s(() => e.loading || n(l)), y = s(() => [
|
|
26
|
+
f(),
|
|
27
|
+
p(n(g), e.color),
|
|
28
|
+
e.disabled ? r("disabled") : null,
|
|
29
|
+
a.value ? r("loading") : null
|
|
29
30
|
].filter(Boolean));
|
|
30
|
-
return (o, i) => o.visible ? (
|
|
31
|
+
return (o, i) => o.visible ? (t(), c("span", {
|
|
31
32
|
key: 0,
|
|
32
|
-
onClick:
|
|
33
|
-
class:
|
|
33
|
+
onClick: k,
|
|
34
|
+
class: v(y.value)
|
|
34
35
|
}, [
|
|
35
|
-
a.value ? (
|
|
36
|
+
a.value ? (t(), d(n(I), {
|
|
36
37
|
key: 0,
|
|
37
38
|
prefixCls: "btn",
|
|
38
39
|
existIcon: !1,
|
|
39
40
|
loading: ""
|
|
40
41
|
})) : u("", !0),
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
B(o.$slots, "default", {}, () => [
|
|
43
|
+
A(o.text) ? (t(), d(x(o.text), { key: 0 })) : (t(), c("span", _, h(o.text || ""), 1))
|
|
43
44
|
])
|
|
44
45
|
], 2)) : u("", !0);
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
G as default
|
|
49
50
|
};
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
line-height: 22px;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
.aplus-action-item--primary {
|
|
7
|
+
.aplus-action-item-aplus--primary {
|
|
8
8
|
color: #0070ff;
|
|
9
9
|
}
|
|
10
|
-
.aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
|
|
10
|
+
.aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
|
|
11
11
|
color: #66a9ff;
|
|
12
12
|
}
|
|
13
|
-
.aplus-action-item--
|
|
13
|
+
.aplus-action-item-admin--primary {
|
|
14
|
+
color: #1890FF;
|
|
15
|
+
}
|
|
16
|
+
.aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
|
|
17
|
+
color: #5EB1FF;
|
|
18
|
+
}
|
|
19
|
+
.aplus-action-item-aplus--success {
|
|
14
20
|
color: #2ed1a3;
|
|
15
21
|
}
|
|
16
|
-
.aplus-action-item--error {
|
|
22
|
+
.aplus-action-item-aplus--error {
|
|
17
23
|
color: #FF4D4F;
|
|
18
24
|
}
|
|
19
|
-
.aplus-action-item--warn {
|
|
25
|
+
.aplus-action-item-aplus--warn {
|
|
20
26
|
color: #FFA940;
|
|
21
27
|
}
|
|
28
|
+
.aplus-action-item-admin--success {
|
|
29
|
+
color: #52C41A;
|
|
30
|
+
}
|
|
31
|
+
.aplus-action-item-admin--error {
|
|
32
|
+
color: #FF4D4F;
|
|
33
|
+
}
|
|
34
|
+
.aplus-action-item-admin--warn {
|
|
35
|
+
color: #FAAD14;
|
|
36
|
+
}
|
|
22
37
|
.aplus-action-item--loading {
|
|
23
38
|
opacity: 0.35;
|
|
24
39
|
transition: opacity 0.2s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useProvideForm as
|
|
1
|
+
import { defineComponent as b, ref as R, reactive as k, toRaw as x, computed as M, openBlock as T, createBlock as w, unref as W, mergeProps as q, withCtx as z, renderSlot as A } from "vue";
|
|
2
|
+
import { Form as E } from "ant-design-vue";
|
|
3
|
+
import { useProvideForm as O } from "./context.mjs";
|
|
4
4
|
import { isArray as y } from "lodash-unified";
|
|
5
|
-
const
|
|
5
|
+
const L = /* @__PURE__ */ b({
|
|
6
6
|
__name: "ap-form",
|
|
7
7
|
props: {
|
|
8
8
|
layout: { default: "horizontal" },
|
|
@@ -35,27 +35,27 @@ const I = /* @__PURE__ */ b({
|
|
|
35
35
|
function _(e, t) {
|
|
36
36
|
var V;
|
|
37
37
|
if (y(e)) {
|
|
38
|
-
let
|
|
39
|
-
for (let
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
let n = o;
|
|
39
|
+
for (let u = 0; u < e.length - 1; u++)
|
|
40
|
+
n = n[e[u]];
|
|
41
|
+
n[e[e.length - 1]] = t;
|
|
42
42
|
} else
|
|
43
43
|
o[e] = t;
|
|
44
44
|
let l = y(e) ? e[0] : e;
|
|
45
45
|
(V = r.onValuesChange) == null || V.call(r, { [l]: o[l] }, o), s();
|
|
46
46
|
}
|
|
47
|
-
const a =
|
|
47
|
+
const a = R(), o = k(r.initialValues || {});
|
|
48
48
|
let i = [];
|
|
49
|
-
const
|
|
49
|
+
const d = (e) => {
|
|
50
50
|
var t;
|
|
51
51
|
(t = a.value) == null || t.resetFields(e), s();
|
|
52
|
-
},
|
|
52
|
+
}, f = (e) => {
|
|
53
53
|
var t;
|
|
54
54
|
(t = a.value) == null || t.clearValidate(e);
|
|
55
|
-
},
|
|
55
|
+
}, c = (e, t) => {
|
|
56
56
|
var l;
|
|
57
57
|
return (l = a.value) == null ? void 0 : l.validateFields(e, t);
|
|
58
|
-
},
|
|
58
|
+
}, p = (e) => {
|
|
59
59
|
var t;
|
|
60
60
|
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
61
61
|
}, h = (e, t) => {
|
|
@@ -76,20 +76,20 @@ const I = /* @__PURE__ */ b({
|
|
|
76
76
|
}
|
|
77
77
|
function s() {
|
|
78
78
|
if (i.length) {
|
|
79
|
-
const e =
|
|
79
|
+
const e = x(o);
|
|
80
80
|
i.forEach((t) => {
|
|
81
81
|
t(e);
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return O({
|
|
86
86
|
model: M(() => o),
|
|
87
87
|
updateModel: _,
|
|
88
88
|
formInstance: {
|
|
89
|
-
resetFields:
|
|
90
|
-
clearValidate:
|
|
91
|
-
validateFields:
|
|
92
|
-
getFieldsValue:
|
|
89
|
+
resetFields: d,
|
|
90
|
+
clearValidate: f,
|
|
91
|
+
validateFields: c,
|
|
92
|
+
getFieldsValue: p,
|
|
93
93
|
validate: h,
|
|
94
94
|
scrollToField: g,
|
|
95
95
|
setFieldsValue: F,
|
|
@@ -97,26 +97,26 @@ const I = /* @__PURE__ */ b({
|
|
|
97
97
|
registerWatch: v
|
|
98
98
|
}
|
|
99
99
|
}), B({
|
|
100
|
-
resetFields:
|
|
101
|
-
clearValidate:
|
|
102
|
-
validateFields:
|
|
103
|
-
getFieldsValue:
|
|
100
|
+
resetFields: d,
|
|
101
|
+
clearValidate: f,
|
|
102
|
+
validateFields: c,
|
|
103
|
+
getFieldsValue: p,
|
|
104
104
|
validate: h,
|
|
105
105
|
scrollToField: g,
|
|
106
106
|
setFieldsValue: F,
|
|
107
107
|
setFieldValue: m,
|
|
108
108
|
registerWatch: v
|
|
109
|
-
}), (e, t) => (
|
|
109
|
+
}), (e, t) => (T(), w(W(E), q({
|
|
110
110
|
ref_key: "formRef",
|
|
111
111
|
ref: a
|
|
112
112
|
}, r, { model: o }), {
|
|
113
|
-
default:
|
|
114
|
-
|
|
113
|
+
default: z(() => [
|
|
114
|
+
A(e.$slots, "default")
|
|
115
115
|
]),
|
|
116
116
|
_: 3
|
|
117
117
|
}, 16, ["model"]));
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
export {
|
|
121
|
-
|
|
121
|
+
L as default
|
|
122
122
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { isVNode as U, defineComponent as $, useSlots as q, ref as F, watch as D, cloneVNode as L, computed as A, createVNode as u, mergeProps as p, unref as i, openBlock as g, createElementBlock as G, Fragment as W, withCtx as y, renderSlot as w, createTextVNode as H, toDisplayString as J, createElementVNode as K, normalizeClass as Q, createBlock as x, resolveDynamicComponent as T } from "vue";
|
|
2
|
+
import { Button as V, Flex as X, Modal as Y } from "ant-design-vue";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { getSingleVNode as
|
|
5
|
+
import { getSingleVNode as Z } from "../../utils/slot.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { omit as
|
|
7
|
+
import { omit as I } from "lodash-unified";
|
|
8
8
|
import "../style/modal-form.css";
|
|
9
|
-
import { convertReactiveToRaw as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import { convertReactiveToRaw as ee } from "../../utils/index.mjs";
|
|
10
|
+
import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useGlobalConfig as oe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import ie from "../ap-form.vue2.mjs";
|
|
15
|
+
function se(d) {
|
|
16
|
+
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !U(d);
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const Pe = /* @__PURE__ */ $({
|
|
18
19
|
__name: "index",
|
|
19
20
|
props: {
|
|
20
21
|
layout: {
|
|
@@ -85,155 +86,154 @@ const xe = /* @__PURE__ */ L({
|
|
|
85
86
|
},
|
|
86
87
|
emits: ["update:open"],
|
|
87
88
|
setup(d, {
|
|
88
|
-
expose:
|
|
89
|
-
emit:
|
|
89
|
+
expose: N,
|
|
90
|
+
emit: P
|
|
90
91
|
}) {
|
|
91
|
-
const
|
|
92
|
-
value:
|
|
93
|
-
updateValue:
|
|
94
|
-
} =
|
|
92
|
+
const o = d, b = q(), S = P, a = F(), c = F(), r = F(!1), {
|
|
93
|
+
value: _,
|
|
94
|
+
updateValue: m
|
|
95
|
+
} = te(o, S, {
|
|
95
96
|
valuePropName: "open",
|
|
96
97
|
defaultValue: !1
|
|
97
98
|
}), {
|
|
98
99
|
t: v
|
|
99
|
-
} =
|
|
100
|
-
b:
|
|
101
|
-
e:
|
|
102
|
-
} =
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
|
|
100
|
+
} = le(), h = oe("uiMode"), {
|
|
101
|
+
b: R,
|
|
102
|
+
e: C
|
|
103
|
+
} = ae("ap-form-modal-form");
|
|
104
|
+
D(() => a.value, (e) => {
|
|
105
|
+
var t;
|
|
106
|
+
e && c.value && ((t = e.setFieldsValue) == null || t.call(e, c.value), c.value = void 0);
|
|
106
107
|
});
|
|
107
|
-
const
|
|
108
|
+
const B = Z(b.trigger), M = B ? L(B, {
|
|
108
109
|
onClick: () => {
|
|
109
|
-
|
|
110
|
+
m(!0);
|
|
110
111
|
}
|
|
111
|
-
}) : null,
|
|
112
|
-
var
|
|
113
|
-
let t;
|
|
112
|
+
}) : null, j = A(() => {
|
|
113
|
+
var t, l, n, f;
|
|
114
114
|
const e = [];
|
|
115
|
-
if (
|
|
115
|
+
if (o.submitter === !1)
|
|
116
116
|
return null;
|
|
117
|
-
if (
|
|
117
|
+
if (o.showCancel) {
|
|
118
118
|
let s;
|
|
119
|
-
e.push(
|
|
120
|
-
onClick:
|
|
121
|
-
disabled:
|
|
122
|
-
},
|
|
119
|
+
e.push(u(V, {
|
|
120
|
+
onClick: k,
|
|
121
|
+
disabled: r.value
|
|
122
|
+
}, se(s = v("ap.common.cancelText")) ? s : {
|
|
123
123
|
default: () => [s]
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
return ((
|
|
126
|
+
return ((t = o.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(u(V, p(((l = o.submitter) == null ? void 0 : l.resetButtonProps) || {}, {
|
|
127
127
|
key: "submit",
|
|
128
|
-
disabled:
|
|
129
|
-
onClick:
|
|
128
|
+
disabled: r.value,
|
|
129
|
+
onClick: O
|
|
130
130
|
}), {
|
|
131
131
|
default: () => {
|
|
132
132
|
var s;
|
|
133
|
-
return [((s =
|
|
133
|
+
return [((s = o.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
|
|
134
134
|
}
|
|
135
|
-
})), ((
|
|
135
|
+
})), ((n = o.submitter) == null ? void 0 : n.submitButtonProps) !== !1 && e.push(u(V, p({
|
|
136
136
|
type: "primary",
|
|
137
137
|
key: "submit"
|
|
138
|
-
}, ((
|
|
139
|
-
loading:
|
|
138
|
+
}, ((f = o.submitter) == null ? void 0 : f.submitButtonProps) || {}, {
|
|
139
|
+
loading: r.value,
|
|
140
140
|
onClick: z
|
|
141
141
|
}), {
|
|
142
142
|
default: () => {
|
|
143
143
|
var s;
|
|
144
|
-
return [((s =
|
|
144
|
+
return [((s = o.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
|
|
145
145
|
}
|
|
146
|
-
})),
|
|
146
|
+
})), u(X, {
|
|
147
147
|
justify: "flex-end",
|
|
148
|
-
class:
|
|
149
|
-
}, C(t = b.submitter(e)) ? t : {
|
|
150
|
-
default: () => [t]
|
|
151
|
-
}) : n(S, {
|
|
152
|
-
justify: "flex-end",
|
|
153
|
-
class: B("footer")
|
|
148
|
+
class: C(i(h) === "admin" ? "footer-admin" : "footer")
|
|
154
149
|
}, {
|
|
155
|
-
default: () => [
|
|
156
|
-
default: () => [e]
|
|
157
|
-
})]
|
|
150
|
+
default: () => [b.submitter ? b.submitter(e) : e]
|
|
158
151
|
});
|
|
159
152
|
});
|
|
160
|
-
function
|
|
161
|
-
var
|
|
162
|
-
|
|
153
|
+
function O() {
|
|
154
|
+
var e, t, l;
|
|
155
|
+
o.submitter !== !1 && ((e = a.value) == null || e.resetFields(), (l = (t = o.submitter) == null ? void 0 : t.onReset) == null || l.call(t));
|
|
163
156
|
}
|
|
164
157
|
async function z() {
|
|
165
|
-
var
|
|
166
|
-
if (
|
|
158
|
+
var e, t, l, n;
|
|
159
|
+
if (o.submitter !== !1)
|
|
167
160
|
try {
|
|
168
|
-
const
|
|
169
|
-
(l = (
|
|
161
|
+
const f = await ((e = a.value) == null ? void 0 : e.validateFields());
|
|
162
|
+
(l = (t = o.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((n = o.onFinish) == null ? void 0 : n.call(o, ee(f))) && m(!1);
|
|
170
163
|
} finally {
|
|
171
|
-
|
|
164
|
+
r.value = !1;
|
|
172
165
|
}
|
|
173
166
|
}
|
|
174
|
-
function
|
|
175
|
-
r
|
|
167
|
+
function k() {
|
|
168
|
+
i(r) || m(!1);
|
|
176
169
|
}
|
|
177
|
-
function
|
|
178
|
-
!
|
|
170
|
+
function E(e) {
|
|
171
|
+
!e && i(r) || m(e);
|
|
179
172
|
}
|
|
180
|
-
return
|
|
181
|
-
resetFields: (
|
|
182
|
-
var
|
|
183
|
-
(
|
|
173
|
+
return N({
|
|
174
|
+
resetFields: (e) => {
|
|
175
|
+
var t;
|
|
176
|
+
(t = a.value) == null || t.resetFields(e);
|
|
184
177
|
},
|
|
185
|
-
clearValidate: (
|
|
186
|
-
var
|
|
187
|
-
(
|
|
178
|
+
clearValidate: (e) => {
|
|
179
|
+
var t;
|
|
180
|
+
(t = a.value) == null || t.clearValidate(e);
|
|
188
181
|
},
|
|
189
|
-
validateFields: (
|
|
182
|
+
validateFields: (e, t) => {
|
|
190
183
|
var l;
|
|
191
|
-
return (l =
|
|
184
|
+
return (l = a.value) == null ? void 0 : l.validateFields(e, t);
|
|
192
185
|
},
|
|
193
|
-
getFieldsValue: (
|
|
194
|
-
var
|
|
195
|
-
return (
|
|
186
|
+
getFieldsValue: (e) => {
|
|
187
|
+
var t;
|
|
188
|
+
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
196
189
|
},
|
|
197
|
-
validate: (
|
|
190
|
+
validate: (e, t) => {
|
|
198
191
|
var l;
|
|
199
|
-
return (l =
|
|
192
|
+
return (l = a.value) == null ? void 0 : l.validate(e, t);
|
|
200
193
|
},
|
|
201
|
-
scrollToField: (
|
|
194
|
+
scrollToField: (e, t = {}) => {
|
|
202
195
|
var l;
|
|
203
|
-
(l =
|
|
196
|
+
(l = a.value) == null || l.scrollToField(e, t);
|
|
204
197
|
},
|
|
205
|
-
setFieldValue: (
|
|
206
|
-
var l,
|
|
207
|
-
(
|
|
198
|
+
setFieldValue: (e, t) => {
|
|
199
|
+
var l, n;
|
|
200
|
+
(n = (l = a.value) == null ? void 0 : l.setFieldValue) == null || n.call(l, e, t);
|
|
208
201
|
},
|
|
209
|
-
setFieldsValue: (
|
|
210
|
-
var
|
|
211
|
-
if (!
|
|
212
|
-
c.value =
|
|
202
|
+
setFieldsValue: (e) => {
|
|
203
|
+
var t, l;
|
|
204
|
+
if (!a.value) {
|
|
205
|
+
c.value = e;
|
|
213
206
|
return;
|
|
214
207
|
}
|
|
215
|
-
(l = (
|
|
208
|
+
(l = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
|
|
216
209
|
}
|
|
217
|
-
}), (
|
|
218
|
-
open:
|
|
219
|
-
"onUpdate:open":
|
|
220
|
-
onCancel:
|
|
210
|
+
}), (e, t) => (g(), G(W, null, [u(i(Y), p(e.modalProps, {
|
|
211
|
+
open: i(_),
|
|
212
|
+
"onUpdate:open": E,
|
|
213
|
+
onCancel: k,
|
|
221
214
|
footer: null,
|
|
222
|
-
width:
|
|
223
|
-
class:
|
|
215
|
+
width: e.width,
|
|
216
|
+
class: i(R)(),
|
|
217
|
+
"body-style": {
|
|
218
|
+
padding: i(h) === "admin" ? "0px !important" : "20px !important"
|
|
219
|
+
// 这里使用内联样式目的是为了使用最高优先级覆盖设置的全局样式
|
|
220
|
+
// 使用ModalForm你可能无法再自定义body的样式
|
|
221
|
+
}
|
|
224
222
|
}), {
|
|
225
|
-
title:
|
|
226
|
-
default:
|
|
223
|
+
title: y(() => [w(e.$slots, "title", {}, () => [H(J(o.title), 1)])]),
|
|
224
|
+
default: y(() => [K("div", {
|
|
225
|
+
class: Q(i(C)(i(h) === "admin" ? "content-admin" : "content"))
|
|
226
|
+
}, [u(ie, p({
|
|
227
227
|
ref_key: "formRef",
|
|
228
|
-
ref:
|
|
229
|
-
},
|
|
230
|
-
default:
|
|
228
|
+
ref: a
|
|
229
|
+
}, i(I)(o, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
230
|
+
default: y(() => [w(e.$slots, "default")]),
|
|
231
231
|
_: 3
|
|
232
|
-
}, 16), (g(),
|
|
232
|
+
}, 16)], 2), (g(), x(T(j.value)))]),
|
|
233
233
|
_: 3
|
|
234
|
-
}, 16, ["open", "width", "class"]), (g(),
|
|
234
|
+
}, 16, ["open", "width", "class", "body-style"]), (g(), x(T(i(M))))], 64));
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
237
|
export {
|
|
238
|
-
|
|
238
|
+
Pe as default
|
|
239
239
|
};
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
border-bottom: 1px solid #E9EDF3;
|
|
7
7
|
margin-bottom: 0;
|
|
8
8
|
}
|
|
9
|
-
.aplus-ap-form-modal-
|
|
9
|
+
.aplus-ap-form-modal-form__content-admin {
|
|
10
10
|
padding: 20px;
|
|
11
11
|
}
|
|
12
12
|
.aplus-ap-form-modal-form__footer {
|
|
13
13
|
padding-top: 20px;
|
|
14
14
|
}
|
|
15
|
+
.aplus-ap-form-modal-form__footer-admin {
|
|
16
|
+
border-top: 1px solid #E9EDF3;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
}
|
|
15
19
|
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
20
|
top: 16px;
|
|
17
21
|
}
|
|
@@ -68,4 +68,6 @@ export type EditableTableExpose<ModelType = any> = {
|
|
|
68
68
|
resetFields: (name?: NamePath) => void;
|
|
69
69
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
|
|
70
70
|
getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<ModelType> | undefined;
|
|
71
|
+
add: (defaultValue?: any) => void;
|
|
72
|
+
remove: (index: number) => void;
|
|
71
73
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
.aplus-editable-table .ant-table-cell:has(> .ant-form-item) {
|
|
2
|
+
padding-top: 20px !important;
|
|
3
|
+
padding-bottom: 0 !important;
|
|
4
|
+
}
|
|
1
5
|
.aplus-editable-table .ant-form-item {
|
|
2
|
-
margin-bottom:
|
|
6
|
+
margin-bottom: 20px;
|
|
3
7
|
}
|
|
4
8
|
.aplus-editable-table__header-cell--required {
|
|
5
9
|
color: #FF4D4F;
|
|
@@ -55,24 +55,24 @@ const X = /* @__PURE__ */ T({
|
|
|
55
55
|
g(e(G).Item, null, {
|
|
56
56
|
default: o(() => [
|
|
57
57
|
i(t.$slots, "resetBefore"),
|
|
58
|
-
t.
|
|
58
|
+
t.showSubmitButton ? (a(), l(e(f), m({
|
|
59
59
|
key: 0,
|
|
60
|
-
type: "
|
|
60
|
+
type: "primary",
|
|
61
61
|
class: e(c)("button", "space")
|
|
62
|
-
},
|
|
62
|
+
}, v.value, { onClick: e(x) }), {
|
|
63
63
|
default: o(() => [
|
|
64
|
-
p(d(
|
|
64
|
+
p(d(v.value.text), 1)
|
|
65
65
|
]),
|
|
66
66
|
_: 1
|
|
67
67
|
}, 16, ["class", "onClick"])) : r("", !0),
|
|
68
68
|
i(t.$slots, "submitBefore"),
|
|
69
|
-
t.
|
|
69
|
+
t.showResetButton ? (a(), l(e(f), m({
|
|
70
70
|
key: 1,
|
|
71
|
-
type: "
|
|
71
|
+
type: "default",
|
|
72
72
|
class: e(c)("button", "space")
|
|
73
|
-
},
|
|
73
|
+
}, y.value, { onClick: e(w) }), {
|
|
74
74
|
default: o(() => [
|
|
75
|
-
p(d(
|
|
75
|
+
p(d(y.value.text), 1)
|
|
76
76
|
]),
|
|
77
77
|
_: 1
|
|
78
78
|
}, 16, ["class", "onClick"])) : r("", !0),
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
line-height: 22px;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
.aplus-action-item--primary {
|
|
7
|
+
.aplus-action-item-aplus--primary {
|
|
8
8
|
color: #0070ff;
|
|
9
9
|
}
|
|
10
|
-
.aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
|
|
10
|
+
.aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
|
|
11
11
|
color: #66a9ff;
|
|
12
12
|
}
|
|
13
|
-
.aplus-action-item--
|
|
13
|
+
.aplus-action-item-admin--primary {
|
|
14
|
+
color: #1890FF;
|
|
15
|
+
}
|
|
16
|
+
.aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
|
|
17
|
+
color: #5EB1FF;
|
|
18
|
+
}
|
|
19
|
+
.aplus-action-item-aplus--success {
|
|
14
20
|
color: #2ed1a3;
|
|
15
21
|
}
|
|
16
|
-
.aplus-action-item--error {
|
|
22
|
+
.aplus-action-item-aplus--error {
|
|
17
23
|
color: #FF4D4F;
|
|
18
24
|
}
|
|
19
|
-
.aplus-action-item--warn {
|
|
25
|
+
.aplus-action-item-aplus--warn {
|
|
20
26
|
color: #FFA940;
|
|
21
27
|
}
|
|
28
|
+
.aplus-action-item-admin--success {
|
|
29
|
+
color: #52C41A;
|
|
30
|
+
}
|
|
31
|
+
.aplus-action-item-admin--error {
|
|
32
|
+
color: #FF4D4F;
|
|
33
|
+
}
|
|
34
|
+
.aplus-action-item-admin--warn {
|
|
35
|
+
color: #FAAD14;
|
|
36
|
+
}
|
|
22
37
|
.aplus-action-item--loading {
|
|
23
38
|
opacity: 0.35;
|
|
24
39
|
transition: opacity 0.2s;
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
border-bottom: 1px solid #E9EDF3;
|
|
7
7
|
margin-bottom: 0;
|
|
8
8
|
}
|
|
9
|
-
.aplus-ap-form-modal-
|
|
9
|
+
.aplus-ap-form-modal-form__content-admin {
|
|
10
10
|
padding: 20px;
|
|
11
11
|
}
|
|
12
12
|
.aplus-ap-form-modal-form__footer {
|
|
13
13
|
padding-top: 20px;
|
|
14
14
|
}
|
|
15
|
+
.aplus-ap-form-modal-form__footer-admin {
|
|
16
|
+
border-top: 1px solid #E9EDF3;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
}
|
|
15
19
|
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
20
|
top: 16px;
|
|
17
21
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
.aplus-editable-table .ant-table-cell:has(> .ant-form-item) {
|
|
2
|
+
padding-top: 20px !important;
|
|
3
|
+
padding-bottom: 0 !important;
|
|
4
|
+
}
|
|
1
5
|
.aplus-editable-table .ant-form-item {
|
|
2
|
-
margin-bottom:
|
|
6
|
+
margin-bottom: 20px;
|
|
3
7
|
}
|
|
4
8
|
.aplus-editable-table__header-cell--required {
|
|
5
9
|
color: #FF4D4F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const m=require("ant-design-vue/es/button/LoadingIcon");require("../style/item.css");const p=require("../../config-provider/hooks/use-namespace.js"),k=require("../../config-provider/hooks/use-global-config.js"),g={key:1},b=e.defineComponent({name:"ApActionItem",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{},onClick:{},loading:{type:Boolean,default:!1}},setup(r){const o=r,{b:s,m:i,bm:u}=p.useNamespace("action-item"),c=k.useGlobalConfig("uiMode"),t=e.ref(!1);function d(n){var a;e.unref(l)||o.disabled||((a=o.onClick)==null||a.call(o,n),o.onAction&&(t.value=!0,o.onAction(n).finally(()=>t.value=!1)))}const l=e.computed(()=>o.loading||e.unref(t)),f=e.computed(()=>[s(),u(e.unref(c),o.color),o.disabled?i("disabled"):null,l.value?i("loading"):null].filter(Boolean));return(n,a)=>n.visible?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:d,class:e.normalizeClass(f.value)},[l.value?(e.openBlock(),e.createBlock(e.unref(m),{key:0,prefixCls:"btn",existIcon:!1,loading:""})):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},()=>[e.isVNode(n.text)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.text),{key:0})):(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(n.text||""),1))])],2)):e.createCommentVNode("",!0)}});exports.default=b;
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
line-height: 22px;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
.aplus-action-item--primary {
|
|
7
|
+
.aplus-action-item-aplus--primary {
|
|
8
8
|
color: #0070ff;
|
|
9
9
|
}
|
|
10
|
-
.aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
|
|
10
|
+
.aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
|
|
11
11
|
color: #66a9ff;
|
|
12
12
|
}
|
|
13
|
-
.aplus-action-item--
|
|
13
|
+
.aplus-action-item-admin--primary {
|
|
14
|
+
color: #1890FF;
|
|
15
|
+
}
|
|
16
|
+
.aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
|
|
17
|
+
color: #5EB1FF;
|
|
18
|
+
}
|
|
19
|
+
.aplus-action-item-aplus--success {
|
|
14
20
|
color: #2ed1a3;
|
|
15
21
|
}
|
|
16
|
-
.aplus-action-item--error {
|
|
22
|
+
.aplus-action-item-aplus--error {
|
|
17
23
|
color: #FF4D4F;
|
|
18
24
|
}
|
|
19
|
-
.aplus-action-item--warn {
|
|
25
|
+
.aplus-action-item-aplus--warn {
|
|
20
26
|
color: #FFA940;
|
|
21
27
|
}
|
|
28
|
+
.aplus-action-item-admin--success {
|
|
29
|
+
color: #52C41A;
|
|
30
|
+
}
|
|
31
|
+
.aplus-action-item-admin--error {
|
|
32
|
+
color: #FF4D4F;
|
|
33
|
+
}
|
|
34
|
+
.aplus-action-item-admin--warn {
|
|
35
|
+
color: #FAAD14;
|
|
36
|
+
}
|
|
22
37
|
.aplus-action-item--loading {
|
|
23
38
|
opacity: 0.35;
|
|
24
39
|
transition: opacity 0.2s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),q=require("ant-design-vue"),M=require("./context.js"),C=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),q=require("ant-design-vue"),M=require("./context.js"),C=require("lodash-unified"),R=a.defineComponent({__name:"ap-form",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{}},setup(_,{expose:b}){const i=_;function B(e,t){var m;if(C.isArray(e)){let u=o;for(let d=0;d<e.length-1;d++)u=u[e[d]];u[e[e.length-1]]=t}else o[e]=t;let l=C.isArray(e)?e[0]:e;(m=i.onValuesChange)==null||m.call(i,{[l]:o[l]},o),n()}const r=a.ref(),o=a.reactive(i.initialValues||{});let s=[];const c=e=>{var t;(t=r.value)==null||t.resetFields(e),n()},f=e=>{var t;(t=r.value)==null||t.clearValidate(e)},g=(e,t)=>{var l;return(l=r.value)==null?void 0:l.validateFields(e,t)},h=e=>{var t;return(t=r.value)==null?void 0:t.getFieldsValue(e)},p=(e,t)=>{var l;return(l=r.value)==null?void 0:l.validate(e,t)},v=(e,t={})=>{var l;(l=r.value)==null||l.scrollToField(e,t)},F=e=>{Object.assign(o,e),n()},y=(e,t)=>{o[e]=t,n()};function V(e){return s.push(e),()=>{s=s.filter(t=>t!==e)}}function n(){if(s.length){const e=a.toRaw(o);s.forEach(t=>{t(e)})}}return M.useProvideForm({model:a.computed(()=>o),updateModel:B,formInstance:{resetFields:c,clearValidate:f,validateFields:g,getFieldsValue:h,validate:p,scrollToField:v,setFieldsValue:F,setFieldValue:y,registerWatch:V}}),b({resetFields:c,clearValidate:f,validateFields:g,getFieldsValue:h,validate:p,scrollToField:v,setFieldsValue:F,setFieldValue:y,registerWatch:V}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(q.Form),a.mergeProps({ref_key:"formRef",ref:r},i,{model:o}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["model"]))}});exports.default=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("ant-design-vue");require("../ap-form.vue.js");require("../../hooks/index.js");const P=require("../../utils/slot.js");require("../../config-provider/index.js");const T=require("lodash-unified");require("../style/modal-form.css");const S=require("../../utils/index.js"),M=require("../../hooks/useControllableValue.js"),R=require("../../config-provider/hooks/use-locale.js"),j=require("../../config-provider/hooks/use-global-config.js"),O=require("../../config-provider/hooks/use-namespace.js"),D=require("../ap-form.vue2.js");function U(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!e.isVNode(u)}const z=e.defineComponent({__name:"index",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinishFailed:{},onValidate:{},initialValues:{},open:{type:Boolean,default:void 0},"onUpdate:open":{},modalProps:{default:()=>({})},title:{},width:{default:800},onFinish:{},submitter:{type:[Boolean,Object],default:()=>({resetButtonProps:!1})},showCancel:{type:Boolean,default:!0}},emits:["update:open"],setup(u,{expose:F,emit:y}){const o=u,m=e.useSlots(),C=y,n=e.ref(),c=e.ref(),i=e.ref(!1),{value:B,updateValue:f}=M.useControllableValue(o,C,{valuePropName:"open",defaultValue:!1}),{t:b}=R.useLocale(),v=j.useGlobalConfig("uiMode"),{b:k,e:g}=O.useNamespace("ap-form-modal-form");e.watch(()=>n.value,t=>{var l;t&&c.value&&((l=t.setFieldsValue)==null||l.call(t,c.value),c.value=void 0)});const h=P.getSingleVNode(m.trigger),q=h?e.cloneVNode(h,{onClick:()=>{f(!0)}}):null,N=e.computed(()=>{var l,a,r,p;const t=[];if(o.submitter===!1)return null;if(o.showCancel){let s;t.push(e.createVNode(d.Button,{onClick:V,disabled:i.value},U(s=b("ap.common.cancelText"))?s:{default:()=>[s]}))}return((l=o.submitter)==null?void 0:l.resetButtonProps)!==!1&&t.push(e.createVNode(d.Button,e.mergeProps(((a=o.submitter)==null?void 0:a.resetButtonProps)||{},{key:"submit",disabled:i.value,onClick:_}),{default:()=>{var s;return[((s=o.submitter)==null?void 0:s.resetText)||b("ap.common.resetText")]}})),((r=o.submitter)==null?void 0:r.submitButtonProps)!==!1&&t.push(e.createVNode(d.Button,e.mergeProps({type:"primary",key:"submit"},((p=o.submitter)==null?void 0:p.submitButtonProps)||{},{loading:i.value,onClick:w}),{default:()=>{var s;return[((s=o.submitter)==null?void 0:s.submitText)||b("ap.common.okText")]}})),e.createVNode(d.Flex,{justify:"flex-end",class:g(e.unref(v)==="admin"?"footer-admin":"footer")},{default:()=>[m.submitter?m.submitter(t):t]})});function _(){var t,l,a;o.submitter!==!1&&((t=n.value)==null||t.resetFields(),(a=(l=o.submitter)==null?void 0:l.onReset)==null||a.call(l))}async function w(){var t,l,a,r;if(o.submitter!==!1)try{const p=await((t=n.value)==null?void 0:t.validateFields());(a=(l=o.submitter)==null?void 0:l.onSubmit)==null||a.call(l),i.value=!0,await((r=o.onFinish)==null?void 0:r.call(o,S.convertReactiveToRaw(p)))&&f(!1)}finally{i.value=!1}}function V(){e.unref(i)||f(!1)}function x(t){!t&&e.unref(i)||f(t)}return F({resetFields:t=>{var l;(l=n.value)==null||l.resetFields(t)},clearValidate:t=>{var l;(l=n.value)==null||l.clearValidate(t)},validateFields:(t,l)=>{var a;return(a=n.value)==null?void 0:a.validateFields(t,l)},getFieldsValue:t=>{var l;return(l=n.value)==null?void 0:l.getFieldsValue(t)},validate:(t,l)=>{var a;return(a=n.value)==null?void 0:a.validate(t,l)},scrollToField:(t,l={})=>{var a;(a=n.value)==null||a.scrollToField(t,l)},setFieldValue:(t,l)=>{var a,r;(r=(a=n.value)==null?void 0:a.setFieldValue)==null||r.call(a,t,l)},setFieldsValue:t=>{var l,a;if(!n.value){c.value=t;return}(a=(l=n.value)==null?void 0:l.setFieldsValue)==null||a.call(l,t)}}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(d.Modal),e.mergeProps(t.modalProps,{open:e.unref(B),"onUpdate:open":x,onCancel:V,footer:null,width:t.width,class:e.unref(k)(),"body-style":{padding:e.unref(v)==="admin"?"0px !important":"20px !important"}}),{title:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(g)(e.unref(v)==="admin"?"content-admin":"content"))},[e.createVNode(D.default,e.mergeProps({ref_key:"formRef",ref:n},e.unref(T.omit)(o,["modalProps","open","onUpdate:open","title","width","onFinish","submitter"])),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)],2),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N.value)))]),_:3},16,["open","width","class","body-style"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))],64))}});exports.default=z;
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
border-bottom: 1px solid #E9EDF3;
|
|
7
7
|
margin-bottom: 0;
|
|
8
8
|
}
|
|
9
|
-
.aplus-ap-form-modal-
|
|
9
|
+
.aplus-ap-form-modal-form__content-admin {
|
|
10
10
|
padding: 20px;
|
|
11
11
|
}
|
|
12
12
|
.aplus-ap-form-modal-form__footer {
|
|
13
13
|
padding-top: 20px;
|
|
14
14
|
}
|
|
15
|
+
.aplus-ap-form-modal-form__footer-admin {
|
|
16
|
+
border-top: 1px solid #E9EDF3;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
}
|
|
15
19
|
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
20
|
top: 16px;
|
|
17
21
|
}
|
|
@@ -68,4 +68,6 @@ export type EditableTableExpose<ModelType = any> = {
|
|
|
68
68
|
resetFields: (name?: NamePath) => void;
|
|
69
69
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
|
|
70
70
|
getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<ModelType> | undefined;
|
|
71
|
+
add: (defaultValue?: any) => void;
|
|
72
|
+
remove: (index: number) => void;
|
|
71
73
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
.aplus-editable-table .ant-table-cell:has(> .ant-form-item) {
|
|
2
|
+
padding-top: 20px !important;
|
|
3
|
+
padding-bottom: 0 !important;
|
|
4
|
+
}
|
|
1
5
|
.aplus-editable-table .ant-form-item {
|
|
2
|
-
margin-bottom:
|
|
6
|
+
margin-bottom: 20px;
|
|
3
7
|
}
|
|
4
8
|
.aplus-editable-table__header-cell--required {
|
|
5
9
|
color: #FF4D4F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("ant-design-vue"),r=require("../../base-button/index.js"),v=require("../../basic/index.js"),h=require("../hooks/use-form-context.js");require("../../config-provider/index.js");require("./style/form-action.css");const k=require("../../config-provider/hooks/use-global-config.js"),x=require("../../config-provider/hooks/use-locale.js"),A=require("../../config-provider/hooks/use-namespace.js"),b=e.defineComponent({name:"BasicFormAction",__name:"form-action",props:{showActionButtonGroup:{type:Boolean,default:!0},showResetButton:{type:Boolean,default:!0},showSubmitButton:{type:Boolean,default:!0},showAdvancedButton:{type:Boolean,default:!0},resetButtonOptions:{default:()=>({})},submitButtonOptions:{},actionColOptions:{default:()=>({})},actionSpan:{default:6},isAdvanced:{type:Boolean},hideAdvanceBtn:{type:Boolean}},emits:["toggle-advanced"],setup(i,{emit:d}){const n=i,p=d,m=k.useGlobalConfig("uiMode"),B=e.computed(()=>m.value==="aplus"?{}:{color:"#34b77c"}),{t:o}=x.useLocale(),{em:s}=A.useNamespace("form-action"),{resetAction:f,submitAction:y}=h.useFormContext(),a=e.computed(()=>{const{actionColOptions:t}=n;return{style:{textAlign:"right",flex:1,maxWidth:"100%",minWidth:"25%"},...t}}),u=e.computed(()=>Object.assign({text:o("ap.common.resetText")},n.resetButtonOptions)),l=e.computed(()=>Object.assign({text:o("ap.common.queryText")},n.submitButtonOptions));function C(){p("toggle-advanced")}return(t,g)=>t.showActionButtonGroup?(e.openBlock(),e.createBlock(e.unref(c.Col),e.normalizeProps(e.mergeProps({key:0},a.value)),{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{width:"100%"},{textAlign:a.value.style.textAlign}])},[e.createVNode(e.unref(c.Form).Item,null,{default:e.withCtx(()=>[e.renderSlot(t.$slots,"resetBefore"),t.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("ant-design-vue"),r=require("../../base-button/index.js"),v=require("../../basic/index.js"),h=require("../hooks/use-form-context.js");require("../../config-provider/index.js");require("./style/form-action.css");const k=require("../../config-provider/hooks/use-global-config.js"),x=require("../../config-provider/hooks/use-locale.js"),A=require("../../config-provider/hooks/use-namespace.js"),b=e.defineComponent({name:"BasicFormAction",__name:"form-action",props:{showActionButtonGroup:{type:Boolean,default:!0},showResetButton:{type:Boolean,default:!0},showSubmitButton:{type:Boolean,default:!0},showAdvancedButton:{type:Boolean,default:!0},resetButtonOptions:{default:()=>({})},submitButtonOptions:{},actionColOptions:{default:()=>({})},actionSpan:{default:6},isAdvanced:{type:Boolean},hideAdvanceBtn:{type:Boolean}},emits:["toggle-advanced"],setup(i,{emit:d}){const n=i,p=d,m=k.useGlobalConfig("uiMode"),B=e.computed(()=>m.value==="aplus"?{}:{color:"#34b77c"}),{t:o}=x.useLocale(),{em:s}=A.useNamespace("form-action"),{resetAction:f,submitAction:y}=h.useFormContext(),a=e.computed(()=>{const{actionColOptions:t}=n;return{style:{textAlign:"right",flex:1,maxWidth:"100%",minWidth:"25%"},...t}}),u=e.computed(()=>Object.assign({text:o("ap.common.resetText")},n.resetButtonOptions)),l=e.computed(()=>Object.assign({text:o("ap.common.queryText")},n.submitButtonOptions));function C(){p("toggle-advanced")}return(t,g)=>t.showActionButtonGroup?(e.openBlock(),e.createBlock(e.unref(c.Col),e.normalizeProps(e.mergeProps({key:0},a.value)),{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{width:"100%"},{textAlign:a.value.style.textAlign}])},[e.createVNode(e.unref(c.Form).Item,null,{default:e.withCtx(()=>[e.renderSlot(t.$slots,"resetBefore"),t.showSubmitButton?(e.openBlock(),e.createBlock(e.unref(r.BaseButton),e.mergeProps({key:0,type:"primary",class:e.unref(s)("button","space")},l.value,{onClick:e.unref(y)}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.text),1)]),_:1},16,["class","onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"submitBefore"),t.showResetButton?(e.openBlock(),e.createBlock(e.unref(r.BaseButton),e.mergeProps({key:1,type:"default",class:e.unref(s)("button","space")},u.value,{onClick:e.unref(f)}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value.text),1)]),_:1},16,["class","onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"advanceBefore"),t.showAdvancedButton&&!t.hideAdvanceBtn?(e.openBlock(),e.createBlock(e.unref(r.BaseButton),{key:2,type:"link",size:"small",style:e.normalizeStyle(B.value),onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.isAdvanced?e.unref(o)("ap.common.closeText"):e.unref(o)("ap.common.expandText"))+" ",1),e.createVNode(e.unref(v.BasicArrow),{class:e.normalizeClass(e.unref(s)("item","space")),expand:!t.isAdvanced,up:""},null,8,["class","expand"])]),_:1},8,["style"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"advanceAfter")]),_:3})],4)]),_:3},16)):e.createCommentVNode("",!0)}});exports.default=b;
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
line-height: 22px;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
.aplus-action-item--primary {
|
|
7
|
+
.aplus-action-item-aplus--primary {
|
|
8
8
|
color: #0070ff;
|
|
9
9
|
}
|
|
10
|
-
.aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
|
|
10
|
+
.aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
|
|
11
11
|
color: #66a9ff;
|
|
12
12
|
}
|
|
13
|
-
.aplus-action-item--
|
|
13
|
+
.aplus-action-item-admin--primary {
|
|
14
|
+
color: #1890FF;
|
|
15
|
+
}
|
|
16
|
+
.aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
|
|
17
|
+
color: #5EB1FF;
|
|
18
|
+
}
|
|
19
|
+
.aplus-action-item-aplus--success {
|
|
14
20
|
color: #2ed1a3;
|
|
15
21
|
}
|
|
16
|
-
.aplus-action-item--error {
|
|
22
|
+
.aplus-action-item-aplus--error {
|
|
17
23
|
color: #FF4D4F;
|
|
18
24
|
}
|
|
19
|
-
.aplus-action-item--warn {
|
|
25
|
+
.aplus-action-item-aplus--warn {
|
|
20
26
|
color: #FFA940;
|
|
21
27
|
}
|
|
28
|
+
.aplus-action-item-admin--success {
|
|
29
|
+
color: #52C41A;
|
|
30
|
+
}
|
|
31
|
+
.aplus-action-item-admin--error {
|
|
32
|
+
color: #FF4D4F;
|
|
33
|
+
}
|
|
34
|
+
.aplus-action-item-admin--warn {
|
|
35
|
+
color: #FAAD14;
|
|
36
|
+
}
|
|
22
37
|
.aplus-action-item--loading {
|
|
23
38
|
opacity: 0.35;
|
|
24
39
|
transition: opacity 0.2s;
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
border-bottom: 1px solid #E9EDF3;
|
|
7
7
|
margin-bottom: 0;
|
|
8
8
|
}
|
|
9
|
-
.aplus-ap-form-modal-
|
|
9
|
+
.aplus-ap-form-modal-form__content-admin {
|
|
10
10
|
padding: 20px;
|
|
11
11
|
}
|
|
12
12
|
.aplus-ap-form-modal-form__footer {
|
|
13
13
|
padding-top: 20px;
|
|
14
14
|
}
|
|
15
|
+
.aplus-ap-form-modal-form__footer-admin {
|
|
16
|
+
border-top: 1px solid #E9EDF3;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
}
|
|
15
19
|
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
20
|
top: 16px;
|
|
17
21
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
.aplus-editable-table .ant-table-cell:has(> .ant-form-item) {
|
|
2
|
+
padding-top: 20px !important;
|
|
3
|
+
padding-bottom: 0 !important;
|
|
4
|
+
}
|
|
1
5
|
.aplus-editable-table .ant-form-item {
|
|
2
|
-
margin-bottom:
|
|
6
|
+
margin-bottom: 20px;
|
|
3
7
|
}
|
|
4
8
|
.aplus-editable-table__header-cell--required {
|
|
5
9
|
color: #FF4D4F;
|