@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.
@@ -1,9 +1,10 @@
1
- import { defineComponent as y, ref as g, unref as r, computed as s, openBlock as n, createElementBlock as c, normalizeClass as C, createBlock as d, createCommentVNode as u, renderSlot as b, isVNode as v, resolveDynamicComponent as B, toDisplayString as A } from "vue";
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 x from "ant-design-vue/es/button/LoadingIcon";
3
+ import I from "ant-design-vue/es/button/LoadingIcon";
4
4
  import "../style/item.css";
5
- import { useNamespace as h } from "../../config-provider/hooks/use-namespace.mjs";
6
- const I = { key: 1 }, V = /* @__PURE__ */ y({
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(f) {
19
- const e = f, { b: m, m: t } = h("action-item"), l = g(!1);
20
- function p(o) {
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
- r(a) || e.disabled || ((i = e.onClick) == null || i.call(e, o), e.onAction && (l.value = !0, e.onAction(o).finally(() => l.value = !1)));
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 || r(l)), k = s(() => [
25
- m(),
26
- t(e.color),
27
- e.disabled ? t("disabled") : null,
28
- a.value ? t("loading") : null
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 ? (n(), c("span", {
31
+ return (o, i) => o.visible ? (t(), c("span", {
31
32
  key: 0,
32
- onClick: p,
33
- class: C(k.value)
33
+ onClick: k,
34
+ class: v(y.value)
34
35
  }, [
35
- a.value ? (n(), d(r(x), {
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
- b(o.$slots, "default", {}, () => [
42
- v(o.text) ? (n(), d(B(o.text), { key: 0 })) : (n(), c("span", I, A(o.text || ""), 1))
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
- V as default
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--success {
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 k, reactive as x, computed as M, openBlock as R, createBlock as T, unref as W, mergeProps as q, withCtx as w, renderSlot as z } from "vue";
2
- import { Form as A } from "ant-design-vue";
3
- import { useProvideForm as E } from "./context.mjs";
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 I = /* @__PURE__ */ b({
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 u = o;
39
- for (let d = 0; d < e.length - 1; d++)
40
- u = u[e[d]];
41
- u[e[e.length - 1]] = t;
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 = k(), o = x(r.initialValues || {});
47
+ const a = R(), o = k(r.initialValues || {});
48
48
  let i = [];
49
- const f = (e) => {
49
+ const d = (e) => {
50
50
  var t;
51
51
  (t = a.value) == null || t.resetFields(e), s();
52
- }, c = (e) => {
52
+ }, f = (e) => {
53
53
  var t;
54
54
  (t = a.value) == null || t.clearValidate(e);
55
- }, p = (e, t) => {
55
+ }, c = (e, t) => {
56
56
  var l;
57
57
  return (l = a.value) == null ? void 0 : l.validateFields(e, t);
58
- }, n = (e) => {
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 = n(!0);
79
+ const e = x(o);
80
80
  i.forEach((t) => {
81
81
  t(e);
82
82
  });
83
83
  }
84
84
  }
85
- return E({
85
+ return O({
86
86
  model: M(() => o),
87
87
  updateModel: _,
88
88
  formInstance: {
89
- resetFields: f,
90
- clearValidate: c,
91
- validateFields: p,
92
- getFieldsValue: n,
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: f,
101
- clearValidate: c,
102
- validateFields: p,
103
- getFieldsValue: n,
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) => (R(), T(W(A), q({
109
+ }), (e, t) => (T(), w(W(E), q({
110
110
  ref_key: "formRef",
111
111
  ref: a
112
112
  }, r, { model: o }), {
113
- default: w(() => [
114
- z(e.$slots, "default")
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
- I as default
121
+ L as default
122
122
  };
@@ -1,20 +1,21 @@
1
- import { isVNode as E, defineComponent as L, useSlots as A, ref as F, watch as W, cloneVNode as G, computed as H, createVNode as n, mergeProps as p, unref as r, openBlock as g, createElementBlock as J, Fragment as K, withCtx as V, renderSlot as x, createTextVNode as Q, toDisplayString as X, createBlock as N, resolveDynamicComponent as P } from "vue";
2
- import { Button as y, Flex as S, Space as Y, Modal as Z } from "ant-design-vue";
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 I } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as Z } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { omit as ee } from "lodash-unified";
7
+ import { omit as I } from "lodash-unified";
8
8
  import "../style/modal-form.css";
9
- import { convertReactiveToRaw as te } from "../../utils/index.mjs";
10
- import { useControllableValue as le } from "../../hooks/useControllableValue.mjs";
11
- import { useLocale as ae } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
13
- import se from "../ap-form.vue2.mjs";
14
- function C(d) {
15
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !E(d);
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 xe = /* @__PURE__ */ L({
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: R
89
+ expose: N,
90
+ emit: P
90
91
  }) {
91
- const a = d, b = A(), j = R, o = F(), c = F(), u = F(!1), {
92
- value: M,
93
- updateValue: f
94
- } = le(a, j, {
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
- } = ae(), {
100
- b: O,
101
- e: B
102
- } = oe("ap-form-modal-form");
103
- W(() => o.value, (t) => {
104
- var e;
105
- t && c.value && ((e = t.setFieldsValue) == null || e.call(t, c.value), c.value = void 0);
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 k = I(b.trigger), U = k ? G(k, {
108
+ const B = Z(b.trigger), M = B ? L(B, {
108
109
  onClick: () => {
109
- f(!0);
110
+ m(!0);
110
111
  }
111
- }) : null, $ = H(() => {
112
- var i, m, h, T;
113
- let t;
112
+ }) : null, j = A(() => {
113
+ var t, l, n, f;
114
114
  const e = [];
115
- if (a.submitter === !1)
115
+ if (o.submitter === !1)
116
116
  return null;
117
- if (a.showCancel) {
117
+ if (o.showCancel) {
118
118
  let s;
119
- e.push(n(y, {
120
- onClick: w,
121
- disabled: u.value
122
- }, C(s = v("ap.common.cancelText")) ? s : {
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 ((i = a.submitter) == null ? void 0 : i.resetButtonProps) !== !1 && e.push(n(y, p(((m = a.submitter) == null ? void 0 : m.resetButtonProps) || {}, {
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: u.value,
129
- onClick: q
128
+ disabled: r.value,
129
+ onClick: O
130
130
  }), {
131
131
  default: () => {
132
132
  var s;
133
- return [((s = a.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
133
+ return [((s = o.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
134
134
  }
135
- })), ((h = a.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && e.push(n(y, p({
135
+ })), ((n = o.submitter) == null ? void 0 : n.submitButtonProps) !== !1 && e.push(u(V, p({
136
136
  type: "primary",
137
137
  key: "submit"
138
- }, ((T = a.submitter) == null ? void 0 : T.submitButtonProps) || {}, {
139
- loading: u.value,
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 = a.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
144
+ return [((s = o.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
145
145
  }
146
- })), b.submitter ? n(S, {
146
+ })), u(X, {
147
147
  justify: "flex-end",
148
- class: B("footer")
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: () => [n(Y, null, C(e) ? e : {
156
- default: () => [e]
157
- })]
150
+ default: () => [b.submitter ? b.submitter(e) : e]
158
151
  });
159
152
  });
160
- function q() {
161
- var t, e, l;
162
- a.submitter !== !1 && ((t = o.value) == null || t.resetFields(), (l = (e = a.submitter) == null ? void 0 : e.onReset) == null || l.call(e));
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 t, e, l, i;
166
- if (a.submitter !== !1)
158
+ var e, t, l, n;
159
+ if (o.submitter !== !1)
167
160
  try {
168
- const m = await ((t = o.value) == null ? void 0 : t.validateFields());
169
- (l = (e = a.submitter) == null ? void 0 : e.onSubmit) == null || l.call(e), u.value = !0, await ((i = a.onFinish) == null ? void 0 : i.call(a, te(m))) && f(!1);
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
- u.value = !1;
164
+ r.value = !1;
172
165
  }
173
166
  }
174
- function w() {
175
- r(u) || f(!1);
167
+ function k() {
168
+ i(r) || m(!1);
176
169
  }
177
- function D(t) {
178
- !t && r(u) || f(t);
170
+ function E(e) {
171
+ !e && i(r) || m(e);
179
172
  }
180
- return _({
181
- resetFields: (t) => {
182
- var e;
183
- (e = o.value) == null || e.resetFields(t);
173
+ return N({
174
+ resetFields: (e) => {
175
+ var t;
176
+ (t = a.value) == null || t.resetFields(e);
184
177
  },
185
- clearValidate: (t) => {
186
- var e;
187
- (e = o.value) == null || e.clearValidate(t);
178
+ clearValidate: (e) => {
179
+ var t;
180
+ (t = a.value) == null || t.clearValidate(e);
188
181
  },
189
- validateFields: (t, e) => {
182
+ validateFields: (e, t) => {
190
183
  var l;
191
- return (l = o.value) == null ? void 0 : l.validateFields(t, e);
184
+ return (l = a.value) == null ? void 0 : l.validateFields(e, t);
192
185
  },
193
- getFieldsValue: (t) => {
194
- var e;
195
- return (e = o.value) == null ? void 0 : e.getFieldsValue(t);
186
+ getFieldsValue: (e) => {
187
+ var t;
188
+ return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
196
189
  },
197
- validate: (t, e) => {
190
+ validate: (e, t) => {
198
191
  var l;
199
- return (l = o.value) == null ? void 0 : l.validate(t, e);
192
+ return (l = a.value) == null ? void 0 : l.validate(e, t);
200
193
  },
201
- scrollToField: (t, e = {}) => {
194
+ scrollToField: (e, t = {}) => {
202
195
  var l;
203
- (l = o.value) == null || l.scrollToField(t, e);
196
+ (l = a.value) == null || l.scrollToField(e, t);
204
197
  },
205
- setFieldValue: (t, e) => {
206
- var l, i;
207
- (i = (l = o.value) == null ? void 0 : l.setFieldValue) == null || i.call(l, t, e);
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: (t) => {
210
- var e, l;
211
- if (!o.value) {
212
- c.value = t;
202
+ setFieldsValue: (e) => {
203
+ var t, l;
204
+ if (!a.value) {
205
+ c.value = e;
213
206
  return;
214
207
  }
215
- (l = (e = o.value) == null ? void 0 : e.setFieldsValue) == null || l.call(e, t);
208
+ (l = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
216
209
  }
217
- }), (t, e) => (g(), J(K, null, [n(r(Z), p(t.modalProps, {
218
- open: r(M),
219
- "onUpdate:open": D,
220
- onCancel: w,
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: t.width,
223
- class: r(O)()
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: V(() => [x(t.$slots, "title", {}, () => [Q(X(a.title), 1)])]),
226
- default: V(() => [n(se, p({
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: o
229
- }, r(ee)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
230
- default: V(() => [x(t.$slots, "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(), N(P($.value)))]),
232
+ }, 16)], 2), (g(), x(T(j.value)))]),
233
233
  _: 3
234
- }, 16, ["open", "width", "class"]), (g(), N(P(r(U))))], 64));
234
+ }, 16, ["open", "width", "class", "body-style"]), (g(), x(T(i(M))))], 64));
235
235
  }
236
236
  });
237
237
  export {
238
- xe as default
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-form .ant-modal-body {
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: 0;
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.showResetButton ? (a(), l(e(f), m({
58
+ t.showSubmitButton ? (a(), l(e(f), m({
59
59
  key: 0,
60
- type: "default",
60
+ type: "primary",
61
61
  class: e(c)("button", "space")
62
- }, y.value, { onClick: e(w) }), {
62
+ }, v.value, { onClick: e(x) }), {
63
63
  default: o(() => [
64
- p(d(y.value.text), 1)
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.showSubmitButton ? (a(), l(e(f), m({
69
+ t.showResetButton ? (a(), l(e(f), m({
70
70
  key: 1,
71
- type: "primary",
71
+ type: "default",
72
72
  class: e(c)("button", "space")
73
- }, v.value, { onClick: e(x) }), {
73
+ }, y.value, { onClick: e(w) }), {
74
74
  default: o(() => [
75
- p(d(v.value.text), 1)
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--success {
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-form .ant-modal-body {
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: 0;
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 d=require("ant-design-vue/es/button/LoadingIcon");require("../style/item.css");const f=require("../../config-provider/hooks/use-namespace.js"),m={key:1},p=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:t}=f.useNamespace("action-item"),l=e.ref(!1);function c(n){var i;e.unref(a)||o.disabled||((i=o.onClick)==null||i.call(o,n),o.onAction&&(l.value=!0,o.onAction(n).finally(()=>l.value=!1)))}const a=e.computed(()=>o.loading||e.unref(l)),u=e.computed(()=>[s(),t(o.color),o.disabled?t("disabled"):null,a.value?t("loading"):null].filter(Boolean));return(n,i)=>n.visible?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:c,class:e.normalizeClass(u.value)},[a.value?(e.openBlock(),e.createBlock(e.unref(d),{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",m,e.toDisplayString(n.text||""),1))])],2)):e.createCommentVNode("",!0)}});exports.default=p;
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--success {
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"),T=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 d=o;for(let c=0;c<e.length-1;c++)d=d[e[c]];d[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 f=e=>{var t;(t=r.value)==null||t.resetFields(e),n()},g=e=>{var t;(t=r.value)==null||t.clearValidate(e)},h=(e,t)=>{var l;return(l=r.value)==null?void 0:l.validateFields(e,t)},u=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=u(!0);s.forEach(t=>{t(e)})}}return M.useProvideForm({model:a.computed(()=>o),updateModel:B,formInstance:{resetFields:f,clearValidate:g,validateFields:h,getFieldsValue:u,validate:p,scrollToField:v,setFieldsValue:F,setFieldValue:y,registerWatch:V}}),b({resetFields:f,clearValidate:g,validateFields:h,getFieldsValue:u,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=T;
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"),i=require("ant-design-vue");require("../ap-form.vue.js");require("../../hooks/index.js");const T=require("../../utils/slot.js");require("../../config-provider/index.js");const R=require("lodash-unified");require("../style/modal-form.css");const j=require("../../utils/index.js"),M=require("../../hooks/useControllableValue.js"),O=require("../../config-provider/hooks/use-locale.js"),D=require("../../config-provider/hooks/use-namespace.js"),U=require("../ap-form.vue2.js");function g(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!e.isVNode(d)}const L=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(d,{expose:C,emit:B}){const o=d,m=e.useSlots(),N=B,s=e.ref(),c=e.ref(),r=e.ref(!1),{value:k,updateValue:f}=M.useControllableValue(o,N,{valuePropName:"open",defaultValue:!1}),{t:v}=O.useLocale(),{b:_,e:h}=D.useNamespace("ap-form-modal-form");e.watch(()=>s.value,l=>{var t;l&&c.value&&((t=l.setFieldsValue)==null||t.call(l,c.value),c.value=void 0)});const V=T.getSingleVNode(m.trigger),q=V?e.cloneVNode(V,{onClick:()=>{f(!0)}}):null,w=e.computed(()=>{var u,p,b,y;let l;const t=[];if(o.submitter===!1)return null;if(o.showCancel){let n;t.push(e.createVNode(i.Button,{onClick:F,disabled:r.value},g(n=v("ap.common.cancelText"))?n:{default:()=>[n]}))}return((u=o.submitter)==null?void 0:u.resetButtonProps)!==!1&&t.push(e.createVNode(i.Button,e.mergeProps(((p=o.submitter)==null?void 0:p.resetButtonProps)||{},{key:"submit",disabled:r.value,onClick:x}),{default:()=>{var n;return[((n=o.submitter)==null?void 0:n.resetText)||v("ap.common.resetText")]}})),((b=o.submitter)==null?void 0:b.submitButtonProps)!==!1&&t.push(e.createVNode(i.Button,e.mergeProps({type:"primary",key:"submit"},((y=o.submitter)==null?void 0:y.submitButtonProps)||{},{loading:r.value,onClick:P}),{default:()=>{var n;return[((n=o.submitter)==null?void 0:n.submitText)||v("ap.common.okText")]}})),m.submitter?e.createVNode(i.Flex,{justify:"flex-end",class:h("footer")},g(l=m.submitter(t))?l:{default:()=>[l]}):e.createVNode(i.Flex,{justify:"flex-end",class:h("footer")},{default:()=>[e.createVNode(i.Space,null,g(t)?t:{default:()=>[t]})]})});function x(){var l,t,a;o.submitter!==!1&&((l=s.value)==null||l.resetFields(),(a=(t=o.submitter)==null?void 0:t.onReset)==null||a.call(t))}async function P(){var l,t,a,u;if(o.submitter!==!1)try{const p=await((l=s.value)==null?void 0:l.validateFields());(a=(t=o.submitter)==null?void 0:t.onSubmit)==null||a.call(t),r.value=!0,await((u=o.onFinish)==null?void 0:u.call(o,j.convertReactiveToRaw(p)))&&f(!1)}finally{r.value=!1}}function F(){e.unref(r)||f(!1)}function S(l){!l&&e.unref(r)||f(l)}return C({resetFields:l=>{var t;(t=s.value)==null||t.resetFields(l)},clearValidate:l=>{var t;(t=s.value)==null||t.clearValidate(l)},validateFields:(l,t)=>{var a;return(a=s.value)==null?void 0:a.validateFields(l,t)},getFieldsValue:l=>{var t;return(t=s.value)==null?void 0:t.getFieldsValue(l)},validate:(l,t)=>{var a;return(a=s.value)==null?void 0:a.validate(l,t)},scrollToField:(l,t={})=>{var a;(a=s.value)==null||a.scrollToField(l,t)},setFieldValue:(l,t)=>{var a,u;(u=(a=s.value)==null?void 0:a.setFieldValue)==null||u.call(a,l,t)},setFieldsValue:l=>{var t,a;if(!s.value){c.value=l;return}(a=(t=s.value)==null?void 0:t.setFieldsValue)==null||a.call(t,l)}}),(l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(i.Modal),e.mergeProps(l.modalProps,{open:e.unref(k),"onUpdate:open":S,onCancel:F,footer:null,width:l.width,class:e.unref(_)()}),{title:e.withCtx(()=>[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),default:e.withCtx(()=>[e.createVNode(U.default,e.mergeProps({ref_key:"formRef",ref:s},e.unref(R.omit)(o,["modalProps","open","onUpdate:open","title","width","onFinish","submitter"])),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value)))]),_:3},16,["open","width","class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))],64))}});exports.default=L;
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-form .ant-modal-body {
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: 0;
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.showResetButton?(e.openBlock(),e.createBlock(e.unref(r.BaseButton),e.mergeProps({key:0,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,"submitBefore"),t.showSubmitButton?(e.openBlock(),e.createBlock(e.unref(r.BaseButton),e.mergeProps({key:1,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,"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;
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--success {
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-form .ant-modal-body {
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: 0;
6
+ margin-bottom: 20px;
3
7
  }
4
8
  .aplus-editable-table__header-cell--required {
5
9
  color: #FF4D4F;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [