@aplus-frontend/ui 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-download/ap-download.vue.d.ts +6 -2
- package/es/src/ap-download/ap-download.vue.mjs +48 -28
- package/es/src/ap-download/interface.d.ts +3 -2
- package/es/src/ap-download/style/ap-download.css +3 -0
- 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 +67 -63
- package/es/src/ap-form/style/ap-form-item.css +2 -0
- 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 +91 -87
- 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/business/ap-attachment/ApAttachment.mjs +79 -59
- package/es/src/business/ap-attachment/interface.d.ts +1 -1
- package/es/src/business/ap-attachment/style.css +4 -0
- package/es/src/business/ap-input-radio/interface.d.ts +1 -1
- package/es/src/business/index.d.ts +0 -2
- package/es/src/editable-table/form-item.vue.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +63 -59
- package/es/src/editable-table/index.vue.d.ts +1 -0
- package/es/src/editable-table/index.vue.mjs +77 -72
- package/es/src/editable-table/interface.d.ts +6 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +4 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-form/ap-form-item.css +2 -0
- package/lib/src/ap-download/ap-download.vue.d.ts +6 -2
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -2
- package/lib/src/ap-download/style/ap-download.css +3 -0
- 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/style/ap-form-item.css +2 -0
- 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/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/interface.d.ts +1 -1
- package/lib/src/business/ap-attachment/style.css +4 -0
- package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
- package/lib/src/business/index.d.ts +0 -2
- package/lib/src/editable-table/form-item.vue.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +1 -0
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +6 -0
- package/lib/src/theme/ap-attachment/ap-attachment.css +4 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-form/ap-form-item.css +2 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { Select as
|
|
1
|
+
import { defineComponent as T, ref as p, onMounted as _, computed as y, unref as u, openBlock as w, createElementBlock as R, toDisplayString as z, createBlock as D, mergeProps as U, createSlots as L, renderList as K, withCtx as S, renderSlot as H, normalizeProps as $, guardReactiveProps as j, createVNode as E } from "vue";
|
|
2
|
+
import { debounce as W, isFunction as g, isArray as G, isNil as J, omit as Q } from "lodash-unified";
|
|
3
|
+
import { Select as X, Spin as Y } from "ant-design-vue";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { omitUndefined as
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
7
|
-
import { useControllableValue as
|
|
8
|
-
const
|
|
5
|
+
import { omitUndefined as Z } from "../../utils/index.mjs";
|
|
6
|
+
import { useDefaultPlaceholder as ee } from "../hooks/use-default-placeholder.mjs";
|
|
7
|
+
import { useControllableValue as oe } from "../../hooks/useControllableValue.mjs";
|
|
8
|
+
const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
9
9
|
name: "ApFieldSelect",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -93,27 +93,27 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
93
93
|
lazy: { type: Boolean, default: !1 }
|
|
94
94
|
},
|
|
95
95
|
emits: ["update:value"],
|
|
96
|
-
setup(
|
|
96
|
+
setup(B, { expose: F, emit: b }) {
|
|
97
97
|
let n = 0;
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
98
|
+
const C = W((o) => {
|
|
99
|
+
if (!g(e.request))
|
|
100
100
|
return;
|
|
101
101
|
n += 1;
|
|
102
102
|
const t = n;
|
|
103
|
-
i.value = [],
|
|
103
|
+
i.value = [], r.value = !0, e.request(o).then((l) => {
|
|
104
104
|
n === t && (i.value = l);
|
|
105
105
|
}).finally(() => {
|
|
106
|
-
|
|
106
|
+
r.value = !1;
|
|
107
107
|
});
|
|
108
|
-
}, 300), e =
|
|
109
|
-
var
|
|
110
|
-
const l = ((
|
|
108
|
+
}, 300), e = B, N = (o, t) => {
|
|
109
|
+
var a;
|
|
110
|
+
const l = ((a = e.fieldNames) == null ? void 0 : a.label) || "label";
|
|
111
111
|
return typeof (t == null ? void 0 : t[l]) == "string" && t[l].indexOf(o) > -1;
|
|
112
|
-
}, i =
|
|
113
|
-
async function
|
|
114
|
-
if (!
|
|
112
|
+
}, i = p((e == null ? void 0 : e.options) || []), s = p(), r = p((e == null ? void 0 : e.loading) || !1), x = b;
|
|
113
|
+
async function c(o = !0) {
|
|
114
|
+
if (!g(e.request))
|
|
115
115
|
return;
|
|
116
|
-
|
|
116
|
+
r.value = !0, n += 1;
|
|
117
117
|
const t = n;
|
|
118
118
|
try {
|
|
119
119
|
o && (i.value = []);
|
|
@@ -122,47 +122,51 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
122
122
|
return;
|
|
123
123
|
i.value = l;
|
|
124
124
|
} finally {
|
|
125
|
-
|
|
125
|
+
r.value = !1;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function I(o) {
|
|
129
129
|
var t;
|
|
130
|
-
(t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !
|
|
130
|
+
(t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !r.value && c(!0);
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
_(() => {
|
|
133
133
|
if (e.lazy) {
|
|
134
134
|
n += 1;
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
c();
|
|
138
138
|
});
|
|
139
|
-
const { value:
|
|
140
|
-
|
|
139
|
+
const { value: m, updateValue: O } = oe(e, x), P = ee("Select", e), V = y(() => {
|
|
140
|
+
var d, v;
|
|
141
|
+
const o = u(m);
|
|
141
142
|
if (!o)
|
|
142
143
|
return e.emptyText;
|
|
143
|
-
|
|
144
|
+
const t = ((d = e.fieldNames) == null ? void 0 : d.label) || "label", l = ((v = e.fieldNames) == null ? void 0 : v.value) || "value";
|
|
145
|
+
if (G(o))
|
|
144
146
|
return o.map(
|
|
145
|
-
(
|
|
146
|
-
var
|
|
147
|
-
return (
|
|
147
|
+
(f) => {
|
|
148
|
+
var h;
|
|
149
|
+
return (h = u(i).find((M) => M[l] === f)) == null ? void 0 : h[t];
|
|
148
150
|
}
|
|
149
151
|
).filter(Boolean).join("、") || e.emptyText;
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
const a = u(i).find(
|
|
153
|
+
(f) => f[l] === o
|
|
154
|
+
);
|
|
155
|
+
return (a == null ? void 0 : a[t]) || e.emptyText;
|
|
156
|
+
}), k = y(() => {
|
|
153
157
|
const o = !!(e != null && e.showSearch), t = e.searchMode;
|
|
154
158
|
let l = {};
|
|
155
159
|
return o && (l = t === "request" ? {
|
|
156
160
|
showArrow: !1,
|
|
157
161
|
defaultActiveFirstOption: !1,
|
|
158
|
-
onSearch:
|
|
159
|
-
notFoundContent:
|
|
162
|
+
onSearch: C,
|
|
163
|
+
notFoundContent: r.value ? void 0 : null
|
|
160
164
|
} : {
|
|
161
165
|
showArrow: !0,
|
|
162
|
-
filterOption:
|
|
166
|
+
filterOption: J(e == null ? void 0 : e.filterOption) ? N : e == null ? void 0 : e.filterOption
|
|
163
167
|
}), {
|
|
164
|
-
...
|
|
165
|
-
|
|
168
|
+
...Z(
|
|
169
|
+
Q(e, [
|
|
166
170
|
"mode",
|
|
167
171
|
"value",
|
|
168
172
|
"onUpdate:value",
|
|
@@ -172,45 +176,45 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
172
176
|
"onFocus"
|
|
173
177
|
])
|
|
174
178
|
),
|
|
175
|
-
placeholder: u(
|
|
179
|
+
placeholder: u(P),
|
|
176
180
|
...l
|
|
177
181
|
};
|
|
178
182
|
});
|
|
179
|
-
function
|
|
183
|
+
function q() {
|
|
180
184
|
var o;
|
|
181
|
-
(o =
|
|
185
|
+
(o = s.value) == null || o.focus();
|
|
182
186
|
}
|
|
183
|
-
function
|
|
187
|
+
function A() {
|
|
184
188
|
var o;
|
|
185
|
-
(o =
|
|
189
|
+
(o = s.value) == null || o.blur();
|
|
186
190
|
}
|
|
187
|
-
return
|
|
188
|
-
focus:
|
|
189
|
-
blur:
|
|
190
|
-
request:
|
|
191
|
-
}), (o, t) => o.mode === "read" ? (
|
|
191
|
+
return F({
|
|
192
|
+
focus: q,
|
|
193
|
+
blur: A,
|
|
194
|
+
request: c
|
|
195
|
+
}), (o, t) => o.mode === "read" ? (w(), R("span", te, z(V.value), 1)) : (w(), D(u(X), U({
|
|
192
196
|
key: 1,
|
|
193
197
|
"allow-clear": "",
|
|
194
198
|
ref_key: "selectRef",
|
|
195
|
-
ref:
|
|
196
|
-
},
|
|
199
|
+
ref: s
|
|
200
|
+
}, k.value, {
|
|
197
201
|
mode: o.multiple ? "multiple" : void 0,
|
|
198
|
-
value: u(
|
|
199
|
-
"onUpdate:value": u(
|
|
202
|
+
value: u(m),
|
|
203
|
+
"onUpdate:value": u(O),
|
|
200
204
|
options: i.value,
|
|
201
|
-
loading:
|
|
202
|
-
onFocus:
|
|
203
|
-
}),
|
|
204
|
-
|
|
205
|
-
name:
|
|
206
|
-
fn:
|
|
207
|
-
|
|
205
|
+
loading: r.value,
|
|
206
|
+
onFocus: I
|
|
207
|
+
}), L({ _: 2 }, [
|
|
208
|
+
K(o.$slots, (l, a) => ({
|
|
209
|
+
name: a,
|
|
210
|
+
fn: S((d) => [
|
|
211
|
+
H(o.$slots, a, $(j(d || {})))
|
|
208
212
|
])
|
|
209
213
|
})),
|
|
210
|
-
|
|
214
|
+
r.value ? {
|
|
211
215
|
name: "notFoundContent",
|
|
212
|
-
fn:
|
|
213
|
-
|
|
216
|
+
fn: S(() => [
|
|
217
|
+
E(u(Y), { size: "small" })
|
|
214
218
|
]),
|
|
215
219
|
key: "0"
|
|
216
220
|
} : void 0
|
|
@@ -218,5 +222,5 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
218
222
|
}
|
|
219
223
|
});
|
|
220
224
|
export {
|
|
221
|
-
|
|
225
|
+
se as default
|
|
222
226
|
};
|
|
@@ -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"])
|