@aplus-frontend/ui 0.1.28 → 0.1.30

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.
Files changed (79) hide show
  1. package/es/index.mjs +78 -76
  2. package/es/src/ap-field/date-range/index.vue.mjs +154 -109
  3. package/es/src/ap-field/interface.d.ts +4 -0
  4. package/es/src/ap-field/select/index.vue.mjs +4 -2
  5. package/es/src/ap-form/ap-form.vue.d.ts +1 -1
  6. package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
  7. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  8. package/es/src/ap-form/style/ap-form-item.css +2 -0
  9. package/es/src/ap-table/ap-table.vue.mjs +1 -1
  10. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +72 -97
  11. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +37 -33
  12. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +5 -6
  13. package/es/src/ap-table/components/setting/utils.d.ts +7 -1
  14. package/es/src/ap-table/components/setting/utils.mjs +37 -22
  15. package/es/src/ap-table/constants.d.ts +12 -0
  16. package/es/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
  17. package/es/src/ap-table/hooks/use-table-column-state.mjs +101 -33
  18. package/es/src/ap-table/interface.d.ts +8 -1
  19. package/es/src/ap-table/utils.mjs +42 -42
  20. package/es/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  21. package/es/src/business/ap-action-button/ApActionButton.vue.mjs +4 -0
  22. package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +97 -0
  23. package/es/src/business/ap-action-button/index.css +6 -0
  24. package/es/src/business/ap-action-button/interface.d.ts +6 -0
  25. package/es/src/business/ap-action-button/interface.mjs +1 -0
  26. package/es/src/business/index.d.ts +265 -0
  27. package/es/src/business/index.mjs +25 -21
  28. package/es/src/editable-table/form-item.vue.d.ts +2 -1
  29. package/es/src/editable-table/form-item.vue.mjs +69 -65
  30. package/es/src/editable-table/index.vue.d.ts +2 -1
  31. package/es/src/editable-table/index.vue.mjs +84 -79
  32. package/es/src/editable-table/interface.d.ts +6 -0
  33. package/es/src/index.mjs +209 -207
  34. package/es/src/theme/ap-action-button/ap-action-button.css +6 -0
  35. package/es/src/theme/ap-form/ap-form-item.css +2 -0
  36. package/es/src/work-order-modal/index.mjs +4 -3
  37. package/es/src/work-order-modal/interfaces.d.ts +3 -0
  38. package/es/src/work-order-modal/interfaces.mjs +6 -1
  39. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  42. package/lib/src/ap-field/interface.d.ts +4 -0
  43. package/lib/src/ap-field/select/index.vue.js +1 -1
  44. package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
  45. package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
  46. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  47. package/lib/src/ap-form/style/ap-form-item.css +2 -0
  48. package/lib/src/ap-table/ap-table.vue.js +1 -1
  49. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  50. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  51. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  52. package/lib/src/ap-table/components/setting/utils.d.ts +7 -1
  53. package/lib/src/ap-table/components/setting/utils.js +1 -1
  54. package/lib/src/ap-table/constants.d.ts +12 -0
  55. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
  56. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  57. package/lib/src/ap-table/interface.d.ts +8 -1
  58. package/lib/src/ap-table/utils.js +1 -1
  59. package/lib/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  60. package/lib/src/business/ap-action-button/ApActionButton.vue.js +1 -0
  61. package/lib/src/business/ap-action-button/ApActionButton.vue2.js +1 -0
  62. package/lib/src/business/ap-action-button/index.css +6 -0
  63. package/lib/src/business/ap-action-button/interface.d.ts +6 -0
  64. package/lib/src/business/ap-action-button/interface.js +1 -0
  65. package/lib/src/business/index.d.ts +265 -0
  66. package/lib/src/business/index.js +1 -1
  67. package/lib/src/editable-table/form-item.vue.d.ts +2 -1
  68. package/lib/src/editable-table/form-item.vue.js +1 -1
  69. package/lib/src/editable-table/index.vue.d.ts +2 -1
  70. package/lib/src/editable-table/index.vue.js +1 -1
  71. package/lib/src/editable-table/interface.d.ts +6 -0
  72. package/lib/src/index.js +1 -1
  73. package/lib/src/theme/ap-action-button/ap-action-button.css +6 -0
  74. package/lib/src/theme/ap-form/ap-form-item.css +2 -0
  75. package/lib/src/work-order-modal/index.js +1 -1
  76. package/lib/src/work-order-modal/interfaces.d.ts +3 -0
  77. package/lib/src/work-order-modal/interfaces.js +1 -1
  78. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  79. package/package.json +1 -1
