@aplus-frontend/ui 0.0.1-beta.27 → 0.0.1-beta.28

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.
@@ -7,6 +7,9 @@
7
7
  .aplus-action-item--primary {
8
8
  color: #0070ff;
9
9
  }
10
+ .aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
11
+ color: #66a9ff;
12
+ }
10
13
  .aplus-action-item--success {
11
14
  color: #2ed1a3;
12
15
  }
@@ -19,6 +22,7 @@
19
22
  .aplus-action-item--loading {
20
23
  opacity: 0.35;
21
24
  transition: opacity 0.2s;
25
+ cursor: default;
22
26
  }
23
27
  .aplus-action-item--loading .btn-loading-icon {
24
28
  margin-right: 4px;
@@ -1,4 +1,4 @@
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 N, createTextVNode as Q, toDisplayString as X, createBlock as T, resolveDynamicComponent as P } from "vue";
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
2
  import { Button as y, Flex as S, Space as Y, Modal as Z } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
@@ -6,14 +6,15 @@ import { getSingleVNode as I } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
7
  import { omit as ee } from "lodash-unified";
8
8
  import "../style/modal-form.css";
9
- import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
10
- import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
12
- import oe from "../ap-form.vue2.mjs";
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";
13
14
  function C(d) {
14
15
  return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !E(d);
15
16
  }
