@aplus-frontend/ui 0.6.1 → 0.6.2
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/index.vue.mjs +140 -135
- package/es/src/ap-grid/utils/table.mjs +24 -21
- package/es/src/ap-table/utils.mjs +3 -3
- package/es/src/business/ap-card/ApCard.vue2.mjs +18 -18
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -2
- package/theme/antd-global-overwrite/admin/index.css +1 -288
- package/theme/antd-global-overwrite/admin/index.less +1 -7
- package/theme/antd-global-overwrite/aplus/index.css +1 -284
- package/theme/antd-global-overwrite/aplus/index.less +1 -7
- package/theme/antdv-override.css +572 -0
- package/theme/antdv-override.less +659 -0
- package/theme/ap-grid/index.css +7 -0
- package/theme/ap-grid/index.less +7 -0
- package/theme/index.css +579 -0
- package/theme/index.less +2 -1
- package/es/src/ap-grid/hooks/use-load-vxe.d.ts +0 -1
- package/lib/src/ap-grid/hooks/use-load-vxe.d.ts +0 -1
- package/theme/antd-global-overwrite/admin/alert.css +0 -37
- package/theme/antd-global-overwrite/admin/alert.less +0 -51
- package/theme/antd-global-overwrite/admin/button.css +0 -27
- package/theme/antd-global-overwrite/admin/button.less +0 -31
- package/theme/antd-global-overwrite/admin/drawer.css +0 -3
- package/theme/antd-global-overwrite/admin/drawer.less +0 -5
- package/theme/antd-global-overwrite/admin/field.css +0 -42
- package/theme/antd-global-overwrite/admin/field.less +0 -43
- package/theme/antd-global-overwrite/admin/form.css +0 -57
- package/theme/antd-global-overwrite/admin/form.less +0 -97
- package/theme/antd-global-overwrite/admin/message.css +0 -10
- package/theme/antd-global-overwrite/admin/message.less +0 -13
- package/theme/antd-global-overwrite/admin/modal.css +0 -91
- package/theme/antd-global-overwrite/admin/modal.less +0 -125
- package/theme/antd-global-overwrite/admin/pagination.css +0 -122
- package/theme/antd-global-overwrite/admin/pagination.less +0 -91
- package/theme/antd-global-overwrite/admin/steps.css +0 -127
- package/theme/antd-global-overwrite/admin/steps.less +0 -197
- package/theme/antd-global-overwrite/admin/table.css +0 -78
- package/theme/antd-global-overwrite/admin/table.less +0 -62
- package/theme/antd-global-overwrite/admin/tooltip.css +0 -3
- package/theme/antd-global-overwrite/admin/tooltip.less +0 -3
- package/theme/antd-global-overwrite/aplus/alert.css +0 -40
- package/theme/antd-global-overwrite/aplus/alert.less +0 -55
- package/theme/antd-global-overwrite/aplus/button.css +0 -27
- package/theme/antd-global-overwrite/aplus/button.less +0 -31
- package/theme/antd-global-overwrite/aplus/drawer.css +0 -3
- package/theme/antd-global-overwrite/aplus/drawer.less +0 -5
- package/theme/antd-global-overwrite/aplus/field.css +0 -42
- package/theme/antd-global-overwrite/aplus/field.less +0 -43
- package/theme/antd-global-overwrite/aplus/form.css +0 -87
- package/theme/antd-global-overwrite/aplus/form.less +0 -133
- package/theme/antd-global-overwrite/aplus/message.css +0 -10
- package/theme/antd-global-overwrite/aplus/message.less +0 -13
- package/theme/antd-global-overwrite/aplus/modal.css +0 -84
- package/theme/antd-global-overwrite/aplus/modal.less +0 -117
- package/theme/antd-global-overwrite/aplus/pagination.css +0 -147
- package/theme/antd-global-overwrite/aplus/pagination.less +0 -108
- package/theme/antd-global-overwrite/aplus/steps.css +0 -125
- package/theme/antd-global-overwrite/aplus/steps.less +0 -198
- package/theme/antd-global-overwrite/aplus/table.css +0 -78
- package/theme/antd-global-overwrite/aplus/table.less +0 -61
- package/theme/antd-global-overwrite/aplus/tooltip.css +0 -3
- package/theme/antd-global-overwrite/aplus/tooltip.less +0 -3
- package/theme/ap-table/ap-table-pagination.css +0 -12
- package/theme/ap-table/ap-table-pagination.less +0 -14
- /package/theme/{ui-mode.css → css-var.css} +0 -0
- /package/theme/{ui-mode.less → css-var.less} +0 -0
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import { defineComponent as Ke, useSlots as Le, getCurrentInstance as De, ref as
|
|
2
|
-
import { VxeTable as je, VxeColumn as
|
|
1
|
+
import { defineComponent as Ke, useSlots as Le, getCurrentInstance as De, ref as E, computed as n, unref as t, toRef as Oe, nextTick as $e, watch as B, createElementBlock as I, openBlock as d, normalizeStyle as A, normalizeClass as g, createCommentVNode as S, createElementVNode as b, createVNode as V, mergeProps as C, createSlots as J, withCtx as h, Fragment as Q, renderList as K, createBlock as p, resolveDynamicComponent as L, renderSlot as D, normalizeProps as Me, guardReactiveProps as We } from "vue";
|
|
2
|
+
import { VxeUI as Y, VxeTable as je, VxeColumn as Z } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
|
-
import "vxe-pc-ui/es/style.css";
|
|
5
|
-
import { VxeUI as Z } from "vxe-pc-ui";
|
|
6
4
|
import { isUndefined as R, isFunction as ee, omit as He } from "lodash-unified";
|
|
7
5
|
import { ApForm as qe } from "../ap-form/index.mjs";
|
|
8
6
|
import "../config-provider/index.mjs";
|
|
9
7
|
import { noRenderAsFormItemValueList as Ue } from "../ap-table/constants.mjs";
|
|
10
|
-
import { getColumnOrder as oe, updateFormProps as Ge, getFieldProps as Xe, getSearchFormItemRenderNode as Je, recursionApColumns as
|
|
8
|
+
import { getColumnOrder as oe, updateFormProps as Ge, getFieldProps as Xe, getSearchFormItemRenderNode as Je, recursionApColumns as ae } from "../ap-table/utils.mjs";
|
|
11
9
|
import { useTablePaging as Qe } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
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
|
|
10
|
+
import { Spin as Ye, Empty as te, Pagination as Ze } from "@aplus-frontend/antdv";
|
|
11
|
+
import { useInnerParams as eo } from "./hooks/use-inner-params.mjs";
|
|
12
|
+
import { toVxeProps as oo, getRowExpandProps as ao, getRowSelectionProps as to } from "./utils/table.mjs";
|
|
13
|
+
import ro from "./hooks/use-row-selection.mjs";
|
|
14
|
+
import { useProvideApTable as lo } from "../ap-table/context.mjs";
|
|
15
|
+
import { sizeReverseMap as no, sizeMap as so, ROW_SELECTION_FIELD as io } from "./constants.mjs";
|
|
16
|
+
import { useRenderColumns as uo } from "./hooks/use-render-columns.mjs";
|
|
17
|
+
import { useToken as co } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
18
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { isDef as
|
|
22
|
-
import { getValidVNodeList as
|
|
23
|
-
import { useTableStyle as
|
|
24
|
-
import { useNamespace as
|
|
25
|
-
import { useGlobalConfig as
|
|
26
|
-
import { useLocale as
|
|
27
|
-
import
|
|
28
|
-
const
|
|
19
|
+
import { isDef as po } from "../utils/index.mjs";
|
|
20
|
+
import { getValidVNodeList as fo } from "../utils/slot.mjs";
|
|
21
|
+
import { useTableStyle as mo } from "./hooks/use-table-style.mjs";
|
|
22
|
+
import { useNamespace as go } from "../config-provider/hooks/use-namespace.mjs";
|
|
23
|
+
import { useGlobalConfig as ho } from "../config-provider/hooks/use-global-config.mjs";
|
|
24
|
+
import { useLocale as Co } from "../config-provider/hooks/use-locale.mjs";
|
|
25
|
+
import yo from "../scroll-bar/index.vue.mjs";
|
|
26
|
+
const Ho = /* @__PURE__ */ Ke({
|
|
29
27
|
name: "ApGrid",
|
|
30
28
|
__name: "index",
|
|
31
29
|
props: {
|
|
@@ -116,23 +114,23 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
116
114
|
rowHighlightable: { type: [Boolean, Function], default: !1 }
|
|
117
115
|
},
|
|
118
116
|
setup(re, { expose: le }) {
|
|
119
|
-
var
|
|
120
|
-
const y = Le(),
|
|
121
|
-
|
|
122
|
-
const { e:
|
|
123
|
-
|
|
117
|
+
var X;
|
|
118
|
+
const y = Le(), a = re, x = (X = De()) == null ? void 0 : X.appContext.app;
|
|
119
|
+
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(Y), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
120
|
+
const { e: k, b: u, be: ne } = go("ap-grid"), se = ho("valueTypeMap"), i = E([]), O = E([]), s = E(), F = E(a.size), ie = mo(), [, de] = co(), { t: ue } = Co();
|
|
121
|
+
Y.setConfig({
|
|
124
122
|
i18n: (e, o) => ue(`ap.${e}`, o)
|
|
125
123
|
});
|
|
126
|
-
const { renderConfig: ce, updateSignal: pe } =
|
|
127
|
-
let
|
|
124
|
+
const { renderConfig: ce, updateSignal: pe } = uo(i);
|
|
125
|
+
let $ = 0;
|
|
128
126
|
const fe = n(() => {
|
|
129
127
|
if (s.value)
|
|
130
128
|
return s.value.$el.querySelector(
|
|
131
129
|
".vxe-table--header-inner-wrapper"
|
|
132
130
|
);
|
|
133
|
-
}),
|
|
131
|
+
}), M = n(() => {
|
|
134
132
|
var e, o, r;
|
|
135
|
-
return
|
|
133
|
+
return $++, ((r = (o = (e = a.columns) == null ? void 0 : e.filter(
|
|
136
134
|
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Ue.includes(l.valueType)
|
|
137
135
|
)) == null ? void 0 : o.sort((l, c) => {
|
|
138
136
|
let w = oe(l.order);
|
|
@@ -149,30 +147,30 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
149
147
|
// tips: 在表格中的查询表单项默认是带边框的
|
|
150
148
|
bordered: !0,
|
|
151
149
|
...c || {},
|
|
152
|
-
_signal:
|
|
150
|
+
_signal: $
|
|
153
151
|
},
|
|
154
152
|
renderNode: void 0
|
|
155
153
|
};
|
|
156
154
|
return w.renderNode = Je(
|
|
157
155
|
w,
|
|
158
|
-
|
|
156
|
+
t(se)
|
|
159
157
|
), w;
|
|
160
158
|
})) || [];
|
|
161
159
|
}), me = n(() => {
|
|
162
160
|
var o;
|
|
163
|
-
return
|
|
161
|
+
return po(a.manual) ? a.manual : fo(((o = y.searchFormExtra) == null ? void 0 : o.call(y)) || []).some((r) => {
|
|
164
162
|
var l;
|
|
165
163
|
return ((l = r.type) == null ? void 0 : l.name) === "ApView";
|
|
166
164
|
});
|
|
167
165
|
}), ge = n(() => [
|
|
168
166
|
u(),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
].filter(Boolean)),
|
|
167
|
+
a.card ? null : u("wrapper"),
|
|
168
|
+
a.adaptive ? u("adaptive") : null,
|
|
169
|
+
a.sticky ? u("sticky") : null
|
|
170
|
+
].filter(Boolean)), W = n(() => ae(t(i), (e) => {
|
|
173
171
|
if (e.sorter === !0)
|
|
174
172
|
return e.key || e.dataIndex;
|
|
175
|
-
}).filter(Boolean)),
|
|
173
|
+
}).filter(Boolean)), j = n(() => ae(t(i), (e) => {
|
|
176
174
|
if (e.filters && !e.onFilter)
|
|
177
175
|
return e.key || e.dataIndex;
|
|
178
176
|
}).filter(Boolean)), {
|
|
@@ -181,7 +179,7 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
181
179
|
reset: T,
|
|
182
180
|
refresh: he,
|
|
183
181
|
data: f,
|
|
184
|
-
tableProps:
|
|
182
|
+
tableProps: H,
|
|
185
183
|
setDataSource: Ce,
|
|
186
184
|
handleTableChangeOptional: ye,
|
|
187
185
|
getPaging: ve,
|
|
@@ -189,48 +187,48 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
189
187
|
} = Qe({
|
|
190
188
|
async request(e) {
|
|
191
189
|
var r;
|
|
192
|
-
if (!m.value.preserveSelectedRowKeys && R(
|
|
190
|
+
if (!m.value.preserveSelectedRowKeys && R(a.dataSource) && _(), !R(a.dataSource)) {
|
|
193
191
|
const l = e.pageSize * (e.current - 1);
|
|
194
192
|
return {
|
|
195
|
-
data: (
|
|
196
|
-
total:
|
|
193
|
+
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(l, l + e.pageSize)) || [],
|
|
194
|
+
total: a.dataSource.length || 0
|
|
197
195
|
};
|
|
198
196
|
}
|
|
199
|
-
const o = await ((r =
|
|
197
|
+
const o = await ((r = a.request) == null ? void 0 : r.call(a, e));
|
|
200
198
|
return {
|
|
201
199
|
data: (o == null ? void 0 : o.data) || [],
|
|
202
200
|
total: (o == null ? void 0 : o.total) || 0
|
|
203
201
|
};
|
|
204
202
|
},
|
|
205
203
|
namespace: "ap-grid",
|
|
206
|
-
filterFields:
|
|
207
|
-
sortFields:
|
|
208
|
-
params: Oe(
|
|
209
|
-
defaultData:
|
|
210
|
-
manual:
|
|
211
|
-
formatParams:
|
|
212
|
-
pagination:
|
|
204
|
+
filterFields: j,
|
|
205
|
+
sortFields: W,
|
|
206
|
+
params: Oe(a, "params"),
|
|
207
|
+
defaultData: a.defaultData,
|
|
208
|
+
manual: t(me),
|
|
209
|
+
formatParams: a.beforeSearchSubmit,
|
|
210
|
+
pagination: a.pagination,
|
|
213
211
|
onClickReset: Ae,
|
|
214
|
-
onAfterRequest:
|
|
215
|
-
}), { sortChangeEvent: Se, filterChangeEvent:
|
|
216
|
-
|
|
212
|
+
onAfterRequest: G
|
|
213
|
+
}), { sortChangeEvent: Se, filterChangeEvent: be, paginationChangeEvent: Re } = eo(ye);
|
|
214
|
+
lo({
|
|
217
215
|
columns: n(() => i.value),
|
|
218
|
-
columnsBackup: n(() =>
|
|
219
|
-
size: n(() =>
|
|
216
|
+
columnsBackup: n(() => O.value),
|
|
217
|
+
size: n(() => so[F.value]),
|
|
220
218
|
updateColumns(e) {
|
|
221
219
|
var o;
|
|
222
|
-
i.value = e, (o =
|
|
220
|
+
i.value = e, (o = a.onShownColumnsChange) == null || o.call(a, e);
|
|
223
221
|
},
|
|
224
222
|
updateSize(e) {
|
|
225
|
-
|
|
223
|
+
F.value = no[e];
|
|
226
224
|
},
|
|
227
225
|
renderConfig: n(() => ({
|
|
228
226
|
className: ne("table-header", "title"),
|
|
229
227
|
color: de.value.colorTextTertiary
|
|
230
228
|
})),
|
|
231
|
-
dataSource: n(() =>
|
|
232
|
-
getSearchFormValues:
|
|
233
|
-
setSearchFormValues:
|
|
229
|
+
dataSource: n(() => t(f).records),
|
|
230
|
+
getSearchFormValues: U,
|
|
231
|
+
setSearchFormValues: q,
|
|
234
232
|
submit: N,
|
|
235
233
|
reset: T
|
|
236
234
|
});
|
|
@@ -239,13 +237,13 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
239
237
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
240
238
|
) ? "left" : void 0
|
|
241
239
|
), ke = n(
|
|
242
|
-
() => R(
|
|
240
|
+
() => R(a.loading) ? f.loading : a.loading
|
|
243
241
|
), Fe = n(
|
|
244
|
-
() => R(
|
|
245
|
-
), { selectedRows: z, rowSelection: m, ...v } =
|
|
246
|
-
...
|
|
242
|
+
() => R(a.dataSource) ? f.records : a.dataSource
|
|
243
|
+
), { selectedRows: z, rowSelection: m, ...v } = ro({
|
|
244
|
+
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
247
245
|
dataSource: Fe,
|
|
248
|
-
rowKey:
|
|
246
|
+
rowKey: a.rowKey
|
|
249
247
|
}), Ee = ({
|
|
250
248
|
checked: e,
|
|
251
249
|
row: o
|
|
@@ -278,18 +276,18 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
278
276
|
}, Ne = ({
|
|
279
277
|
row: e
|
|
280
278
|
}) => {
|
|
281
|
-
const o =
|
|
279
|
+
const o = a.rowHighlightable;
|
|
282
280
|
ee(o) && o(e);
|
|
283
281
|
};
|
|
284
282
|
function Te() {
|
|
285
283
|
var e;
|
|
286
|
-
return ((e =
|
|
284
|
+
return ((e = a.columns) == null ? void 0 : e.filter((o) => !o.hideInTable)) || [];
|
|
287
285
|
}
|
|
288
|
-
function
|
|
286
|
+
function q(e) {
|
|
289
287
|
var o, r, l;
|
|
290
288
|
(l = (r = (o = P.value) == null ? void 0 : o.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
|
|
291
289
|
}
|
|
292
|
-
function
|
|
290
|
+
function U(e = !1) {
|
|
293
291
|
var r, l, c;
|
|
294
292
|
const o = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
295
293
|
return (c = (l = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : l[o]) == null ? void 0 : c.call(l, !0);
|
|
@@ -300,20 +298,20 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
300
298
|
e && (m.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
301
299
|
}
|
|
302
300
|
function ze(e) {
|
|
303
|
-
ee(
|
|
301
|
+
ee(a.rowKey) || (v.selectMultiByKeys(e), G());
|
|
304
302
|
}
|
|
305
303
|
function _e(e) {
|
|
306
304
|
const o = s.value;
|
|
307
305
|
if (!o)
|
|
308
306
|
return;
|
|
309
|
-
const r = String(e[
|
|
307
|
+
const r = String(e[a.rowKey]), l = o.getRowById(r);
|
|
310
308
|
o.setCurrentRow(l);
|
|
311
309
|
}
|
|
312
310
|
function Ae() {
|
|
313
311
|
const e = s.value;
|
|
314
312
|
e && (e.clearSort(), e.clearFilter());
|
|
315
313
|
}
|
|
316
|
-
function
|
|
314
|
+
function G() {
|
|
317
315
|
$e(() => {
|
|
318
316
|
var e, o;
|
|
319
317
|
m.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(m.value.selectedRowKeys[0]) : (o = s.value) == null || o.setCheckboxRowKey(
|
|
@@ -328,70 +326,70 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
328
326
|
if (r)
|
|
329
327
|
return (l = s.value) == null ? void 0 : l.scrollToRow(r, o);
|
|
330
328
|
}
|
|
331
|
-
return
|
|
332
|
-
() => [
|
|
329
|
+
return B(
|
|
330
|
+
() => [a.columnResizable, a.columns],
|
|
333
331
|
() => {
|
|
334
332
|
var o;
|
|
335
333
|
const e = Te();
|
|
336
|
-
i.value = e, (o =
|
|
334
|
+
i.value = e, (o = a.onShownColumnsChange) == null || o.call(a, e), O.value = e;
|
|
337
335
|
},
|
|
338
336
|
{
|
|
339
337
|
deep: !0,
|
|
340
338
|
immediate: !0
|
|
341
339
|
}
|
|
342
|
-
),
|
|
343
|
-
() =>
|
|
340
|
+
), B(
|
|
341
|
+
() => a.dataSource,
|
|
344
342
|
(e) => {
|
|
345
343
|
Ce(e);
|
|
346
344
|
},
|
|
347
345
|
{ immediate: !0, deep: !0 }
|
|
348
|
-
),
|
|
349
|
-
() =>
|
|
346
|
+
), B(
|
|
347
|
+
() => t(f).loading,
|
|
350
348
|
(e) => {
|
|
351
349
|
var o;
|
|
352
|
-
(o =
|
|
350
|
+
(o = a.onLoadingChange) == null || o.call(a, e);
|
|
353
351
|
}
|
|
354
|
-
),
|
|
355
|
-
() =>
|
|
352
|
+
), B(
|
|
353
|
+
() => a.size,
|
|
356
354
|
(e) => {
|
|
357
|
-
|
|
355
|
+
F.value = e;
|
|
358
356
|
}
|
|
359
357
|
), le({
|
|
360
358
|
submit: N,
|
|
361
359
|
reset: T,
|
|
362
360
|
refresh: he,
|
|
363
|
-
setSearchFormValues:
|
|
364
|
-
getSearchFormValues:
|
|
365
|
-
getShowColumns: () =>
|
|
361
|
+
setSearchFormValues: q,
|
|
362
|
+
getSearchFormValues: U,
|
|
363
|
+
getShowColumns: () => t(i),
|
|
366
364
|
rowSelection: {
|
|
367
365
|
selectedRows: n(() => z.value),
|
|
368
366
|
setSelectedRowKeys: ze,
|
|
369
367
|
clearAll: _
|
|
370
368
|
},
|
|
371
369
|
scrollToRow: Ve,
|
|
372
|
-
getDataSource: () =>
|
|
370
|
+
getDataSource: () => t(f.records),
|
|
373
371
|
setCurrentRow: _e,
|
|
374
372
|
getPaging: ve,
|
|
375
373
|
setPaging: we
|
|
376
|
-
}), (e, o) => (d(),
|
|
374
|
+
}), (e, o) => (d(), I("div", {
|
|
377
375
|
class: g(ge.value),
|
|
378
376
|
style: A(e.wrapperStyle)
|
|
379
377
|
}, [
|
|
380
|
-
|
|
378
|
+
t(R)(e.dataSource) && e.searchForm !== !1 && M.value.length > 0 ? (d(), I("div", {
|
|
381
379
|
key: 0,
|
|
382
|
-
class: g(e.card ?
|
|
380
|
+
class: g(e.card ? t(k)("search-wrapper") : null),
|
|
383
381
|
style: A(e.searchFormWrapperStyle)
|
|
384
382
|
}, [
|
|
385
|
-
|
|
383
|
+
V(t(qe).SearchForm, C(e.searchForm || {}, {
|
|
386
384
|
ref_key: "formRef",
|
|
387
385
|
ref: P,
|
|
388
386
|
"custom-reset": "",
|
|
389
|
-
"submit-loading":
|
|
390
|
-
onSubmit:
|
|
391
|
-
onReset:
|
|
387
|
+
"submit-loading": t(H).loading,
|
|
388
|
+
onSubmit: t(N),
|
|
389
|
+
onReset: t(T)
|
|
392
390
|
}), J({
|
|
393
|
-
default:
|
|
394
|
-
(d(!0),
|
|
391
|
+
default: h(() => [
|
|
392
|
+
(d(!0), I(Q, null, K(M.value, (r) => (d(), p(L(r.renderNode.Comp), C({
|
|
395
393
|
key: r.dataIndex,
|
|
396
394
|
item: r,
|
|
397
395
|
ref_for: !0
|
|
@@ -404,84 +402,91 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
404
402
|
}, [
|
|
405
403
|
y.searchFormExtra ? {
|
|
406
404
|
name: "extra",
|
|
407
|
-
fn:
|
|
408
|
-
|
|
405
|
+
fn: h(() => [
|
|
406
|
+
D(e.$slots, "searchFormExtra")
|
|
409
407
|
]),
|
|
410
408
|
key: "0"
|
|
411
409
|
} : void 0
|
|
412
410
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
413
411
|
], 6)) : S("", !0),
|
|
414
|
-
|
|
415
|
-
class: g([
|
|
412
|
+
b("div", {
|
|
413
|
+
class: g([t(k)("table-wrapper"), e.card ? t(k)("table-wrapper-card") : null]),
|
|
416
414
|
style: A(e.tableWrapperStyle)
|
|
417
415
|
}, [
|
|
418
|
-
|
|
419
|
-
class: g(
|
|
416
|
+
b("div", {
|
|
417
|
+
class: g(t(u)("header-wrapper"))
|
|
420
418
|
}, [
|
|
421
|
-
|
|
422
|
-
selectedRows:
|
|
423
|
-
selectedRowKeys:
|
|
419
|
+
D(e.$slots, "title", {
|
|
420
|
+
selectedRows: t(z),
|
|
421
|
+
selectedRowKeys: t(m).selectedRowKeys,
|
|
424
422
|
shownColumns: i.value,
|
|
425
423
|
clearAll: _
|
|
426
424
|
})
|
|
427
425
|
], 2),
|
|
428
|
-
|
|
429
|
-
class: g(
|
|
426
|
+
b("div", {
|
|
427
|
+
class: g(t(u)("vxe-wrapper"))
|
|
430
428
|
}, [
|
|
431
|
-
(d(), p(
|
|
429
|
+
(d(), p(t(je), C(t(oo)(a), {
|
|
432
430
|
ref_key: "tableRef",
|
|
433
431
|
ref: s,
|
|
434
|
-
key:
|
|
435
|
-
data:
|
|
432
|
+
key: t(pe),
|
|
433
|
+
data: t(f).records,
|
|
436
434
|
"sort-config": {
|
|
437
|
-
remote:
|
|
435
|
+
remote: W.value.length > 0,
|
|
438
436
|
trigger: "cell"
|
|
439
437
|
},
|
|
440
438
|
"filter-config": {
|
|
441
|
-
remote:
|
|
439
|
+
remote: j.value.length > 0
|
|
442
440
|
},
|
|
443
441
|
loading: ke.value,
|
|
444
|
-
style:
|
|
445
|
-
size:
|
|
446
|
-
onSortChange:
|
|
447
|
-
onFilterChange:
|
|
442
|
+
style: t(ie),
|
|
443
|
+
size: F.value,
|
|
444
|
+
onSortChange: t(Se),
|
|
445
|
+
onFilterChange: t(be),
|
|
448
446
|
onCheckboxChange: Ee,
|
|
449
447
|
onCheckboxRangeChange: Ie,
|
|
450
448
|
onCheckboxAll: Be,
|
|
451
449
|
onRadioChange: Pe,
|
|
452
450
|
onCurrentChange: Ne
|
|
453
451
|
}), J({
|
|
454
|
-
empty:
|
|
455
|
-
|
|
456
|
-
image:
|
|
452
|
+
empty: h(() => [
|
|
453
|
+
V(t(te), {
|
|
454
|
+
image: t(te).PRESENTED_IMAGE_SIMPLE
|
|
457
455
|
}, null, 8, ["image"])
|
|
458
456
|
]),
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
457
|
+
loading: h(() => [
|
|
458
|
+
b("div", {
|
|
459
|
+
class: g(t(k)("table-loading-wrapper"))
|
|
460
|
+
}, [
|
|
461
|
+
V(t(Ye))
|
|
462
|
+
], 2)
|
|
463
|
+
]),
|
|
464
|
+
default: h(() => [
|
|
465
|
+
a.expandable && i.value.length ? (d(), p(t(Z), C({ key: 0 }, t(ao)(e.expandable), { fixed: xe.value }), {
|
|
466
|
+
content: h((r) => [
|
|
467
|
+
(d(), p(L(a.expandable.renderContent(r))))
|
|
463
468
|
]),
|
|
464
469
|
_: 1
|
|
465
470
|
}, 16, ["fixed"])) : S("", !0),
|
|
466
|
-
|
|
467
|
-
(d(!0),
|
|
471
|
+
a.rowSelection && i.value.length ? (d(), p(t(Z), C({ key: 1 }, t(to)(t(m), i.value), { field: t(io) }), null, 16, ["field"])) : S("", !0),
|
|
472
|
+
(d(!0), I(Q, null, K(t(ce), (r) => (d(), p(L(r), {
|
|
468
473
|
key: r.props.colId
|
|
469
474
|
}))), 128))
|
|
470
475
|
]),
|
|
471
476
|
_: 2
|
|
472
477
|
}, [
|
|
473
|
-
|
|
478
|
+
K(t(He)(y, ["searchFormExtra"]), (r, l) => ({
|
|
474
479
|
name: l,
|
|
475
|
-
fn:
|
|
476
|
-
|
|
480
|
+
fn: h((c) => [
|
|
481
|
+
D(e.$slots, l, Me(We(c || {})))
|
|
477
482
|
])
|
|
478
483
|
}))
|
|
479
484
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
480
485
|
], 2),
|
|
481
|
-
|
|
482
|
-
class: g(
|
|
486
|
+
b("div", {
|
|
487
|
+
class: g(t(u)("pagination-wrapper"))
|
|
483
488
|
}, [
|
|
484
|
-
e.sticky ? (d(), p(
|
|
489
|
+
e.sticky ? (d(), p(t(yo), {
|
|
485
490
|
key: 0,
|
|
486
491
|
direction: "horizontal",
|
|
487
492
|
"scroll-container": fe.value,
|
|
@@ -489,15 +494,15 @@ const qo = /* @__PURE__ */ Ke({
|
|
|
489
494
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
490
495
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
491
496
|
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
492
|
-
e.pagination !== !1 ? (d(), p(
|
|
497
|
+
e.pagination !== !1 ? (d(), p(t(Ze), C({
|
|
493
498
|
key: 1,
|
|
494
|
-
class:
|
|
495
|
-
},
|
|
499
|
+
class: t(u)("pagination")
|
|
500
|
+
}, t(H).pagination, { onChange: t(Re) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
496
501
|
], 2)
|
|
497
502
|
], 6)
|
|
498
503
|
], 6));
|
|
499
504
|
}
|
|
500
505
|
});
|
|
501
506
|
export {
|
|
502
|
-
|
|
507
|
+
Ho as default
|
|
503
508
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { omit as
|
|
2
|
-
import { isDef as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
var
|
|
1
|
+
import { omit as u, isUndefined as s, isFunction as c, isNumber as C } from "lodash-unified";
|
|
2
|
+
import { isDef as m } from "../../utils/index.mjs";
|
|
3
|
+
const w = 20, b = 50, g = (e) => e.some((t) => !!t.html);
|
|
4
|
+
function R(e) {
|
|
5
|
+
var n;
|
|
6
6
|
const t = {
|
|
7
|
-
...
|
|
7
|
+
...u(e, [
|
|
8
8
|
"columns",
|
|
9
9
|
"request",
|
|
10
10
|
"searchForm",
|
|
@@ -18,7 +18,7 @@ function v(e) {
|
|
|
18
18
|
isHover: !0,
|
|
19
19
|
keyField: e.rowKey,
|
|
20
20
|
isCurrent: !!e.rowHighlightable
|
|
21
|
-
}, t.columnConfig = {},
|
|
21
|
+
}, t.columnConfig = {}, g(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) {
|
|
22
22
|
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
23
23
|
o.type === "radio" ? t.radioConfig = {
|
|
24
24
|
highlight: !0,
|
|
@@ -28,7 +28,7 @@ function v(e) {
|
|
|
28
28
|
visibleMethod({ row: r }) {
|
|
29
29
|
return o.shown ? o.shown(r) : !0;
|
|
30
30
|
},
|
|
31
|
-
checkRowKey: (
|
|
31
|
+
checkRowKey: (n = o.defaultSelectedRowKeys) == null ? void 0 : n[0],
|
|
32
32
|
reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
33
33
|
} : t.checkboxConfig = {
|
|
34
34
|
highlight: !0,
|
|
@@ -42,35 +42,38 @@ function v(e) {
|
|
|
42
42
|
range: o.range || !1
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
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, [
|
|
46
46
|
"renderContent",
|
|
47
47
|
"width",
|
|
48
48
|
"title"
|
|
49
|
-
])), e.footer && (t.showFooter = !0,
|
|
49
|
+
])), e.footer && (t.showFooter = !0, c(e.footer) ? t.footerMethod = e.footer : t.footerData = e.footer), e.virtual === !1 ? (t.virtualXConfig = {
|
|
50
50
|
enabled: !1
|
|
51
51
|
}, t.virtualYConfig = {
|
|
52
52
|
enabled: !1
|
|
53
|
-
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round =
|
|
53
|
+
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = m(e.round) ? e.round : !e.card, e.virtual !== !1 && (t.headerCellConfig = {
|
|
54
|
+
height: 36,
|
|
55
|
+
...t.headerCellConfig || {}
|
|
56
|
+
}), t;
|
|
54
57
|
}
|
|
55
|
-
function a(e, t,
|
|
56
|
-
const
|
|
58
|
+
function a(e, t, i) {
|
|
59
|
+
const n = t === "X", o = n ? "x" : "y", r = n ? "virtualXConfig" : "virtualYConfig", l = i == null ? void 0 : i[o], f = l !== !1, d = n ? w : b, h = C(l) && l >= 0 ? l : d;
|
|
57
60
|
e[r] = {
|
|
58
61
|
enabled: f,
|
|
59
|
-
gt:
|
|
60
|
-
oSize: (
|
|
62
|
+
gt: h,
|
|
63
|
+
oSize: (i == null ? void 0 : i.oSize) || 0
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function y(e) {
|
|
64
67
|
return e === !0 ? "left" : e;
|
|
65
68
|
}
|
|
66
69
|
function K(e, t) {
|
|
67
|
-
const
|
|
68
|
-
let o = e === !0 ? void 0 :
|
|
70
|
+
const i = e === !0 || !e.type ? "checkbox" : e.type, n = e === !0 ? 60 : e.columnWidth || 60;
|
|
71
|
+
let o = e === !0 ? void 0 : y(e.fixed);
|
|
69
72
|
return o || (o === !1 ? o = void 0 : o = t.some(
|
|
70
73
|
(r) => r.fixed === "left" || r.fixed === !0
|
|
71
74
|
) ? "left" : void 0), {
|
|
72
|
-
type:
|
|
73
|
-
width:
|
|
75
|
+
type: i,
|
|
76
|
+
width: n,
|
|
74
77
|
fixed: o
|
|
75
78
|
};
|
|
76
79
|
}
|
|
@@ -85,5 +88,5 @@ function k(e) {
|
|
|
85
88
|
export {
|
|
86
89
|
k as getRowExpandProps,
|
|
87
90
|
K as getRowSelectionProps,
|
|
88
|
-
|
|
91
|
+
R as toVxeProps
|
|
89
92
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isVNode as E, createVNode as l, mergeProps as b, cloneVNode as j, Fragment as O } from "vue";
|
|
2
|
-
import { isObject as p, isArray as a, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as d, isPlainObject as m, every as
|
|
2
|
+
import { isObject as p, isArray as a, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as d, isPlainObject as m, every as I, isEmpty as v } from "lodash-unified";
|
|
3
3
|
import { apTableRenderItemMap as P, apTableFormItemMap as V } from "./constants.mjs";
|
|
4
4
|
import { isType as x } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
@@ -179,7 +179,7 @@ function ut(t, e, n, o) {
|
|
|
179
179
|
}, {
|
|
180
180
|
default: () => [l(w, {
|
|
181
181
|
style: {
|
|
182
|
-
|
|
182
|
+
paddingInline: "4px",
|
|
183
183
|
color: o,
|
|
184
184
|
verticalAlign: "middle"
|
|
185
185
|
}
|
|
@@ -199,7 +199,7 @@ function ct(t, e) {
|
|
|
199
199
|
if (a(t) && a(e))
|
|
200
200
|
return S(d(t), d(e));
|
|
201
201
|
if (m(t) && m(e)) {
|
|
202
|
-
const n = (o) =>
|
|
202
|
+
const n = (o) => I(o, (i) => i == null) || v(o);
|
|
203
203
|
if (n(t) && n(e))
|
|
204
204
|
return !0;
|
|
205
205
|
}
|