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