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