@aplus-frontend/ui 7.13.11 → 7.14.0
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 +58 -56
- package/es/src/ap-field/select/index.vue.d.ts +8 -18
- package/es/src/ap-field/text/index.vue2.mjs +2 -2
- package/es/src/ap-field/text/password.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue.d.ts +1 -0
- package/es/src/ap-form/ap-form.vue2.mjs +122 -106
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/drawer-form/index.vue.mjs +13 -10
- package/es/src/ap-form/interface.d.ts +5 -0
- package/es/src/ap-form/item/index.vue.d.ts +1 -0
- package/es/src/ap-form/item/index.vue.mjs +84 -70
- package/es/src/ap-form/items/checkbox/index.vue.mjs +9 -8
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +10 -9
- package/es/src/ap-form/items/number/index.vue.mjs +7 -6
- package/es/src/ap-form/items/radio/index.vue.mjs +9 -8
- package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/es/src/ap-form/items/select/index.vue.mjs +3 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -5
- package/es/src/ap-form/items/text/password.vue.mjs +10 -9
- package/es/src/ap-form/items/text-area/index.vue.mjs +4 -3
- package/es/src/ap-form/items/tree-select/index.vue.mjs +1 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -0
- package/es/src/ap-form/render/item.vue.mjs +6 -5
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/search-form/index.vue.mjs +26 -23
- package/es/src/ap-table/ap-table.vue2.mjs +2 -2
- package/es/src/ap-table/components/setting/index.d.ts +2 -0
- package/es/src/ap-table/components/setting/index.mjs +5 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +277 -2
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +2 -273
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +11 -8
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +35 -35
- package/es/src/ap-table/constants.d.ts +3 -3
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +55 -54
- package/es/src/ap-table/index.d.ts +2 -2
- package/es/src/ap-table/index.mjs +7 -6
- package/es/src/ap-table/interface.d.ts +16 -0
- package/es/src/business/ap-size-input/form-item.vue.mjs +6 -5
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +8 -7
- package/es/src/business/hooks/usePageListAgGrid.mjs +2 -2
- package/es/src/index.mjs +54 -52
- package/es/src/locale/lang/en.mjs +1 -0
- package/es/src/locale/lang/zh-cn.mjs +1 -0
- package/es/src/render/render.d.ts +7 -4
- package/es/src/render/render.mjs +17 -7
- package/es/src/splitter/SplitBar.vue2.mjs +7 -7
- package/es/src/splitter/hooks/sizeUtil.d.ts +3 -0
- package/es/src/splitter/hooks/sizeUtil.mjs +44 -0
- package/es/src/splitter/hooks/useSizes.mjs +38 -41
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +8 -18
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -0
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +5 -0
- package/lib/src/ap-form/item/index.vue.d.ts +1 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/index.d.ts +2 -0
- package/lib/src/ap-table/components/setting/index.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.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/template/edit-form.vue.d.ts +2 -0
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +3 -3
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
- package/lib/src/ap-table/index.d.ts +2 -2
- package/lib/src/ap-table/index.js +1 -1
- package/lib/src/ap-table/interface.d.ts +16 -0
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/render/render.d.ts +7 -4
- package/lib/src/render/render.js +1 -1
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/hooks/sizeUtil.d.ts +3 -0
- package/lib/src/splitter/hooks/sizeUtil.js +1 -0
- package/lib/src/splitter/hooks/useSizes.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,275 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SettingOutlined as Te, SaveOutlined as be } from "@ant-design/icons-vue";
|
|
3
|
-
import { Button as F, Modal as Ce, Divider as A, RadioGroup as ke, RadioButton as M, Flex as he, Space as q, Popover as _e } from "@aplus-frontend/antdv";
|
|
4
|
-
import "../../../../ap-button/index.mjs";
|
|
5
|
-
import { randomStr as ze } from "../../../../utils/index.mjs";
|
|
6
|
-
import "../../../../config-provider/index.mjs";
|
|
7
|
-
import { getSingleVNode as xe } from "../../../../utils/slot.mjs";
|
|
8
|
-
import { useInjectApTable as we } from "../../../context.mjs";
|
|
9
|
-
import { useTableColumnState as Ae } from "../../../hooks/use-table-column-state.mjs";
|
|
10
|
-
import { useTableTemplateStorage as Be } from "../../../hooks/use-table-template-storage.mjs";
|
|
11
|
-
import Ne from "../../../style/setting.mjs";
|
|
12
|
-
import { useProvideApColumnSetting as Ke } from "../context.mjs";
|
|
13
|
-
import "../sorter/index.vue.mjs";
|
|
14
|
-
import "../template/edit-form.vue.mjs";
|
|
15
|
-
import "../template/index.vue.mjs";
|
|
16
|
-
import "../tree-select/index.vue.mjs";
|
|
17
|
-
import $e, { customCloneColumnStates as B, isEqualColumnStateIgnoreLabel as Ie } from "../utils.mjs";
|
|
18
|
-
import { useLocale as Le } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
19
|
-
import { useNamespace as G } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
20
|
-
import Re from "../template/index.vue2.mjs";
|
|
21
|
-
import Ve from "../tree-select/index.vue2.mjs";
|
|
22
|
-
import De from "../sorter/index.vue2.mjs";
|
|
23
|
-
import Oe from "../../../../ap-button/ap-button.vue.mjs";
|
|
24
|
-
import Ue from "../template/edit-form.vue2.mjs";
|
|
25
|
-
const Ee = {
|
|
26
|
-
style: {
|
|
27
|
-
"padding-inline": "8px"
|
|
28
|
-
}
|
|
29
|
-
}, ct = /* @__PURE__ */ pe({
|
|
30
|
-
name: "ApTableSetting",
|
|
31
|
-
__name: "index",
|
|
32
|
-
props: {
|
|
33
|
-
config: {
|
|
34
|
-
default: () => ({
|
|
35
|
-
persistenceKey: ""
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
setup(H) {
|
|
40
|
-
const T = H, {
|
|
41
|
-
columnsBackup: J,
|
|
42
|
-
updateSize: Q,
|
|
43
|
-
updateColumns: W
|
|
44
|
-
} = we(), m = v(), h = ce(() => T.config.persistenceKey), b = v(!1), {
|
|
45
|
-
basicTemplate: X,
|
|
46
|
-
customizeTemplateList: d,
|
|
47
|
-
addTemplate: Y,
|
|
48
|
-
deleteTemplate: N,
|
|
49
|
-
updateTemplate: Z
|
|
50
|
-
} = Be(T.config, h), {
|
|
51
|
-
columnState: p,
|
|
52
|
-
setColumnState: K,
|
|
53
|
-
isAllSelected: ee,
|
|
54
|
-
toggleSelectAll: te
|
|
55
|
-
} = Ae([]), $ = `${h.value}__active_key`;
|
|
56
|
-
function I(a) {
|
|
57
|
-
localStorage.setItem($, a);
|
|
58
|
-
}
|
|
59
|
-
function L() {
|
|
60
|
-
return localStorage.getItem($);
|
|
61
|
-
}
|
|
62
|
-
const i = v(L() ?? d.value?.[0].key);
|
|
63
|
-
Ke({
|
|
64
|
-
activeKey: i,
|
|
65
|
-
cacheConfig: me(T, "config"),
|
|
66
|
-
deleteTemplate: re
|
|
67
|
-
});
|
|
68
|
-
const {
|
|
69
|
-
t: r
|
|
70
|
-
} = Le(), {
|
|
71
|
-
b: f,
|
|
72
|
-
be: C
|
|
73
|
-
} = G("ap-column-setting"), {
|
|
74
|
-
b: ae
|
|
75
|
-
} = G("ap-table"), le = Ne("ap-column-setting"), y = v(!1), R = v(!1), ne = de(), V = xe(ne.trigger) || l(F, {
|
|
76
|
-
icon: l(Te, null, null),
|
|
77
|
-
class: ae("setting-trigger-button")
|
|
78
|
-
}, null), D = V ? fe(V, {
|
|
79
|
-
onClick: () => {
|
|
80
|
-
y.value = !0;
|
|
81
|
-
}
|
|
82
|
-
}) : null;
|
|
83
|
-
function oe() {
|
|
84
|
-
K(B(e(X).columnState));
|
|
85
|
-
}
|
|
86
|
-
function O(a, t) {
|
|
87
|
-
W?.($e(e(J), a)), Q?.(t);
|
|
88
|
-
}
|
|
89
|
-
function ie() {
|
|
90
|
-
O(e(p), e(m)), y.value = !1;
|
|
91
|
-
const a = B(p.value), t = Z(i.value, {
|
|
92
|
-
columnState: a,
|
|
93
|
-
size: m.value
|
|
94
|
-
});
|
|
95
|
-
I(i.value), T.config?.onChange?.(a, t);
|
|
96
|
-
}
|
|
97
|
-
function se(a) {
|
|
98
|
-
const t = ze();
|
|
99
|
-
Y({
|
|
100
|
-
key: t,
|
|
101
|
-
label: a,
|
|
102
|
-
columnState: p.value,
|
|
103
|
-
size: m.value
|
|
104
|
-
}), b.value = !1, i.value = t;
|
|
105
|
-
}
|
|
106
|
-
function U(a) {
|
|
107
|
-
const t = [...d.value].find((n) => n?.key === a);
|
|
108
|
-
t && (K(B(t.columnState)), m.value = t.size);
|
|
109
|
-
}
|
|
110
|
-
function re(a) {
|
|
111
|
-
if (a !== i.value) {
|
|
112
|
-
N(a);
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
const t = d.value, n = t.findIndex((z) => z.key === a), s = t[n + 1]?.key ?? t[n - 1]?.key;
|
|
116
|
-
N(a), i.value = s, I(s);
|
|
117
|
-
}
|
|
118
|
-
function ue(a) {
|
|
119
|
-
if (R.value = a, !a) {
|
|
120
|
-
const t = L();
|
|
121
|
-
t && t !== i.value && (i.value = t);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
E(() => i.value, (a, t) => {
|
|
125
|
-
if (!t && a) {
|
|
126
|
-
const n = [...d.value].find((s) => s?.key === a);
|
|
127
|
-
if (!n)
|
|
128
|
-
return;
|
|
129
|
-
O(n.columnState, n.size);
|
|
130
|
-
}
|
|
131
|
-
U(a);
|
|
132
|
-
}, {
|
|
133
|
-
immediate: !0
|
|
134
|
-
});
|
|
135
|
-
const _ = v(!1);
|
|
136
|
-
return E([m, p, y], ([a, t, n]) => {
|
|
137
|
-
if (!n)
|
|
138
|
-
return;
|
|
139
|
-
const s = d.value.find((z) => z.key === i.value);
|
|
140
|
-
s && (s.size !== a || !Ie(t, s.columnState)) ? _.value = !0 : _.value = !1;
|
|
141
|
-
}, {
|
|
142
|
-
deep: !0
|
|
143
|
-
}), (a, t) => (S(), P(ve, null, [e(D) ? (S(), x(w(e(D)), {
|
|
144
|
-
key: 0
|
|
145
|
-
})) : j("", !0), l(e(Ce), {
|
|
146
|
-
open: y.value,
|
|
147
|
-
"onUpdate:open": t[4] || (t[4] = (n) => y.value = n),
|
|
148
|
-
title: e(r)("ap.apTable.setting.title"),
|
|
149
|
-
width: 1e3,
|
|
150
|
-
centered: !0,
|
|
151
|
-
"body-style": {
|
|
152
|
-
padding: "0px !important",
|
|
153
|
-
height: "516px"
|
|
154
|
-
},
|
|
155
|
-
"after-open-change": ue,
|
|
156
|
-
"wrap-class-name": `${e(f)()} ${e(le)}`,
|
|
157
|
-
"ok-text": e(r)("ap.apTable.setting.saveAndApply"),
|
|
158
|
-
"mask-closable": !1,
|
|
159
|
-
onOk: ie
|
|
160
|
-
}, {
|
|
161
|
-
footer: o(({
|
|
162
|
-
extra: n
|
|
163
|
-
}) => [l(e(he), {
|
|
164
|
-
justify: "space-between"
|
|
165
|
-
}, {
|
|
166
|
-
default: o(() => [l(e(q), {
|
|
167
|
-
size: 12
|
|
168
|
-
}, {
|
|
169
|
-
default: o(() => [l(e(_e), {
|
|
170
|
-
open: b.value,
|
|
171
|
-
"onUpdate:open": t[3] || (t[3] = (s) => b.value = s),
|
|
172
|
-
trigger: "click",
|
|
173
|
-
arrow: !1,
|
|
174
|
-
placement: "topLeft",
|
|
175
|
-
"destroy-tooltip-on-hide": ""
|
|
176
|
-
}, {
|
|
177
|
-
content: o(() => [l(Ue, {
|
|
178
|
-
onConfirm: se,
|
|
179
|
-
onCancel: t[2] || (t[2] = () => b.value = !1)
|
|
180
|
-
})]),
|
|
181
|
-
default: o(() => [l(e(Oe), {
|
|
182
|
-
type: "borderLink",
|
|
183
|
-
disabled: !a.config.persistenceKey
|
|
184
|
-
}, {
|
|
185
|
-
icon: o(() => [l(e(be))]),
|
|
186
|
-
default: o(() => [k(g(e(r)("ap.apTable.setting.saveAsTemplate")) + " ", 1)]),
|
|
187
|
-
_: 1
|
|
188
|
-
}, 8, ["disabled"])]),
|
|
189
|
-
_: 1
|
|
190
|
-
}, 8, ["open"]), _.value ? (S(), P("span", {
|
|
191
|
-
key: 0,
|
|
192
|
-
class: u(e(f)("modify-tip"))
|
|
193
|
-
}, g(e(r)("ap.apTable.setting.modifyNotification")), 3)) : j("", !0)]),
|
|
194
|
-
_: 1
|
|
195
|
-
}), l(e(q), {
|
|
196
|
-
size: 10
|
|
197
|
-
}, {
|
|
198
|
-
default: o(() => [(S(), x(w(n.cancelBtn))), (S(), x(w(n.okBtn)))]),
|
|
199
|
-
_: 2
|
|
200
|
-
}, 1024)]),
|
|
201
|
-
_: 2
|
|
202
|
-
}, 1024)]),
|
|
203
|
-
default: o(() => [ge(c("div", {
|
|
204
|
-
class: u(e(f)("wrapper"))
|
|
205
|
-
}, [c("div", {
|
|
206
|
-
class: u(e(f)("left"))
|
|
207
|
-
}, [l(Re, {
|
|
208
|
-
"customize-template-list": e(d),
|
|
209
|
-
"persistence-key": h.value,
|
|
210
|
-
onActiveChange: U
|
|
211
|
-
}, null, 8, ["customize-template-list", "persistence-key"])], 2), l(e(A), {
|
|
212
|
-
type: "vertical",
|
|
213
|
-
style: {
|
|
214
|
-
height: "100%",
|
|
215
|
-
margin: "0px"
|
|
216
|
-
}
|
|
217
|
-
}), c("div", {
|
|
218
|
-
class: u(e(f)("center"))
|
|
219
|
-
}, [c("div", {
|
|
220
|
-
class: u(e(C)("center", "header"))
|
|
221
|
-
}, [c("div", {
|
|
222
|
-
class: u(e(C)("center", "tip-wrapper"))
|
|
223
|
-
}, [c("span", {
|
|
224
|
-
class: u(e(C)("center", "header-tips"))
|
|
225
|
-
}, g(e(r)("ap.apTable.setting.selectAllTip")), 3), l(e(F), {
|
|
226
|
-
type: "link",
|
|
227
|
-
size: "small",
|
|
228
|
-
onClick: e(te)
|
|
229
|
-
}, {
|
|
230
|
-
default: o(() => [k(g(e(ee) ? e(r)("ap.apTable.setting.unSelectAll") : e(r)("ap.apTable.setting.selectAll")), 1)]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["onClick"])], 2), l(e(ke), {
|
|
233
|
-
value: m.value,
|
|
234
|
-
"onUpdate:value": t[0] || (t[0] = (n) => m.value = n)
|
|
235
|
-
}, {
|
|
236
|
-
default: o(() => [l(e(M), {
|
|
237
|
-
value: "small"
|
|
238
|
-
}, {
|
|
239
|
-
default: o(() => [k(g(e(r)("ap.apTable.setting.sizeSmall")), 1)]),
|
|
240
|
-
_: 1
|
|
241
|
-
}), l(e(M), {
|
|
242
|
-
value: "middle"
|
|
243
|
-
}, {
|
|
244
|
-
default: o(() => [k(g(e(r)("ap.apTable.setting.sizeNormal")), 1)]),
|
|
245
|
-
_: 1
|
|
246
|
-
})]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 8, ["value"])], 2), c("div", Ee, [l(e(A), {
|
|
249
|
-
dashed: "",
|
|
250
|
-
style: {
|
|
251
|
-
margin: "0px"
|
|
252
|
-
}
|
|
253
|
-
})]), l(Ve, {
|
|
254
|
-
class: u(e(C)("center", "content")),
|
|
255
|
-
value: e(p)
|
|
256
|
-
}, null, 8, ["class", "value"])], 2), l(e(A), {
|
|
257
|
-
type: "vertical",
|
|
258
|
-
style: {
|
|
259
|
-
height: "100%",
|
|
260
|
-
margin: "0px"
|
|
261
|
-
}
|
|
262
|
-
}), c("div", {
|
|
263
|
-
class: u(e(f)("right"))
|
|
264
|
-
}, [l(De, {
|
|
265
|
-
value: e(p),
|
|
266
|
-
"onUpdate:value": t[1] || (t[1] = (n) => ye(p) ? p.value = n : null),
|
|
267
|
-
onReset: oe
|
|
268
|
-
}, null, 8, ["value"])], 2)], 2), [[Se, R.value]])]),
|
|
269
|
-
_: 1
|
|
270
|
-
}, 8, ["open", "title", "wrap-class-name", "ok-text"])], 64));
|
|
271
|
-
}
|
|
272
|
-
});
|
|
1
|
+
import f from "./index.vue.mjs";
|
|
273
2
|
export {
|
|
274
|
-
|
|
3
|
+
f as default
|
|
275
4
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as U, ref as x, computed as v, unref as n, watch as D, createElementBlock as k, openBlock as s, normalizeClass as w, createElementVNode as b, createVNode as i, withCtx as d, createBlock as u, resolveDynamicComponent as
|
|
2
|
-
import { Checkbox as
|
|
1
|
+
import { defineComponent as U, ref as x, computed as v, unref as n, watch as D, createElementBlock as k, openBlock as s, normalizeClass as w, createElementVNode as b, createVNode as i, withCtx as d, createBlock as u, resolveDynamicComponent as g, Fragment as L, renderList as j, mergeProps as z } from "vue";
|
|
2
|
+
import { Checkbox as C, Row as F, Col as I } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../../config-provider/index.mjs";
|
|
4
4
|
import { useInjectApTable as R } from "../../../context.mjs";
|
|
5
5
|
import { getLabelNode as y } from "../utils.mjs";
|
|
@@ -49,31 +49,34 @@ const M = /* @__PURE__ */ U({
|
|
|
49
49
|
b("div", {
|
|
50
50
|
class: w(n(h)("header"))
|
|
51
51
|
}, [
|
|
52
|
-
i(n(
|
|
52
|
+
i(n(C), {
|
|
53
53
|
indeterminate: c.value,
|
|
54
54
|
checked: e.value?.show,
|
|
55
55
|
disabled: E.value,
|
|
56
56
|
"onUpdate:checked": B
|
|
57
57
|
}, {
|
|
58
58
|
default: d(() => [
|
|
59
|
-
(s(), u(
|
|
59
|
+
(s(), u(g(n(y)(f.value, n(m)))))
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
}, 8, ["indeterminate", "checked", "disabled"])
|
|
63
63
|
], 2),
|
|
64
64
|
b("div", null, [
|
|
65
|
-
i(n(F), {
|
|
65
|
+
i(n(F), {
|
|
66
|
+
align: "middle",
|
|
67
|
+
gutter: 24
|
|
68
|
+
}, {
|
|
66
69
|
default: d(() => [
|
|
67
70
|
(s(!0), k(L, null, j(f.value.children, (o) => (s(), u(n(I), {
|
|
68
71
|
key: o.key,
|
|
69
|
-
span:
|
|
72
|
+
span: 12
|
|
70
73
|
}, {
|
|
71
74
|
default: d(() => [
|
|
72
|
-
i(n(
|
|
75
|
+
i(n(C), z({ ref_for: !0 }, A(o), {
|
|
73
76
|
"onUpdate:checked": (a) => N(o.key, a)
|
|
74
77
|
}), {
|
|
75
78
|
default: d(() => [
|
|
76
|
-
(s(), u(
|
|
79
|
+
(s(), u(g(n(y)(o, n(m)))))
|
|
77
80
|
]),
|
|
78
81
|
_: 2
|
|
79
82
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -114,6 +114,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
114
114
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
115
115
|
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
116
116
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
117
|
+
readonly autoFocusFirstInput?: boolean | undefined;
|
|
117
118
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
118
119
|
$attrs: {
|
|
119
120
|
[x: string]: unknown;
|
|
@@ -839,6 +840,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
839
840
|
}> & {} & ComponentCustomProperties & {} & {
|
|
840
841
|
$slots: {
|
|
841
842
|
default?(_: {}): any;
|
|
843
|
+
default?(_: {}): any;
|
|
842
844
|
};
|
|
843
845
|
}) | null;
|
|
844
846
|
}, HTMLDivElement>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as b, createElementBlock as c, openBlock as s, normalizeClass as n, unref as t, createElementVNode as f, createBlock as w, createCommentVNode as v, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as d } from "vue";
|
|
2
2
|
import { EditOutlined as N, DeleteOutlined as A } from "@ant-design/icons-vue";
|
|
3
3
|
import { Flex as D, Popover as E } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import { useInjectApColumnSetting as
|
|
5
|
+
import { useInjectApColumnSetting as S } from "../context.mjs";
|
|
6
6
|
import "./edit-form.vue.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { useNamespace as V } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import F from "./edit-form.vue2.mjs";
|
|
9
|
+
const K = /* @__PURE__ */ g({
|
|
10
10
|
__name: "item",
|
|
11
11
|
props: {
|
|
12
12
|
value: {},
|
|
@@ -14,29 +14,29 @@ const M = /* @__PURE__ */ b({
|
|
|
14
14
|
onClick: { type: Function },
|
|
15
15
|
shouldRemove: { type: Boolean }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const p =
|
|
19
|
-
function y(
|
|
20
|
-
if (!
|
|
17
|
+
setup(C) {
|
|
18
|
+
const p = C, { b: l } = V("ap-column-setting-template-item"), a = b(!1), { deleteTemplate: k, cacheConfig: m } = S();
|
|
19
|
+
function y(o) {
|
|
20
|
+
if (!o || o === p.value.label)
|
|
21
21
|
return;
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const e = p.value;
|
|
23
|
+
e.label = o, m.value?.onChange?.(e.columnState, e), a.value = !1;
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
class: n([
|
|
27
|
-
onClick:
|
|
28
|
-
(...
|
|
25
|
+
return (o, e) => (s(), c("div", {
|
|
26
|
+
class: n([t(l)(), { [t(l)("active")]: o.isActive }]),
|
|
27
|
+
onClick: e[3] || (e[3] = //@ts-ignore
|
|
28
|
+
(...u) => o.onClick && o.onClick(...u))
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
class: n(
|
|
32
|
-
}, B(
|
|
33
|
-
|
|
30
|
+
f("span", {
|
|
31
|
+
class: n(t(l)("label"))
|
|
32
|
+
}, B(o.value.label), 3),
|
|
33
|
+
t(m).persistenceKey ? (s(), w(t(D), {
|
|
34
34
|
key: 0,
|
|
35
35
|
gap: 8,
|
|
36
|
-
class: n(
|
|
36
|
+
class: n(t(l)("action-wrapper"))
|
|
37
37
|
}, {
|
|
38
38
|
default: r(() => [
|
|
39
|
-
i(
|
|
39
|
+
i(t(E), {
|
|
40
40
|
open: a.value,
|
|
41
41
|
trigger: "click",
|
|
42
42
|
arrow: !1,
|
|
@@ -44,36 +44,36 @@ const M = /* @__PURE__ */ b({
|
|
|
44
44
|
"destroy-tooltip-on-hide": ""
|
|
45
45
|
}, {
|
|
46
46
|
content: r(() => [
|
|
47
|
-
i(
|
|
47
|
+
i(F, {
|
|
48
48
|
"is-edit": "",
|
|
49
|
-
"initial-values": { label:
|
|
49
|
+
"initial-values": { label: o.value.label },
|
|
50
50
|
onConfirm: y,
|
|
51
|
-
onCancel:
|
|
51
|
+
onCancel: e[1] || (e[1] = () => a.value = !1)
|
|
52
52
|
}, null, 8, ["initial-values"])
|
|
53
53
|
]),
|
|
54
54
|
default: r(() => [
|
|
55
|
-
|
|
56
|
-
class: n(
|
|
57
|
-
onClick:
|
|
55
|
+
f("span", {
|
|
56
|
+
class: n(t(l)("icon-wrapper")),
|
|
57
|
+
onClick: e[0] || (e[0] = d((u) => a.value = !0, ["stop"]))
|
|
58
58
|
}, [
|
|
59
|
-
i(
|
|
59
|
+
i(t(N))
|
|
60
60
|
], 2)
|
|
61
61
|
]),
|
|
62
62
|
_: 1
|
|
63
63
|
}, 8, ["open"]),
|
|
64
|
-
|
|
64
|
+
o.shouldRemove ? (s(), c("span", {
|
|
65
65
|
key: 0,
|
|
66
|
-
class: n(
|
|
67
|
-
onClick:
|
|
66
|
+
class: n(t(l)("icon-wrapper")),
|
|
67
|
+
onClick: e[2] || (e[2] = d(() => t(k)(o.value.key), ["stop"]))
|
|
68
68
|
}, [
|
|
69
|
-
i(
|
|
70
|
-
], 2)) :
|
|
69
|
+
i(t(A))
|
|
70
|
+
], 2)) : v("", !0)
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
|
-
}, 8, ["class"])) :
|
|
73
|
+
}, 8, ["class"])) : v("", !0)
|
|
74
74
|
], 2));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
K as default
|
|
79
79
|
};
|
|
@@ -990,7 +990,7 @@ export declare const apTableFormItemMap: {
|
|
|
990
990
|
readonly filterSort?: ((optionA: DefaultOptionType, optionB: DefaultOptionType, info: {
|
|
991
991
|
searchValue: string;
|
|
992
992
|
}) => number) | undefined;
|
|
993
|
-
readonly optionFilterProp?: string | undefined;
|
|
993
|
+
readonly optionFilterProp?: string | string[] | undefined;
|
|
994
994
|
readonly optionLabelProp?: string | undefined;
|
|
995
995
|
readonly options?: DefaultOptionType[] | undefined;
|
|
996
996
|
readonly defaultActiveFirstOption?: boolean | undefined;
|
|
@@ -1157,7 +1157,7 @@ export declare const apTableFormItemMap: {
|
|
|
1157
1157
|
filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType, info: {
|
|
1158
1158
|
searchValue: string;
|
|
1159
1159
|
}) => number>;
|
|
1160
|
-
optionFilterProp:
|
|
1160
|
+
optionFilterProp: PropType<string | string[]>;
|
|
1161
1161
|
optionLabelProp: StringConstructor;
|
|
1162
1162
|
options: PropType< DefaultOptionType[]>;
|
|
1163
1163
|
defaultActiveFirstOption: {
|
|
@@ -1379,7 +1379,7 @@ export declare const apTableFormItemMap: {
|
|
|
1379
1379
|
filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType, info: {
|
|
1380
1380
|
searchValue: string;
|
|
1381
1381
|
}) => number>;
|
|
1382
|
-
optionFilterProp:
|
|
1382
|
+
optionFilterProp: PropType<string | string[]>;
|
|
1383
1383
|
optionLabelProp: StringConstructor;
|
|
1384
1384
|
options: PropType< DefaultOptionType[]>;
|
|
1385
1385
|
defaultActiveFirstOption: {
|