@aplus-frontend/ui 0.6.0-beta.1 → 0.6.0-beta.3
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-button/ap-button.vue.mjs +1 -1
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +39 -34
- package/es/src/ap-form/search-form/index.vue.mjs +1 -1
- package/es/src/ap-grid/editable/form-item.vue.mjs +23 -20
- package/es/src/ap-grid/editable/index.vue.mjs +3 -0
- package/es/src/ap-grid/index.vue.mjs +146 -136
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-grid/utils/table.mjs +32 -32
- package/es/src/ap-table/ap-table.vue2.mjs +206 -199
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
- package/es/src/ap-tag/interface.d.ts +4 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -12
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +108 -99
- package/es/src/business/ap-export-group/index.d.ts +3 -0
- package/es/src/business/ap-export-group/interface.d.ts +7 -2
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-view/ap-view.vue2.mjs +72 -69
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +49 -43
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +2 -4
- package/es/src/config-provider/css-var.mjs +2 -2
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +4 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +3 -0
- package/lib/src/business/ap-export-group/interface.d.ts +7 -2
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- 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/hooks/usePageListApGrid.js +1 -1
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/package.json +4 -4
- package/theme/antd-global-overwrite/admin/index.css +9 -25
- package/theme/antd-global-overwrite/admin/modal.css +6 -22
- package/theme/antd-global-overwrite/admin/modal.less +7 -22
- package/theme/antd-global-overwrite/admin/table.css +3 -3
- package/theme/antd-global-overwrite/admin/table.less +3 -3
- package/theme/antd-global-overwrite/aplus/index.css +9 -19
- package/theme/antd-global-overwrite/aplus/modal.css +6 -16
- package/theme/antd-global-overwrite/aplus/modal.less +7 -17
- package/theme/antd-global-overwrite/aplus/table.css +3 -3
- package/theme/antd-global-overwrite/aplus/table.less +3 -3
- package/theme/ap-appendix/ap-appendix.css +4 -2
- package/theme/ap-appendix/ap-appendix.less +4 -2
- package/theme/ap-attachment/ap-attachment.css +4 -4
- package/theme/ap-attachment/ap-attachment.less +4 -4
- package/theme/ap-batch-action/ap-batch-action.css +6 -3
- package/theme/ap-batch-action/ap-batch-action.less +6 -3
- package/theme/ap-descriptions/ap-descriptions.css +3 -5
- package/theme/ap-descriptions/ap-descriptions.less +3 -5
- package/theme/ap-download/ap-download.css +7 -10
- package/theme/ap-download/ap-download.less +8 -11
- package/theme/ap-expand-alert/ap-expand-alert.css +1 -1
- package/theme/ap-expand-alert/ap-expand-alert.less +3 -4
- package/theme/ap-form/ap-form-item.css +2 -2
- package/theme/ap-form/ap-form-item.less +2 -2
- package/theme/ap-form/index.css +5 -2
- package/theme/ap-form/search-form.css +5 -2
- package/theme/ap-form/search-form.less +3 -0
- package/theme/ap-grid/editable.less +3 -2
- package/theme/ap-grid/index.css +6 -3
- package/theme/ap-grid/index.less +6 -4
- package/theme/ap-ladder/ap-ladder.css +3 -3
- package/theme/ap-ladder/ap-ladder.less +3 -3
- package/theme/ap-select-layout/ap-select-layout.css +8 -8
- package/theme/ap-select-layout/ap-select-layout.less +8 -8
- package/theme/ap-status/ap-status.css +2 -3
- package/theme/ap-status/ap-status.less +2 -4
- package/theme/ap-summary/index.css +3 -3
- package/theme/ap-summary/index.less +3 -3
- package/theme/ap-table/ap-table-index.css +5 -5
- package/theme/ap-table/ap-table-index.less +5 -5
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +15 -14
- package/theme/ap-table/ap-table.less +2 -5
- package/theme/ap-table/setting/index.css +3 -3
- package/theme/ap-table/setting/modal.css +1 -2
- package/theme/ap-table/setting/modal.less +1 -2
- package/theme/ap-table/setting/select-group.css +2 -1
- package/theme/ap-table/setting/select-group.less +2 -1
- package/theme/ap-table-modal/index.css +15 -14
- package/theme/ap-tag/ap-tag-group.less +2 -2
- package/theme/ap-tag/ap-tag.css +24 -15
- package/theme/ap-tag/ap-tag.less +37 -24
- package/theme/ap-title/ap-title.css +2 -2
- package/theme/ap-title/ap-title.less +2 -2
- package/theme/ap-upload/index.css +3 -3
- package/theme/ap-upload/multiple-file.css +1 -1
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +2 -2
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-view/ap-view.css +4 -0
- package/theme/ap-view/ap-view.less +4 -0
- package/theme/editable-table/index.css +5 -2
- package/theme/index.css +90 -77
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as Le, useSlots as Oe, ref as w, computed as s, unref as l, createVNode as m, Fragment as re, watch as k, createElementBlock as B, openBlock as y, normalizeStyle as K, normalizeClass as g, createCommentVNode as oe, createElementVNode as L, mergeProps as v, createSlots as ae, withCtx as R, renderList as te, createBlock as le, resolveDynamicComponent as Ae, renderSlot as C, normalizeProps as $e, guardReactiveProps as De } from "vue";
|
|
2
|
+
import { Divider as je, Table as We } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as _e } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as He } from "../ap-form/index.mjs";
|
|
5
5
|
import { noRenderAsFormItemValueList as ne } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as b, omit as se, isBoolean as
|
|
9
|
-
import { getColumnOrder as de, updateFormProps as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { getScrollbarSize as
|
|
7
|
+
import { useTablePaging as Ue } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as b, omit as se, isBoolean as qe } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as de, updateFormProps as Me, getFieldProps as Ge, getSearchFormItemRenderNode as Je, recursionApColumns as ue, getTableTitle as Qe, getTableRenderType as Xe, getTableRenderProps as Ye, getTableCellRenderNode as Ze, apColumnToColumn as er, falseToUndefined as rr, objectToString as or } from "./utils.mjs";
|
|
10
|
+
import ar from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import tr from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { getScrollbarSize as lr, isDef as ie } from "../utils/index.mjs";
|
|
13
13
|
import "./components/setting/modal/index.vue.mjs";
|
|
14
14
|
import "./components/paragraph-ellipsis/index.vue.mjs";
|
|
15
|
-
import { useProvideApTable as
|
|
15
|
+
import { useProvideApTable as nr } from "./context.mjs";
|
|
16
16
|
import "../scroll-bar/index.mjs";
|
|
17
|
-
import { useStickyScroll as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
17
|
+
import { useStickyScroll as sr } from "./hooks/use-sticky-scroll.mjs";
|
|
18
|
+
import { getValidVNodeList as dr } from "../utils/slot.mjs";
|
|
19
|
+
import { useNamespace as ur } from "../config-provider/hooks/use-namespace.mjs";
|
|
20
|
+
import { useGlobalConfig as ir } from "../config-provider/hooks/use-global-config.mjs";
|
|
21
|
+
import cr from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
22
|
+
import fr from "./components/setting/modal/index.vue2.mjs";
|
|
23
|
+
import pr from "../scroll-bar/index.vue.mjs";
|
|
24
|
+
const Or = /* @__PURE__ */ Le({
|
|
24
25
|
name: "ApTable",
|
|
25
26
|
__name: "ap-table",
|
|
26
27
|
props: {
|
|
@@ -126,10 +127,10 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
126
127
|
tableWrapperStyle: {},
|
|
127
128
|
manual: {
|
|
128
129
|
type: Boolean,
|
|
129
|
-
default:
|
|
130
|
+
default: void 0
|
|
130
131
|
},
|
|
131
132
|
size: {
|
|
132
|
-
default: "
|
|
133
|
+
default: "small"
|
|
133
134
|
},
|
|
134
135
|
adaptive: {
|
|
135
136
|
type: Boolean,
|
|
@@ -144,248 +145,254 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
144
145
|
default: void 0
|
|
145
146
|
}
|
|
146
147
|
},
|
|
147
|
-
setup(
|
|
148
|
-
expose:
|
|
148
|
+
setup(ce, {
|
|
149
|
+
expose: fe
|
|
149
150
|
}) {
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
const
|
|
151
|
+
const r = ce;
|
|
152
|
+
let O = 0;
|
|
153
|
+
const c = Oe(), [, pe] = _e(), {
|
|
153
154
|
e: z,
|
|
154
|
-
b:
|
|
155
|
-
be:
|
|
156
|
-
m:
|
|
157
|
-
cssVar:
|
|
158
|
-
} =
|
|
159
|
-
height:
|
|
155
|
+
b: f,
|
|
156
|
+
be: A,
|
|
157
|
+
m: me,
|
|
158
|
+
cssVar: ye
|
|
159
|
+
} = ur("ap-table"), $ = ir("valueTypeMap"), {
|
|
160
|
+
height: ge,
|
|
160
161
|
contentRef: be
|
|
161
|
-
} =
|
|
162
|
+
} = ar(), D = w(), j = w(), {
|
|
162
163
|
isStickyMode: W,
|
|
163
164
|
scrollBarRef: i
|
|
164
|
-
} =
|
|
165
|
-
|
|
165
|
+
} = sr(D), N = w(r.size), u = w([]), _ = w([]), H = lr();
|
|
166
|
+
nr({
|
|
166
167
|
columns: s(() => u.value),
|
|
167
168
|
columnsBackup: s(() => _.value),
|
|
168
|
-
size: s(() =>
|
|
169
|
+
size: s(() => N.value),
|
|
169
170
|
updateColumns(e) {
|
|
170
171
|
u.value = e;
|
|
171
172
|
},
|
|
172
173
|
updateSize(e) {
|
|
173
|
-
|
|
174
|
+
N.value = e;
|
|
174
175
|
},
|
|
175
|
-
dataSource: s(() => l(
|
|
176
|
+
dataSource: s(() => l(S).records),
|
|
176
177
|
getSearchFormValues: Q,
|
|
177
178
|
setSearchFormValues: J,
|
|
178
|
-
submit: () =>
|
|
179
|
+
submit: () => I(),
|
|
179
180
|
reset: () => V()
|
|
180
181
|
});
|
|
181
182
|
const U = s(() => {
|
|
182
|
-
var e, a,
|
|
183
|
-
return
|
|
183
|
+
var e, a, o;
|
|
184
|
+
return O++, ((o = (a = (e = r.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !ne.includes(t.valueType))) == null ? void 0 : a.sort((t, d) => {
|
|
184
185
|
let n = de(t.order);
|
|
185
186
|
return de(d.order) - n;
|
|
186
|
-
})) == null ? void 0 :
|
|
187
|
-
const d =
|
|
187
|
+
})) == null ? void 0 : o.map((t) => {
|
|
188
|
+
const d = Me(t, Ge(t.fieldProps, {})), n = {
|
|
188
189
|
...t,
|
|
189
190
|
fieldProps: {
|
|
190
191
|
label: t.title,
|
|
191
192
|
name: t.dataIndex,
|
|
192
193
|
...d || {},
|
|
193
|
-
_signal:
|
|
194
|
+
_signal: O
|
|
194
195
|
},
|
|
195
196
|
renderNode: void 0
|
|
196
197
|
};
|
|
197
|
-
return n.renderNode =
|
|
198
|
+
return n.renderNode = Je(n, l($)), n;
|
|
198
199
|
})) || [];
|
|
199
|
-
}),
|
|
200
|
+
}), Se = s(() => ue(l(u), (e) => {
|
|
200
201
|
if (e.sorter === !0)
|
|
201
202
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
202
|
-
}).filter(Boolean)),
|
|
203
|
+
}).filter(Boolean)), he = s(() => ue(l(u), (e) => {
|
|
203
204
|
if (e.filters && !e.onFilter)
|
|
204
205
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
205
|
-
}).filter(Boolean)),
|
|
206
|
+
}).filter(Boolean)), we = s(() => b(r.dataSource) ? S.records : r.dataSource), ve = s(() => {
|
|
207
|
+
var a;
|
|
208
|
+
return ie(r.manual) ? r.manual : dr(((a = c.searchFormExtra) == null ? void 0 : a.call(c)) || []).some((o) => {
|
|
209
|
+
var t;
|
|
210
|
+
return ((t = o.type) == null ? void 0 : t.name) === "ApView";
|
|
211
|
+
});
|
|
212
|
+
}), {
|
|
206
213
|
rowSelection: T,
|
|
207
|
-
selectedRows:
|
|
208
|
-
...
|
|
209
|
-
} =
|
|
214
|
+
selectedRows: x,
|
|
215
|
+
...F
|
|
216
|
+
} = tr({
|
|
210
217
|
fixed: !0,
|
|
211
|
-
...
|
|
212
|
-
rowKey:
|
|
213
|
-
dataSource:
|
|
218
|
+
...r.rowSelection === !0 ? {} : r.rowSelection,
|
|
219
|
+
rowKey: r.rowKey,
|
|
220
|
+
dataSource: we
|
|
214
221
|
}), {
|
|
215
|
-
formRef:
|
|
216
|
-
submit:
|
|
222
|
+
formRef: P,
|
|
223
|
+
submit: I,
|
|
217
224
|
reset: V,
|
|
218
225
|
tableProps: q,
|
|
219
|
-
refresh:
|
|
220
|
-
data:
|
|
221
|
-
setDataSource:
|
|
226
|
+
refresh: Re,
|
|
227
|
+
data: S,
|
|
228
|
+
setDataSource: Ce,
|
|
222
229
|
getColumnSFConfig: M,
|
|
223
|
-
sortedInfo:
|
|
224
|
-
filteredInfo:
|
|
225
|
-
} =
|
|
230
|
+
sortedInfo: Te,
|
|
231
|
+
filteredInfo: xe
|
|
232
|
+
} = Ue({
|
|
226
233
|
async request(e) {
|
|
227
|
-
var
|
|
228
|
-
if (!T.value.preserveSelectedRowKeys && b(
|
|
234
|
+
var o, t;
|
|
235
|
+
if (!T.value.preserveSelectedRowKeys && b(r.dataSource) && F.clearAll(), !b(r.dataSource))
|
|
229
236
|
return {
|
|
230
|
-
data:
|
|
231
|
-
total:
|
|
237
|
+
data: r.dataSource || [],
|
|
238
|
+
total: r.dataSource.length || 0
|
|
232
239
|
};
|
|
233
|
-
const a = await ((
|
|
234
|
-
return (t =
|
|
240
|
+
const a = await ((o = r.request) == null ? void 0 : o.call(r, e));
|
|
241
|
+
return (t = r.onLoad) == null || t.call(r, (a == null ? void 0 : a.data) || []), {
|
|
235
242
|
data: (a == null ? void 0 : a.data) || [],
|
|
236
243
|
total: (a == null ? void 0 : a.total) || 0
|
|
237
244
|
};
|
|
238
245
|
},
|
|
239
|
-
filterFields:
|
|
240
|
-
sortFields:
|
|
241
|
-
defaultParams:
|
|
242
|
-
defaultData:
|
|
243
|
-
manual:
|
|
244
|
-
formatParams:
|
|
245
|
-
pagination:
|
|
246
|
-
}),
|
|
247
|
-
var
|
|
248
|
-
let e = ((
|
|
246
|
+
filterFields: he,
|
|
247
|
+
sortFields: Se,
|
|
248
|
+
defaultParams: r.params,
|
|
249
|
+
defaultData: r.defaultData,
|
|
250
|
+
manual: l(ve),
|
|
251
|
+
formatParams: r.beforeSearchSubmit,
|
|
252
|
+
pagination: r.pagination
|
|
253
|
+
}), Fe = () => {
|
|
254
|
+
var o;
|
|
255
|
+
let e = ((o = r.columns) == null ? void 0 : o.filter((t) => !t.hideInTable)) || [];
|
|
249
256
|
function a(t, d) {
|
|
250
257
|
return t.map((n) => ({
|
|
251
|
-
resizable:
|
|
252
|
-
...se(
|
|
258
|
+
resizable: ie(n.resizable) ? n.resizable : r.columnResizable,
|
|
259
|
+
...se(er(n), ["ellipsis"]),
|
|
253
260
|
// tips: 此函数内部依赖查询&筛选的相应式值
|
|
254
261
|
...M(n),
|
|
255
262
|
fixed: d ? d.fixed : n.fixed,
|
|
256
|
-
title:
|
|
263
|
+
title: Qe(n, A("table-header", "title"), c.headerCell, l(pe).colorPrimary),
|
|
257
264
|
customRender({
|
|
258
|
-
value:
|
|
259
|
-
...
|
|
265
|
+
value: p,
|
|
266
|
+
...h
|
|
260
267
|
}) {
|
|
261
268
|
var Z, ee;
|
|
262
|
-
const X =
|
|
269
|
+
const X = Xe(n), Ve = Ye({
|
|
263
270
|
...n,
|
|
264
271
|
valueType: X
|
|
265
272
|
}, {
|
|
266
|
-
value:
|
|
267
|
-
...
|
|
268
|
-
}),
|
|
269
|
-
value:
|
|
270
|
-
...
|
|
271
|
-
})) ||
|
|
272
|
-
value:
|
|
273
|
-
...
|
|
274
|
-
})]) :
|
|
275
|
-
let
|
|
276
|
-
return n.customRender && (
|
|
277
|
-
value:
|
|
278
|
-
...
|
|
273
|
+
value: p,
|
|
274
|
+
...h
|
|
275
|
+
}), Ee = Ze(X, Ve, h.record, l($)), Y = ((Z = n.renderText) == null ? void 0 : Z.call(n, {
|
|
276
|
+
value: p,
|
|
277
|
+
...h
|
|
278
|
+
})) || p, Ke = n.renderText ? m(re, null, [(ee = n.renderText) == null ? void 0 : ee.call(n, {
|
|
279
|
+
value: p,
|
|
280
|
+
...h
|
|
281
|
+
})]) : Ee;
|
|
282
|
+
let E = Pe(n, Y, Ke);
|
|
283
|
+
return n.customRender && (E = n.customRender({
|
|
284
|
+
value: p,
|
|
285
|
+
...h,
|
|
279
286
|
column: n,
|
|
280
|
-
originalNode:
|
|
287
|
+
originalNode: E,
|
|
281
288
|
originalText: Y
|
|
282
|
-
})),
|
|
289
|
+
})), E;
|
|
283
290
|
},
|
|
284
291
|
children: a(n.children || [], d || n)
|
|
285
292
|
}));
|
|
286
293
|
}
|
|
287
294
|
return a(e);
|
|
288
|
-
},
|
|
295
|
+
}, ke = () => {
|
|
289
296
|
function e(a) {
|
|
290
|
-
var
|
|
297
|
+
var o;
|
|
291
298
|
for (const t of a)
|
|
292
|
-
(
|
|
299
|
+
(o = t.children) != null && o.length ? e(t.children) : M(t, !0);
|
|
293
300
|
}
|
|
294
301
|
e(u.value);
|
|
295
302
|
};
|
|
296
|
-
k(() => [
|
|
297
|
-
const e =
|
|
303
|
+
k(() => [r.columns, r.columnResizable], () => {
|
|
304
|
+
const e = Fe();
|
|
298
305
|
u.value = e, _.value = e;
|
|
299
306
|
}, {
|
|
300
307
|
deep: !0,
|
|
301
308
|
immediate: !0
|
|
302
|
-
}), k(() => [
|
|
303
|
-
|
|
309
|
+
}), k(() => [Te.value, xe.value], () => {
|
|
310
|
+
ke();
|
|
304
311
|
}, {
|
|
305
312
|
deep: !0
|
|
306
313
|
});
|
|
307
|
-
const
|
|
308
|
-
var a,
|
|
309
|
-
if (
|
|
314
|
+
const Be = s(() => {
|
|
315
|
+
var a, o;
|
|
316
|
+
if (r.adaptive && (S.total > 0 || ((a = r.dataSource) == null ? void 0 : a.length)))
|
|
310
317
|
return {
|
|
311
|
-
y: l(
|
|
312
|
-
x: ((
|
|
318
|
+
y: l(ge),
|
|
319
|
+
x: ((o = r.scroll) == null ? void 0 : o.x) || "100%"
|
|
313
320
|
};
|
|
314
|
-
if (
|
|
315
|
-
return
|
|
316
|
-
}),
|
|
321
|
+
if (r.scroll)
|
|
322
|
+
return r.scroll;
|
|
323
|
+
}), ze = s(() => {
|
|
317
324
|
var e;
|
|
318
|
-
if (
|
|
319
|
-
return
|
|
320
|
-
if ((e =
|
|
325
|
+
if (r.tableLayout)
|
|
326
|
+
return r.tableLayout;
|
|
327
|
+
if ((e = r.columns) != null && e.some((a) => a.ellipsis))
|
|
321
328
|
return "fixed";
|
|
322
329
|
}), G = s(() => {
|
|
323
|
-
var
|
|
330
|
+
var o;
|
|
324
331
|
const e = l(q), a = l(T);
|
|
325
332
|
return {
|
|
326
|
-
...
|
|
333
|
+
...r,
|
|
327
334
|
...e,
|
|
328
|
-
rowSelection:
|
|
335
|
+
rowSelection: r.rowSelection === !0 || ((o = r.rowSelection) == null ? void 0 : o.mode) === "internal" ? {
|
|
329
336
|
...a,
|
|
330
337
|
// tips 如果是前端分页,则默认会走缓存
|
|
331
|
-
preserveSelectedRowKeys: b(
|
|
332
|
-
} :
|
|
333
|
-
loading: b(
|
|
334
|
-
pagination:
|
|
335
|
-
scroll: l(
|
|
338
|
+
preserveSelectedRowKeys: b(r.dataSource) ? a.preserveSelectedRowKeys : !0
|
|
339
|
+
} : rr(r.rowSelection),
|
|
340
|
+
loading: b(r.loading) ? e.loading : r.loading,
|
|
341
|
+
pagination: r.pagination === !1 ? !1 : e.pagination,
|
|
342
|
+
scroll: l(Be)
|
|
336
343
|
};
|
|
337
|
-
}),
|
|
344
|
+
}), Ne = s(() => {
|
|
338
345
|
var e;
|
|
339
|
-
return [
|
|
346
|
+
return [f(), r.card ? null : f("wrapper"), r.adaptive ? f("adaptive") : null, W.value && ((e = i.value) != null && e.visible) ? me(`sticky-${H === 0 ? "absolute" : "relative"}`) : null].filter(Boolean);
|
|
340
347
|
});
|
|
341
|
-
function
|
|
348
|
+
function Pe(e, a, o) {
|
|
342
349
|
if (ne.includes(e.valueType))
|
|
343
|
-
return
|
|
344
|
-
const t =
|
|
345
|
-
return e.copyable || e.ellipsis ?
|
|
350
|
+
return o;
|
|
351
|
+
const t = or(a);
|
|
352
|
+
return e.copyable || e.ellipsis ? m(cr, {
|
|
346
353
|
copyable: e.copyable,
|
|
347
354
|
rawValue: t,
|
|
348
|
-
ellipsis: e.ellipsis ?
|
|
349
|
-
tooltip:
|
|
355
|
+
ellipsis: e.ellipsis ? qe(e.ellipsis) ? {
|
|
356
|
+
tooltip: o,
|
|
350
357
|
rows: 1
|
|
351
358
|
} : {
|
|
352
359
|
...e.ellipsis,
|
|
353
|
-
tooltip:
|
|
360
|
+
tooltip: o
|
|
354
361
|
} : !1,
|
|
355
|
-
content:
|
|
356
|
-
}, null) :
|
|
362
|
+
content: o
|
|
363
|
+
}, null) : o;
|
|
357
364
|
}
|
|
358
|
-
k(() => l(
|
|
365
|
+
k(() => l(S).loading, (e) => {
|
|
359
366
|
var a;
|
|
360
|
-
(a =
|
|
361
|
-
}), k(() =>
|
|
362
|
-
|
|
367
|
+
(a = r.onLoadingChange) == null || a.call(r, e);
|
|
368
|
+
}), k(() => r.dataSource, (e) => {
|
|
369
|
+
Ce(e);
|
|
363
370
|
}, {
|
|
364
371
|
immediate: !0
|
|
365
372
|
});
|
|
366
373
|
function J(e) {
|
|
367
|
-
var a,
|
|
368
|
-
(t = (
|
|
374
|
+
var a, o, t;
|
|
375
|
+
(t = (o = (a = P.value) == null ? void 0 : a.apForm) == null ? void 0 : o.setFieldsValue) == null || t.call(o, e);
|
|
369
376
|
}
|
|
370
377
|
function Q(e = !1) {
|
|
371
|
-
var
|
|
378
|
+
var o, t, d;
|
|
372
379
|
const a = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
373
|
-
return (d = (t = (
|
|
380
|
+
return (d = (t = (o = P.value) == null ? void 0 : o.apForm) == null ? void 0 : t[a]) == null ? void 0 : d.call(t, !0);
|
|
374
381
|
}
|
|
375
|
-
function
|
|
382
|
+
function Ie() {
|
|
376
383
|
return l(u);
|
|
377
384
|
}
|
|
378
|
-
return
|
|
379
|
-
submit: () =>
|
|
385
|
+
return fe({
|
|
386
|
+
submit: () => I(),
|
|
380
387
|
reset: () => V(),
|
|
381
|
-
refresh: () =>
|
|
388
|
+
refresh: () => Re(),
|
|
382
389
|
setSearchFormValues: J,
|
|
383
390
|
getSearchFormValues: Q,
|
|
384
|
-
getShownColumns:
|
|
385
|
-
dataSource: s(() => l(
|
|
391
|
+
getShownColumns: Ie,
|
|
392
|
+
dataSource: s(() => l(S).records),
|
|
386
393
|
rowSelection: {
|
|
387
|
-
selectedRows: s(() => l(
|
|
388
|
-
...
|
|
394
|
+
selectedRows: s(() => l(x)),
|
|
395
|
+
...F
|
|
389
396
|
},
|
|
390
397
|
scrollBar: {
|
|
391
398
|
x: {
|
|
@@ -394,104 +401,104 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
394
401
|
return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.currentScroll) ?? 0;
|
|
395
402
|
},
|
|
396
403
|
scroll: (e) => {
|
|
397
|
-
var a,
|
|
398
|
-
return (
|
|
404
|
+
var a, o;
|
|
405
|
+
return (o = (a = i == null ? void 0 : i.value) == null ? void 0 : a.scroll) == null ? void 0 : o.call(a, e);
|
|
399
406
|
}
|
|
400
407
|
},
|
|
401
408
|
y: void 0
|
|
402
409
|
}
|
|
403
|
-
}), (e, a) => (
|
|
410
|
+
}), (e, a) => (y(), B("div", {
|
|
404
411
|
ref_key: "tableWrapperRef",
|
|
405
412
|
ref: D,
|
|
406
|
-
class:
|
|
407
|
-
style:
|
|
413
|
+
class: g(Ne.value),
|
|
414
|
+
style: K(l(ye)({
|
|
408
415
|
"scroll-bar-width": `${l(H)}px`
|
|
409
416
|
}))
|
|
410
|
-
}, [l(b)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (
|
|
417
|
+
}, [l(b)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (y(), B("div", {
|
|
411
418
|
key: 0,
|
|
412
|
-
class:
|
|
413
|
-
style:
|
|
414
|
-
}, [
|
|
419
|
+
class: g(e.card ? l(z)("search-wrapper") : null),
|
|
420
|
+
style: K(e.searchFormWrapperStyle)
|
|
421
|
+
}, [m(l(He).SearchForm, v(e.searchForm || {}, {
|
|
415
422
|
ref_key: "formRef",
|
|
416
|
-
ref:
|
|
423
|
+
ref: P,
|
|
417
424
|
"custom-reset": "",
|
|
418
425
|
"submit-loading": l(q).loading,
|
|
419
|
-
onSubmit: l(
|
|
426
|
+
onSubmit: l(I),
|
|
420
427
|
onReset: l(V)
|
|
421
428
|
}), ae({
|
|
422
|
-
default:
|
|
423
|
-
key:
|
|
424
|
-
item:
|
|
429
|
+
default: R(() => [(y(!0), B(re, null, te(U.value, (o) => (y(), le(Ae(o.renderNode.Comp), v({
|
|
430
|
+
key: o.dataIndex,
|
|
431
|
+
item: o,
|
|
425
432
|
ref_for: !0
|
|
426
|
-
},
|
|
427
|
-
span:
|
|
428
|
-
"custom-render":
|
|
433
|
+
}, o.fieldProps || {}, {
|
|
434
|
+
span: o.span,
|
|
435
|
+
"custom-render": o.renderNode.render
|
|
429
436
|
}), null, 16, ["item", "span", "custom-render"]))), 128))]),
|
|
430
437
|
_: 2
|
|
431
|
-
}, [
|
|
438
|
+
}, [c.searchFormExtra ? {
|
|
432
439
|
name: "extra",
|
|
433
|
-
fn:
|
|
440
|
+
fn: R(() => [C(e.$slots, "searchFormExtra")]),
|
|
434
441
|
key: "0"
|
|
435
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
442
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : oe("", !0), L("div", {
|
|
436
443
|
ref_key: "contentRef",
|
|
437
444
|
ref: be,
|
|
438
|
-
class:
|
|
439
|
-
style:
|
|
440
|
-
}, [
|
|
441
|
-
class:
|
|
442
|
-
}, [e.settings ? (
|
|
445
|
+
class: g([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
|
|
446
|
+
style: K(e.tableWrapperStyle)
|
|
447
|
+
}, [L("div", {
|
|
448
|
+
class: g(l(f)("header-wrapper"))
|
|
449
|
+
}, [e.settings ? (y(), B("div", {
|
|
443
450
|
key: 0,
|
|
444
|
-
class:
|
|
445
|
-
}, [
|
|
446
|
-
class:
|
|
447
|
-
}, [
|
|
448
|
-
selectedRows: l(
|
|
451
|
+
class: g(l(f)("header"))
|
|
452
|
+
}, [L("div", {
|
|
453
|
+
class: g(l(A)("header", "title"))
|
|
454
|
+
}, [C(e.$slots, "title", v({
|
|
455
|
+
selectedRows: l(x),
|
|
449
456
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
450
457
|
shownColumns: u.value
|
|
451
|
-
},
|
|
458
|
+
}, F))], 2), c.title ? (y(), le(l(je), {
|
|
452
459
|
key: 0,
|
|
453
460
|
type: "vertical"
|
|
454
|
-
})) :
|
|
461
|
+
})) : oe("", !0), m(fr, {
|
|
455
462
|
config: e.settings === !0 ? {} : e.settings
|
|
456
|
-
}, null, 8, ["config"])], 2)) :
|
|
463
|
+
}, null, 8, ["config"])], 2)) : C(e.$slots, "title", v({
|
|
457
464
|
key: 1,
|
|
458
|
-
selectedRows: l(
|
|
465
|
+
selectedRows: l(x),
|
|
459
466
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
460
467
|
shownColumns: u.value
|
|
461
|
-
},
|
|
468
|
+
}, F))], 2), m(l(We), v({
|
|
462
469
|
ref_key: "antdTableRef",
|
|
463
470
|
ref: j,
|
|
464
|
-
class: l(
|
|
471
|
+
class: l(f)("table")
|
|
465
472
|
}, G.value, {
|
|
466
|
-
size:
|
|
467
|
-
"table-layout":
|
|
473
|
+
size: N.value,
|
|
474
|
+
"table-layout": ze.value,
|
|
468
475
|
columns: u.value,
|
|
469
|
-
onResizeColumn: a[0] || (a[0] = (
|
|
476
|
+
onResizeColumn: a[0] || (a[0] = (o, t) => t.width = o)
|
|
470
477
|
}), ae({
|
|
471
|
-
summary:
|
|
478
|
+
summary: R(() => [C(e.$slots, "summary", {
|
|
472
479
|
columns: u.value,
|
|
473
480
|
records: G.value.dataSource,
|
|
474
|
-
selectedRows: l(
|
|
481
|
+
selectedRows: l(x)
|
|
475
482
|
})]),
|
|
476
483
|
_: 2
|
|
477
484
|
}, [l(W) ? {
|
|
478
485
|
name: "bottomPaginationTop",
|
|
479
|
-
fn:
|
|
480
|
-
var
|
|
481
|
-
return [
|
|
486
|
+
fn: R(() => {
|
|
487
|
+
var o, t;
|
|
488
|
+
return [m(l(pr), {
|
|
482
489
|
ref_key: "scrollBarRef",
|
|
483
490
|
ref: i,
|
|
484
|
-
"scroll-container": (t = (
|
|
491
|
+
"scroll-container": (t = (o = j.value) == null ? void 0 : o.table) == null ? void 0 : t.scrollBodyRef,
|
|
485
492
|
direction: "horizontal"
|
|
486
493
|
}, null, 8, ["scroll-container"])];
|
|
487
494
|
}),
|
|
488
495
|
key: "0"
|
|
489
|
-
} : void 0, te(l(se)(
|
|
496
|
+
} : void 0, te(l(se)(c, ["title", "searchFormExtra", "headerCell", "summary"]), (o, t) => ({
|
|
490
497
|
name: t,
|
|
491
|
-
fn:
|
|
498
|
+
fn: R((d) => [C(e.$slots, t, $e(De(d || {})))])
|
|
492
499
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
|
|
493
500
|
}
|
|
494
501
|
});
|
|
495
502
|
export {
|
|
496
|
-
|
|
503
|
+
Or as default
|
|
497
504
|
};
|
|
@@ -2,6 +2,7 @@ import { ApTagProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<ApTagProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTagProps> & Readonly<{}>, {
|
|
4
4
|
size: "small" | "middle" | "large";
|
|
5
|
+
type: "purely" | "border";
|
|
5
6
|
color: string;
|
|
6
7
|
disabled: boolean;
|
|
7
8
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|