@aplus-frontend/ui 0.6.0-beta.2 → 0.6.0-beta.3
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-form/search-form/components/popover-sorter/index.vue2.mjs +39 -34
- package/es/src/ap-grid/editable/form-item.vue.mjs +23 -20
- package/es/src/ap-grid/editable/index.vue.mjs +3 -0
- package/es/src/ap-grid/index.vue.mjs +45 -43
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-grid/utils/table.mjs +32 -32
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/package.json +4 -4
- package/theme/antd-global-overwrite/admin/index.css +4 -17
- package/theme/antd-global-overwrite/admin/modal.css +4 -17
- package/theme/antd-global-overwrite/admin/modal.less +4 -19
- package/theme/antd-global-overwrite/aplus/index.css +4 -11
- package/theme/antd-global-overwrite/aplus/modal.css +4 -11
- package/theme/antd-global-overwrite/aplus/modal.less +4 -14
- package/theme/ap-form/ap-form-item.css +2 -2
- package/theme/ap-form/ap-form-item.less +2 -2
- package/theme/ap-form/index.css +5 -2
- package/theme/ap-form/search-form.css +5 -2
- package/theme/ap-form/search-form.less +3 -0
- package/theme/ap-grid/index.css +5 -2
- package/theme/ap-table/ap-table.css +8 -5
- package/theme/ap-table/setting/index.css +3 -3
- package/theme/ap-table/setting/modal.css +1 -2
- package/theme/ap-table/setting/modal.less +1 -2
- package/theme/ap-table/setting/select-group.css +2 -1
- package/theme/ap-table/setting/select-group.less +2 -1
- package/theme/ap-table-modal/index.css +8 -5
- package/theme/editable-table/index.css +5 -2
- package/theme/index.css +8 -5
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as T, ref as h, unref as e, createBlock as w, openBlock as B, withCtx as t, createVNode as o, createElementVNode as n, normalizeClass as r, toDisplayString as l, createTextVNode as
|
|
2
|
-
import { Popover as
|
|
1
|
+
import { defineComponent as T, ref as h, unref as e, createBlock as w, openBlock as B, withCtx as t, createVNode as o, createElementVNode as n, normalizeClass as r, toDisplayString as l, createTextVNode as y } from "vue";
|
|
2
|
+
import { Popover as S, Tooltip as D, Button as v, Flex as C, Divider as L } from "@aplus-frontend/antdv";
|
|
3
3
|
import { IconApLayoutOutlined as P } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import
|
|
5
|
+
import V from "vuedraggable";
|
|
6
6
|
import "./sortable-item.vue.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
7
|
+
import { getStringName as j } from "../../../item-group/helper.mjs";
|
|
8
|
+
import { useNamespace as g } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as A } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import I from "./sortable-item.vue2.mjs";
|
|
11
|
+
const J = /* @__PURE__ */ T({
|
|
11
12
|
name: "ApFormSearchFormPopoverSorter",
|
|
12
13
|
__name: "index",
|
|
13
14
|
props: {
|
|
@@ -15,22 +16,25 @@ const G = /* @__PURE__ */ T({
|
|
|
15
16
|
onClickConfirm: { type: Function }
|
|
16
17
|
},
|
|
17
18
|
setup(k) {
|
|
18
|
-
const d = k,
|
|
19
|
-
let
|
|
20
|
-
const { e:
|
|
21
|
-
function F(
|
|
22
|
-
return
|
|
19
|
+
const d = k, p = h(d.children);
|
|
20
|
+
let _ = [...d.children];
|
|
21
|
+
const { e: c } = g("ap-form-search-form"), { b: a } = g("search-form-sorter"), { t: s } = A(), i = h(!1);
|
|
22
|
+
function F(m) {
|
|
23
|
+
return m.closest(".ant-form") || document.body;
|
|
23
24
|
}
|
|
24
25
|
function b() {
|
|
25
|
-
i.value = !1, console.log(e(
|
|
26
|
+
i.value = !1, console.log(e(p)), d.onClickConfirm(e(p));
|
|
26
27
|
}
|
|
27
28
|
function x() {
|
|
28
|
-
|
|
29
|
+
p.value = [..._];
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
function N(m) {
|
|
32
|
+
return j(m.props.name);
|
|
33
|
+
}
|
|
34
|
+
return (m, f) => (B(), w(e(S), {
|
|
31
35
|
open: i.value,
|
|
32
|
-
"onUpdate:open":
|
|
33
|
-
"overlay-class-name": e(
|
|
36
|
+
"onUpdate:open": f[1] || (f[1] = (u) => i.value = u),
|
|
37
|
+
"overlay-class-name": e(c)("popover"),
|
|
34
38
|
trigger: "click",
|
|
35
39
|
placement: "bottom",
|
|
36
40
|
mask: "",
|
|
@@ -44,7 +48,7 @@ const G = /* @__PURE__ */ T({
|
|
|
44
48
|
n("span", {
|
|
45
49
|
class: r(e(a)("header-title"))
|
|
46
50
|
}, l(e(s)("ap.apForm.search.sorterTitle")), 3),
|
|
47
|
-
o(e(
|
|
51
|
+
o(e(C), { justify: "space-between" }, {
|
|
48
52
|
default: t(() => [
|
|
49
53
|
n("span", {
|
|
50
54
|
class: r(e(a)("header-desc"))
|
|
@@ -62,39 +66,40 @@ const G = /* @__PURE__ */ T({
|
|
|
62
66
|
})
|
|
63
67
|
], 2),
|
|
64
68
|
n("div", {
|
|
65
|
-
class: r([e(
|
|
69
|
+
class: r([e(c)("popover-content"), e(a)("content")])
|
|
66
70
|
}, [
|
|
67
|
-
o(e(
|
|
68
|
-
list:
|
|
69
|
-
class: r(e(a)("sorter-wrapper"))
|
|
71
|
+
o(e(V), {
|
|
72
|
+
list: p.value,
|
|
73
|
+
class: r(e(a)("sorter-wrapper")),
|
|
74
|
+
"item-key": N
|
|
70
75
|
}, {
|
|
71
|
-
item: t(({ element:
|
|
72
|
-
o(
|
|
76
|
+
item: t(({ element: u }) => [
|
|
77
|
+
o(I, { item: u }, null, 8, ["item"])
|
|
73
78
|
]),
|
|
74
79
|
_: 1
|
|
75
80
|
}, 8, ["list", "class"])
|
|
76
81
|
], 2),
|
|
77
82
|
o(e(L), { style: { margin: "0" } }),
|
|
78
83
|
n("div", {
|
|
79
|
-
class: r(e(
|
|
84
|
+
class: r(e(c)("popover-footer"))
|
|
80
85
|
}, [
|
|
81
|
-
o(e(
|
|
86
|
+
o(e(C), { justify: "end" }, {
|
|
82
87
|
default: t(() => [
|
|
83
|
-
o(e(
|
|
84
|
-
onClick:
|
|
88
|
+
o(e(v), {
|
|
89
|
+
onClick: f[0] || (f[0] = (u) => i.value = !1)
|
|
85
90
|
}, {
|
|
86
91
|
default: t(() => [
|
|
87
|
-
|
|
92
|
+
y(l(e(s)("ap.common.cancelText")), 1)
|
|
88
93
|
]),
|
|
89
94
|
_: 1
|
|
90
95
|
}),
|
|
91
|
-
o(e(
|
|
92
|
-
class: r(e(
|
|
96
|
+
o(e(v), {
|
|
97
|
+
class: r(e(c)("popover-footer-confirm-btn")),
|
|
93
98
|
type: "primary",
|
|
94
99
|
onClick: b
|
|
95
100
|
}, {
|
|
96
101
|
default: t(() => [
|
|
97
|
-
|
|
102
|
+
y(l(e(s)("ap.apForm.search.sorterConfirmBtn")), 1)
|
|
98
103
|
]),
|
|
99
104
|
_: 1
|
|
100
105
|
}, 8, ["class"])
|
|
@@ -109,7 +114,7 @@ const G = /* @__PURE__ */ T({
|
|
|
109
114
|
placement: "top"
|
|
110
115
|
}, {
|
|
111
116
|
default: t(() => [
|
|
112
|
-
o(e(
|
|
117
|
+
o(e(v), null, {
|
|
113
118
|
icon: t(() => [
|
|
114
119
|
o(e(P))
|
|
115
120
|
]),
|
|
@@ -124,5 +129,5 @@ const G = /* @__PURE__ */ T({
|
|
|
124
129
|
}
|
|
125
130
|
});
|
|
126
131
|
export {
|
|
127
|
-
|
|
132
|
+
J as default
|
|
128
133
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as u, watch as K, nextTick as W, createBlock as G, openBlock as U, mergeProps as
|
|
1
|
+
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as u, watch as K, nextTick as W, createBlock as G, openBlock as U, mergeProps as y, withCtx as g, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
|
|
2
2
|
import { ApForm as C } from "../../ap-form/index.mjs";
|
|
3
3
|
import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -9,7 +9,7 @@ import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
|
9
9
|
import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
11
|
import ne from "../index.vue.mjs";
|
|
12
|
-
const
|
|
12
|
+
const ge = /* @__PURE__ */ P({
|
|
13
13
|
name: "EditableGrid",
|
|
14
14
|
__name: "form-item",
|
|
15
15
|
props: {
|
|
@@ -108,6 +108,9 @@ const ye = /* @__PURE__ */ P({
|
|
|
108
108
|
loadingConfig: {},
|
|
109
109
|
headerCellConfig: {},
|
|
110
110
|
footerCellConfig: {},
|
|
111
|
+
round: {
|
|
112
|
+
type: Boolean
|
|
113
|
+
},
|
|
111
114
|
rowSelection: {
|
|
112
115
|
type: Boolean,
|
|
113
116
|
default: void 0
|
|
@@ -182,32 +185,32 @@ const ye = /* @__PURE__ */ P({
|
|
|
182
185
|
const a = {
|
|
183
186
|
...e || {}
|
|
184
187
|
};
|
|
185
|
-
t == null || t.setFieldValue(l.name, a, !0, (
|
|
186
|
-
if (!r
|
|
187
|
-
r
|
|
188
|
+
t == null || t.setFieldValue(l.name, a, !0, (f, r) => {
|
|
189
|
+
if (!f[r]) {
|
|
190
|
+
f[r] = [a];
|
|
188
191
|
return;
|
|
189
192
|
}
|
|
190
|
-
I(o) ? r
|
|
193
|
+
I(o) ? f[r].push(a) : f[r].splice(o, 0, a);
|
|
191
194
|
});
|
|
192
195
|
}
|
|
193
196
|
function L(e, o = "suffix") {
|
|
194
|
-
var
|
|
195
|
-
const n = ((
|
|
197
|
+
var f;
|
|
198
|
+
const n = ((f = u(d)) == null ? void 0 : f.length) || 0, a = m(e) ? e : e.length;
|
|
196
199
|
if (w(l.maxLength) && n + a > l.maxLength)
|
|
197
200
|
return;
|
|
198
201
|
const s = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
|
|
199
|
-
t == null || t.setFieldValue(l.name, s, !0, (
|
|
200
|
-
if (!
|
|
201
|
-
|
|
202
|
+
t == null || t.setFieldValue(l.name, s, !0, (r, i) => {
|
|
203
|
+
if (!r[i]) {
|
|
204
|
+
r[i] = [...s];
|
|
202
205
|
return;
|
|
203
206
|
}
|
|
204
|
-
o === "suffix" ?
|
|
207
|
+
o === "suffix" ? r[i].push(...s) : r[i].unshift(...s);
|
|
205
208
|
});
|
|
206
209
|
}
|
|
207
210
|
function V(e) {
|
|
208
211
|
const o = new Set(m(e) ? [e] : e);
|
|
209
212
|
t == null || t.setFieldValue(l.name, void 0, !0, (n, a) => {
|
|
210
|
-
n[a] = n[a].filter((s,
|
|
213
|
+
n[a] = n[a].filter((s, f) => !o.has(f));
|
|
211
214
|
});
|
|
212
215
|
}
|
|
213
216
|
function T() {
|
|
@@ -221,9 +224,9 @@ const ye = /* @__PURE__ */ P({
|
|
|
221
224
|
t == null || t.setFieldValue(l.name, void 0, !0, (a, s) => {
|
|
222
225
|
if (!(!a[s] || !a[s][e])) {
|
|
223
226
|
if (!n) {
|
|
224
|
-
const
|
|
225
|
-
for (const
|
|
226
|
-
|
|
227
|
+
const f = Object.keys(a[s][e]);
|
|
228
|
+
for (const r of f)
|
|
229
|
+
r !== l.rowKey && delete a[s][e][r];
|
|
227
230
|
}
|
|
228
231
|
Object.assign(a[s][e], {
|
|
229
232
|
...o
|
|
@@ -253,11 +256,11 @@ const ye = /* @__PURE__ */ P({
|
|
|
253
256
|
scrollTo: O,
|
|
254
257
|
setTableData: E,
|
|
255
258
|
clear: z
|
|
256
|
-
}), (e, o) => (U(), G(u(C).FormItem,
|
|
259
|
+
}), (e, o) => (U(), G(u(C).FormItem, y(e.formItem, {
|
|
257
260
|
name: e.name,
|
|
258
261
|
label: e.label
|
|
259
262
|
}), {
|
|
260
|
-
default:
|
|
263
|
+
default: g(() => [$(ne, y(u(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
261
264
|
ref_key: "tableRef",
|
|
262
265
|
ref: c,
|
|
263
266
|
class: u(B)(),
|
|
@@ -268,12 +271,12 @@ const ye = /* @__PURE__ */ P({
|
|
|
268
271
|
_: 2
|
|
269
272
|
}, [J(R, (n, a) => ({
|
|
270
273
|
name: a,
|
|
271
|
-
fn:
|
|
274
|
+
fn: g((s) => [Q(e.$slots, a, X(Y(s || {})))])
|
|
272
275
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
273
276
|
_: 3
|
|
274
277
|
}, 16, ["name", "label"]));
|
|
275
278
|
}
|
|
276
279
|
});
|
|
277
280
|
export {
|
|
278
|
-
|
|
281
|
+
ge as default
|
|
279
282
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Be, useSlots as Fe, getCurrentInstance as Ie, ref as B, computed as n, unref as o, watch as F, createElementBlock as I, openBlock as s, normalizeStyle as V, normalizeClass as g, createCommentVNode as S, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as p, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Ee, guardReactiveProps as Pe } from "vue";
|
|
2
2
|
import { VxeTable as Ne, VxeColumn as Y } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
@@ -24,7 +24,7 @@ import { useNamespace as Ze } from "../config-provider/hooks/use-namespace.mjs";
|
|
|
24
24
|
import { useGlobalConfig as eo } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
25
|
import { useLocale as oo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
26
|
import ao from "../scroll-bar/index.vue.mjs";
|
|
27
|
-
const No = /* @__PURE__ */
|
|
27
|
+
const No = /* @__PURE__ */ Be({
|
|
28
28
|
name: "ApGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -87,6 +87,7 @@ const No = /* @__PURE__ */ Fe({
|
|
|
87
87
|
loadingConfig: {},
|
|
88
88
|
headerCellConfig: {},
|
|
89
89
|
footerCellConfig: {},
|
|
90
|
+
round: { type: Boolean, default: void 0 },
|
|
90
91
|
columns: {},
|
|
91
92
|
rowSelection: { type: Boolean },
|
|
92
93
|
card: { type: Boolean, default: !1 },
|
|
@@ -114,15 +115,15 @@ const No = /* @__PURE__ */ Fe({
|
|
|
114
115
|
},
|
|
115
116
|
setup(re, { expose: te }) {
|
|
116
117
|
var G;
|
|
117
|
-
const C =
|
|
118
|
+
const C = Fe(), a = re, x = (G = Ie()) == null ? void 0 : G.appContext.app;
|
|
118
119
|
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(Z), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
119
|
-
const { e: P, b:
|
|
120
|
+
const { e: P, b: u, be: le } = Ze("ap-grid"), ne = eo("valueTypeMap"), i = B([]), $ = B([]), m = B(), y = B(a.size), [, d] = Je(), { t: se } = oo();
|
|
120
121
|
Z.setConfig({
|
|
121
122
|
i18n: (e, r) => se(`ap.${e}`, r)
|
|
122
123
|
});
|
|
123
124
|
const { renderConfig: ie, updateSignal: de } = Xe(i);
|
|
124
125
|
let K = 0;
|
|
125
|
-
const
|
|
126
|
+
const ue = n(() => {
|
|
126
127
|
if (m.value)
|
|
127
128
|
return m.value.$el.querySelector(
|
|
128
129
|
".vxe-table--header-inner-wrapper"
|
|
@@ -131,39 +132,39 @@ const No = /* @__PURE__ */ Fe({
|
|
|
131
132
|
var e, r, l;
|
|
132
133
|
return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
133
134
|
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
|
|
134
|
-
)) == null ? void 0 : r.sort((t,
|
|
135
|
-
let
|
|
136
|
-
return ee(
|
|
135
|
+
)) == null ? void 0 : r.sort((t, c) => {
|
|
136
|
+
let b = ee(t.order);
|
|
137
|
+
return ee(c.order) - b;
|
|
137
138
|
})) == null ? void 0 : l.map((t) => {
|
|
138
|
-
const
|
|
139
|
+
const c = Ae(
|
|
139
140
|
t,
|
|
140
141
|
Ve(t.fieldProps, {})
|
|
141
|
-
),
|
|
142
|
+
), b = {
|
|
142
143
|
...t,
|
|
143
144
|
fieldProps: {
|
|
144
145
|
label: t.title,
|
|
145
146
|
name: t.dataIndex,
|
|
146
|
-
...
|
|
147
|
+
...c || {},
|
|
147
148
|
_signal: K
|
|
148
149
|
},
|
|
149
150
|
renderNode: void 0
|
|
150
151
|
};
|
|
151
|
-
return
|
|
152
|
-
|
|
152
|
+
return b.renderNode = Le(
|
|
153
|
+
b,
|
|
153
154
|
o(ne)
|
|
154
|
-
),
|
|
155
|
+
), b;
|
|
155
156
|
})) || [];
|
|
156
|
-
}),
|
|
157
|
+
}), ce = n(() => {
|
|
157
158
|
var r;
|
|
158
159
|
return Qe(a.manual) ? a.manual : Ye(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
|
|
159
160
|
var t;
|
|
160
161
|
return ((t = l.type) == null ? void 0 : t.name) === "ApView";
|
|
161
162
|
});
|
|
162
163
|
}), pe = n(() => [
|
|
163
|
-
|
|
164
|
-
a.card ? null :
|
|
165
|
-
a.adaptive ?
|
|
166
|
-
a.sticky ?
|
|
164
|
+
u(),
|
|
165
|
+
a.card ? null : u("wrapper"),
|
|
166
|
+
a.adaptive ? u("adaptive") : null,
|
|
167
|
+
a.sticky ? u("sticky") : null
|
|
167
168
|
].filter(Boolean)), j = n(() => oe(o(i), (e) => {
|
|
168
169
|
if (e.sorter === !0)
|
|
169
170
|
return e.key || e.dataIndex;
|
|
@@ -200,7 +201,7 @@ const No = /* @__PURE__ */ Fe({
|
|
|
200
201
|
sortFields: j,
|
|
201
202
|
defaultParams: a.params,
|
|
202
203
|
defaultData: a.defaultData,
|
|
203
|
-
manual: o(
|
|
204
|
+
manual: o(ce),
|
|
204
205
|
formatParams: a.beforeSearchSubmit,
|
|
205
206
|
pagination: a.pagination
|
|
206
207
|
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = $e(ge);
|
|
@@ -229,13 +230,13 @@ const No = /* @__PURE__ */ Fe({
|
|
|
229
230
|
() => i.value.some(
|
|
230
231
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
231
232
|
) ? "left" : void 0
|
|
232
|
-
), Se = n(
|
|
233
|
-
() => w(a.loading) ? f.loading : a.loading
|
|
234
233
|
), be = n(
|
|
234
|
+
() => w(a.loading) ? f.loading : a.loading
|
|
235
|
+
), Se = n(
|
|
235
236
|
() => w(a.dataSource) ? f.records : a.dataSource
|
|
236
237
|
), { selectedRows: R, rowSelection: k, ...we } = He({
|
|
237
238
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
238
|
-
dataSource:
|
|
239
|
+
dataSource: Se,
|
|
239
240
|
rowKey: a.rowKey
|
|
240
241
|
}), _ = () => {
|
|
241
242
|
const e = m.value;
|
|
@@ -256,9 +257,9 @@ const No = /* @__PURE__ */ Fe({
|
|
|
256
257
|
(t = (l = (r = N.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
|
|
257
258
|
}
|
|
258
259
|
function U(e = !1) {
|
|
259
|
-
var l, t,
|
|
260
|
+
var l, t, c;
|
|
260
261
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
261
|
-
return (
|
|
262
|
+
return (c = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : c.call(t, !0);
|
|
262
263
|
}
|
|
263
264
|
function A() {
|
|
264
265
|
we.clearAll();
|
|
@@ -271,7 +272,7 @@ const No = /* @__PURE__ */ Fe({
|
|
|
271
272
|
if (l)
|
|
272
273
|
return (t = m.value) == null ? void 0 : t.scrollToRow(l, r);
|
|
273
274
|
}
|
|
274
|
-
return
|
|
275
|
+
return F(
|
|
275
276
|
() => [a.columnResizable, a.columns],
|
|
276
277
|
() => {
|
|
277
278
|
var r;
|
|
@@ -282,19 +283,19 @@ const No = /* @__PURE__ */ Fe({
|
|
|
282
283
|
deep: !0,
|
|
283
284
|
immediate: !0
|
|
284
285
|
}
|
|
285
|
-
),
|
|
286
|
+
), F(
|
|
286
287
|
() => a.dataSource,
|
|
287
288
|
(e) => {
|
|
288
289
|
fe(e);
|
|
289
290
|
},
|
|
290
291
|
{ immediate: !0, deep: !0 }
|
|
291
|
-
),
|
|
292
|
+
), F(
|
|
292
293
|
() => o(f).loading,
|
|
293
294
|
(e) => {
|
|
294
295
|
var r;
|
|
295
296
|
(r = a.onLoadingChange) == null || r.call(a, e);
|
|
296
297
|
}
|
|
297
|
-
),
|
|
298
|
+
), F(
|
|
298
299
|
() => a.size,
|
|
299
300
|
(e) => {
|
|
300
301
|
y.value = e;
|
|
@@ -349,13 +350,13 @@ const No = /* @__PURE__ */ Fe({
|
|
|
349
350
|
key: "0"
|
|
350
351
|
} : void 0
|
|
351
352
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
352
|
-
], 6)) :
|
|
353
|
+
], 6)) : S("", !0),
|
|
353
354
|
E("div", {
|
|
354
355
|
class: g([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
355
356
|
style: V(e.tableWrapperStyle)
|
|
356
357
|
}, [
|
|
357
358
|
E("div", {
|
|
358
|
-
class: g(o(
|
|
359
|
+
class: g(o(u)("header-wrapper"))
|
|
359
360
|
}, [
|
|
360
361
|
O(e.$slots, "title", {
|
|
361
362
|
selectedRows: o(R),
|
|
@@ -365,7 +366,7 @@ const No = /* @__PURE__ */ Fe({
|
|
|
365
366
|
})
|
|
366
367
|
], 2),
|
|
367
368
|
E("div", {
|
|
368
|
-
class: g(o(
|
|
369
|
+
class: g(o(u)("vxe-wrapper"))
|
|
369
370
|
}, [
|
|
370
371
|
(s(), p(o(Ne), h(o(Ke)(a), {
|
|
371
372
|
ref_key: "tableRef",
|
|
@@ -374,7 +375,7 @@ const No = /* @__PURE__ */ Fe({
|
|
|
374
375
|
data: o(f).records,
|
|
375
376
|
"sort-config": { remote: j.value.length > 0 },
|
|
376
377
|
"filter-config": { remote: H.value.length > 0 },
|
|
377
|
-
loading:
|
|
378
|
+
loading: be.value,
|
|
378
379
|
style: {
|
|
379
380
|
"--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
|
|
380
381
|
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
|
|
@@ -387,7 +388,8 @@ const No = /* @__PURE__ */ Fe({
|
|
|
387
388
|
"--vxe-ui-font-color": o(d).colorTextBase,
|
|
388
389
|
"--vxe-ui-table-border-color": o(d).colorBorderSecondary,
|
|
389
390
|
"--vxe-ui-table-header-font-color": o(d).colorTextBase,
|
|
390
|
-
"--vxe-ui-table-cell-padding-mini": "8px"
|
|
391
|
+
"--vxe-ui-table-cell-padding-mini": "8px",
|
|
392
|
+
"--vxe-ui-table-row-line-height": "18px"
|
|
391
393
|
},
|
|
392
394
|
size: y.value,
|
|
393
395
|
onSortChange: o(he),
|
|
@@ -408,8 +410,8 @@ const No = /* @__PURE__ */ Fe({
|
|
|
408
410
|
(s(), p(D(a.expandable.renderContent(l))))
|
|
409
411
|
]),
|
|
410
412
|
_: 1
|
|
411
|
-
}, 16, ["fixed"])) :
|
|
412
|
-
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k), i.value), { field: o(Ge) }), null, 16, ["field"])) :
|
|
413
|
+
}, 16, ["fixed"])) : S("", !0),
|
|
414
|
+
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k), i.value), { field: o(Ge) }), null, 16, ["field"])) : S("", !0),
|
|
413
415
|
(s(!0), I(Q, null, L(o(ie), (l) => (s(), p(D(l), {
|
|
414
416
|
key: l.props.colId
|
|
415
417
|
}))), 128))
|
|
@@ -418,25 +420,25 @@ const No = /* @__PURE__ */ Fe({
|
|
|
418
420
|
}, [
|
|
419
421
|
L(o(Te)(C, ["searchFormExtra"]), (l, t) => ({
|
|
420
422
|
name: t,
|
|
421
|
-
fn: v((
|
|
422
|
-
O(e.$slots, t, Ee(Pe(
|
|
423
|
+
fn: v((c) => [
|
|
424
|
+
O(e.$slots, t, Ee(Pe(c || {})))
|
|
423
425
|
])
|
|
424
426
|
}))
|
|
425
427
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
426
428
|
], 2),
|
|
427
429
|
E("div", {
|
|
428
|
-
class: g(o(
|
|
430
|
+
class: g(o(u)("pagination-wrapper"))
|
|
429
431
|
}, [
|
|
430
432
|
e.sticky ? (s(), p(o(ao), {
|
|
431
433
|
key: 0,
|
|
432
434
|
direction: "horizontal",
|
|
433
|
-
"scroll-container":
|
|
435
|
+
"scroll-container": ue.value,
|
|
434
436
|
"extra-size": -4.2
|
|
435
|
-
}, null, 8, ["scroll-container"])) :
|
|
437
|
+
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
436
438
|
e.pagination !== !1 ? (s(), p(o(Oe), h({
|
|
437
439
|
key: 1,
|
|
438
|
-
class: o(
|
|
439
|
-
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) :
|
|
440
|
+
class: o(u)("pagination")
|
|
441
|
+
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
440
442
|
], 2)
|
|
441
443
|
], 6)
|
|
442
444
|
], 6));
|
|
@@ -119,7 +119,7 @@ export type ApGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>,
|
|
|
119
119
|
*/
|
|
120
120
|
range?: boolean;
|
|
121
121
|
};
|
|
122
|
-
export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowKey' | 'rowClassName' | 'footer' | 'loading'> & Pick<VxeTableProps<RecordType>, 'rowClassName' | 'stripe' | 'headerRowClassName' | 'footerRowClassName' | 'cellClassName' | 'headerCellClassName' | 'footerCellClassName' | 'rowStyle' | 'headerRowStyle' | 'footerRowStyle' | 'cellStyle' | 'headerCellStyle' | 'footerCellStyle' | 'height' | 'minHeight' | 'maxHeight' | 'mergeCells' | 'mergeFooterItems' | 'cellConfig' | 'loading' | 'loadingConfig' | 'headerCellConfig' | 'footerCellConfig'> & {
|
|
122
|
+
export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowKey' | 'rowClassName' | 'footer' | 'loading'> & Pick<VxeTableProps<RecordType>, 'rowClassName' | 'stripe' | 'headerRowClassName' | 'footerRowClassName' | 'cellClassName' | 'headerCellClassName' | 'footerCellClassName' | 'rowStyle' | 'headerRowStyle' | 'footerRowStyle' | 'cellStyle' | 'headerCellStyle' | 'footerCellStyle' | 'height' | 'minHeight' | 'maxHeight' | 'mergeCells' | 'mergeFooterItems' | 'cellConfig' | 'loading' | 'loadingConfig' | 'headerCellConfig' | 'footerCellConfig' | 'round'> & {
|
|
123
123
|
/**
|
|
124
124
|
* 列配置
|
|
125
125
|
*/
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { omit as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { omit as u, isUndefined as l, isFunction as h, isNumber as m } from "lodash-unified";
|
|
2
|
+
import { isDef as w } from "../../utils/index.mjs";
|
|
3
|
+
const y = 20, C = 50, b = (e) => e.some((t) => !!t.html);
|
|
4
|
+
function v(e) {
|
|
4
5
|
var i;
|
|
5
6
|
const t = {
|
|
6
|
-
...
|
|
7
|
+
...u(e, [
|
|
7
8
|
"columns",
|
|
8
9
|
"request",
|
|
9
10
|
"searchForm",
|
|
10
11
|
"dataSource",
|
|
11
12
|
"rowKey",
|
|
12
|
-
"value"
|
|
13
|
+
"value",
|
|
14
|
+
"round"
|
|
13
15
|
])
|
|
14
16
|
};
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
if (t.rowConfig = {
|
|
18
|
+
isHover: !0,
|
|
19
|
+
keyField: e.rowKey
|
|
20
|
+
}, t.columnConfig = {}, b(e.columns || []) && (t.rowConfig.useKey = !0, t.columnConfig.useKey = !0), e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig.resizable = !0), e.rowSelection) {
|
|
18
21
|
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
19
22
|
o.type === "radio" ? t.radioConfig = {
|
|
20
23
|
highlight: !0,
|
|
@@ -25,7 +28,7 @@ function R(e) {
|
|
|
25
28
|
return o.shown ? o.shown(r) : !0;
|
|
26
29
|
},
|
|
27
30
|
checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
|
|
28
|
-
reserve:
|
|
31
|
+
reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
29
32
|
} : t.checkboxConfig = {
|
|
30
33
|
highlight: !0,
|
|
31
34
|
checkMethod({ row: r }) {
|
|
@@ -35,11 +38,11 @@ function R(e) {
|
|
|
35
38
|
return o.shown ? o.shown(r) : !0;
|
|
36
39
|
},
|
|
37
40
|
checkRowKeys: o.defaultSelectedRowKeys,
|
|
38
|
-
reserve:
|
|
41
|
+
reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
|
|
39
42
|
range: o.range || !1
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
|
-
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig =
|
|
45
|
+
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = u(e.expandable, [
|
|
43
46
|
"renderContent",
|
|
44
47
|
"width",
|
|
45
48
|
"title"
|
|
@@ -47,34 +50,31 @@ function R(e) {
|
|
|
47
50
|
enabled: !1
|
|
48
51
|
}, t.virtualYConfig = {
|
|
49
52
|
enabled: !1
|
|
50
|
-
}) : (
|
|
51
|
-
isHover: !0,
|
|
52
|
-
keyField: e.rowKey
|
|
53
|
-
}, t.round = !0, t;
|
|
53
|
+
}) : (f(t, "X", e.virtual), f(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
e[
|
|
58
|
-
enabled:
|
|
55
|
+
function f(e, t, n) {
|
|
56
|
+
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o], a = d !== !1, s = i ? y : C, c = m(d) && d >= 0 ? d : s;
|
|
57
|
+
e[r] = {
|
|
58
|
+
enabled: a,
|
|
59
59
|
gt: c,
|
|
60
|
-
oSize: (
|
|
60
|
+
oSize: (n == null ? void 0 : n.oSize) || 0
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
function x(e) {
|
|
64
64
|
return e === !0 ? "left" : e;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
return
|
|
70
|
-
(
|
|
66
|
+
function K(e, t) {
|
|
67
|
+
const n = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
68
|
+
let o = e === !0 ? void 0 : x(e.fixed);
|
|
69
|
+
return o || (o === !1 ? o = void 0 : o = t.some(
|
|
70
|
+
(r) => r.fixed === "left" || r.fixed === !0
|
|
71
71
|
) ? "left" : void 0), {
|
|
72
|
-
type:
|
|
73
|
-
width:
|
|
74
|
-
fixed:
|
|
72
|
+
type: n,
|
|
73
|
+
width: i,
|
|
74
|
+
fixed: o
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function k(e) {
|
|
78
78
|
const t = (e == null ? void 0 : e.width) || "auto";
|
|
79
79
|
return {
|
|
80
80
|
type: "expand",
|
|
@@ -83,7 +83,7 @@ function g(e) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
k as getRowExpandProps,
|
|
87
|
+
K as getRowSelectionProps,
|
|
88
|
+
v as toVxeProps
|
|
89
89
|
};
|