16
- const we = /* @__PURE__ */ L({
17
+ const xe = /* @__PURE__ */ L({
17
18
  __name: "index",
18
19
  props: {
19
20
  initialValues: {},
@@ -85,20 +86,20 @@ const we = /* @__PURE__ */ L({
85
86
  emits: ["update:open"],
86
87
  setup(d, {
87
88
  expose: _,
88
- emit: j
89
+ emit: R
89
90
  }) {
90
- const a = d, b = A(), R = j, o = F(), c = F(), u = F(!1), {
91
+ const a = d, b = A(), j = R, o = F(), c = F(), u = F(!1), {
91
92
  value: M,
92
93
  updateValue: f
93
- } = te(a, R, {
94
+ } = le(a, j, {
94
95
  valuePropName: "open",
95
96
  defaultValue: !1
96
97
  }), {
97
98
  t: v
98
- } = le(), {
99
+ } = ae(), {
99
100
  b: O,
100
101
  e: B
101
- } = ae("ap-form-modal-form");
102
+ } = oe("ap-form-modal-form");
102
103
  W(() => o.value, (t) => {
103
104
  var e;
104
105
  t && c.value && ((e = t.setFieldsValue) == null || e.call(t, c.value), c.value = void 0);
@@ -108,7 +109,7 @@ const we = /* @__PURE__ */ L({
108
109
  f(!0);
109
110
  }
110
111
  }) : null, $ = H(() => {
111
- var i, m, h, x;
112
+ var i, m, h, T;
112
113
  let t;
113
114
  const e = [];
114
115
  if (a.submitter === !1)
@@ -134,7 +135,7 @@ const we = /* @__PURE__ */ L({
134
135
  })), ((h = a.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && e.push(n(y, p({
135
136
  type: "primary",
136
137
  key: "submit"
137
- }, ((x = a.submitter) == null ? void 0 : x.submitButtonProps) || {}, {
138
+ }, ((T = a.submitter) == null ? void 0 : T.submitButtonProps) || {}, {
138
139
  loading: u.value,
139
140
  onClick: z
140
141
  }), {
@@ -165,7 +166,7 @@ const we = /* @__PURE__ */ L({
165
166
  if (a.submitter !== !1)
166
167
  try {
167
168
  const m = await ((t = o.value) == null ? void 0 : t.validateFields());
168
- (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, m)) && f(!1);
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);
169
170
  } finally {
170
171
  u.value = !1;
171
172
  }
@@ -221,18 +222,18 @@ const we = /* @__PURE__ */ L({
221
222
  width: t.width,
222
223
  class: r(O)()
223
224
  }), {
224
- title: V(() => [N(t.$slots, "title", {}, () => [Q(X(a.title), 1)])]),
225
- default: V(() => [n(oe, p({
225
+ title: V(() => [x(t.$slots, "title", {}, () => [Q(X(a.title), 1)])]),
226
+ default: V(() => [n(se, p({
226
227
  ref_key: "formRef",
227
228
  ref: o
228
229
  }, r(ee)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
229
- default: V(() => [N(t.$slots, "default")]),
230
+ default: V(() => [x(t.$slots, "default")]),
230
231
  _: 3
231
- }, 16), (g(), T(P($.value)))]),
232
+ }, 16), (g(), N(P($.value)))]),
232
233
  _: 3
233
- }, 16, ["open", "width", "class"]), (g(), T(P(r(U))))], 64));
234
+ }, 16, ["open", "width", "class"]), (g(), N(P(r(U))))], 64));
234
235
  }
235
236
  });
236
237
  export {
237
- we as default
238
+ xe as default
238
239
  };
@@ -20,7 +20,8 @@
20
20
  border-width: 0 !important;
21
21
  height: 30px !important;
22
22
  }
23
- .aplus-ap-form-item--bordered .ant-select-arrow {
23
+ .aplus-ap-form-item--bordered .ant-select-arrow,
24
+ .aplus-ap-form-item--bordered .ant-picker-clear {
24
25
  inset-inline-end: 0;
25
26
  }
26
27
  .aplus-ap-form-item--bordered .ant-select-clear {
@@ -1,11 +1,11 @@
1
1
  import { unref as r, reactive as ie, ref as Y, watchEffect as Z, watch as fe, computed as E, onMounted as se } from "vue";
2
- import { useTimeoutFn as de } from "@vueuse/core";
2
+ import { useTimeoutFn as he } from "@vueuse/core";
3
3
  import { buildUUID as q } from "../../utils/uuid.mjs";
4
- import { isFunction as b, cloneDeep as he, isObject as ge, isBoolean as x, merge as me, get as J } from "lodash-unified";
5
- import { ROW_KEY as h } from "../const.mjs";
4
+ import { isFunction as b, cloneDeep as de, isObject as ge, isBoolean as x, merge as me, get as J } from "lodash-unified";
5
+ import { ROW_KEY as d } from "../const.mjs";
6
6
  import { parseRowKeyValue as Q } from "../helper.mjs";
7
7
  import "../../config-provider/index.mjs";
8
- import { useGlobalConfig as Se } from "../../config-provider/hooks/use-global-config.mjs";
8
+ import { useGlobalConfig as ve } from "../../config-provider/hooks/use-global-config.mjs";
9
9
  function Ae(u, {
10
10
  getPaginationInfo: R,
11
11
  setPagination: g,
@@ -14,7 +14,7 @@ function Ae(u, {
14
14
  clearSelectedRowKeys: X,
15
15
  tableData: $
16
16
  }, _) {
17
- const z = Se(), L = r(z).table.fetchSetting, P = r(z).table.defaultPageSize, A = ie({
17
+ const z = ve(), L = r(z).table.fetchSetting, P = r(z).table.defaultPageSize, A = ie({
18
18
  sortInfo: {},
19
19
  filterInfo: {}
20
20
  }), n = Y([]), G = Y({});
@@ -46,28 +46,26 @@ function Ae(u, {
46
46
  }
47
47
  function N(e) {
48
48
  !e || !Array.isArray(e) || e.forEach((t) => {
49
- t[h] || (t[h] = q()), t.children && t.children.length && N(t.children);
49
+ t[d] || (t[d] = q()), t.children && t.children.length && N(t.children);
50
50
  });
51
51
  }
52
52
  const K = E(() => r(u).autoCreateKey && !r(u).rowKey), C = E(() => {
53
53
  const { rowKey: e } = r(u);
54
- return r(K) ? h : e;
54
+ return r(K) ? d : e;
55
55
  });
56
56
  Z(() => {
57
- if (r(K)) {
58
- const e = r(n), t = e[0], a = e[e.length - 1];
59
- if (t && a && (!t[h] || !a[h])) {
60
- const c = he(r(n));
57
+ const e = r(n);
58
+ if (!(!e || e.length === 0) && r(K)) {
59
+ const t = e[0], a = e[e.length - 1];
60
+ if (t && a && (!t[d] || !a[d])) {
61
+ const c = de(r(n));
61
62
  c.forEach((o) => {
62
- o[h] || (o[h] = q()), o.children && o.children.length && N(o.children);
63
+ o[d] || (o[d] = q()), o.children && o.children.length && N(o.children);
63
64
  }), n.value = c;
64
65
  }
65
66
  }
66
67
  });
67
- const j = E(() => {
68
- const e = r(n);
69
- return !e || e.length === 0 ? r(n) : r(n);
70
- });
68
+ const j = E(() => r(n));
71
69
  async function p(e, t, a) {
72
70
  return n.value[e] && (n.value[e][t] = a), n.value[e];
73
71
  }
@@ -93,14 +91,14 @@ function Ae(u, {
93
91
  var T;
94
92
  if (s == null)
95
93
  return null;
96
- for (let S = 0; S < s.length; S++) {
97
- const y = s[S];
94
+ for (let v = 0; v < s.length; v++) {
95
+ const y = s[v];
98
96
  if (Q(r(C), y) === m)
99
- return { index: S, data: s };
97
+ return { index: v, data: s };
100
98
  if (((T = y.children) == null ? void 0 : T.length) > 0) {
101
- const d = f(y.children, m);
102
- if (d != null)
103
- return d;
99
+ const h = f(y.children, m);
100
+ if (h != null)
101
+ return h;
104
102
  }
105
103
  }
106
104
  return null;
@@ -143,19 +141,19 @@ function Ae(u, {
143
141
  if (!(!t || !b(t)))
144
142
  try {
145
143
  O(!0);
146
- const { pageField: m, sizeField: T, listField: S, totalField: y } = Object.assign(
144
+ const { pageField: m, sizeField: T, listField: v, totalField: y } = Object.assign(
147
145
  {},
148
146
  L,
149
147
  o
150
148
  );
151
- let d = {};
149
+ let h = {};
152
150
  const { current: U = 1, pageSize: B = P } = r(
153
151
  R
154
152
  );
155
- x(s) && !s || x(R) ? d = {} : (d[m] = e && e.page || U, d[T] = B);
153
+ x(s) && !s || x(R) ? h = {} : (h[m] = e && e.page || U, h[T] = B);
156
154
  const { sortInfo: le = {}, filterInfo: ue } = A;
157
155
  let D = me(
158
- d,
156
+ h,
159
157
  f ? V() : {},
160
158
  a,
161
159
  (e == null ? void 0 : e.searchInfo) ?? {},
@@ -166,11 +164,11 @@ function Ae(u, {
166
164
  (e == null ? void 0 : e.filterInfo) ?? {}
167
165
  );
168
166
  i && b(i) && (D = await i(D) || D);
169
- const v = await t(D);
170
- G.value = v;
171
- const H = Array.isArray(v);
172
- let w = H ? v : J(v, S);
173
- const F = H ? v.length : J(v, y);
167
+ const S = await t(D);
168
+ G.value = S;
169
+ const H = Array.isArray(S);
170
+ let w = H ? S : J(S, v);
171
+ const F = H ? S.length : J(S, y);
174
172
  if (Number(F)) {
175
173
  const W = Math.ceil(F / B);
176
174
  if (U > W)
@@ -207,7 +205,7 @@ function Ae(u, {
207
205
  return await I(e);
208
206
  }
209
207
  return se(() => {
210
- de(() => {
208
+ he(() => {
211
209
  r(u).immediate && I();
212
210
  }, 16);
213
211
  }), {
@@ -395,14 +395,24 @@
395
395
  align-items: center;
396
396
  }
397
397
  .ant-table-wrapper {
398
- border-radius: 0 !important;
398
+ padding: 12px 16px 16px;
399
+ background-color: #ffffff;
400
+ border-radius: 0;
401
+ }
402
+ .ant-table-wrapper .ant-table.ant-table-middle > .ant-table-title,
403
+ .ant-table-wrapper .ant-table.ant-table-small > .ant-table-title {
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: space-between;
407
+ min-height: 40px;
408
+ padding: 0 0 12px;
409
+ border: none;
399
410
  }
400
411
  .ant-table-wrapper .ant-table {
412
+ width: 100%;
413
+ overflow-x: hidden;
401
414
  border-radius: 0;
402
415
  }
403
- .ant-table-wrapper .ant-table div.ant-table-title {
404
- padding: 0 0 12px !important;
405
- }
406
416
  .ant-table-wrapper .ant-table .ant-table-container {
407
417
  border-radius: 0;
408
418
  }
@@ -416,8 +426,25 @@
416
426
  border-radius: 0;
417
427
  }
418
428
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-tbody > tr > td {
419
- padding: 12px 16px;
429
+ padding: 13.5px 16px;
430
+ line-height: 20px;
420
431
  }
421
432
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-thead > tr > th {
422
- padding: 12px 16px;
433
+ padding: 13.5px 16px;
434
+ line-height: 20px;
435
+ }
436
+ .ant-table-wrapper .ant-table-footer {
437
+ padding: 0;
438
+ }
439
+ .ant-table-wrapper .ant-table-footer .ant-table-wrapper {
440
+ padding: 0;
441
+ }
442
+ .ant-table-wrapper .ant-table-footer table {
443
+ border: none;
444
+ }
445
+ .ant-table-wrapper .ant-table-footer .ant-table-body {
446
+ overflow-x: hidden;
447
+ }
448
+ .ant-table-wrapper .ant-table-footer td {
449
+ padding: 12px 8px;
423
450
  }
@@ -1,12 +1,22 @@
1
1
  .ant-table-wrapper {
2
- border-radius: 0 !important;
2
+ padding: 12px 16px 16px;
3
+ background-color: #ffffff;
4
+ border-radius: 0;
5
+ }
6
+ .ant-table-wrapper .ant-table.ant-table-middle > .ant-table-title,
7
+ .ant-table-wrapper .ant-table.ant-table-small > .ant-table-title {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: space-between;
11
+ min-height: 40px;
12
+ padding: 0 0 12px;
13
+ border: none;
3
14
  }
4
15
  .ant-table-wrapper .ant-table {
16
+ width: 100%;
17
+ overflow-x: hidden;
5
18
  border-radius: 0;
6
19
  }
7
- .ant-table-wrapper .ant-table div.ant-table-title {
8
- padding: 0 0 12px !important;
9
- }
10
20
  .ant-table-wrapper .ant-table .ant-table-container {
11
21
  border-radius: 0;
12
22
  }
@@ -20,8 +30,25 @@
20
30
  border-radius: 0;
21
31
  }
22
32
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-tbody > tr > td {
23
- padding: 12px 16px;
33
+ padding: 13.5px 16px;
34
+ line-height: 20px;
24
35
  }
25
36
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-thead > tr > th {
26
- padding: 12px 16px;
37
+ padding: 13.5px 16px;
38
+ line-height: 20px;
39
+ }
40
+ .ant-table-wrapper .ant-table-footer {
41
+ padding: 0;
42
+ }
43
+ .ant-table-wrapper .ant-table-footer .ant-table-wrapper {
44
+ padding: 0;
45
+ }
46
+ .ant-table-wrapper .ant-table-footer table {
47
+ border: none;
48
+ }
49
+ .ant-table-wrapper .ant-table-footer .ant-table-body {
50
+ overflow-x: hidden;
51
+ }
52
+ .ant-table-wrapper .ant-table-footer td {
53
+ padding: 12px 8px;
27
54
  }
@@ -395,25 +395,72 @@
395
395
  justify-content: center;
396
396
  align-items: center;
397
397
  }
398
+ .ant-table-wrapper .ant-table.ant-table.ant-table-small .ant-table-title,
399
+ .ant-table-wrapper .ant-table.ant-table.ant-table-middle .ant-table-title {
400
+ display: flex;
401
+ align-items: center;
402
+ justify-content: space-between;
403
+ min-height: 40px;
404
+ padding: 0 0 10px;
405
+ border: none;
406
+ }
407
+ .ant-table-wrapper .ant-table {
408
+ width: 100%;
409
+ overflow-x: hidden;
410
+ border-radius: 0;
411
+ }
412
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header {
413
+ border-radius: 0;
414
+ }
415
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th {
416
+ color: #182948;
417
+ font-weight: 700;
418
+ font-size: 14px;
419
+ font-style: normal;
420
+ text-align: left;
421
+ text-transform: none;
422
+ background: #f2f6f9;
423
+ }
424
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th::before {
425
+ display: none;
426
+ width: 0;
427
+ visibility: hidden;
428
+ }
429
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover {
430
+ background: #f6f9fa;
431
+ }
432
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover > td {
433
+ background: #f6f9fa;
434
+ }
435
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
436
+ color: #182948;
437
+ font-weight: 400;
438
+ font-size: 14px;
439
+ font-style: normal;
440
+ text-align: left;
441
+ text-transform: none;
442
+ }
398
443
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-thead tr > th {
399
- padding: 15.5px !important;
444
+ padding: 12px 16px;
445
+ line-height: 22px;
400
446
  }
401
447
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
402
448
  border-top: 1px solid;
403
449
  border-top-color: transparent;
404
450
  }
405
451
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr > .ant-table-cell {
406
- padding: 12px !important;
452
+ padding: 12px 16px;
407
453
  line-height: 22px;
408
454
  }
409
455
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-thead tr > th {
410
- padding: 10.5px 16px !important;
456
+ padding: 10.5px 16px;
457
+ line-height: 18px;
411
458
  }
412
459
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
413
460
  border-top: 1px solid;
414
461
  border-top-color: transparent;
415
462
  }
416
463
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr > .ant-table-cell {
417
- padding: 10.5px 16px !important;
418
- line-height: 18px !important;
464
+ padding: 10.5px 16px;
465
+ line-height: 18px;
419
466
  }
@@ -1,22 +1,69 @@
1
+ .ant-table-wrapper .ant-table.ant-table.ant-table-small .ant-table-title,
2
+ .ant-table-wrapper .ant-table.ant-table.ant-table-middle .ant-table-title {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ min-height: 40px;
7
+ padding: 0 0 10px;
8
+ border: none;
9
+ }
10
+ .ant-table-wrapper .ant-table {
11
+ width: 100%;
12
+ overflow-x: hidden;
13
+ border-radius: 0;
14
+ }
15
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header {
16
+ border-radius: 0;
17
+ }
18
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th {
19
+ color: #182948;
20
+ font-weight: 700;
21
+ font-size: 14px;
22
+ font-style: normal;
23
+ text-align: left;
24
+ text-transform: none;
25
+ background: #f2f6f9;
26
+ }
27
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th::before {
28
+ display: none;
29
+ width: 0;
30
+ visibility: hidden;
31
+ }
32
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover {
33
+ background: #f6f9fa;
34
+ }
35
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover > td {
36
+ background: #f6f9fa;
37
+ }
38
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
39
+ color: #182948;
40
+ font-weight: 400;
41
+ font-size: 14px;
42
+ font-style: normal;
43
+ text-align: left;
44
+ text-transform: none;
45
+ }
1
46
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-thead tr > th {
2
- padding: 15.5px !important;
47
+ padding: 12px 16px;
48
+ line-height: 22px;
3
49
  }
4
50
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
5
51
  border-top: 1px solid;
6
52
  border-top-color: transparent;
7
53
  }
8
54
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr > .ant-table-cell {
9
- padding: 12px !important;
55
+ padding: 12px 16px;
10
56
  line-height: 22px;
11
57
  }
12
58
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-thead tr > th {
13
- padding: 10.5px 16px !important;
59
+ padding: 10.5px 16px;
60
+ line-height: 18px;
14
61
  }
15
62
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
16
63
  border-top: 1px solid;
17
64
  border-top-color: transparent;
18
65
  }
19
66
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr > .ant-table-cell {
20
- padding: 10.5px 16px !important;
21
- line-height: 18px !important;
67
+ padding: 10.5px 16px;
68
+ line-height: 18px;
22
69
  }
@@ -7,6 +7,9 @@
7
7
  .aplus-action-item--primary {
8
8
  color: #0070ff;
9
9
  }
10
+ .aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
11
+ color: #66a9ff;
12
+ }
10
13
  .aplus-action-item--success {
11
14
  color: #2ed1a3;
12
15
  }
@@ -19,6 +22,7 @@
19
22
  .aplus-action-item--loading {
20
23
  opacity: 0.35;
21
24
  transition: opacity 0.2s;
25
+ cursor: default;
22
26
  }
23
27
  .aplus-action-item--loading .btn-loading-icon {
24
28
  margin-right: 4px;
@@ -20,7 +20,8 @@
20
20
  border-width: 0 !important;
21
21
  height: 30px !important;
22
22
  }
23
- .aplus-ap-form-item--bordered .ant-select-arrow {
23
+ .aplus-ap-form-item--bordered .ant-select-arrow,
24
+ .aplus-ap-form-item--bordered .ant-picker-clear {
24
25
  inset-inline-end: 0;
25
26
  }
26
27
  .aplus-ap-form-item--bordered .ant-select-clear {
@@ -1,3 +1,5 @@
1
+ import { Recordable } from '../type';
2
+
1
3
  /**
2
4
  * @description: Set ui mount node
3
5
  */
@@ -12,3 +14,9 @@ export declare function getDynamicProps<T extends Record<string, unknown>, U>(pr
12
14
  */
13
15
  export declare function omitWhen<T extends object, K extends keyof T>(obj: T, fieldList?: K[], when?: (field: string, fieldValue: T[K]) => boolean): Omit<T, K>;
14
16
  export declare function isPascalCase(str: string): boolean;
17
+ /**
18
+ * 递归处理reactive对象转raw object
19
+ * @param obj
20
+ * @returns
21
+ */
22
+ export declare function convertReactiveToRaw(obj: Recordable<any>): Recordable<any>;
@@ -1,31 +1,43 @@
1
- import { unref as s } from "vue";
2
- function f(t) {
1
+ import { unref as u, markRaw as a } from "vue";
2
+ function l(t) {
3
3
  return (t == null ? void 0 : t.parentNode) ?? document.body;
4
4
  }
5
- function a(t) {
5
+ function y(t) {
6
6
  return typeof t < "u";
7
7
  }
8
- function l(t) {
9
- const n = {};
10
- return Object.keys(t).map((e) => {
11
- n[e] = s(t[e]);
12
- }), n;
8
+ function p(t) {
9
+ const e = {};
10
+ return Object.keys(t).map((n) => {
11
+ e[n] = u(t[n]);
12
+ }), e;
13
13
  }
14
- function p(t, n = [], e) {
15
- const r = Object.assign({}, t), i = Object.keys(r);
16
- for (let c = 0; c < i.length; c += 1) {
17
- const o = i[c];
18
- (n.includes(o) || e != null && e(o, r[o])) && delete r[o];
14
+ function m(t, e = [], n) {
15
+ const r = Object.assign({}, t), o = Object.keys(r);
16
+ for (let i = 0; i < o.length; i += 1) {
17
+ const c = o[i];
18
+ (e.includes(c) || n != null && n(c, r[c])) && delete r[c];
19
19
  }
20
20
  return r;
21
21
  }
22
22
  function g(t) {
23
23
  return /^[A-Z][A-Za-z]*$/.test(t);
24
24
  }
25
+ function s(t) {
26
+ if (Array.isArray(t))
27
+ return t.map((e) => s(e));
28
+ if (typeof t == "object" && t !== null) {
29
+ const e = {};
30
+ for (const n in t)
31
+ e[n] = s(t[n]);
32
+ return a(e);
33
+ }
34
+ return t;
35
+ }
25
36
  export {
26
- l as getDynamicProps,
27
- f as getPopupContainer,
28
- a as isDef,
37
+ s as convertReactiveToRaw,
38
+ p as getDynamicProps,
39
+ l as getPopupContainer,
40
+ y as isDef,
29
41
  g as isPascalCase,
30
- p as omitWhen
42
+ m as omitWhen
31
43
  };
@@ -7,6 +7,9 @@
7
7
  .aplus-action-item--primary {
8
8
  color: #0070ff;
9
9
  }
10
+ .aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
11
+ color: #66a9ff;
12
+ }
10
13
  .aplus-action-item--success {
11
14
  color: #2ed1a3;
12
15
  }
@@ -19,6 +22,7 @@
19
22
  .aplus-action-item--loading {
20
23
  opacity: 0.35;
21
24
  transition: opacity 0.2s;
25
+ cursor: default;
22
26
  }
23
27
  .aplus-action-item--loading .btn-loading-icon {
24
28
  margin-right: 4px;
@@ -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 j=require("lodash-unified");require("../style/modal-form.css");const M=require("../../hooks/useControllableValue.js"),O=require("../../config-provider/hooks/use-locale.js"),R=require("../../config-provider/hooks/use-namespace.js"),D=require("../ap-form.vue2.js");function g(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!e.isVNode(d)}const U=e.defineComponent({__name:"index",props:{initialValues:{},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:{},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}=R.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 n,p,b,y;let l;const t=[];if(o.submitter===!1)return null;if(o.showCancel){let u;t.push(e.createVNode(i.Button,{onClick:F,disabled:r.value},g(u=v("ap.common.cancelText"))?u:{default:()=>[u]}))}return((n=o.submitter)==null?void 0:n.resetButtonProps)!==!1&&t.push(e.createVNode(i.Button,e.mergeProps(((p=o.submitter)==null?void 0:p.resetButtonProps)||{},{key:"submit",disabled:r.value,onClick:P}),{default:()=>{var u;return[((u=o.submitter)==null?void 0:u.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:x}),{default:()=>{var u;return[((u=o.submitter)==null?void 0:u.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 P(){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 x(){var l,t,a,n;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((n=o.onFinish)==null?void 0:n.call(o,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,n;(n=(a=s.value)==null?void 0:a.setFieldValue)==null||n.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(D.default,e.mergeProps({ref_key:"formRef",ref:s},e.unref(j.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=U;
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:{initialValues:{},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:{},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;
@@ -20,7 +20,8 @@
20
20
  border-width: 0 !important;
21
21
  height: 30px !important;
22
22
  }
23
- .aplus-ap-form-item--bordered .ant-select-arrow {
23
+ .aplus-ap-form-item--bordered .ant-select-arrow,
24
+ .aplus-ap-form-item--bordered .ant-picker-clear {
24
25
  inset-inline-end: 0;
25
26
  }
26
27
  .aplus-ap-form-item--bordered .ant-select-clear {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),ue=require("@vueuse/core"),N=require("../../utils/uuid.js"),l=require("lodash-unified"),g=require("../const.js"),B=require("../helper.js");require("../../config-provider/index.js");const ae=require("../../config-provider/hooks/use-global-config.js");function ce(f,{getPaginationInfo:O,setPagination:S,setLoading:_,getFieldsValue:H,clearSelectedRowKeys:V,tableData:Z},A){const C=ae.useGlobalConfig(),J=n.unref(C).table.fetchSetting,P=n.unref(C).table.defaultPageSize,T=n.reactive({sortInfo:{},filterInfo:{}}),t=n.ref([]),q=n.ref({});n.watchEffect(()=>{Z.value=n.unref(t)}),n.watch(()=>n.unref(f).dataSource,()=>{const{dataSource:e,api:r}=n.unref(f);!r&&e&&(t.value=e)},{immediate:!0});function Q(e,r,u){const{clearSelectOnPageChange:a,sortFn:c,filterFn:i}=n.unref(f);a&&V(),S(e);const o={};if(u&&l.isFunction(c)){const s=c(u);T.sortInfo=s,o.sortInfo=s}if(r&&l.isFunction(i)){const s=i(r);T.filterInfo=s,o.filterInfo=s}I(o)}function W(e){!e||!Array.isArray(e)||e.forEach(r=>{r[g.ROW_KEY]||(r[g.ROW_KEY]=N.buildUUID()),r.children&&r.children.length&&W(r.children)})}const R=n.computed(()=>n.unref(f).autoCreateKey&&!n.unref(f).rowKey),m=n.computed(()=>{const{rowKey:e}=n.unref(f);return n.unref(R)?g.ROW_KEY:e});n.watchEffect(()=>{if(n.unref(R)){const e=n.unref(t),r=e[0],u=e[e.length-1];if(r&&u&&(!r[g.ROW_KEY]||!u[g.ROW_KEY])){const a=l.cloneDeep(n.unref(t));a.forEach(c=>{c[g.ROW_KEY]||(c[g.ROW_KEY]=N.buildUUID()),c.children&&c.children.length&&W(c.children)}),t.value=a}}});const Y=n.computed(()=>{const e=n.unref(t);return!e||e.length===0,n.unref(t)});async function X(e,r,u){return t.value[e]&&(t.value[e][r]=u),t.value[e]}function $(e,r){const u=U(e);if(u){for(const a in u)Reflect.has(r,a)&&(u[a]=r[a]);return u}}function x(e){var a;if(!t.value||t.value.length==0)return;const r=Array.isArray(e)?e:[e];function u(c,i){const o=s(c,i);if(o===null||o.index===-1)return;o.data.splice(o.index,1);function s(d,v){var K;if(d==null)return null;for(let w=0;w<d.length;w++){const F=d[w];if(B.parseRowKeyValue(n.unref(m),F)===v)return{index:w,data:d};if(((K=F.children)==null?void 0:K.length)>0){const h=s(F.children,v);if(h!=null)return h}}return null}}for(const c of r)u(t.value,c),u(n.unref(f).dataSource,c);S({total:(a=n.unref(f).dataSource)==null?void 0:a.length})}function L(e,r){var a;r=r??((a=t.value)==null?void 0:a.length);const u=l.isObject(e)?[e]:e;return n.unref(t).splice(r,0,...u),n.unref(t)}function U(e){if(!t.value||t.value.length==0)return;const{childrenColumnName:r="children"}=n.unref(f);return(a=>{let c;return a.some(function i(o){return B.parseRowKeyValue(n.unref(m),o)===e?(c=o,!0):o[r]&&o[r].some(i)}),c})(t.value)}async function I(e){const{api:r,searchInfo:u,defSort:a,fetchSetting:c,beforeFetch:i,afterFetch:o,useSearchForm:s,pagination:d}=n.unref(f);if(!(!r||!l.isFunction(r)))try{_(!0);const{pageField:v,sizeField:K,listField:w,totalField:F}=Object.assign({},J,c);let h={};const{current:G=1,pageSize:j=P}=n.unref(O);l.isBoolean(d)&&!d||l.isBoolean(O)?h={}:(h[v]=e&&e.page||G,h[K]=j);const{sortInfo:re={},filterInfo:te}=T;let D=l.merge(h,s?H():{},u,(e==null?void 0:e.searchInfo)??{},a,re,te,(e==null?void 0:e.sortInfo)??{},(e==null?void 0:e.filterInfo)??{});i&&l.isFunction(i)&&(D=await i(D)||D);const b=await r(D);q.value=b;const z=Array.isArray(b);let y=z?b:l.get(b,w);const E=z?b.length:l.get(b,F);if(Number(E)){const M=Math.ceil(E/j);if(G>M)return S({current:M}),await I(e)}return o&&l.isFunction(o)&&(y=await o(y)||y),t.value=y,S({total:E||0}),e&&e.page&&S({current:e.page||1}),A("fetch-success",{items:n.unref(y),total:E}),y}catch(v){A("fetch-error",v),t.value=[],S({total:0})}finally{_(!1)}}function k(e){t.value=e}function p(){return Y.value}function ee(){return q.value}async function ne(e){return await I(e)}return n.onMounted(()=>{ue.useTimeoutFn(()=>{n.unref(f).immediate&&I()},16)}),{getDataSourceRef:Y,getDataSource:p,getRawDataSource:ee,getRowKey:m,setTableData:k,getAutoCreateKey:R,fetch:I,reload:ne,updateTableData:X,updateTableDataRecord:$,deleteTableDataRecord:x,insertTableDataRecord:L,findTableDataRecord:U,handleTableChange:Q}}exports.useDataSource=ce;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),ue=require("@vueuse/core"),N=require("../../utils/uuid.js"),l=require("lodash-unified"),g=require("../const.js"),B=require("../helper.js");require("../../config-provider/index.js");const ae=require("../../config-provider/hooks/use-global-config.js");function ce(f,{getPaginationInfo:O,setPagination:S,setLoading:_,getFieldsValue:H,clearSelectedRowKeys:V,tableData:Z},A){const C=ae.useGlobalConfig(),J=n.unref(C).table.fetchSetting,P=n.unref(C).table.defaultPageSize,T=n.reactive({sortInfo:{},filterInfo:{}}),t=n.ref([]),q=n.ref({});n.watchEffect(()=>{Z.value=n.unref(t)}),n.watch(()=>n.unref(f).dataSource,()=>{const{dataSource:e,api:r}=n.unref(f);!r&&e&&(t.value=e)},{immediate:!0});function Q(e,r,u){const{clearSelectOnPageChange:a,sortFn:c,filterFn:i}=n.unref(f);a&&V(),S(e);const o={};if(u&&l.isFunction(c)){const s=c(u);T.sortInfo=s,o.sortInfo=s}if(r&&l.isFunction(i)){const s=i(r);T.filterInfo=s,o.filterInfo=s}I(o)}function W(e){!e||!Array.isArray(e)||e.forEach(r=>{r[g.ROW_KEY]||(r[g.ROW_KEY]=N.buildUUID()),r.children&&r.children.length&&W(r.children)})}const R=n.computed(()=>n.unref(f).autoCreateKey&&!n.unref(f).rowKey),m=n.computed(()=>{const{rowKey:e}=n.unref(f);return n.unref(R)?g.ROW_KEY:e});n.watchEffect(()=>{const e=n.unref(t);if(!(!e||e.length===0)&&n.unref(R)){const r=e[0],u=e[e.length-1];if(r&&u&&(!r[g.ROW_KEY]||!u[g.ROW_KEY])){const a=l.cloneDeep(n.unref(t));a.forEach(c=>{c[g.ROW_KEY]||(c[g.ROW_KEY]=N.buildUUID()),c.children&&c.children.length&&W(c.children)}),t.value=a}}});const Y=n.computed(()=>n.unref(t));async function X(e,r,u){return t.value[e]&&(t.value[e][r]=u),t.value[e]}function $(e,r){const u=U(e);if(u){for(const a in u)Reflect.has(r,a)&&(u[a]=r[a]);return u}}function x(e){var a;if(!t.value||t.value.length==0)return;const r=Array.isArray(e)?e:[e];function u(c,i){const o=s(c,i);if(o===null||o.index===-1)return;o.data.splice(o.index,1);function s(d,v){var K;if(d==null)return null;for(let w=0;w<d.length;w++){const F=d[w];if(B.parseRowKeyValue(n.unref(m),F)===v)return{index:w,data:d};if(((K=F.children)==null?void 0:K.length)>0){const h=s(F.children,v);if(h!=null)return h}}return null}}for(const c of r)u(t.value,c),u(n.unref(f).dataSource,c);S({total:(a=n.unref(f).dataSource)==null?void 0:a.length})}function L(e,r){var a;r=r??((a=t.value)==null?void 0:a.length);const u=l.isObject(e)?[e]:e;return n.unref(t).splice(r,0,...u),n.unref(t)}function U(e){if(!t.value||t.value.length==0)return;const{childrenColumnName:r="children"}=n.unref(f);return(a=>{let c;return a.some(function i(o){return B.parseRowKeyValue(n.unref(m),o)===e?(c=o,!0):o[r]&&o[r].some(i)}),c})(t.value)}async function I(e){const{api:r,searchInfo:u,defSort:a,fetchSetting:c,beforeFetch:i,afterFetch:o,useSearchForm:s,pagination:d}=n.unref(f);if(!(!r||!l.isFunction(r)))try{_(!0);const{pageField:v,sizeField:K,listField:w,totalField:F}=Object.assign({},J,c);let h={};const{current:G=1,pageSize:j=P}=n.unref(O);l.isBoolean(d)&&!d||l.isBoolean(O)?h={}:(h[v]=e&&e.page||G,h[K]=j);const{sortInfo:re={},filterInfo:te}=T;let D=l.merge(h,s?H():{},u,(e==null?void 0:e.searchInfo)??{},a,re,te,(e==null?void 0:e.sortInfo)??{},(e==null?void 0:e.filterInfo)??{});i&&l.isFunction(i)&&(D=await i(D)||D);const b=await r(D);q.value=b;const z=Array.isArray(b);let y=z?b:l.get(b,w);const E=z?b.length:l.get(b,F);if(Number(E)){const M=Math.ceil(E/j);if(G>M)return S({current:M}),await I(e)}return o&&l.isFunction(o)&&(y=await o(y)||y),t.value=y,S({total:E||0}),e&&e.page&&S({current:e.page||1}),A("fetch-success",{items:n.unref(y),total:E}),y}catch(v){A("fetch-error",v),t.value=[],S({total:0})}finally{_(!1)}}function k(e){t.value=e}function p(){return Y.value}function ee(){return q.value}async function ne(e){return await I(e)}return n.onMounted(()=>{ue.useTimeoutFn(()=>{n.unref(f).immediate&&I()},16)}),{getDataSourceRef:Y,getDataSource:p,getRawDataSource:ee,getRowKey:m,setTableData:k,getAutoCreateKey:R,fetch:I,reload:ne,updateTableData:X,updateTableDataRecord:$,deleteTableDataRecord:x,insertTableDataRecord:L,findTableDataRecord:U,handleTableChange:Q}}exports.useDataSource=ce;
@@ -395,14 +395,24 @@
395
395
  align-items: center;
396
396
  }
397
397
  .ant-table-wrapper {
398
- border-radius: 0 !important;
398
+ padding: 12px 16px 16px;
399
+ background-color: #ffffff;
400
+ border-radius: 0;
401
+ }
402
+ .ant-table-wrapper .ant-table.ant-table-middle > .ant-table-title,
403
+ .ant-table-wrapper .ant-table.ant-table-small > .ant-table-title {
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: space-between;
407
+ min-height: 40px;
408
+ padding: 0 0 12px;
409
+ border: none;
399
410
  }
400
411
  .ant-table-wrapper .ant-table {
412
+ width: 100%;
413
+ overflow-x: hidden;
401
414
  border-radius: 0;
402
415
  }
403
- .ant-table-wrapper .ant-table div.ant-table-title {
404
- padding: 0 0 12px !important;
405
- }
406
416
  .ant-table-wrapper .ant-table .ant-table-container {
407
417
  border-radius: 0;
408
418
  }
@@ -416,8 +426,25 @@
416
426
  border-radius: 0;
417
427
  }
418
428
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-tbody > tr > td {
419
- padding: 12px 16px;
429
+ padding: 13.5px 16px;
430
+ line-height: 20px;
420
431
  }
421
432
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-thead > tr > th {
422
- padding: 12px 16px;
433
+ padding: 13.5px 16px;
434
+ line-height: 20px;
435
+ }
436
+ .ant-table-wrapper .ant-table-footer {
437
+ padding: 0;
438
+ }
439
+ .ant-table-wrapper .ant-table-footer .ant-table-wrapper {
440
+ padding: 0;
441
+ }
442
+ .ant-table-wrapper .ant-table-footer table {
443
+ border: none;
444
+ }
445
+ .ant-table-wrapper .ant-table-footer .ant-table-body {
446
+ overflow-x: hidden;
447
+ }
448
+ .ant-table-wrapper .ant-table-footer td {
449
+ padding: 12px 8px;
423
450
  }
@@ -1,12 +1,22 @@
1
1
  .ant-table-wrapper {
2
- border-radius: 0 !important;
2
+ padding: 12px 16px 16px;
3
+ background-color: #ffffff;
4
+ border-radius: 0;
5
+ }
6
+ .ant-table-wrapper .ant-table.ant-table-middle > .ant-table-title,
7
+ .ant-table-wrapper .ant-table.ant-table-small > .ant-table-title {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: space-between;
11
+ min-height: 40px;
12
+ padding: 0 0 12px;
13
+ border: none;
3
14
  }
4
15
  .ant-table-wrapper .ant-table {
16
+ width: 100%;
17
+ overflow-x: hidden;
5
18
  border-radius: 0;
6
19
  }
7
- .ant-table-wrapper .ant-table div.ant-table-title {
8
- padding: 0 0 12px !important;
9
- }
10
20
  .ant-table-wrapper .ant-table .ant-table-container {
11
21
  border-radius: 0;
12
22
  }
@@ -20,8 +30,25 @@
20
30
  border-radius: 0;
21
31
  }
22
32
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-tbody > tr > td {
23
- padding: 12px 16px;
33
+ padding: 13.5px 16px;
34
+ line-height: 20px;
24
35
  }
25
36
  .ant-table-wrapper .ant-table .ant-table-container .ant-table-thead > tr > th {
26
- padding: 12px 16px;
37
+ padding: 13.5px 16px;
38
+ line-height: 20px;
39
+ }
40
+ .ant-table-wrapper .ant-table-footer {
41
+ padding: 0;
42
+ }
43
+ .ant-table-wrapper .ant-table-footer .ant-table-wrapper {
44
+ padding: 0;
45
+ }
46
+ .ant-table-wrapper .ant-table-footer table {
47
+ border: none;
48
+ }
49
+ .ant-table-wrapper .ant-table-footer .ant-table-body {
50
+ overflow-x: hidden;
51
+ }
52
+ .ant-table-wrapper .ant-table-footer td {
53
+ padding: 12px 8px;
27
54
  }
@@ -395,25 +395,72 @@
395
395
  justify-content: center;
396
396
  align-items: center;
397
397
  }
398
+ .ant-table-wrapper .ant-table.ant-table.ant-table-small .ant-table-title,
399
+ .ant-table-wrapper .ant-table.ant-table.ant-table-middle .ant-table-title {
400
+ display: flex;
401
+ align-items: center;
402
+ justify-content: space-between;
403
+ min-height: 40px;
404
+ padding: 0 0 10px;
405
+ border: none;
406
+ }
407
+ .ant-table-wrapper .ant-table {
408
+ width: 100%;
409
+ overflow-x: hidden;
410
+ border-radius: 0;
411
+ }
412
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header {
413
+ border-radius: 0;
414
+ }
415
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th {
416
+ color: #182948;
417
+ font-weight: 700;
418
+ font-size: 14px;
419
+ font-style: normal;
420
+ text-align: left;
421
+ text-transform: none;
422
+ background: #f2f6f9;
423
+ }
424
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th::before {
425
+ display: none;
426
+ width: 0;
427
+ visibility: hidden;
428
+ }
429
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover {
430
+ background: #f6f9fa;
431
+ }
432
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover > td {
433
+ background: #f6f9fa;
434
+ }
435
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
436
+ color: #182948;
437
+ font-weight: 400;
438
+ font-size: 14px;
439
+ font-style: normal;
440
+ text-align: left;
441
+ text-transform: none;
442
+ }
398
443
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-thead tr > th {
399
- padding: 15.5px !important;
444
+ padding: 12px 16px;
445
+ line-height: 22px;
400
446
  }
401
447
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
402
448
  border-top: 1px solid;
403
449
  border-top-color: transparent;
404
450
  }
405
451
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr > .ant-table-cell {
406
- padding: 12px !important;
452
+ padding: 12px 16px;
407
453
  line-height: 22px;
408
454
  }
409
455
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-thead tr > th {
410
- padding: 10.5px 16px !important;
456
+ padding: 10.5px 16px;
457
+ line-height: 18px;
411
458
  }
412
459
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
413
460
  border-top: 1px solid;
414
461
  border-top-color: transparent;
415
462
  }
416
463
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr > .ant-table-cell {
417
- padding: 10.5px 16px !important;
418
- line-height: 18px !important;
464
+ padding: 10.5px 16px;
465
+ line-height: 18px;
419
466
  }
@@ -1,22 +1,69 @@
1
+ .ant-table-wrapper .ant-table.ant-table.ant-table-small .ant-table-title,
2
+ .ant-table-wrapper .ant-table.ant-table.ant-table-middle .ant-table-title {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ min-height: 40px;
7
+ padding: 0 0 10px;
8
+ border: none;
9
+ }
10
+ .ant-table-wrapper .ant-table {
11
+ width: 100%;
12
+ overflow-x: hidden;
13
+ border-radius: 0;
14
+ }
15
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header {
16
+ border-radius: 0;
17
+ }
18
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th {
19
+ color: #182948;
20
+ font-weight: 700;
21
+ font-size: 14px;
22
+ font-style: normal;
23
+ text-align: left;
24
+ text-transform: none;
25
+ background: #f2f6f9;
26
+ }
27
+ .ant-table-wrapper .ant-table .ant-table-container .ant-table-header .ant-table-thead > tr > th::before {
28
+ display: none;
29
+ width: 0;
30
+ visibility: hidden;
31
+ }
32
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover {
33
+ background: #f6f9fa;
34
+ }
35
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row:hover > td {
36
+ background: #f6f9fa;
37
+ }
38
+ .ant-table-wrapper .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
39
+ color: #182948;
40
+ font-weight: 400;
41
+ font-size: 14px;
42
+ font-style: normal;
43
+ text-align: left;
44
+ text-transform: none;
45
+ }
1
46
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-thead tr > th {
2
- padding: 15.5px !important;
47
+ padding: 12px 16px;
48
+ line-height: 22px;
3
49
  }
4
50
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
5
51
  border-top: 1px solid;
6
52
  border-top-color: transparent;
7
53
  }
8
54
  .ant-table-wrapper .ant-table.ant-table-middle .ant-table-container .ant-table-tbody tr > .ant-table-cell {
9
- padding: 12px !important;
55
+ padding: 12px 16px;
10
56
  line-height: 22px;
11
57
  }
12
58
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-thead tr > th {
13
- padding: 10.5px 16px !important;
59
+ padding: 10.5px 16px;
60
+ line-height: 18px;
14
61
  }
15
62
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr.ant-table-measure-row + tr > td {
16
63
  border-top: 1px solid;
17
64
  border-top-color: transparent;
18
65
  }
19
66
  .ant-table-wrapper .ant-table.ant-table-small .ant-table-container .ant-table-tbody tr > .ant-table-cell {
20
- padding: 10.5px 16px !important;
21
- line-height: 18px !important;
67
+ padding: 10.5px 16px;
68
+ line-height: 18px;
22
69
  }
@@ -7,6 +7,9 @@
7
7
  .aplus-action-item--primary {
8
8
  color: #0070ff;
9
9
  }
10
+ .aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
11
+ color: #66a9ff;
12
+ }
10
13
  .aplus-action-item--success {
11
14
  color: #2ed1a3;
12
15
  }
@@ -19,6 +22,7 @@
19
22
  .aplus-action-item--loading {
20
23
  opacity: 0.35;
21
24
  transition: opacity 0.2s;
25
+ cursor: default;
22
26
  }
23
27
  .aplus-action-item--loading .btn-loading-icon {
24
28
  margin-right: 4px;
@@ -20,7 +20,8 @@
20
20
  border-width: 0 !important;
21
21
  height: 30px !important;
22
22
  }
23
- .aplus-ap-form-item--bordered .ant-select-arrow {
23
+ .aplus-ap-form-item--bordered .ant-select-arrow,
24
+ .aplus-ap-form-item--bordered .ant-picker-clear {
24
25
  inset-inline-end: 0;
25
26
  }
26
27
  .aplus-ap-form-item--bordered .ant-select-clear {
@@ -1,3 +1,5 @@
1
+ import { Recordable } from '../type';
2
+
1
3
  /**
2
4
  * @description: Set ui mount node
3
5
  */
@@ -12,3 +14,9 @@ export declare function getDynamicProps<T extends Record<string, unknown>, U>(pr
12
14
  */
13
15
  export declare function omitWhen<T extends object, K extends keyof T>(obj: T, fieldList?: K[], when?: (field: string, fieldValue: T[K]) => boolean): Omit<T, K>;
14
16
  export declare function isPascalCase(str: string): boolean;
17
+ /**
18
+ * 递归处理reactive对象转raw object
19
+ * @param obj
20
+ * @returns
21
+ */
22
+ export declare function convertReactiveToRaw(obj: Recordable<any>): Recordable<any>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");function u(e){return(e==null?void 0:e.parentNode)??document.body}function a(e){return typeof e<"u"}function f(e){const n={};return Object.keys(e).map(t=>{n[t]=c.unref(e[t])}),n}function l(e,n=[],t){const i=Object.assign({},e),s=Object.keys(i);for(let r=0;r<s.length;r+=1){const o=s[r];(n.includes(o)||t!=null&&t(o,i[o]))&&delete i[o]}return i}function g(e){return/^[A-Z][A-Za-z]*$/.test(e)}exports.getDynamicProps=f;exports.getPopupContainer=u;exports.isDef=a;exports.isPascalCase=g;exports.omitWhen=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue");function u(e){return(e==null?void 0:e.parentNode)??document.body}function f(e){return typeof e<"u"}function l(e){const t={};return Object.keys(e).map(n=>{t[n]=a.unref(e[n])}),t}function y(e,t=[],n){const r=Object.assign({},e),s=Object.keys(r);for(let c=0;c<s.length;c+=1){const i=s[c];(t.includes(i)||n!=null&&n(i,r[i]))&&delete r[i]}return r}function p(e){return/^[A-Z][A-Za-z]*$/.test(e)}function o(e){if(Array.isArray(e))return e.map(t=>o(t));if(typeof e=="object"&&e!==null){const t={};for(const n in e)t[n]=o(e[n]);return a.markRaw(t)}return e}exports.convertReactiveToRaw=o;exports.getDynamicProps=l;exports.getPopupContainer=u;exports.isDef=f;exports.isPascalCase=p;exports.omitWhen=y;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.0.1-beta.27",
3
+ "version": "0.0.1-beta.28",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [