@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.
- package/es/index.mjs +78 -76
- package/es/src/ap-field/date-range/index.vue.mjs +154 -109
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.mjs +4 -2
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/style/ap-form-item.css +2 -0
- package/es/src/ap-table/ap-table.vue.mjs +1 -1
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +72 -97
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +37 -33
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +5 -6
- package/es/src/ap-table/components/setting/utils.d.ts +7 -1
- package/es/src/ap-table/components/setting/utils.mjs +37 -22
- package/es/src/ap-table/constants.d.ts +12 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
- package/es/src/ap-table/hooks/use-table-column-state.mjs +101 -33
- package/es/src/ap-table/interface.d.ts +8 -1
- package/es/src/ap-table/utils.mjs +42 -42
- package/es/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
- package/es/src/business/ap-action-button/ApActionButton.vue.mjs +4 -0
- package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +97 -0
- package/es/src/business/ap-action-button/index.css +6 -0
- package/es/src/business/ap-action-button/interface.d.ts +6 -0
- package/es/src/business/ap-action-button/interface.mjs +1 -0
- package/es/src/business/index.d.ts +265 -0
- package/es/src/business/index.mjs +25 -21
- package/es/src/editable-table/form-item.vue.d.ts +2 -1
- package/es/src/editable-table/form-item.vue.mjs +69 -65
- package/es/src/editable-table/index.vue.d.ts +2 -1
- package/es/src/editable-table/index.vue.mjs +84 -79
- package/es/src/editable-table/interface.d.ts +6 -0
- package/es/src/index.mjs +209 -207
- package/es/src/theme/ap-action-button/ap-action-button.css +6 -0
- package/es/src/theme/ap-form/ap-form-item.css +2 -0
- package/es/src/work-order-modal/index.mjs +4 -3
- package/es/src/work-order-modal/interfaces.d.ts +3 -0
- package/es/src/work-order-modal/interfaces.mjs +6 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/style/ap-form-item.css +2 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +7 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +12 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/interface.d.ts +8 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
- package/lib/src/business/ap-action-button/ApActionButton.vue.js +1 -0
- package/lib/src/business/ap-action-button/ApActionButton.vue2.js +1 -0
- package/lib/src/business/ap-action-button/index.css +6 -0
- package/lib/src/business/ap-action-button/interface.d.ts +6 -0
- package/lib/src/business/ap-action-button/interface.js +1 -0
- package/lib/src/business/index.d.ts +265 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +2 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +2 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +6 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-action-button/ap-action-button.css +6 -0
- package/lib/src/theme/ap-form/ap-form-item.css +2 -0
- package/lib/src/work-order-modal/index.js +1 -1
- package/lib/src/work-order-modal/interfaces.d.ts +3 -0
- package/lib/src/work-order-modal/interfaces.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- 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;
|
|
@@ -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
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { getSingleVNode as
|
|
4
|
-
import { useInjectApTable as
|
|
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
|
|
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
|
|
12
|
-
import { useLocale as
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
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
|
-
},
|
|
20
|
+
}, ke = /* @__PURE__ */ $({
|
|
22
21
|
__name: "index",
|
|
23
22
|
props: {
|
|
24
23
|
config: {}
|
|
25
24
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
|
50
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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 (
|
|
58
|
+
return (u, t) => (y(), G(H, null, [e(b) ? (y(), L(M(e(b)), {
|
|
84
59
|
key: 0
|
|
85
|
-
})) :
|
|
86
|
-
title: e(
|
|
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] = (
|
|
63
|
+
"onUpdate:open": t[2] || (t[2] = (o) => p.value = o),
|
|
89
64
|
width: 900,
|
|
90
|
-
onOk:
|
|
65
|
+
onOk: O,
|
|
91
66
|
"body-style": {
|
|
92
67
|
padding: "0px !important",
|
|
93
68
|
height: "450px"
|
|
94
69
|
}
|
|
95
70
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
class:
|
|
98
|
-
}, [
|
|
99
|
-
class:
|
|
100
|
-
}, [
|
|
101
|
-
class:
|
|
102
|
-
}, [
|
|
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:
|
|
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"])]),
|
|
110
|
-
value:
|
|
111
|
-
"onUpdate:value": t[0] || (t[0] = (
|
|
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:
|
|
88
|
+
default: i(() => [l(e(_), {
|
|
114
89
|
value: "small"
|
|
115
90
|
}, {
|
|
116
|
-
default:
|
|
91
|
+
default: i(() => [v(m(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
|
|
117
92
|
_: 1
|
|
118
|
-
}),
|
|
93
|
+
}), l(e(_), {
|
|
119
94
|
value: "middle"
|
|
120
95
|
}, {
|
|
121
|
-
default:
|
|
96
|
+
default: i(() => [v(m(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
|
|
122
97
|
_: 1
|
|
123
98
|
})]),
|
|
124
99
|
_: 1
|
|
125
|
-
}, 8, ["value"])], 2),
|
|
100
|
+
}, 8, ["value"])], 2), l(e(h), {
|
|
126
101
|
dashed: "",
|
|
127
102
|
style: {
|
|
128
103
|
margin: "0px"
|
|
129
104
|
}
|
|
130
|
-
}),
|
|
131
|
-
class:
|
|
132
|
-
value: e(
|
|
133
|
-
}, null, 8, ["class", "value"])], 2),
|
|
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
|
-
}),
|
|
140
|
-
class:
|
|
141
|
-
}, [
|
|
142
|
-
value: e(
|
|
143
|
-
"onUpdate:value": t[1] || (t[1] = (
|
|
144
|
-
onReset:
|
|
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
|
-
|
|
126
|
+
ke as default
|
|
152
127
|
};
|
|
@@ -1,82 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Checkbox as w, Row as
|
|
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
|
|
5
|
+
import { useInjectApTable as I } from "../../../context.mjs";
|
|
6
6
|
import { cloneLabelNode as b } from "../utils.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
const M = /* @__PURE__ */
|
|
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 } =
|
|
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
|
-
(
|
|
17
|
+
(n) => {
|
|
18
18
|
var l;
|
|
19
|
-
return
|
|
19
|
+
return n.key === ((l = t.value) == null ? void 0 : l.key);
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
|
-
function S(
|
|
24
|
-
const e = t.value.children.find((
|
|
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(
|
|
30
|
+
function g(o) {
|
|
31
31
|
const e = t.value;
|
|
32
|
-
e.children.forEach((
|
|
32
|
+
e.children.forEach((n) => n.show = o), e.show = o, c.value = !1;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
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 =
|
|
40
|
-
|
|
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
|
|
43
|
-
return
|
|
42
|
+
const B = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
|
|
43
|
+
return U(
|
|
44
44
|
() => t.value,
|
|
45
|
-
(
|
|
46
|
-
const e =
|
|
47
|
-
c.value =
|
|
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
|
-
), (
|
|
50
|
-
var
|
|
51
|
-
return
|
|
53
|
+
), (o, e) => {
|
|
54
|
+
var n;
|
|
55
|
+
return a(), f("div", null, [
|
|
52
56
|
v("div", {
|
|
53
|
-
class:
|
|
57
|
+
class: x(r(C)("header"))
|
|
54
58
|
}, [
|
|
55
59
|
u(r(w), {
|
|
56
60
|
indeterminate: c.value,
|
|
57
|
-
checked: (
|
|
61
|
+
checked: (n = o.value) == null ? void 0 : n.show,
|
|
58
62
|
"onUpdate:checked": g,
|
|
59
|
-
disabled:
|
|
63
|
+
disabled: B.value
|
|
60
64
|
}, {
|
|
61
65
|
default: i(() => [
|
|
62
|
-
(
|
|
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(
|
|
72
|
+
u(r(z), null, {
|
|
69
73
|
default: i(() => [
|
|
70
|
-
(
|
|
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),
|
|
76
|
-
"onUpdate:checked": (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
|
-
(
|
|
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
|
|
3
|
-
function
|
|
4
|
-
var
|
|
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
|
|
7
|
-
const l =
|
|
8
|
-
if ((
|
|
9
|
-
const
|
|
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
|
-
|
|
11
|
+
e.children
|
|
12
12
|
);
|
|
13
|
-
|
|
13
|
+
r.length && n.push({
|
|
14
14
|
...l,
|
|
15
|
-
fixed:
|
|
16
|
-
children:
|
|
15
|
+
fixed: e.fixed,
|
|
16
|
+
children: r
|
|
17
17
|
});
|
|
18
18
|
} else {
|
|
19
|
-
if (!
|
|
19
|
+
if (!e.show)
|
|
20
20
|
continue;
|
|
21
|
-
n.push({ ...l, fixed:
|
|
21
|
+
n.push({ ...l, fixed: e.fixed });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return n;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return s(
|
|
26
|
+
function p(t) {
|
|
27
|
+
return s(t, (o, n) => {
|
|
28
28
|
if (n === "label")
|
|
29
|
-
return
|
|
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
|
|
42
|
-
return
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
};
|