@@ -428,7 +428,7 @@ declare function __VLS_template(): {
428
428
  };
429
429
  }>>, {
430
430
  resetFields: () => Promise<void>;
431
- clearValidate: (name?: NamePath) => void;
431
+ clearValidate: (name?: NamePath | NamePath[]) => void;
432
432
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
433
433
  [key: string]: any;
434
434
  }> | undefined;
@@ -620,7 +620,7 @@ declare function __VLS_template(): {
620
620
  };
621
621
  }>>, "validate" | "setFieldsValue" | "resetFields" | "getFieldsValue" | "clearValidate" | "validateFields" | "scrollToField" | "setFieldValue" | "getInternalInstance" | "registerWatch"> & ShallowUnwrapRef<{
622
622
  resetFields: () => Promise<void>;
623
- clearValidate: (name?: NamePath) => void;
623
+ clearValidate: (name?: NamePath | NamePath[]) => void;
624
624
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
625
625
  [key: string]: any;
626
626
  }> | undefined;
@@ -423,7 +423,7 @@ declare function __VLS_template(): {
423
423
  };
424
424
  }>>, {
425
425
  resetFields: () => Promise<void>;
426
- clearValidate: (name?: NamePath) => void;
426
+ clearValidate: (name?: NamePath | NamePath[]) => void;
427
427
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
428
428
  [key: string]: any;
429
429
  }> | undefined;
@@ -615,7 +615,7 @@ declare function __VLS_template(): {
615
615
  };
616
616
  }>>, "validate" | "setFieldsValue" | "resetFields" | "getFieldsValue" | "clearValidate" | "validateFields" | "scrollToField" | "setFieldValue" | "getInternalInstance" | "registerWatch"> & ShallowUnwrapRef<{
617
617
  resetFields: () => Promise<void>;
618
- clearValidate: (name?: NamePath) => void;
618
+ clearValidate: (name?: NamePath | NamePath[]) => void;
619
619
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
620
620
  [key: string]: any;
621
621
  }> | undefined;
@@ -18,6 +18,8 @@
18
18
  }
19
19
  .aplus-ap-form-item--bordered .ant-select-selector {
20
20
  border-width: 0 !important;
21
+ }
22
+ .aplus-ap-form-item--bordered .ant-select-single .ant-select-selector {
21
23
  height: 30px !important;
22
24
  }
23
25
  .aplus-ap-form-item--bordered .ant-select-arrow,
@@ -415,7 +415,7 @@ const Ca = /* @__PURE__ */ Re({
415
415
  records: W.value.dataSource
416
416
  })]),
417
417
  _: 2
