@aplus-frontend/ui 0.5.31 → 0.5.33
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/index.mjs +104 -100
- package/es/src/ap-grid/constants.d.ts +1 -0
- package/es/src/ap-grid/constants.mjs +4 -3
- package/es/src/ap-grid/editable/style/css.js +1 -0
- package/es/src/ap-grid/editable/style/index.js +1 -0
- package/es/src/ap-grid/index.d.ts +1 -0
- package/es/src/ap-grid/index.mjs +4 -0
- package/es/src/ap-grid/index.vue.mjs +94 -94
- package/es/src/ap-grid/utils/col.mjs +77 -88
- package/es/src/business/ap-product-info/ApProductInfo.mjs +33 -27
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +247 -243
- package/es/src/path-map.mjs +2 -1
- package/es/src/splitter/Panel.vue.d.ts +21 -0
- package/es/src/splitter/Panel.vue.mjs +4 -0
- package/es/src/splitter/Panel.vue2.mjs +36 -0
- package/es/src/splitter/SplitBar.vue.d.ts +4 -0
- package/es/src/splitter/SplitBar.vue.mjs +4 -0
- package/es/src/splitter/SplitBar.vue2.mjs +129 -0
- package/es/src/splitter/Splitter.vue.d.ts +6 -0
- package/es/src/splitter/Splitter.vue.mjs +4 -0
- package/es/src/splitter/Splitter.vue2.mjs +131 -0
- package/es/src/splitter/_Panel.vue.d.ts +4 -0
- package/es/src/splitter/_Panel.vue.mjs +4 -0
- package/es/src/splitter/_Panel.vue2.mjs +22 -0
- package/es/src/splitter/hooks/useItems.d.ts +10 -0
- package/es/src/splitter/hooks/useItems.mjs +26 -0
- package/es/src/splitter/hooks/useResizable.d.ts +8 -0
- package/es/src/splitter/hooks/useResizable.mjs +37 -0
- package/es/src/splitter/hooks/useResize.d.ts +4 -0
- package/es/src/splitter/hooks/useResize.mjs +72 -0
- package/es/src/splitter/hooks/useSizes.d.ts +4 -0
- package/es/src/splitter/hooks/useSizes.mjs +58 -0
- package/es/src/splitter/index.d.ts +8 -0
- package/es/src/splitter/index.mjs +10 -0
- package/es/src/splitter/interface.d.ts +70 -0
- package/es/src/splitter/interface.mjs +1 -0
- package/es/src/splitter/style/css.d.ts +0 -0
- package/es/src/splitter/style/css.js +1 -0
- package/es/src/splitter/style/index.d.ts +0 -0
- package/es/src/splitter/style/index.js +1 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-grid/constants.d.ts +1 -0
- package/lib/src/ap-grid/constants.js +1 -1
- package/lib/src/ap-grid/editable/style/css.cjs +1 -0
- package/lib/src/ap-grid/editable/style/index.cjs +1 -0
- package/lib/src/ap-grid/index.d.ts +1 -0
- package/lib/src/ap-grid/index.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/splitter/Panel.vue.d.ts +21 -0
- package/lib/src/splitter/Panel.vue.js +1 -0
- package/lib/src/splitter/Panel.vue2.js +1 -0
- package/lib/src/splitter/SplitBar.vue.d.ts +4 -0
- package/lib/src/splitter/SplitBar.vue.js +1 -0
- package/lib/src/splitter/SplitBar.vue2.js +1 -0
- package/lib/src/splitter/Splitter.vue.d.ts +6 -0
- package/lib/src/splitter/Splitter.vue.js +1 -0
- package/lib/src/splitter/Splitter.vue2.js +1 -0
- package/lib/src/splitter/_Panel.vue.d.ts +4 -0
- package/lib/src/splitter/_Panel.vue.js +1 -0
- package/lib/src/splitter/_Panel.vue2.js +1 -0
- package/lib/src/splitter/hooks/useItems.d.ts +10 -0
- package/lib/src/splitter/hooks/useItems.js +1 -0
- package/lib/src/splitter/hooks/useResizable.d.ts +8 -0
- package/lib/src/splitter/hooks/useResizable.js +1 -0
- package/lib/src/splitter/hooks/useResize.d.ts +4 -0
- package/lib/src/splitter/hooks/useResize.js +1 -0
- package/lib/src/splitter/hooks/useSizes.d.ts +4 -0
- package/lib/src/splitter/hooks/useSizes.js +1 -0
- package/lib/src/splitter/index.d.ts +8 -0
- package/lib/src/splitter/index.js +1 -0
- package/lib/src/splitter/interface.d.ts +70 -0
- package/lib/src/splitter/interface.js +1 -0
- package/lib/src/splitter/style/css.cjs +1 -0
- package/lib/src/splitter/style/css.d.ts +0 -0
- package/lib/src/splitter/style/index.cjs +1 -0
- package/lib/src/splitter/style/index.d.ts +0 -0
- package/package.json +1 -1
- package/theme/ap-grid/index.css +9 -0
- package/theme/ap-grid/index.less +10 -0
- package/theme/ap-product-info/ap-product-info.css +0 -1
- package/theme/ap-product-info/ap-product-info.less +1 -1
- package/theme/index.css +243 -5
- package/theme/index.less +1 -0
- package/theme/mixins/config.less +11 -0
- package/theme/splitter/index.css +230 -0
- package/theme/splitter/index.less +240 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as ke, useSlots as Fe, getCurrentInstance as Be, ref as k, computed as n, unref as o, watch as F, createElementBlock as B, openBlock as s, normalizeStyle as z, normalizeClass as g, createCommentVNode as S, createElementVNode as I, createVNode as U, mergeProps as h, createSlots as G, withCtx as v, Fragment as X, renderList as _, createBlock as p, resolveDynamicComponent as A, renderSlot as V, normalizeProps as Ie, guardReactiveProps as Ee } from "vue";
|
|
2
|
+
import { VxeTable as Pe, VxeColumn as J } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
5
|
-
import { VxeUI as
|
|
5
|
+
import { VxeUI as Q } from "vxe-pc-ui";
|
|
6
6
|
import { isUndefined as b, omit as Ne } from "lodash-unified";
|
|
7
7
|
import { ApForm as Te } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
9
|
import { noRenderAsFormItemValueList as ze } from "../ap-table/constants.mjs";
|
|
10
|
-
import { getColumnOrder as
|
|
10
|
+
import { getColumnOrder as Y, updateFormProps as _e, getFieldProps as Ae, getSearchFormItemRenderNode as Ve, recursionApColumns as Z } from "../ap-table/utils.mjs";
|
|
11
11
|
import { useTablePaging as Le } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
-
import { Empty as
|
|
13
|
-
import { useInnerParams as
|
|
12
|
+
import { Empty as ee, Pagination as Oe } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as De } from "./hooks/use-inner-params.mjs";
|
|
14
14
|
import { toVxeProps as Ke, getRowExpandProps as $e, getRowSelectionProps as He } from "./utils/table.mjs";
|
|
15
|
-
import
|
|
16
|
-
import { useProvideApTable as
|
|
17
|
-
import { sizeReverseMap as Me, sizeMap as qe } from "./constants.mjs";
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
15
|
+
import We from "../ap-table/hooks/use-table-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as je } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as Me, sizeMap as qe, ROW_SELECTION_FIELD as Ue } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as Ge } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as Xe } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { useNamespace as
|
|
22
|
-
import { useGlobalConfig as
|
|
23
|
-
import { useLocale as
|
|
24
|
-
import
|
|
25
|
-
const
|
|
21
|
+
import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
|
|
22
|
+
import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
|
|
23
|
+
import { useLocale as Ye } from "../config-provider/hooks/use-locale.mjs";
|
|
24
|
+
import Ze from "../scroll-bar/index.vue.mjs";
|
|
25
|
+
const Fo = /* @__PURE__ */ ke({
|
|
26
26
|
name: "ApGrid",
|
|
27
27
|
__name: "index",
|
|
28
28
|
props: {
|
|
@@ -110,67 +110,67 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
110
110
|
expandable: {},
|
|
111
111
|
value: {}
|
|
112
112
|
},
|
|
113
|
-
setup(
|
|
113
|
+
setup(oe, { expose: ae }) {
|
|
114
114
|
var q;
|
|
115
|
-
const L =
|
|
116
|
-
w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(
|
|
117
|
-
const { e:
|
|
118
|
-
|
|
119
|
-
i18n: (e, r) =>
|
|
115
|
+
const L = Fe(), a = oe, w = (q = Be()) == null ? void 0 : q.appContext.app;
|
|
116
|
+
w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(Q), w.__VXE_PC_UI_INSTALLED__ = !0);
|
|
117
|
+
const { e: E, b: i, be: re } = Je("ap-grid"), te = Qe("valueTypeMap"), d = k([]), O = k([]), m = k(), C = k(a.size), [, c] = Xe(), { t: le } = Ye();
|
|
118
|
+
Q.setConfig({
|
|
119
|
+
i18n: (e, r) => le(`ap.${e}`, r)
|
|
120
120
|
});
|
|
121
|
-
const { renderConfig:
|
|
122
|
-
let
|
|
123
|
-
const
|
|
121
|
+
const { renderConfig: ne, updateSignal: se } = Ge(d);
|
|
122
|
+
let D = 0;
|
|
123
|
+
const de = n(() => {
|
|
124
124
|
if (m.value)
|
|
125
125
|
return m.value.$el.querySelector(
|
|
126
126
|
".vxe-table--header-inner-wrapper"
|
|
127
127
|
);
|
|
128
128
|
}), K = n(() => {
|
|
129
129
|
var e, r, l;
|
|
130
|
-
return
|
|
130
|
+
return D++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
131
131
|
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !ze.includes(t.valueType)
|
|
132
132
|
)) == null ? void 0 : r.sort((t, u) => {
|
|
133
|
-
let y =
|
|
134
|
-
return
|
|
133
|
+
let y = Y(t.order);
|
|
134
|
+
return Y(u.order) - y;
|
|
135
135
|
})) == null ? void 0 : l.map((t) => {
|
|
136
|
-
const u =
|
|
136
|
+
const u = _e(
|
|
137
137
|
t,
|
|
138
|
-
|
|
138
|
+
Ae(t.fieldProps, {})
|
|
139
139
|
), y = {
|
|
140
140
|
...t,
|
|
141
141
|
fieldProps: {
|
|
142
142
|
label: t.title,
|
|
143
143
|
name: t.dataIndex,
|
|
144
144
|
...u || {},
|
|
145
|
-
_signal:
|
|
145
|
+
_signal: D
|
|
146
146
|
},
|
|
147
147
|
renderNode: void 0
|
|
148
148
|
};
|
|
149
149
|
return y.renderNode = Ve(
|
|
150
150
|
y,
|
|
151
|
-
o(
|
|
151
|
+
o(te)
|
|
152
152
|
), y;
|
|
153
153
|
})) || [];
|
|
154
|
-
}),
|
|
154
|
+
}), ie = n(() => [
|
|
155
155
|
i(),
|
|
156
156
|
a.card ? null : i("wrapper"),
|
|
157
157
|
a.adaptive ? i("adaptive") : null,
|
|
158
158
|
a.sticky ? i("sticky") : null
|
|
159
|
-
].filter(Boolean)), $ = n(() =>
|
|
159
|
+
].filter(Boolean)), $ = n(() => Z(o(d), (e) => {
|
|
160
160
|
if (e.sorter === !0)
|
|
161
161
|
return e.key || e.dataIndex;
|
|
162
|
-
}).filter(Boolean)), H = n(() =>
|
|
162
|
+
}).filter(Boolean)), H = n(() => Z(o(d), (e) => {
|
|
163
163
|
if (e.filters && !e.onFilter)
|
|
164
164
|
return e.key || e.dataIndex;
|
|
165
165
|
}).filter(Boolean)), {
|
|
166
|
-
formRef:
|
|
167
|
-
submit:
|
|
168
|
-
reset:
|
|
169
|
-
refresh:
|
|
166
|
+
formRef: P,
|
|
167
|
+
submit: W,
|
|
168
|
+
reset: j,
|
|
169
|
+
refresh: ce,
|
|
170
170
|
data: f,
|
|
171
171
|
tableProps: M,
|
|
172
|
-
setDataSource:
|
|
173
|
-
handleTableChange:
|
|
172
|
+
setDataSource: ue,
|
|
173
|
+
handleTableChange: pe
|
|
174
174
|
} = Le({
|
|
175
175
|
async request(e) {
|
|
176
176
|
var l;
|
|
@@ -195,10 +195,10 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
195
195
|
manual: a.manual,
|
|
196
196
|
formatParams: a.beforeSearchSubmit,
|
|
197
197
|
pagination: a.pagination
|
|
198
|
-
}), { sortChangeEvent:
|
|
199
|
-
|
|
198
|
+
}), { sortChangeEvent: me, filterChangeEvent: fe, paginationChangeEvent: ge } = De(pe);
|
|
199
|
+
je({
|
|
200
200
|
columns: n(() => d.value),
|
|
201
|
-
columnsBackup: n(() =>
|
|
201
|
+
columnsBackup: n(() => O.value),
|
|
202
202
|
size: n(() => C.value ? qe[C.value] : "middle"),
|
|
203
203
|
updateColumns(e) {
|
|
204
204
|
var r;
|
|
@@ -208,22 +208,22 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
208
208
|
C.value = Me[e];
|
|
209
209
|
},
|
|
210
210
|
renderConfig: n(() => ({
|
|
211
|
-
className:
|
|
211
|
+
className: re("table-header", "title"),
|
|
212
212
|
color: c.value.colorPrimary
|
|
213
213
|
})),
|
|
214
214
|
dataSource: n(() => o(f).records)
|
|
215
215
|
});
|
|
216
|
-
const
|
|
216
|
+
const he = n(
|
|
217
217
|
() => d.value.some(
|
|
218
218
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
219
219
|
) ? "left" : void 0
|
|
220
|
-
),
|
|
220
|
+
), ve = n(
|
|
221
221
|
() => b(a.loading) ? f.loading : a.loading
|
|
222
|
-
),
|
|
222
|
+
), Ce = n(
|
|
223
223
|
() => b(a.dataSource) ? f.records : a.dataSource
|
|
224
|
-
), { selectedRows: x, rowSelection: R, ...
|
|
224
|
+
), { selectedRows: x, rowSelection: R, ...ye } = We({
|
|
225
225
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
226
|
-
dataSource:
|
|
226
|
+
dataSource: Ce,
|
|
227
227
|
rowKey: a.rowKey
|
|
228
228
|
}), N = () => {
|
|
229
229
|
const e = m.value;
|
|
@@ -231,29 +231,29 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
231
231
|
...e.getCheckboxReserveRecords(),
|
|
232
232
|
...e.getCheckboxRecords()
|
|
233
233
|
]);
|
|
234
|
-
},
|
|
234
|
+
}, Se = () => {
|
|
235
235
|
const e = m.value;
|
|
236
236
|
e && (x.value = [e.getRadioRecord()]);
|
|
237
237
|
};
|
|
238
|
-
function
|
|
238
|
+
function be() {
|
|
239
239
|
var e;
|
|
240
240
|
return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function we(e) {
|
|
243
243
|
var r, l, t;
|
|
244
|
-
(t = (l = (r =
|
|
244
|
+
(t = (l = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function xe(e = !1) {
|
|
247
247
|
var l, t, u;
|
|
248
248
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
249
|
-
return (u = (t = (l =
|
|
249
|
+
return (u = (t = (l = P.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : u.call(t, !0);
|
|
250
250
|
}
|
|
251
251
|
function T() {
|
|
252
|
-
|
|
252
|
+
ye.clearAll();
|
|
253
253
|
const e = m.value;
|
|
254
254
|
e && (R.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
255
255
|
}
|
|
256
|
-
async function
|
|
256
|
+
async function Re(e, r) {
|
|
257
257
|
var t;
|
|
258
258
|
const l = f.records[e];
|
|
259
259
|
if (l)
|
|
@@ -263,8 +263,8 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
263
263
|
() => [a.columnResizable, a.columns],
|
|
264
264
|
() => {
|
|
265
265
|
var r;
|
|
266
|
-
const e =
|
|
267
|
-
d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e),
|
|
266
|
+
const e = be();
|
|
267
|
+
d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), O.value = e;
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
deep: !0,
|
|
@@ -273,7 +273,7 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
273
273
|
), F(
|
|
274
274
|
() => a.dataSource,
|
|
275
275
|
(e) => {
|
|
276
|
-
|
|
276
|
+
ue(e);
|
|
277
277
|
},
|
|
278
278
|
{ immediate: !0, deep: !0 }
|
|
279
279
|
), F(
|
|
@@ -287,37 +287,37 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
287
287
|
(e) => {
|
|
288
288
|
C.value = e;
|
|
289
289
|
}
|
|
290
|
-
),
|
|
291
|
-
submit:
|
|
292
|
-
reset:
|
|
293
|
-
refresh:
|
|
294
|
-
setSearchFormValues:
|
|
295
|
-
getSearchFormValues:
|
|
290
|
+
), ae({
|
|
291
|
+
submit: W,
|
|
292
|
+
reset: j,
|
|
293
|
+
refresh: ce,
|
|
294
|
+
setSearchFormValues: we,
|
|
295
|
+
getSearchFormValues: xe,
|
|
296
296
|
getShowColumns: () => o(d),
|
|
297
297
|
rowSelection: {
|
|
298
298
|
selectedRows: n(() => x.value),
|
|
299
299
|
clearAll: T
|
|
300
300
|
},
|
|
301
|
-
scrollToRow:
|
|
301
|
+
scrollToRow: Re
|
|
302
302
|
}), (e, r) => (s(), B("div", {
|
|
303
|
-
class: g(
|
|
303
|
+
class: g(ie.value),
|
|
304
304
|
style: z(e.wrapperStyle)
|
|
305
305
|
}, [
|
|
306
306
|
o(b)(e.dataSource) && e.searchForm !== !1 && K.value.length > 0 ? (s(), B("div", {
|
|
307
307
|
key: 0,
|
|
308
|
-
class: g(e.card ? o(
|
|
308
|
+
class: g(e.card ? o(E)("search-wrapper") : null),
|
|
309
309
|
style: z(e.searchFormWrapperStyle)
|
|
310
310
|
}, [
|
|
311
311
|
U(o(Te).SearchForm, h(e.searchForm || {}, {
|
|
312
312
|
ref_key: "formRef",
|
|
313
|
-
ref:
|
|
313
|
+
ref: P,
|
|
314
314
|
"custom-reset": "",
|
|
315
315
|
"submit-loading": o(M).loading,
|
|
316
|
-
onSubmit: o(
|
|
317
|
-
onReset: o(
|
|
316
|
+
onSubmit: o(W),
|
|
317
|
+
onReset: o(j)
|
|
318
318
|
}), G({
|
|
319
319
|
default: v(() => [
|
|
320
|
-
(s(!0), B(X, null,
|
|
320
|
+
(s(!0), B(X, null, _(K.value, (l) => (s(), p(A(l.renderNode.Comp), h({
|
|
321
321
|
key: l.dataIndex,
|
|
322
322
|
item: l,
|
|
323
323
|
ref_for: !0
|
|
@@ -338,7 +338,7 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
338
338
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
339
339
|
], 6)) : S("", !0),
|
|
340
340
|
I("div", {
|
|
341
|
-
class: g([o(
|
|
341
|
+
class: g([o(E)("table-wrapper"), e.card ? o(E)("table-wrapper-card") : null]),
|
|
342
342
|
style: z(e.tableWrapperStyle)
|
|
343
343
|
}, [
|
|
344
344
|
I("div", {
|
|
@@ -354,14 +354,14 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
354
354
|
I("div", {
|
|
355
355
|
class: g(o(i)("vxe-wrapper"))
|
|
356
356
|
}, [
|
|
357
|
-
(s(), p(o(
|
|
357
|
+
(s(), p(o(Pe), h(o(Ke)(a), {
|
|
358
358
|
ref_key: "tableRef",
|
|
359
359
|
ref: m,
|
|
360
|
-
key: o(
|
|
360
|
+
key: o(se),
|
|
361
361
|
data: o(f).records,
|
|
362
362
|
"sort-config": { remote: $.value.length > 0 },
|
|
363
363
|
"filter-config": { remote: H.value.length > 0 },
|
|
364
|
-
loading:
|
|
364
|
+
loading: ve.value,
|
|
365
365
|
"row-config": {
|
|
366
366
|
isHover: !0,
|
|
367
367
|
keyField: a.rowKey
|
|
@@ -379,36 +379,36 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
379
379
|
"--vxe-ui-table-border-color": o(c).colorBorderSecondary
|
|
380
380
|
},
|
|
381
381
|
size: C.value,
|
|
382
|
-
onSortChange: o(
|
|
383
|
-
onFilterChange: o(
|
|
382
|
+
onSortChange: o(me),
|
|
383
|
+
onFilterChange: o(fe),
|
|
384
384
|
onCheckboxChange: N,
|
|
385
385
|
onCheckboxRangeChange: N,
|
|
386
386
|
onCheckboxAll: N,
|
|
387
|
-
onRadioChange:
|
|
387
|
+
onRadioChange: Se
|
|
388
388
|
}), G({
|
|
389
389
|
empty: v(() => [
|
|
390
|
-
U(o(
|
|
391
|
-
image: o(
|
|
390
|
+
U(o(ee), {
|
|
391
|
+
image: o(ee).PRESENTED_IMAGE_SIMPLE
|
|
392
392
|
}, null, 8, ["image"])
|
|
393
393
|
]),
|
|
394
394
|
default: v(() => [
|
|
395
|
-
a.expandable ? (s(), p(o(
|
|
395
|
+
a.expandable ? (s(), p(o(J), h({ key: 0 }, o($e)(e.expandable), { fixed: he.value }), {
|
|
396
396
|
content: v((l) => [
|
|
397
|
-
(s(), p(
|
|
397
|
+
(s(), p(A(a.expandable.renderContent(l))))
|
|
398
398
|
]),
|
|
399
399
|
_: 1
|
|
400
400
|
}, 16, ["fixed"])) : S("", !0),
|
|
401
|
-
a.rowSelection ? (s(), p(o(
|
|
402
|
-
(s(!0), B(X, null,
|
|
401
|
+
a.rowSelection ? (s(), p(o(J), h({ key: 1 }, o(He)(o(R), d.value), { field: o(Ue) }), null, 16, ["field"])) : S("", !0),
|
|
402
|
+
(s(!0), B(X, null, _(o(ne), (l) => (s(), p(A(l), {
|
|
403
403
|
key: l.props.colId
|
|
404
404
|
}))), 128))
|
|
405
405
|
]),
|
|
406
406
|
_: 2
|
|
407
407
|
}, [
|
|
408
|
-
|
|
408
|
+
_(o(Ne)(L, ["searchFormExtra"]), (l, t) => ({
|
|
409
409
|
name: t,
|
|
410
410
|
fn: v((u) => [
|
|
411
|
-
V(e.$slots, t,
|
|
411
|
+
V(e.$slots, t, Ie(Ee(u || {})))
|
|
412
412
|
])
|
|
413
413
|
}))
|
|
414
414
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "style", "size", "onSortChange", "onFilterChange"]))
|
|
@@ -416,20 +416,20 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
416
416
|
I("div", {
|
|
417
417
|
class: g(o(i)("pagination-wrapper"))
|
|
418
418
|
}, [
|
|
419
|
-
e.sticky ? (s(), p(o(
|
|
419
|
+
e.sticky ? (s(), p(o(Ze), {
|
|
420
420
|
key: 0,
|
|
421
421
|
direction: "horizontal",
|
|
422
|
-
"scroll-container":
|
|
422
|
+
"scroll-container": de.value
|
|
423
423
|
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
424
|
-
e.pagination !== !1 ? (s(), p(o(
|
|
424
|
+
e.pagination !== !1 ? (s(), p(o(Oe), h({
|
|
425
425
|
key: 1,
|
|
426
426
|
class: o(i)("pagination")
|
|
427
|
-
}, o(M).pagination, { onChange: o(
|
|
427
|
+
}, o(M).pagination, { onChange: o(ge) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
428
428
|
], 2)
|
|
429
429
|
], 6)
|
|
430
430
|
], 6));
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
433
|
export {
|
|
434
|
-
|
|
434
|
+
Fo as default
|
|
435
435
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import { isUndefined as
|
|
3
|
-
import { valueEnumToArray as
|
|
4
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { createVNode as v, Fragment as S } from "vue";
|
|
2
|
+
import { isUndefined as $, isArray as M, isString as x, isBoolean as A, isNumber as V, pick as R } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as j, objectToString as B, getTableTitle as c, getTableRenderType as N, getTableRenderProps as W, getTableCellRenderNode as _ } from "../../ap-table/utils.mjs";
|
|
4
|
+
import { noRenderAsFormItemValueList as k } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
6
|
+
import z from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
+
function b(e) {
|
|
8
|
+
if (!$(e))
|
|
9
|
+
return M(e) ? e.reduce((r, i) => x(i) ? `${r}.${i}` : `${r}[${i}]`, "") : String(e);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function w(e) {
|
|
12
12
|
if (e)
|
|
13
13
|
return e === !0 ? "left" : e;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function G(e) {
|
|
16
|
+
return A(e) ? {
|
|
17
17
|
sortable: e
|
|
18
18
|
} : e ? {
|
|
19
19
|
sortable: !0,
|
|
@@ -23,19 +23,19 @@ function U(e) {
|
|
|
23
23
|
sortable: !1
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function I(e) {
|
|
27
27
|
let r;
|
|
28
|
-
return
|
|
29
|
-
label:
|
|
28
|
+
return A(e.filters) && e.valueEnum ? r = j(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((i) => ({
|
|
29
|
+
label: x(i.text) ? i.text : "",
|
|
30
30
|
value: i.value
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function L(e) {
|
|
34
34
|
if (e)
|
|
35
35
|
return (r) => e(r.value, r.row);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return e ?
|
|
37
|
+
function U(e, r) {
|
|
38
|
+
return e ? V(e) ? {
|
|
39
39
|
tooltip: r,
|
|
40
40
|
rows: e
|
|
41
41
|
} : e === !0 || e === "tooltip" ? {
|
|
@@ -47,102 +47,91 @@ function H(e, r) {
|
|
|
47
47
|
htmlTitle: e === "title" ? r : ""
|
|
48
48
|
} : !1;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
if (
|
|
50
|
+
function q(e, r, i) {
|
|
51
|
+
if (k.includes(e.valueType))
|
|
52
52
|
return i;
|
|
53
53
|
if (e.copyable || e.ellipsis) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
54
|
+
const l = U(e.ellipsis, r), t = B(r);
|
|
55
|
+
return v(z, {
|
|
56
56
|
rawValue: t,
|
|
57
57
|
copyable: e.copyable,
|
|
58
|
-
ellipsis:
|
|
58
|
+
ellipsis: l,
|
|
59
59
|
content: i
|
|
60
60
|
}, null);
|
|
61
61
|
}
|
|
62
62
|
return i;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
header: () =>
|
|
68
|
-
},
|
|
64
|
+
function y(e, r, i) {
|
|
65
|
+
const l = R(e, ["width", "minWidth", "align"]);
|
|
66
|
+
return l.field = b(e.dataIndex), l.fixed = w(e.fixed), l.slots = {
|
|
67
|
+
header: () => c(e, i, void 0, r)
|
|
68
|
+
}, l.headerAlign = e.align, l.showOverflow = !1, l.showFooterOverflow = !1, l;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const t =
|
|
72
|
-
t.field =
|
|
73
|
-
const
|
|
74
|
-
value:
|
|
75
|
-
|
|
76
|
-
footer: f,
|
|
77
|
-
...d
|
|
70
|
+
function F(e, r, i, l) {
|
|
71
|
+
const t = R(e, ["width", "minWidth", "align", "resizable"]);
|
|
72
|
+
t.field = b(e.dataIndex), t.fixed = w(e.fixed), t.headerAlign = e.align, t.footerAlign = e.align, t.showOverflow = !1, t.showFooterOverflow = !1, Object.assign(t, G(e.sorter)), t.filters = I(e), t.filterMultiple = e.filterMultiple, t.filterMethod = L(e.onFilter);
|
|
73
|
+
const a = ({
|
|
74
|
+
value: d,
|
|
75
|
+
...n
|
|
78
76
|
}) => {
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
return A(e, l, h(x, null, [l]));
|
|
82
|
-
const o = k(e), $ = z({
|
|
77
|
+
var o, T;
|
|
78
|
+
const f = N(e), u = W({
|
|
83
79
|
...e,
|
|
84
|
-
valueType:
|
|
80
|
+
valueType: f
|
|
85
81
|
}, {
|
|
86
|
-
value:
|
|
87
|
-
...
|
|
88
|
-
}),
|
|
89
|
-
value:
|
|
90
|
-
...
|
|
91
|
-
})) ||
|
|
92
|
-
value:
|
|
93
|
-
...
|
|
94
|
-
})]) :
|
|
95
|
-
let p =
|
|
82
|
+
value: d,
|
|
83
|
+
...n
|
|
84
|
+
}), E = _(f, u, n.record, l), h = ((o = e.renderText) == null ? void 0 : o.call(e, {
|
|
85
|
+
value: d,
|
|
86
|
+
...n
|
|
87
|
+
})) || d, O = e.renderText ? v(S, null, [(T = e.renderText) == null ? void 0 : T.call(e, {
|
|
88
|
+
value: d,
|
|
89
|
+
...n
|
|
90
|
+
})]) : E;
|
|
91
|
+
let p = q(e, h, O);
|
|
96
92
|
return e.customRender && (p = e.customRender({
|
|
97
|
-
value:
|
|
98
|
-
...
|
|
93
|
+
value: d,
|
|
94
|
+
...n,
|
|
99
95
|
column: e,
|
|
100
96
|
originalNode: p,
|
|
101
|
-
originalText:
|
|
97
|
+
originalText: h
|
|
102
98
|
})), p;
|
|
103
|
-
},
|
|
104
|
-
row:
|
|
105
|
-
rowIndex:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
renderIndex: s,
|
|
114
|
-
column: e,
|
|
115
|
-
_columnIndex: f,
|
|
116
|
-
footer: d
|
|
99
|
+
}, s = ({
|
|
100
|
+
row: d,
|
|
101
|
+
rowIndex: n
|
|
102
|
+
}) => a({
|
|
103
|
+
value: d[t.field],
|
|
104
|
+
text: d[t.field],
|
|
105
|
+
record: d,
|
|
106
|
+
index: n,
|
|
107
|
+
renderIndex: n,
|
|
108
|
+
column: e
|
|
117
109
|
});
|
|
118
110
|
return t.slots = {
|
|
119
|
-
header: () =>
|
|
120
|
-
default:
|
|
121
|
-
footer:
|
|
122
|
-
...l,
|
|
123
|
-
footer: !0
|
|
124
|
-
})
|
|
111
|
+
header: () => c(e, i, void 0, r),
|
|
112
|
+
default: s,
|
|
113
|
+
footer: s
|
|
125
114
|
}, e.html && (delete t.slots.default, delete t.slots.footer, t.type = "html"), t;
|
|
126
115
|
}
|
|
127
|
-
function
|
|
128
|
-
var
|
|
129
|
-
if (!((
|
|
130
|
-
return
|
|
131
|
-
function t(
|
|
132
|
-
return
|
|
116
|
+
function Y(e, r, i, l) {
|
|
117
|
+
var s;
|
|
118
|
+
if (!((s = e.children) != null && s.length))
|
|
119
|
+
return F(e, r, i, l);
|
|
120
|
+
function t(d) {
|
|
121
|
+
return d.map((n) => {
|
|
133
122
|
var f;
|
|
134
|
-
if ((f =
|
|
135
|
-
const
|
|
136
|
-
return
|
|
123
|
+
if ((f = n.children) != null && f.length) {
|
|
124
|
+
const u = y(n, r, i);
|
|
125
|
+
return u.children = t(n.children), u;
|
|
137
126
|
}
|
|
138
|
-
return
|
|
127
|
+
return F(n, r, i, l);
|
|
139
128
|
});
|
|
140
129
|
}
|
|
141
|
-
const
|
|
142
|
-
return
|
|
130
|
+
const a = y(e, r, i);
|
|
131
|
+
return a.children = t(e.children), a;
|
|
143
132
|
}
|
|
144
133
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
134
|
+
Y as transformCol,
|
|
135
|
+
y as transformToColGroup,
|
|
136
|
+
F as transformToColumn
|
|
148
137
|
};
|