@aplus-frontend/ui 0.6.0-beta.14 → 0.6.0-beta.15
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-grid/hooks/use-row-selection.d.ts +100 -0
- package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
- package/es/src/ap-grid/index.vue.mjs +272 -238
- package/es/src/ap-grid/interface.d.ts +6 -0
- package/es/src/ap-grid/utils/table.mjs +6 -7
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +99 -96
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
- package/es/src/business/ap-label/interface.d.ts +2 -3
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
- package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +6 -0
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -3
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ap-table-modal/index.css +15 -13
- package/theme/ap-table-modal/index.less +15 -13
- package/theme/index.css +15 -13
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as ze, useSlots as _e, getCurrentInstance as Ve, ref as F, computed as n, unref as o, nextTick as Ke, watch as B, createElementBlock as I, openBlock as c, normalizeStyle as V, normalizeClass as h, createCommentVNode as S, createElementVNode as E, createVNode as J, mergeProps as v, createSlots as Q, withCtx as C, Fragment as Y, renderList as K, createBlock as f, resolveDynamicComponent as L, renderSlot as D, normalizeProps as Le, guardReactiveProps as De } from "vue";
|
|
2
|
+
import { VxeTable as Oe, VxeColumn as Z } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
5
|
-
import { VxeUI as
|
|
6
|
-
import { isUndefined as
|
|
7
|
-
import { ApForm as
|
|
5
|
+
import { VxeUI as ee } from "vxe-pc-ui";
|
|
6
|
+
import { isUndefined as R, isFunction as oe, omit as $e } from "lodash-unified";
|
|
7
|
+
import { ApForm as He } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
|
-
import { noRenderAsFormItemValueList as
|
|
10
|
-
import { getColumnOrder as
|
|
11
|
-
import { useTablePaging as
|
|
12
|
-
import { Empty as
|
|
13
|
-
import { useInnerParams as
|
|
14
|
-
import { toVxeProps as
|
|
15
|
-
import
|
|
16
|
-
import { useProvideApTable as
|
|
17
|
-
import { sizeReverseMap as
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
9
|
+
import { noRenderAsFormItemValueList as Me } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as ae, updateFormProps as We, getFieldProps as je, getSearchFormItemRenderNode as qe, recursionApColumns as te } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as Ue } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as re, Pagination as Ge } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as Xe } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Je, getRowExpandProps as Qe, getRowSelectionProps as Ye } from "./utils/table.mjs";
|
|
15
|
+
import Ze from "./hooks/use-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as eo } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as oo, sizeMap as ao, ROW_SELECTION_FIELD as to } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as ro } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as lo } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { isDef as
|
|
22
|
-
import { getValidVNodeList as
|
|
23
|
-
import { useNamespace as
|
|
24
|
-
import { useGlobalConfig as
|
|
25
|
-
import { useLocale as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
21
|
+
import { isDef as no } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as so } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as io } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as co } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as uo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import po from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const Oo = /* @__PURE__ */ ze({
|
|
28
28
|
name: "ApGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -114,363 +114,397 @@ const _o = /* @__PURE__ */ Ee({
|
|
|
114
114
|
value: {},
|
|
115
115
|
rowHighlightable: { type: [Boolean, Function], default: !1 }
|
|
116
116
|
},
|
|
117
|
-
setup(
|
|
118
|
-
var
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const { e: P, b: u, be:
|
|
122
|
-
|
|
123
|
-
i18n: (e,
|
|
117
|
+
setup(le, { expose: ne }) {
|
|
118
|
+
var X;
|
|
119
|
+
const b = _e(), t = le, x = (X = Ve()) == null ? void 0 : X.appContext.app;
|
|
120
|
+
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(ee), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
121
|
+
const { e: P, b: u, be: se } = io("ap-grid"), ie = co("valueTypeMap"), i = F([]), O = F([]), s = F(), k = F(t.size), [, d] = lo(), { t: ce } = uo();
|
|
122
|
+
ee.setConfig({
|
|
123
|
+
i18n: (e, a) => ce(`ap.${e}`, a)
|
|
124
124
|
});
|
|
125
|
-
const { renderConfig:
|
|
126
|
-
let
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
return
|
|
125
|
+
const { renderConfig: de, updateSignal: ue } = ro(i);
|
|
126
|
+
let $ = 0;
|
|
127
|
+
const pe = n(() => {
|
|
128
|
+
if (s.value)
|
|
129
|
+
return s.value.$el.querySelector(
|
|
130
130
|
".vxe-table--header-inner-wrapper"
|
|
131
131
|
);
|
|
132
132
|
}), H = n(() => {
|
|
133
|
-
var e,
|
|
134
|
-
return
|
|
135
|
-
(
|
|
136
|
-
)) == null ? void 0 :
|
|
137
|
-
let
|
|
138
|
-
return
|
|
139
|
-
})) == null ? void 0 :
|
|
140
|
-
const p =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
-
...
|
|
133
|
+
var e, a, r;
|
|
134
|
+
return $++, ((r = (a = (e = t.columns) == null ? void 0 : e.filter(
|
|
135
|
+
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Me.includes(l.valueType)
|
|
136
|
+
)) == null ? void 0 : a.sort((l, p) => {
|
|
137
|
+
let w = ae(l.order);
|
|
138
|
+
return ae(p.order) - w;
|
|
139
|
+
})) == null ? void 0 : r.map((l) => {
|
|
140
|
+
const p = We(
|
|
141
|
+
l,
|
|
142
|
+
je(l.fieldProps, {})
|
|
143
|
+
), w = {
|
|
144
|
+
...l,
|
|
145
145
|
fieldProps: {
|
|
146
|
-
label:
|
|
147
|
-
name:
|
|
146
|
+
label: l.title,
|
|
147
|
+
name: l.dataIndex,
|
|
148
148
|
// tips: 在表格中的查询表单项默认是带边框的
|
|
149
149
|
bordered: !0,
|
|
150
150
|
...p || {},
|
|
151
|
-
_signal:
|
|
151
|
+
_signal: $
|
|
152
152
|
},
|
|
153
153
|
renderNode: void 0
|
|
154
154
|
};
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
o(
|
|
158
|
-
),
|
|
155
|
+
return w.renderNode = qe(
|
|
156
|
+
w,
|
|
157
|
+
o(ie)
|
|
158
|
+
), w;
|
|
159
159
|
})) || [];
|
|
160
|
-
}),
|
|
161
|
-
var
|
|
162
|
-
return
|
|
163
|
-
var
|
|
164
|
-
return ((
|
|
160
|
+
}), fe = n(() => {
|
|
161
|
+
var a;
|
|
162
|
+
return no(t.manual) ? t.manual : so(((a = b.searchFormExtra) == null ? void 0 : a.call(b)) || []).some((r) => {
|
|
163
|
+
var l;
|
|
164
|
+
return ((l = r.type) == null ? void 0 : l.name) === "ApView";
|
|
165
165
|
});
|
|
166
|
-
}),
|
|
166
|
+
}), me = n(() => [
|
|
167
167
|
u(),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
].filter(Boolean)),
|
|
168
|
+
t.card ? null : u("wrapper"),
|
|
169
|
+
t.adaptive ? u("adaptive") : null,
|
|
170
|
+
t.sticky ? u("sticky") : null
|
|
171
|
+
].filter(Boolean)), M = n(() => te(o(i), (e) => {
|
|
172
172
|
if (e.sorter === !0)
|
|
173
173
|
return e.key || e.dataIndex;
|
|
174
|
-
}).filter(Boolean)),
|
|
174
|
+
}).filter(Boolean)), W = n(() => te(o(i), (e) => {
|
|
175
175
|
if (e.filters && !e.onFilter)
|
|
176
176
|
return e.key || e.dataIndex;
|
|
177
177
|
}).filter(Boolean)), {
|
|
178
|
-
formRef:
|
|
179
|
-
submit:
|
|
180
|
-
reset:
|
|
181
|
-
refresh:
|
|
182
|
-
data:
|
|
183
|
-
tableProps:
|
|
184
|
-
setDataSource:
|
|
185
|
-
handleTableChangeOptional:
|
|
186
|
-
} =
|
|
178
|
+
formRef: T,
|
|
179
|
+
submit: N,
|
|
180
|
+
reset: A,
|
|
181
|
+
refresh: ge,
|
|
182
|
+
data: m,
|
|
183
|
+
tableProps: j,
|
|
184
|
+
setDataSource: he,
|
|
185
|
+
handleTableChangeOptional: ve
|
|
186
|
+
} = Ue({
|
|
187
187
|
async request(e) {
|
|
188
|
-
var
|
|
189
|
-
if (!
|
|
190
|
-
const
|
|
188
|
+
var r;
|
|
189
|
+
if (!g.value.preserveSelectedRowKeys && R(t.dataSource) && _(), !R(t.dataSource)) {
|
|
190
|
+
const l = e.pageSize * (e.current - 1);
|
|
191
191
|
return {
|
|
192
|
-
data: (
|
|
193
|
-
total:
|
|
192
|
+
data: (t.pagination === !1 ? t.dataSource : t.dataSource.slice(l, l + e.pageSize)) || [],
|
|
193
|
+
total: t.dataSource.length || 0
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const a = await ((r = t.request) == null ? void 0 : r.call(t, e));
|
|
197
197
|
return {
|
|
198
|
-
data: (
|
|
199
|
-
total: (
|
|
198
|
+
data: (a == null ? void 0 : a.data) || [],
|
|
199
|
+
total: (a == null ? void 0 : a.total) || 0
|
|
200
200
|
};
|
|
201
201
|
},
|
|
202
202
|
namespace: "ap-grid",
|
|
203
|
-
filterFields:
|
|
204
|
-
sortFields:
|
|
205
|
-
defaultParams:
|
|
206
|
-
defaultData:
|
|
207
|
-
manual: o(
|
|
208
|
-
formatParams:
|
|
209
|
-
pagination:
|
|
210
|
-
onClickReset:
|
|
211
|
-
|
|
212
|
-
Xe(
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
filterFields: W,
|
|
204
|
+
sortFields: M,
|
|
205
|
+
defaultParams: t.params,
|
|
206
|
+
defaultData: t.defaultData,
|
|
207
|
+
manual: o(fe),
|
|
208
|
+
formatParams: t.beforeSearchSubmit,
|
|
209
|
+
pagination: t.pagination,
|
|
210
|
+
onClickReset: Ne,
|
|
211
|
+
onAfterRequest: G
|
|
212
|
+
}), { sortChangeEvent: Ce, filterChangeEvent: be, paginationChangeEvent: ye } = Xe(ve);
|
|
213
|
+
eo({
|
|
214
|
+
columns: n(() => i.value),
|
|
215
|
+
columnsBackup: n(() => O.value),
|
|
216
|
+
size: n(() => ao[k.value]),
|
|
216
217
|
updateColumns(e) {
|
|
217
|
-
var
|
|
218
|
-
|
|
218
|
+
var a;
|
|
219
|
+
i.value = e, (a = t.onShownColumnsChange) == null || a.call(t, e);
|
|
219
220
|
},
|
|
220
221
|
updateSize(e) {
|
|
221
|
-
|
|
222
|
+
k.value = oo[e];
|
|
222
223
|
},
|
|
223
224
|
renderConfig: n(() => ({
|
|
224
|
-
className:
|
|
225
|
-
color:
|
|
225
|
+
className: se("table-header", "title"),
|
|
226
|
+
color: d.value.colorTextTertiary
|
|
226
227
|
})),
|
|
227
|
-
dataSource: n(() => o(
|
|
228
|
+
dataSource: n(() => o(m).records),
|
|
228
229
|
getSearchFormValues: U,
|
|
229
230
|
setSearchFormValues: q,
|
|
230
|
-
submit:
|
|
231
|
-
reset:
|
|
231
|
+
submit: N,
|
|
232
|
+
reset: A
|
|
232
233
|
});
|
|
233
|
-
const
|
|
234
|
-
() =>
|
|
234
|
+
const we = n(
|
|
235
|
+
() => i.value.some(
|
|
235
236
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
236
237
|
) ? "left" : void 0
|
|
237
|
-
),
|
|
238
|
-
() =>
|
|
239
|
-
),
|
|
240
|
-
() =>
|
|
241
|
-
), { selectedRows:
|
|
242
|
-
...
|
|
243
|
-
dataSource:
|
|
244
|
-
rowKey:
|
|
245
|
-
}),
|
|
246
|
-
|
|
247
|
-
|
|
238
|
+
), Se = n(
|
|
239
|
+
() => R(t.loading) ? m.loading : t.loading
|
|
240
|
+
), Re = n(
|
|
241
|
+
() => R(t.dataSource) ? m.records : t.dataSource
|
|
242
|
+
), { selectedRows: z, rowSelection: g, ...y } = Ze({
|
|
243
|
+
...t.rowSelection === !0 ? {} : t.rowSelection,
|
|
244
|
+
dataSource: Re,
|
|
245
|
+
rowKey: t.rowKey
|
|
246
|
+
}), xe = ({
|
|
247
|
+
checked: e,
|
|
248
|
+
row: a
|
|
249
|
+
}) => {
|
|
250
|
+
const r = s.value;
|
|
251
|
+
if (r && r) {
|
|
252
|
+
const l = [
|
|
253
|
+
...r.getCheckboxReserveRecords(),
|
|
254
|
+
...r.getCheckboxRecords()
|
|
255
|
+
];
|
|
256
|
+
y.selectChange(a, e, l);
|
|
257
|
+
}
|
|
258
|
+
}, ke = ({
|
|
259
|
+
checked: e
|
|
260
|
+
}) => {
|
|
261
|
+
const a = s.value;
|
|
262
|
+
a && y.selectAllChange(e, [
|
|
263
|
+
...a.getCheckboxReserveRecords(),
|
|
264
|
+
...a.getCheckboxRecords()
|
|
265
|
+
]);
|
|
266
|
+
}, Fe = () => {
|
|
267
|
+
const e = s.value;
|
|
268
|
+
e && y.selectRangeChange(e.getCheckboxRecords(), [
|
|
248
269
|
...e.getCheckboxReserveRecords(),
|
|
249
270
|
...e.getCheckboxRecords()
|
|
250
271
|
]);
|
|
251
|
-
},
|
|
252
|
-
const e =
|
|
253
|
-
e && (
|
|
254
|
-
},
|
|
272
|
+
}, Be = () => {
|
|
273
|
+
const e = s.value;
|
|
274
|
+
e && (z.value = [e.getRadioRecord()]);
|
|
275
|
+
}, Ie = ({
|
|
255
276
|
row: e
|
|
256
277
|
}) => {
|
|
257
|
-
const
|
|
258
|
-
|
|
278
|
+
const a = t.rowHighlightable;
|
|
279
|
+
oe(a) && a(e);
|
|
259
280
|
};
|
|
260
|
-
function
|
|
281
|
+
function Ee() {
|
|
261
282
|
var e;
|
|
262
|
-
return ((e =
|
|
283
|
+
return ((e = t.columns) == null ? void 0 : e.filter((a) => !a.hideInTable)) || [];
|
|
263
284
|
}
|
|
264
285
|
function q(e) {
|
|
265
|
-
var r, l
|
|
266
|
-
(
|
|
286
|
+
var a, r, l;
|
|
287
|
+
(l = (r = (a = T.value) == null ? void 0 : a.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
|
|
267
288
|
}
|
|
268
289
|
function U(e = !1) {
|
|
269
|
-
var
|
|
270
|
-
const
|
|
271
|
-
return (p = (
|
|
290
|
+
var r, l, p;
|
|
291
|
+
const a = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
292
|
+
return (p = (l = (r = T.value) == null ? void 0 : r.apForm) == null ? void 0 : l[a]) == null ? void 0 : p.call(l, !0);
|
|
272
293
|
}
|
|
273
294
|
function _() {
|
|
274
|
-
|
|
275
|
-
const e =
|
|
276
|
-
e && (
|
|
295
|
+
y.clearAll();
|
|
296
|
+
const e = s.value;
|
|
297
|
+
e && (g.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
298
|
+
}
|
|
299
|
+
function Pe(e) {
|
|
300
|
+
oe(t.rowKey) || (y.selectMultiByKeys(e), G());
|
|
277
301
|
}
|
|
278
|
-
function
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
302
|
+
function Te(e) {
|
|
303
|
+
const a = s.value;
|
|
304
|
+
if (!a)
|
|
281
305
|
return;
|
|
282
|
-
const
|
|
283
|
-
|
|
306
|
+
const r = String(e[t.rowKey]), l = a.getRowById(r);
|
|
307
|
+
a.setCurrentRow(l);
|
|
284
308
|
}
|
|
285
|
-
function
|
|
286
|
-
const e =
|
|
309
|
+
function Ne() {
|
|
310
|
+
const e = s.value;
|
|
287
311
|
e && (e.clearSort(), e.clearFilter());
|
|
288
312
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
313
|
+
function G() {
|
|
314
|
+
Ke(() => {
|
|
315
|
+
var e, a;
|
|
316
|
+
g.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(g.value.selectedRowKeys[0]) : (a = s.value) == null || a.setCheckboxRowKey(
|
|
317
|
+
g.value.selectedRowKeys,
|
|
318
|
+
!0
|
|
319
|
+
);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
async function Ae(e, a) {
|
|
323
|
+
var l;
|
|
324
|
+
const r = m.records[e];
|
|
325
|
+
if (r)
|
|
326
|
+
return (l = s.value) == null ? void 0 : l.scrollToRow(r, a);
|
|
294
327
|
}
|
|
295
328
|
return B(
|
|
296
|
-
() => [
|
|
329
|
+
() => [t.columnResizable, t.columns],
|
|
297
330
|
() => {
|
|
298
|
-
var
|
|
299
|
-
const e =
|
|
300
|
-
|
|
331
|
+
var a;
|
|
332
|
+
const e = Ee();
|
|
333
|
+
i.value = e, (a = t.onShownColumnsChange) == null || a.call(t, e), O.value = e;
|
|
301
334
|
},
|
|
302
335
|
{
|
|
303
336
|
deep: !0,
|
|
304
337
|
immediate: !0
|
|
305
338
|
}
|
|
306
339
|
), B(
|
|
307
|
-
() =>
|
|
340
|
+
() => t.dataSource,
|
|
308
341
|
(e) => {
|
|
309
|
-
|
|
342
|
+
he(e);
|
|
310
343
|
},
|
|
311
344
|
{ immediate: !0, deep: !0 }
|
|
312
345
|
), B(
|
|
313
|
-
() => o(
|
|
346
|
+
() => o(m).loading,
|
|
314
347
|
(e) => {
|
|
315
|
-
var
|
|
316
|
-
(
|
|
348
|
+
var a;
|
|
349
|
+
(a = t.onLoadingChange) == null || a.call(t, e);
|
|
317
350
|
}
|
|
318
351
|
), B(
|
|
319
|
-
() =>
|
|
352
|
+
() => t.size,
|
|
320
353
|
(e) => {
|
|
321
|
-
|
|
354
|
+
k.value = e;
|
|
322
355
|
}
|
|
323
|
-
),
|
|
324
|
-
submit:
|
|
325
|
-
reset:
|
|
326
|
-
refresh:
|
|
356
|
+
), ne({
|
|
357
|
+
submit: N,
|
|
358
|
+
reset: A,
|
|
359
|
+
refresh: ge,
|
|
327
360
|
setSearchFormValues: q,
|
|
328
361
|
getSearchFormValues: U,
|
|
329
|
-
getShowColumns: () => o(
|
|
362
|
+
getShowColumns: () => o(i),
|
|
330
363
|
rowSelection: {
|
|
331
|
-
selectedRows: n(() =>
|
|
364
|
+
selectedRows: n(() => z.value),
|
|
365
|
+
setSelectedRowKeys: Pe,
|
|
332
366
|
clearAll: _
|
|
333
367
|
},
|
|
334
|
-
scrollToRow:
|
|
335
|
-
getDataSource: () => o(
|
|
336
|
-
setCurrentRow:
|
|
337
|
-
}), (e,
|
|
338
|
-
class:
|
|
368
|
+
scrollToRow: Ae,
|
|
369
|
+
getDataSource: () => o(m.records),
|
|
370
|
+
setCurrentRow: Te
|
|
371
|
+
}), (e, a) => (c(), I("div", {
|
|
372
|
+
class: h(me.value),
|
|
339
373
|
style: V(e.wrapperStyle)
|
|
340
374
|
}, [
|
|
341
|
-
o(
|
|
375
|
+
o(R)(e.dataSource) && e.searchForm !== !1 && H.value.length > 0 ? (c(), I("div", {
|
|
342
376
|
key: 0,
|
|
343
|
-
class:
|
|
377
|
+
class: h(e.card ? o(P)("search-wrapper") : null),
|
|
344
378
|
style: V(e.searchFormWrapperStyle)
|
|
345
379
|
}, [
|
|
346
|
-
|
|
380
|
+
J(o(He).SearchForm, v(e.searchForm || {}, {
|
|
347
381
|
ref_key: "formRef",
|
|
348
|
-
ref:
|
|
382
|
+
ref: T,
|
|
349
383
|
"custom-reset": "",
|
|
350
|
-
"submit-loading": o(
|
|
351
|
-
onSubmit: o(
|
|
352
|
-
onReset: o(
|
|
353
|
-
}),
|
|
354
|
-
default:
|
|
355
|
-
(
|
|
356
|
-
key:
|
|
357
|
-
item:
|
|
384
|
+
"submit-loading": o(j).loading,
|
|
385
|
+
onSubmit: o(N),
|
|
386
|
+
onReset: o(A)
|
|
387
|
+
}), Q({
|
|
388
|
+
default: C(() => [
|
|
389
|
+
(c(!0), I(Y, null, K(H.value, (r) => (c(), f(L(r.renderNode.Comp), v({
|
|
390
|
+
key: r.dataIndex,
|
|
391
|
+
item: r,
|
|
358
392
|
ref_for: !0
|
|
359
|
-
},
|
|
360
|
-
span:
|
|
361
|
-
"custom-render":
|
|
393
|
+
}, r.fieldProps || {}, {
|
|
394
|
+
span: r.span,
|
|
395
|
+
"custom-render": r.renderNode.render
|
|
362
396
|
}), null, 16, ["item", "span", "custom-render"]))), 128))
|
|
363
397
|
]),
|
|
364
398
|
_: 2
|
|
365
399
|
}, [
|
|
366
|
-
|
|
400
|
+
b.searchFormExtra ? {
|
|
367
401
|
name: "extra",
|
|
368
|
-
fn:
|
|
369
|
-
|
|
402
|
+
fn: C(() => [
|
|
403
|
+
D(e.$slots, "searchFormExtra")
|
|
370
404
|
]),
|
|
371
405
|
key: "0"
|
|
372
406
|
} : void 0
|
|
373
407
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
374
|
-
], 6)) :
|
|
408
|
+
], 6)) : S("", !0),
|
|
375
409
|
E("div", {
|
|
376
|
-
class:
|
|
410
|
+
class: h([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
377
411
|
style: V(e.tableWrapperStyle)
|
|
378
412
|
}, [
|
|
379
413
|
E("div", {
|
|
380
|
-
class:
|
|
414
|
+
class: h(o(u)("header-wrapper"))
|
|
381
415
|
}, [
|
|
382
|
-
|
|
383
|
-
selectedRows: o(
|
|
384
|
-
selectedRowKeys: o(
|
|
385
|
-
shownColumns:
|
|
416
|
+
D(e.$slots, "title", {
|
|
417
|
+
selectedRows: o(z),
|
|
418
|
+
selectedRowKeys: o(g).selectedRowKeys,
|
|
419
|
+
shownColumns: i.value,
|
|
386
420
|
clearAll: _
|
|
387
421
|
})
|
|
388
422
|
], 2),
|
|
389
423
|
E("div", {
|
|
390
|
-
class:
|
|
424
|
+
class: h(o(u)("vxe-wrapper"))
|
|
391
425
|
}, [
|
|
392
|
-
(
|
|
426
|
+
(c(), f(o(Oe), v(o(Je)(t), {
|
|
393
427
|
ref_key: "tableRef",
|
|
394
|
-
ref:
|
|
395
|
-
key: o(
|
|
396
|
-
data: o(
|
|
428
|
+
ref: s,
|
|
429
|
+
key: o(ue),
|
|
430
|
+
data: o(m).records,
|
|
397
431
|
"sort-config": {
|
|
398
|
-
remote:
|
|
432
|
+
remote: M.value.length > 0,
|
|
399
433
|
trigger: "cell"
|
|
400
434
|
},
|
|
401
435
|
"filter-config": {
|
|
402
|
-
remote:
|
|
436
|
+
remote: W.value.length > 0
|
|
403
437
|
},
|
|
404
|
-
loading:
|
|
438
|
+
loading: Se.value,
|
|
405
439
|
style: {
|
|
406
|
-
"--vxe-ui-table-row-checkbox-checked-background-color": o(
|
|
407
|
-
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(
|
|
408
|
-
"--vxe-ui-font-primary-color": o(
|
|
440
|
+
"--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
|
|
441
|
+
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
|
|
442
|
+
"--vxe-ui-font-primary-color": o(d).colorPrimary,
|
|
409
443
|
"--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
|
|
410
444
|
"--vxe-ui-table-cell-padding-default": "12px",
|
|
411
445
|
"--vxe-ui-table-cell-padding-medium": "9px",
|
|
412
|
-
"--vxe-ui-table-row-radio-checked-background-color": o(
|
|
413
|
-
"--vxe-ui-table-row-hover-radio-checked-background-color": o(
|
|
414
|
-
"--vxe-ui-font-color": o(
|
|
415
|
-
"--vxe-ui-table-border-color": o(
|
|
416
|
-
"--vxe-ui-table-header-font-color": o(
|
|
446
|
+
"--vxe-ui-table-row-radio-checked-background-color": o(d).controlItemBgActive,
|
|
447
|
+
"--vxe-ui-table-row-hover-radio-checked-background-color": o(d).controlItemBgActiveHover,
|
|
448
|
+
"--vxe-ui-font-color": o(d).colorTextBase,
|
|
449
|
+
"--vxe-ui-table-border-color": o(d).colorBorderSecondary,
|
|
450
|
+
"--vxe-ui-table-header-font-color": o(d).colorTextBase
|
|
417
451
|
},
|
|
418
|
-
size:
|
|
419
|
-
onSortChange: o(
|
|
420
|
-
onFilterChange: o(
|
|
421
|
-
onCheckboxChange:
|
|
422
|
-
onCheckboxRangeChange:
|
|
423
|
-
onCheckboxAll:
|
|
424
|
-
onRadioChange:
|
|
425
|
-
onCurrentChange:
|
|
426
|
-
}),
|
|
427
|
-
empty:
|
|
428
|
-
|
|
429
|
-
image: o(
|
|
452
|
+
size: k.value,
|
|
453
|
+
onSortChange: o(Ce),
|
|
454
|
+
onFilterChange: o(be),
|
|
455
|
+
onCheckboxChange: xe,
|
|
456
|
+
onCheckboxRangeChange: Fe,
|
|
457
|
+
onCheckboxAll: ke,
|
|
458
|
+
onRadioChange: Be,
|
|
459
|
+
onCurrentChange: Ie
|
|
460
|
+
}), Q({
|
|
461
|
+
empty: C(() => [
|
|
462
|
+
J(o(re), {
|
|
463
|
+
image: o(re).PRESENTED_IMAGE_SIMPLE
|
|
430
464
|
}, null, 8, ["image"])
|
|
431
465
|
]),
|
|
432
|
-
default:
|
|
433
|
-
|
|
434
|
-
content:
|
|
435
|
-
(
|
|
466
|
+
default: C(() => [
|
|
467
|
+
t.expandable && i.value.length ? (c(), f(o(Z), v({ key: 0 }, o(Qe)(e.expandable), { fixed: we.value }), {
|
|
468
|
+
content: C((r) => [
|
|
469
|
+
(c(), f(L(t.expandable.renderContent(r))))
|
|
436
470
|
]),
|
|
437
471
|
_: 1
|
|
438
|
-
}, 16, ["fixed"])) :
|
|
439
|
-
|
|
440
|
-
(
|
|
441
|
-
key:
|
|
472
|
+
}, 16, ["fixed"])) : S("", !0),
|
|
473
|
+
t.rowSelection && i.value.length ? (c(), f(o(Z), v({ key: 1 }, o(Ye)(o(g), i.value), { field: o(to) }), null, 16, ["field"])) : S("", !0),
|
|
474
|
+
(c(!0), I(Y, null, K(o(de), (r) => (c(), f(L(r), {
|
|
475
|
+
key: r.props.colId
|
|
442
476
|
}))), 128))
|
|
443
477
|
]),
|
|
444
478
|
_: 2
|
|
445
479
|
}, [
|
|
446
|
-
|
|
447
|
-
name:
|
|
448
|
-
fn:
|
|
449
|
-
|
|
480
|
+
K(o($e)(b, ["searchFormExtra"]), (r, l) => ({
|
|
481
|
+
name: l,
|
|
482
|
+
fn: C((p) => [
|
|
483
|
+
D(e.$slots, l, Le(De(p || {})))
|
|
450
484
|
])
|
|
451
485
|
}))
|
|
452
486
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
453
487
|
], 2),
|
|
454
488
|
E("div", {
|
|
455
|
-
class:
|
|
489
|
+
class: h(o(u)("pagination-wrapper"))
|
|
456
490
|
}, [
|
|
457
|
-
e.sticky ? (
|
|
491
|
+
e.sticky ? (c(), f(o(po), {
|
|
458
492
|
key: 0,
|
|
459
493
|
direction: "horizontal",
|
|
460
|
-
"scroll-container":
|
|
494
|
+
"scroll-container": pe.value,
|
|
461
495
|
"extra-size": -4.2,
|
|
462
496
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
463
497
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
464
|
-
}, null, 8, ["scroll-container"])) :
|
|
465
|
-
e.pagination !== !1 ? (
|
|
498
|
+
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
499
|
+
e.pagination !== !1 ? (c(), f(o(Ge), v({
|
|
466
500
|
key: 1,
|
|
467
501
|
class: o(u)("pagination")
|
|
468
|
-
}, o(
|
|
502
|
+
}, o(j).pagination, { onChange: o(ye) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
469
503
|
], 2)
|
|
470
504
|
], 6)
|
|
471
505
|
], 6));
|
|
472
506
|
}
|
|
473
507
|
});
|
|
474
508
|
export {
|
|
475
|
-
|
|
509
|
+
Oo as default
|
|
476
510
|
};
|