418
- }, [Q(l(_)(S, ["title", "searchFormExtra", "headerCell"]), (t, r) => ({
418
+ }, [Q(l(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, r) => ({
419
419
  name: r,
420
420
  fn: b((d) => [w(e.$slots, r, Be(xe(d || {})))])
421
421
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
@@ -1,152 +1,127 @@
1
- import { defineComponent as M, ref as w, unref as e, useSlots as q, cloneVNode as J, watchEffect as K, openBlock as z, createElementBlock as P, Fragment as Q, createBlock as W, resolveDynamicComponent as X, createCommentVNode as Y, createVNode as o, withCtx as u, createElementVNode as r, normalizeClass as c, toDisplayString as d, createTextVNode as h, isRef as Z } from "vue";
2
- import { Modal as ee, Button as te, RadioGroup as le, RadioButton as R, Divider as D } from "ant-design-vue";
3
- import { getSingleVNode as ne } from "../../../../utils/slot.mjs";
4
- import { useInjectApTable as oe } from "../../../context.mjs";
1
+ import { defineComponent as $, ref as x, unref as e, useSlots as j, cloneVNode as F, openBlock as y, createElementBlock as G, Fragment as H, createBlock as L, resolveDynamicComponent as M, createCommentVNode as q, createVNode as l, withCtx as i, createElementVNode as s, normalizeClass as r, toDisplayString as m, createTextVNode as v, isRef as J } from "vue";
2
+ import { Modal as K, Button as P, RadioGroup as Q, RadioButton as _, Divider as h } from "ant-design-vue";
3
+ import { getSingleVNode as W } from "../../../../utils/slot.mjs";
4
+ import { useInjectApTable as X } from "../../../context.mjs";
5
5
  import "../tree-select/index.vue.mjs";
6
- import { useTableColumnState as ae } from "../../../hooks/use-table-column-state.mjs";
7
- import { isBoolean as ie } from "lodash-unified";
6
+ import { useTableColumnState as Y } from "../../../hooks/use-table-column-state.mjs";
8
7
  import "../../../../config-provider/index.mjs";
9
8
  import "../sorter/index.vue.mjs";
10
9
  import "../../style/setting/modal.css";
11
- import se, { customCloneColumnStates as k } from "../utils.mjs";
12
- import { useLocale as re } from "../../../../config-provider/hooks/use-locale.mjs";
13
- import { useNamespace as ue } from "../../../../config-provider/hooks/use-namespace.mjs";
14
- import ce from "../tree-select/index.vue2.mjs";
15
- import me from "../sorter/index.vue2.mjs";
16
- const pe = {
10
+ import Z, { customCloneColumnStates as B } from "../utils.mjs";
11
+ import { useLocale as ee } from "../../../../config-provider/hooks/use-locale.mjs";
12
+ import { useNamespace as te } from "../../../../config-provider/hooks/use-namespace.mjs";
13
+ import le from "../tree-select/index.vue2.mjs";
14
+ import oe from "../sorter/index.vue2.mjs";
15
+ const ne = {
17
16
  style: {
18
17
  lineHeight: "22px",
19
18
  color: "#8896B0"
20
19
  }
21
- }, Ve = /* @__PURE__ */ M({
20
+ }, ke = /* @__PURE__ */ $({
22
21
  __name: "index",
23
22
  props: {
24
23
  config: {}
25
24
  },
26
- setup(E) {
27
- const m = E;
28
- let f = [];
29
- const {
30
- columnsBackup: y,
31
- size: U,
32
- updateSize: g,
33
- updateColumns: v
34
- } = oe(), C = w(e(U)), {
35
- columnState: i,
36
- setColumnState: b,
37
- isAllSelected: O,
38
- toggleSelectAll: $
39
- } = ae([]), {
40
- t: s
41
- } = re(), {
42
- b: x,
43
- be: _
44
- } = ue("ap-column-setting"), p = w(!1), j = q(), B = ne(j.trigger), T = B ? J(B, {
25
+ setup(N) {
26
+ const C = N, {
27
+ columnsBackup: T,
28
+ size: A,
29
+ updateSize: c,
30
+ updateColumns: d
31
+ } = X(), f = x(e(A)), {
32
+ columnState: n,
33
+ setColumnState: V,
34
+ isAllSelected: z,
35
+ toggleSelectAll: R,
36
+ columnStateBackup: w,
37
+ setColumnStateBackup: D,
38
+ cacheColumnStateIfNeeded: U
39
+ } = Y(C.config, []), {
40
+ t: a
41
+ } = ee(), {
42
+ b: g,
43
+ be: S
44
+ } = te("ap-column-setting"), p = x(!1), E = j(), k = W(E.trigger), b = k ? F(k, {
45
45
  onClick: () => {
46
46
  p.value = !0;
47
47
  }
48
48
  }) : null;
49
- function F() {
50
- var l;
51
- const n = ((l = m == null ? void 0 : m.config) == null ? void 0 : l.defaultValue) || {};
52
- function t(I, N) {
53
- var A;
54
- const V = [];
55
- for (const a of I) {
56
- const L = n == null ? void 0 : n[a.key], S = {
57
- key: a.key,
58
- label: a.title,
59
- show: !0,
60
- fixed: N ? N.fixed : ie(a.fixed) ? a.fixed ? "left" : void 0 : a.fixed,
61
- disabled: !1,
62
- ...L
63
- };
64
- S.children = (A = a.children) != null && A.length ? t(a.children, S) : void 0, V.push(S);
65
- }
66
- return V;
67
- }
68
- return t(e(y) || []);
69
- }
70
- function G() {
71
- b(k(f));
49
+ function I() {
50
+ V(B(w));
72
51
  }
73
- K(() => {
74
- const n = F();
75
- b(n), f = k(n);
76
- });
77
- function H() {
78
- var t, l;
79
- v == null || v(se(e(y), e(i))), g == null || g(e(C)), p.value = !1;
80
- const n = k(i.value);
81
- f = n, (l = (t = m.config) == null ? void 0 : t.onChange) == null || l.call(t, n);
52
+ function O() {
53
+ var t, o;
54
+ d == null || d(Z(e(T), e(n))), c == null || c(e(f)), p.value = !1;
55
+ const u = B(n.value);
56
+ D(u), U(u), (o = (t = C.config) == null ? void 0 : t.onChange) == null || o.call(t, u);
82
57
  }
83
- return (n, t) => (z(), P(Q, null, [e(T) ? (z(), W(X(e(T)), {
58
+ return (u, t) => (y(), G(H, null, [e(b) ? (y(), L(M(e(b)), {
84
59
  key: 0
85
- })) : Y("", !0), o(e(ee), {
86
- title: e(s)("ap.apTable.setting.title"),
60
+ })) : q("", !0), l(e(K), {
61
+ title: e(a)("ap.apTable.setting.title"),
87
62
  open: p.value,
88
- "onUpdate:open": t[2] || (t[2] = (l) => p.value = l),
63
+ "onUpdate:open": t[2] || (t[2] = (o) => p.value = o),
89
64
  width: 900,
90
- onOk: H,
65
+ onOk: O,
91
66
  "body-style": {
92
67
  padding: "0px !important",
93
68
  height: "450px"
94
69
  }
95
70
  }, {
96
- default: u(() => [r("div", {
97
- class: c(e(x)("wrapper"))
98
- }, [r("div", {
99
- class: c(e(x)("left"))
100
- }, [r("div", {
101
- class: c(e(_)("left", "header"))
102
- }, [r("div", null, [r("span", pe, d(e(s)("ap.apTable.setting.selectAllTip")), 1), o(e(te), {
71
+ default: i(() => [s("div", {
72
+ class: r(e(g)("wrapper"))
73
+ }, [s("div", {
74
+ class: r(e(g)("left"))
75
+ }, [s("div", {
76
+ class: r(e(S)("left", "header"))
77
+ }, [s("div", null, [s("span", ne, m(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(P), {
103
78
  type: "link",
104
79
  size: "small",
105
- onClick: e($)
80
+ onClick: e(R)
106
81
  }, {
107
- default: u(() => [h(d(e(O) ? e(s)("ap.apTable.setting.unSelectAll") : e(s)("ap.apTable.setting.selectAll")), 1)]),
82
+ default: i(() => [v(m(e(z) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
108
83
  _: 1
109
- }, 8, ["onClick"])]), o(e(le), {
110
- value: C.value,
111
- "onUpdate:value": t[0] || (t[0] = (l) => C.value = l)
84
+ }, 8, ["onClick"])]), l(e(Q), {
85
+ value: f.value,
86
+ "onUpdate:value": t[0] || (t[0] = (o) => f.value = o)
112
87
  }, {
113
- default: u(() => [o(e(R), {
88
+ default: i(() => [l(e(_), {
114
89
  value: "small"
115
90
  }, {
116
- default: u(() => [h(d(e(s)("ap.apTable.setting.sizeSmall")), 1)]),
91
+ default: i(() => [v(m(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
117
92
  _: 1
118
- }), o(e(R), {
93
+ }), l(e(_), {
119
94
  value: "middle"
120
95
  }, {
121
- default: u(() => [h(d(e(s)("ap.apTable.setting.sizeNormal")), 1)]),
96
+ default: i(() => [v(m(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
122
97
  _: 1
123
98
  })]),
124
99
  _: 1
125
- }, 8, ["value"])], 2), o(e(D), {
100
+ }, 8, ["value"])], 2), l(e(h), {
126
101
  dashed: "",
127
102
  style: {
128
103
  margin: "0px"
129
104
  }
130
- }), o(ce, {
131
- class: c(e(_)("left", "content")),
132
- value: e(i)
133
- }, null, 8, ["class", "value"])], 2), o(e(D), {
105
+ }), l(le, {
106
+ class: r(e(S)("left", "content")),
107
+ value: e(n)
108
+ }, null, 8, ["class", "value"])], 2), l(e(h), {
134
109
  type: "vertical",
135
110
  style: {
136
111
  height: "100%",
137
112
  margin: "0px"
138
113
  }
139
- }), r("div", {
140
- class: c(e(x)("right"))
141
- }, [o(me, {
142
- value: e(i),
143
- "onUpdate:value": t[1] || (t[1] = (l) => Z(i) ? i.value = l : null),
144
- onReset: G
114
+ }), s("div", {
115
+ class: r(e(g)("right"))
116
+ }, [l(oe, {
117
+ value: e(n),
118
+ "onUpdate:value": t[1] || (t[1] = (o) => J(n) ? n.value = o : null),
119
+ onReset: I
145
120
  }, null, 8, ["value"])], 2)], 2)]),
146
121
  _: 1
147
122
  }, 8, ["title", "open"])], 64));
148
123
  }
149
124
  });
150
125
  export {
151
- Ve as default
126
+ ke as default
152
127
  };
@@ -1,82 +1,86 @@
1
- import { defineComponent as N, ref as E, computed as p, unref as r, watch as P, openBlock as s, createElementBlock as f, createElementVNode as v, normalizeClass as U, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as V, renderList as D, mergeProps as L } from "vue";
2
- import { Checkbox as w, Row as j, Col as z } from "ant-design-vue";
1
+ import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as a, createElementBlock as f, createElementVNode as v, normalizeClass as x, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as D, renderList as L, mergeProps as j } from "vue";
2
+ import { Checkbox as w, Row as z, Col as F } from "ant-design-vue";
3
3
  import "../../style/setting/select-group.css";
4
4
  import "../../../../config-provider/index.mjs";
5
- import { useInjectApTable as F } from "../../../context.mjs";
5
+ import { useInjectApTable as I } from "../../../context.mjs";
6
6
  import { cloneLabelNode as b } from "../utils.mjs";
7
- import { useNamespace as I } from "../../../../config-provider/hooks/use-namespace.mjs";
8
- const M = /* @__PURE__ */ N({
7
+ import { useNamespace as R } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ const M = /* @__PURE__ */ E({
9
9
  __name: "index",
10
10
  props: {
11
11
  value: {}
12
12
  },
13
13
  setup(y) {
14
- const t = y, { b: C } = I("select-group"), c = E(!1), { columnsBackup: _ } = F(), m = p(() => {
14
+ const t = y, { b: C } = R("select-group"), c = P(!1), { columnsBackup: _ } = I(), m = p(() => {
15
15
  var e;
16
16
  return (e = r(_)) == null ? void 0 : e.find(
17
- (o) => {
17
+ (n) => {
18
18
  var l;
19
- return o.key === ((l = t.value) == null ? void 0 : l.key);
19
+ return n.key === ((l = t.value) == null ? void 0 : l.key);
20
20
  }
21
21
  );
22
22
  });
23
- function S(n) {
24
- const e = t.value.children.find((o) => o.key === n.key);
23
+ function S(o) {
24
+ const e = t.value.children.find((n) => n.key === o.key);
25
25
  return {
26
26
  checked: e == null ? void 0 : e.show,
27
27
  disabled: t.value.disabled || (e == null ? void 0 : e.disabled)
28
28
  };
29
29
  }
30
- function g(n) {
30
+ function g(o) {
31
31
  const e = t.value;
32
- e.children.forEach((o) => o.show = n), e.show = n, c.value = !1;
32
+ e.children.forEach((n) => n.show = o), e.show = o, c.value = !1;
33
33
  }
34
- function x(n, e) {
35
- const o = t.value, l = o.children.find((a) => a.key === n);
34
+ function A(o, e) {
35
+ const n = t.value, l = n.children.find((s) => s.key === o);
36
36
  if (!l)
37
37
  return;
38
38
  l.show = e;
39
- const d = o.children.every((a) => a.show), B = o.children.some((a) => a.show);
40
- o.show = d, c.value = B && !d;
39
+ const d = n.children.every((s) => s.show), N = n.children.some((s) => s.show);
40
+ n.show = d, c.value = N && !d;
41
41
  }
42
- const A = p(() => t.value.disabled || t.value.children.every((n) => n.disabled));
43
- return P(
42
+ const B = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
43
+ return U(
44
44
  () => t.value,
45
- (n) => {
46
- const e = n.children.every((l) => l.show), o = n.children.some((l) => l.show);
47
- c.value = o && !e;
45
+ (o) => {
46
+ const e = o.children.every((l) => l.show), n = o.children.some((l) => l.show);
47
+ c.value = n && !e, o.show !== e && (o.show = e);
48
+ },
49
+ {
50
+ deep: !0,
51
+ immediate: !0
48
52
  }
49
- ), (n, e) => {
50
- var o;
51
- return s(), f("div", null, [
53
+ ), (o, e) => {
54
+ var n;
55
+ return a(), f("div", null, [
52
56
  v("div", {
53
- class: U(r(C)("header"))
57
+ class: x(r(C)("header"))
54
58
  }, [
55
59
  u(r(w), {
56
60
  indeterminate: c.value,
57
- checked: (o = n.value) == null ? void 0 : o.show,
61
+ checked: (n = o.value) == null ? void 0 : n.show,
58
62
  "onUpdate:checked": g,
59
- disabled: A.value
63
+ disabled: B.value
60
64
  }, {
61
65
  default: i(() => [
62
- (s(), h(k(r(b)(m.value.title))))
66
+ (a(), h(k(r(b)(m.value.title))))
63
67
  ]),
64
68
  _: 1
65
69
  }, 8, ["indeterminate", "checked", "disabled"])
66
70
  ], 2),
67
71
  v("div", null, [
68
- u(r(j), null, {
72
+ u(r(z), null, {
69
73
  default: i(() => [
70
- (s(!0), f(V, null, D(m.value.children, (l) => (s(), h(r(z), {
74
+ (a(!0), f(D, null, L(m.value.children, (l) => (a(), h(r(F), {
71
75
  key: l.key,
72
76
  span: 8
73
77
  }, {
74
78
  default: i(() => [
75
- u(r(w), L({ ref_for: !0 }, S(l), {
76
- "onUpdate:checked": (d) => x(l.key, d)
79
+ u(r(w), j({ ref_for: !0 }, S(l), {
80
+ "onUpdate:checked": (d) => A(l.key, d)
77
81
  }), {
78
82
  default: i(() => [
79
- (s(), h(k(r(b)(l.title))))
83
+ (a(), h(k(r(b)(l.title))))
80
84
  ]),
81
85
  _: 2
82
86
  }, 1040, ["onUpdate:checked"])
@@ -92,7 +92,10 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, ce = /* @__PURE__ */ A({
92
92
  function j(e) {
93
93
  f([...n(i), ...n(s), ...e]);
94
94
  }
95
- $(
95
+ function f(e) {
96
+ S("update:value", e);
97
+ }
98
+ return $(
96
99
  () => x.value,
97
100
  (e) => {
98
101
  if (e) {
@@ -102,11 +105,7 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, ce = /* @__PURE__ */ A({
102
105
  }
103
106
  },
104
107
  { immediate: !0 }
105
- );
106
- function f(e) {
107
- S("update:value", e);
108
- }
109
- return (e, t) => (c(), y("div", {
108
+ ), (e, t) => (c(), y("div", {
110
109
  class: d(n(u)())
111
110
  }, [
112
111
  m(n(G), {
@@ -1,5 +1,5 @@
1
1
  import { ColumnsType } from 'ant-design-vue/es/table';
2
- import { ApColumnState } from '../../interface';
2
+ import { ApColumnState, ApTableSettingDefaultValueType } from '../../interface';
3
3
  /**
4
4
  * 根据列状态重新生成表格列配置
5
5
  * @param columns 表格列数组
@@ -15,3 +15,9 @@ export declare function customCloneColumnStates<T extends ApColumnState | ApColu
15
15
  * @returns
16
16
  */
17
17
  export declare function cloneLabelNode(node: any): any;
18
+ /**
19
+ * 生成可用于缓存的列状态对象
20
+ * @param columnStates
21
+ * @returns
22
+ */
23
+ export declare function getColumnStateString(columnStates: ApColumnState[]): ApTableSettingDefaultValueType;
@@ -1,32 +1,32 @@
1
- import { cloneDeepWith as s } from "lodash-unified";
2
- import { isVNode as u, cloneVNode as c } from "vue";
3
- function f(e, i) {
4
- var r;
1
+ import { cloneDeepWith as s, omit as u } from "lodash-unified";
2
+ import { isVNode as c, cloneVNode as f } from "vue";
3
+ function d(t, o) {
4
+ var i;
5
5
  const n = [];
6
- for (const t of i) {
7
- const l = e.find((o) => o.key === t.key);
8
- if ((r = t.children) != null && r.length) {
9
- const o = f(
6
+ for (const e of o) {
7
+ const l = t.find((r) => r.key === e.key);
8
+ if ((i = e.children) != null && i.length) {
9
+ const r = d(
10
10
  l.children,
11
- t.children
11
+ e.children
12
12
  );
13
- o.length && n.push({
13
+ r.length && n.push({
14
14
  ...l,
15
- fixed: t.fixed,
16
- children: o
15
+ fixed: e.fixed,
16
+ children: r
17
17
  });
18
18
  } else {
19
- if (!t.show)
19
+ if (!e.show)
20
20
  continue;
21
- n.push({ ...l, fixed: t.fixed });
21
+ n.push({ ...l, fixed: e.fixed });
22
22
  }
23
23
  }
24
24
  return n;
25
25
  }
26
- function h(e) {
27
- return s(e, (i, n) => {
26
+ function p(t) {
27
+ return s(t, (o, n) => {
28
28
  if (n === "label")
29
- return i;
29
+ return o;
30
30
  });
31
31
  }
32
32
  const a = {
@@ -38,11 +38,26 @@ const a = {
38
38
  "white-space": "unset",
39
39
  wordBreak: "unset"
40
40
  };
41
- function p(e) {
42
- return u(e) ? c(e, { style: a }) : e;
41
+ function y(t) {
42
+ return c(t) ? f(t, { style: a }) : t;
43
+ }
44
+ function b(t) {
45
+ function o(n) {
46
+ const i = {};
47
+ return n.forEach((e, l) => {
48
+ var r;
49
+ i[e.key] = {
50
+ ...u(e, ["label", "key", "children"]),
51
+ order: l,
52
+ children: (r = e.children) != null && r.length ? o(e.children) : void 0
53
+ };
54
+ }), i;
55
+ }
56
+ return o(t);
43
57
  }
44
58
  export {
45
- p as cloneLabelNode,
46
- h as customCloneColumnStates,
47
- f as default
59
+ y as cloneLabelNode,
60
+ p as customCloneColumnStates,
61
+ d as default,
62
+ b as getColumnStateString
48
63
  };
@@ -9528,6 +9528,9 @@ export declare const apTableRenderItemMap: {
9528
9528
  timezone: {
9529
9529
  type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9530
9530
  };
9531
+ readModeSeparator: {
9532
+ type: PropType<any>;
9533
+ };
9531
9534
  }>> & {
9532
9535
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9533
9536
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -9741,6 +9744,9 @@ export declare const apTableRenderItemMap: {
9741
9744
  timezone: {
9742
9745
  type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9743
9746
  };
9747
+ readModeSeparator: {
9748
+ type: PropType<any>;
9749
+ };
9744
9750
  }>> & {
9745
9751
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9746
9752
  }, {
@@ -9991,6 +9997,9 @@ export declare const apTableRenderItemMap: {
9991
9997
  timezone: {
9992
9998
  type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9993
9999
  };
10000
+ readModeSeparator: {
10001
+ type: PropType<any>;
10002
+ };
9994
10003
  }>> & {
9995
10004
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9996
10005
  }, {}, {}, {}, {}, {
@@ -10238,6 +10247,9 @@ export declare const apTableRenderItemMap: {
10238
10247
  timezone: {
10239
10248
  type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
10240
10249
  };
10250
+ readModeSeparator: {
10251
+ type: PropType<any>;
10252
+ };
10241
10253
  }>> & {
10242
10254
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
10243
10255
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -1,6 +1,6 @@
1
- import { ApColumnState } from '../interface';
1
+ import { ApColumnState, ApTableSettingType } from '../interface';
2
2
  import { Ref, ComputedRef } from 'vue';
3
- export declare const useTableColumnState: (initialColumnState: ApColumnState[]) => {
3
+ export declare const useTableColumnState: (columnSetting: ApTableSettingType, initialColumnState: ApColumnState[]) => {
4
4
  columnState: Ref<{
5
5
  key: string | number;
6
6
  show?: boolean | undefined;
@@ -8,6 +8,7 @@ export declare const useTableColumnState: (initialColumnState: ApColumnState[])
8
8
  disabled?: boolean | undefined;
9
9
  label?: any;
10
10
  children?: any[] | undefined;
11
+ order?: number | undefined;
11
12
  }[]>;
12
13
  selectAll: () => void;
13
14
  unSelectAll: () => void;
@@ -15,4 +16,7 @@ export declare const useTableColumnState: (initialColumnState: ApColumnState[])
15
16
  setColumnState: (nextColumnState: ApColumnState[]) => void;
16
17
  isAllSelected: ComputedRef<boolean>;
17
18
  toggleSelectAll: () => void;
19
+ columnStateBackup: ApColumnState[];
20
+ setColumnStateBackup: (nextBackup: ApColumnState[]) => void;
21
+ cacheColumnStateIfNeeded: (nextColumnState: ApColumnState[]) => void;
18
22
  };