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