@aplus-frontend/ui 0.6.0-beta.21 → 0.6.0-beta.22
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 +76 -74
- package/es/src/ap-drawer/ApDrawer.vue.d.ts +1 -4
- package/es/src/ap-drawer/ApDrawer.vue.mjs +24 -37
- package/es/src/ap-drawer/interface.d.ts +0 -1
- package/es/src/ap-form/item/index.vue.mjs +75 -83
- package/es/src/ap-form/item-group/index.vue.mjs +34 -35
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +18 -20
- package/es/src/ap-grid/index.vue.mjs +46 -46
- package/es/src/ap-grid/interface.d.ts +3 -3
- package/es/src/ap-list/index.vue.mjs +34 -34
- package/es/src/ap-list/interface.d.ts +4 -3
- package/es/src/ap-table/ap-table.vue2.mjs +57 -57
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +15 -15
- package/es/src/ap-table/interface.d.ts +3 -3
- package/es/src/business/ap-keep-alive/index.d.ts +2 -1
- package/es/src/business/ap-keep-alive/index.mjs +11 -9
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +7 -7
- package/es/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/es/src/business/ap-keep-alive/utils.mjs +10 -9
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +36 -30
- package/es/src/business/ap-radio-group/index.d.ts +6 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
- package/es/src/index.mjs +65 -63
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-drawer/ApDrawer.vue.d.ts +1 -4
- package/lib/src/ap-drawer/ApDrawer.vue.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +0 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +3 -3
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +4 -3
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +3 -3
- package/lib/src/business/ap-keep-alive/index.d.ts +2 -1
- package/lib/src/business/ap-keep-alive/index.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -1
- package/lib/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-radio-group/index.d.ts +6 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
- package/theme/antd-global-overwrite/admin/alert.css +1 -1
- package/theme/antd-global-overwrite/admin/field.css +3 -0
- package/theme/antd-global-overwrite/admin/field.less +4 -0
- package/theme/antd-global-overwrite/admin/index.css +10 -1
- package/theme/antd-global-overwrite/admin/modal.css +6 -0
- package/theme/antd-global-overwrite/admin/modal.less +8 -0
- package/theme/antd-global-overwrite/aplus/alert.css +1 -1
- package/theme/antd-global-overwrite/aplus/field.css +3 -0
- package/theme/antd-global-overwrite/aplus/field.less +4 -0
- package/theme/antd-global-overwrite/aplus/index.css +11 -2
- package/theme/antd-global-overwrite/aplus/modal.css +7 -1
- package/theme/antd-global-overwrite/aplus/modal.less +9 -1
- package/theme/ap-action/item-dropdown.css +1 -1
- package/theme/ap-action/item.css +2 -2
- package/theme/ap-appendix/ap-appendix.css +2 -2
- package/theme/ap-attachment/ap-attachment.css +2 -2
- package/theme/ap-batch-action/ap-batch-action.css +1 -1
- package/theme/ap-button/ap-button.css +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-copy/ap-copy.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-download/ap-download.css +4 -4
- package/theme/ap-drawer/ap-drawer.css +5 -6
- package/theme/ap-drawer/ap-drawer.less +4 -7
- package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
- package/theme/ap-field/checkbox.css +1 -1
- package/theme/ap-field/index.css +1 -1
- package/theme/ap-field/number.css +1 -1
- package/theme/ap-field/radio.css +1 -1
- package/theme/ap-field/text-area.css +1 -1
- package/theme/ap-form/ap-form-item-group.css +1 -1
- package/theme/ap-form/ap-form-item.css +4 -1
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/drawer-form.css +1 -1
- package/theme/ap-form/index.css +8 -5
- package/theme/ap-form/item-text-group.css +1 -1
- package/theme/ap-form/item-text.css +1 -1
- package/theme/ap-form/modal-form.css +1 -1
- package/theme/ap-form/search-form-sorter.css +5 -5
- package/theme/ap-form/search-form.css +8 -5
- package/theme/ap-grid/editable.css +1 -1
- package/theme/ap-grid/index.css +16 -11
- package/theme/ap-grid/index.less +2 -2
- package/theme/ap-group-search/ap-extension-select.css +1 -1
- package/theme/ap-group-search/ap-group-search.css +1 -1
- package/theme/ap-group-search/ap-popover-select.css +1 -1
- package/theme/ap-image/ap-image.css +1 -1
- package/theme/ap-input-radio/ap-input-radio.css +1 -1
- package/theme/ap-label/ap-label.css +1 -1
- package/theme/ap-ladder/ap-ladder.css +4 -4
- package/theme/ap-layout/ap-info-layout.css +1 -1
- package/theme/ap-list/index.css +1 -1
- package/theme/ap-product-info/ap-product-info.css +1 -1
- package/theme/ap-radio-group/ap-radio-group.css +2 -1
- package/theme/ap-radio-group/ap-radio-group.less +1 -0
- package/theme/ap-select-layout/ap-select-layout.css +3 -3
- package/theme/ap-size-input/ap-size-input.css +1 -1
- package/theme/ap-status/ap-status.css +1 -1
- package/theme/ap-summary/index.css +1 -1
- package/theme/ap-table/ap-table-index.css +1 -1
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +1 -1
- package/theme/ap-table/ap-table.css +12 -9
- package/theme/ap-table/setting/index.css +3 -3
- package/theme/ap-table/setting/modal.css +2 -2
- package/theme/ap-table/setting/select-group.css +1 -1
- package/theme/ap-table/setting/sortable-item-meta.css +1 -1
- package/theme/ap-table/setting/sortable-item.css +1 -1
- package/theme/ap-table/setting/sorter.css +2 -2
- package/theme/ap-table-modal/index.css +12 -9
- package/theme/ap-tag/ap-tag-group.css +1 -1
- package/theme/ap-tag/ap-tag.css +4 -4
- package/theme/ap-title/ap-title.css +1 -1
- package/theme/ap-upload/index.css +2 -2
- package/theme/ap-upload/multiple-file.css +1 -1
- package/theme/ap-upload/picture.css +1 -1
- package/theme/ap-upload/single-file.css +2 -2
- package/theme/ap-upload/upload.css +1 -1
- package/theme/ap-upload-single/index.css +1 -1
- package/theme/ap-view/ap-view.css +1 -1
- package/theme/batch-input-group/index.css +1 -1
- package/theme/batch-input-group/popover-input.css +1 -1
- package/theme/check-card/index.css +4 -4
- package/theme/editable-table/index.css +9 -6
- package/theme/full-screen/index.css +1 -1
- package/theme/index.css +46 -39
- package/theme/mask/index.css +1 -1
- package/theme/mixins/config.less +3 -3
- package/theme/mixins/mixins.css +1 -1
- package/theme/scroll-bar/index.css +1 -1
- package/theme/scroll-view/index.css +1 -1
- package/theme/splitter/index.css +2 -2
- package/theme/text/group.css +1 -1
- package/theme/text/index.css +2 -2
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +2 -0
- package/theme/work-order-modal/index.css +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as Ae, useSlots as $e, 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
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as Ae, useSlots as $e, ref as w, computed as s, unref as l, toRef as De, 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 je, renderSlot as C, normalizeProps as We, guardReactiveProps as _e } from "vue";
|
|
2
|
+
import { Divider as He, Table as Ue } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as qe } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as Me } 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 Ge } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as b, omit as se, isBoolean as Je } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as de, updateFormProps as Qe, getFieldProps as Xe, getSearchFormItemRenderNode as Ye, recursionApColumns as ue, getTableTitle as Ze, getTableRenderType as er, getTableRenderProps as rr, getTableCellRenderNode as or, apColumnToColumn as ar, falseToUndefined as tr, objectToString as lr } from "./utils.mjs";
|
|
10
|
+
import nr from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import sr from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { getScrollbarSize as dr, 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 ur } from "./context.mjs";
|
|
16
16
|
import "../scroll-bar/index.mjs";
|
|
17
|
-
import { useStickyScroll as
|
|
18
|
-
import { getValidVNodeList as
|
|
19
|
-
import { useNamespace as
|
|
20
|
-
import { useGlobalConfig as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
const
|
|
17
|
+
import { useStickyScroll as ir } from "./hooks/use-sticky-scroll.mjs";
|
|
18
|
+
import { getValidVNodeList as cr } from "../utils/slot.mjs";
|
|
19
|
+
import { useNamespace as fr } from "../config-provider/hooks/use-namespace.mjs";
|
|
20
|
+
import { useGlobalConfig as pr } from "../config-provider/hooks/use-global-config.mjs";
|
|
21
|
+
import mr from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
22
|
+
import yr from "./components/setting/modal/index.vue2.mjs";
|
|
23
|
+
import gr from "../scroll-bar/index.vue.mjs";
|
|
24
|
+
const Dr = /* @__PURE__ */ Ae({
|
|
25
25
|
name: "ApTable",
|
|
26
26
|
__name: "ap-table",
|
|
27
27
|
props: {
|
|
@@ -150,28 +150,28 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
150
150
|
}) {
|
|
151
151
|
const r = ce;
|
|
152
152
|
let O = 0;
|
|
153
|
-
const c = $e(), [, pe] =
|
|
153
|
+
const c = $e(), [, pe] = qe(), {
|
|
154
154
|
e: z,
|
|
155
155
|
b: f,
|
|
156
156
|
be: A,
|
|
157
157
|
m: me,
|
|
158
158
|
cssVar: ye
|
|
159
|
-
} =
|
|
159
|
+
} = fr("ap-table"), $ = pr("valueTypeMap"), {
|
|
160
160
|
height: ge,
|
|
161
161
|
contentRef: be
|
|
162
|
-
} =
|
|
162
|
+
} = nr(), D = w(), j = w(), {
|
|
163
163
|
isStickyMode: W,
|
|
164
164
|
scrollBarRef: i
|
|
165
|
-
} =
|
|
166
|
-
|
|
165
|
+
} = ir(D), N = w(r.size), u = w([]), _ = w([]), H = dr();
|
|
166
|
+
ur({
|
|
167
167
|
columns: s(() => u.value),
|
|
168
168
|
columnsBackup: s(() => _.value),
|
|
169
|
-
size: s(() =>
|
|
169
|
+
size: s(() => N.value),
|
|
170
170
|
updateColumns(e) {
|
|
171
171
|
u.value = e;
|
|
172
172
|
},
|
|
173
173
|
updateSize(e) {
|
|
174
|
-
|
|
174
|
+
N.value = e;
|
|
175
175
|
},
|
|
176
176
|
dataSource: s(() => l(S).records),
|
|
177
177
|
getSearchFormValues: Q,
|
|
@@ -185,7 +185,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
185
185
|
let n = de(t.order);
|
|
186
186
|
return de(d.order) - n;
|
|
187
187
|
})) == null ? void 0 : o.map((t) => {
|
|
188
|
-
const d =
|
|
188
|
+
const d = Qe(t, Xe(t.fieldProps, {})), n = {
|
|
189
189
|
...t,
|
|
190
190
|
fieldProps: {
|
|
191
191
|
label: t.title,
|
|
@@ -197,7 +197,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
197
197
|
},
|
|
198
198
|
renderNode: void 0
|
|
199
199
|
};
|
|
200
|
-
return n.renderNode =
|
|
200
|
+
return n.renderNode = Ye(n, l($)), n;
|
|
201
201
|
})) || [];
|
|
202
202
|
}), Se = s(() => ue(l(u), (e) => {
|
|
203
203
|
if (e.sorter === !0)
|
|
@@ -207,7 +207,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
207
207
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
208
208
|
}).filter(Boolean)), we = s(() => b(r.dataSource) ? S.records : r.dataSource), ve = s(() => {
|
|
209
209
|
var a;
|
|
210
|
-
return ie(r.manual) ? r.manual :
|
|
210
|
+
return ie(r.manual) ? r.manual : cr(((a = c.searchFormExtra) == null ? void 0 : a.call(c)) || []).some((o) => {
|
|
211
211
|
var t;
|
|
212
212
|
return ((t = o.type) == null ? void 0 : t.name) === "ApView";
|
|
213
213
|
});
|
|
@@ -215,13 +215,13 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
215
215
|
rowSelection: T,
|
|
216
216
|
selectedRows: x,
|
|
217
217
|
...F
|
|
218
|
-
} =
|
|
218
|
+
} = sr({
|
|
219
219
|
fixed: !0,
|
|
220
220
|
...r.rowSelection === !0 ? {} : r.rowSelection,
|
|
221
221
|
rowKey: r.rowKey,
|
|
222
222
|
dataSource: we
|
|
223
223
|
}), {
|
|
224
|
-
formRef:
|
|
224
|
+
formRef: P,
|
|
225
225
|
submit: I,
|
|
226
226
|
reset: V,
|
|
227
227
|
tableProps: q,
|
|
@@ -233,7 +233,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
233
233
|
filteredInfo: xe,
|
|
234
234
|
setPaging: Fe,
|
|
235
235
|
getPaging: ke
|
|
236
|
-
} =
|
|
236
|
+
} = Ge({
|
|
237
237
|
async request(e) {
|
|
238
238
|
var o, t;
|
|
239
239
|
if (!T.value.preserveSelectedRowKeys && b(r.dataSource) && F.clearAll(), !b(r.dataSource))
|
|
@@ -249,7 +249,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
249
249
|
},
|
|
250
250
|
filterFields: he,
|
|
251
251
|
sortFields: Se,
|
|
252
|
-
|
|
252
|
+
params: De(r, "params"),
|
|
253
253
|
defaultData: r.defaultData,
|
|
254
254
|
manual: l(ve),
|
|
255
255
|
formatParams: r.beforeSearchSubmit,
|
|
@@ -260,23 +260,23 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
260
260
|
function a(t, d) {
|
|
261
261
|
return t.map((n) => ({
|
|
262
262
|
resizable: ie(n.resizable) ? n.resizable : r.columnResizable,
|
|
263
|
-
...se(
|
|
263
|
+
...se(ar(n), ["ellipsis"]),
|
|
264
264
|
// tips: 此函数内部依赖查询&筛选的相应式值
|
|
265
265
|
...M(n),
|
|
266
266
|
fixed: d ? d.fixed : n.fixed,
|
|
267
|
-
title:
|
|
267
|
+
title: Ze(n, A("table-header", "title"), c.headerCell, l(pe).colorTextTertiary),
|
|
268
268
|
customRender({
|
|
269
269
|
value: p,
|
|
270
270
|
...h
|
|
271
271
|
}) {
|
|
272
272
|
var Z, ee;
|
|
273
|
-
const X =
|
|
273
|
+
const X = er(n), Ke = rr({
|
|
274
274
|
...n,
|
|
275
275
|
valueType: X
|
|
276
276
|
}, {
|
|
277
277
|
value: p,
|
|
278
278
|
...h
|
|
279
|
-
}), Le =
|
|
279
|
+
}), Le = or(X, Ke, h.record, l($)), Y = ((Z = n.renderText) == null ? void 0 : Z.call(n, {
|
|
280
280
|
value: p,
|
|
281
281
|
...h
|
|
282
282
|
})) || p, Oe = n.renderText ? m(re, null, [(ee = n.renderText) == null ? void 0 : ee.call(n, {
|
|
@@ -315,7 +315,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
315
315
|
}, {
|
|
316
316
|
deep: !0
|
|
317
317
|
});
|
|
318
|
-
const
|
|
318
|
+
const Ne = s(() => {
|
|
319
319
|
var a, o;
|
|
320
320
|
if (r.adaptive && (S.total > 0 || ((a = r.dataSource) == null ? void 0 : a.length)))
|
|
321
321
|
return {
|
|
@@ -324,7 +324,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
324
324
|
};
|
|
325
325
|
if (r.scroll)
|
|
326
326
|
return r.scroll;
|
|
327
|
-
}),
|
|
327
|
+
}), Pe = s(() => {
|
|
328
328
|
var e;
|
|
329
329
|
if (r.tableLayout)
|
|
330
330
|
return r.tableLayout;
|
|
@@ -340,10 +340,10 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
340
340
|
...a,
|
|
341
341
|
// tips 如果是前端分页,则默认会走缓存
|
|
342
342
|
preserveSelectedRowKeys: b(r.dataSource) ? a.preserveSelectedRowKeys : !0
|
|
343
|
-
} :
|
|
343
|
+
} : tr(r.rowSelection),
|
|
344
344
|
loading: b(r.loading) ? e.loading : r.loading,
|
|
345
345
|
pagination: r.pagination === !1 ? !1 : e.pagination,
|
|
346
|
-
scroll: l(
|
|
346
|
+
scroll: l(Ne)
|
|
347
347
|
};
|
|
348
348
|
}), Ie = s(() => {
|
|
349
349
|
var e;
|
|
@@ -352,11 +352,11 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
352
352
|
function Ve(e, a, o) {
|
|
353
353
|
if (ne.includes(e.valueType))
|
|
354
354
|
return o;
|
|
355
|
-
const t =
|
|
356
|
-
return e.copyable || e.ellipsis ? m(
|
|
355
|
+
const t = lr(a);
|
|
356
|
+
return e.copyable || e.ellipsis ? m(mr, {
|
|
357
357
|
copyable: e.copyable,
|
|
358
358
|
rawValue: t,
|
|
359
|
-
ellipsis: e.ellipsis ?
|
|
359
|
+
ellipsis: e.ellipsis ? Je(e.ellipsis) ? {
|
|
360
360
|
tooltip: o,
|
|
361
361
|
rows: 1
|
|
362
362
|
} : {
|
|
@@ -376,12 +376,12 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
376
376
|
});
|
|
377
377
|
function J(e) {
|
|
378
378
|
var a, o, t;
|
|
379
|
-
(t = (o = (a =
|
|
379
|
+
(t = (o = (a = P.value) == null ? void 0 : a.apForm) == null ? void 0 : o.setFieldsValue) == null || t.call(o, e);
|
|
380
380
|
}
|
|
381
381
|
function Q(e = !1) {
|
|
382
382
|
var o, t, d;
|
|
383
383
|
const a = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
384
|
-
return (d = (t = (o =
|
|
384
|
+
return (d = (t = (o = P.value) == null ? void 0 : o.apForm) == null ? void 0 : t[a]) == null ? void 0 : d.call(t, !0);
|
|
385
385
|
}
|
|
386
386
|
function Ee() {
|
|
387
387
|
return l(u);
|
|
@@ -424,15 +424,15 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
424
424
|
key: 0,
|
|
425
425
|
class: g(e.card ? l(z)("search-wrapper") : null),
|
|
426
426
|
style: K(e.searchFormWrapperStyle)
|
|
427
|
-
}, [m(l(
|
|
427
|
+
}, [m(l(Me).SearchForm, v(e.searchForm || {}, {
|
|
428
428
|
ref_key: "formRef",
|
|
429
|
-
ref:
|
|
429
|
+
ref: P,
|
|
430
430
|
"custom-reset": "",
|
|
431
431
|
"submit-loading": l(q).loading,
|
|
432
432
|
onSubmit: l(I),
|
|
433
433
|
onReset: l(V)
|
|
434
434
|
}), ae({
|
|
435
|
-
default: R(() => [(y(!0), B(re, null, te(U.value, (o) => (y(), le(
|
|
435
|
+
default: R(() => [(y(!0), B(re, null, te(U.value, (o) => (y(), le(je(o.renderNode.Comp), v({
|
|
436
436
|
key: o.dataIndex,
|
|
437
437
|
item: o,
|
|
438
438
|
ref_for: !0
|
|
@@ -461,23 +461,23 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
461
461
|
selectedRows: l(x),
|
|
462
462
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
463
463
|
shownColumns: u.value
|
|
464
|
-
}, F))], 2), c.title ? (y(), le(l(
|
|
464
|
+
}, F))], 2), c.title ? (y(), le(l(He), {
|
|
465
465
|
key: 0,
|
|
466
466
|
type: "vertical"
|
|
467
|
-
})) : oe("", !0), m(
|
|
467
|
+
})) : oe("", !0), m(yr, {
|
|
468
468
|
config: e.settings === !0 ? {} : e.settings
|
|
469
469
|
}, null, 8, ["config"])], 2)) : C(e.$slots, "title", v({
|
|
470
470
|
key: 1,
|
|
471
471
|
selectedRows: l(x),
|
|
472
472
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
473
473
|
shownColumns: u.value
|
|
474
|
-
}, F))], 2), m(l(
|
|
474
|
+
}, F))], 2), m(l(Ue), v({
|
|
475
475
|
ref_key: "antdTableRef",
|
|
476
476
|
ref: j,
|
|
477
477
|
class: l(f)("table")
|
|
478
478
|
}, G.value, {
|
|
479
|
-
size:
|
|
480
|
-
"table-layout":
|
|
479
|
+
size: N.value,
|
|
480
|
+
"table-layout": Pe.value,
|
|
481
481
|
columns: u.value,
|
|
482
482
|
onResizeColumn: a[0] || (a[0] = (o, t) => t.width = o)
|
|
483
483
|
}), ae({
|
|
@@ -491,7 +491,7 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
491
491
|
name: "bottomPaginationTop",
|
|
492
492
|
fn: R(() => {
|
|
493
493
|
var o, t;
|
|
494
|
-
return [m(l(
|
|
494
|
+
return [m(l(gr), {
|
|
495
495
|
ref_key: "scrollBarRef",
|
|
496
496
|
ref: i,
|
|
497
497
|
"scroll-container": (t = (o = j.value) == null ? void 0 : o.table) == null ? void 0 : t.scrollBodyRef,
|
|
@@ -503,10 +503,10 @@ const $r = /* @__PURE__ */ Ae({
|
|
|
503
503
|
key: "0"
|
|
504
504
|
} : void 0, te(l(se)(c, ["title", "searchFormExtra", "headerCell", "summary"]), (o, t) => ({
|
|
505
505
|
name: t,
|
|
506
|
-
fn: R((d) => [C(e.$slots, t,
|
|
506
|
+
fn: R((d) => [C(e.$slots, t, We(_e(d || {})))])
|
|
507
507
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
510
|
export {
|
|
511
|
-
|
|
511
|
+
Dr as default
|
|
512
512
|
};
|
|
@@ -15,10 +15,10 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
15
15
|
*/
|
|
16
16
|
manual?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* 额外的请求参数
|
|
19
19
|
* @description 如果传入响应式数据,将会在数据改变后重新请求
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
params?: ParamsType | Ref<ParamsType>;
|
|
22
22
|
/**
|
|
23
23
|
* 默认的数据源(只生效一次)
|
|
24
24
|
*/
|
|
@@ -76,7 +76,7 @@ type InternalDataType<DataType = Recordable> = {
|
|
|
76
76
|
export declare const DEFAULT_CURRENT = 1;
|
|
77
77
|
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
78
78
|
export type OptionalOnTableChange<T extends (...args: any[]) => any> = (...args: Partial<Parameters<T>>) => ReturnType<T>;
|
|
79
|
-
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request,
|
|
79
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, params, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
80
80
|
formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
|
|
81
81
|
submit: () => void;
|
|
82
82
|
reset: () => void;
|
|
@@ -2,9 +2,9 @@ import { ref as le, reactive as M, unref as m, nextTick as fe, onMounted as ge,
|
|
|
2
2
|
import { useTableSortedAndFiltered as pe } from "./use-sorted-filtered.mjs";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { parseFieldValue as me, dataIndexToStr as Se, isEqualCustom as he } from "../utils.mjs";
|
|
5
|
-
import { isArray as Q, isEqualWith as ze, isUndefined as
|
|
5
|
+
import { isArray as Q, isEqualWith as ze, isUndefined as Pe } from "lodash-unified";
|
|
6
6
|
import { isDef as $ } from "../../utils/index.mjs";
|
|
7
|
-
import { useLocale as
|
|
7
|
+
import { useLocale as Te } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { useNamespace as we } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
const S = 1, I = 20, G = {
|
|
10
10
|
defaultCurrent: S,
|
|
@@ -25,7 +25,7 @@ function be(c) {
|
|
|
25
25
|
const Ie = ({
|
|
26
26
|
manual: c = !1,
|
|
27
27
|
request: f,
|
|
28
|
-
|
|
28
|
+
params: V = {},
|
|
29
29
|
defaultData: j = [],
|
|
30
30
|
formatParams: U,
|
|
31
31
|
paramsValueTypeMap: _,
|
|
@@ -45,9 +45,9 @@ const Ie = ({
|
|
|
45
45
|
sortedInfo: N,
|
|
46
46
|
filteredInfo: B
|
|
47
47
|
} = pe(), {
|
|
48
|
-
t:
|
|
49
|
-
} =
|
|
50
|
-
b:
|
|
48
|
+
t: P
|
|
49
|
+
} = Te(), {
|
|
50
|
+
b: T
|
|
51
51
|
} = we(H), o = M({
|
|
52
52
|
total: j.length,
|
|
53
53
|
records: j,
|
|
@@ -204,16 +204,16 @@ const Ie = ({
|
|
|
204
204
|
showQuickJumper: $(n) ? n : !e,
|
|
205
205
|
showLessItems: e,
|
|
206
206
|
size: "default",
|
|
207
|
-
pageSizeOptions:
|
|
207
|
+
pageSizeOptions: Pe(a) ? ["10", "20", "50", "100"] : a,
|
|
208
208
|
showTotal: t ? (l) => C("span", {
|
|
209
|
-
class:
|
|
210
|
-
}, [
|
|
211
|
-
class:
|
|
212
|
-
}, [l]), " ",
|
|
213
|
-
class:
|
|
214
|
-
}, [
|
|
215
|
-
class:
|
|
216
|
-
}, [m(oe)]), " ",
|
|
209
|
+
class: T("pagination-total-wrapper")
|
|
210
|
+
}, [P("ap.apTable.pagination.totalLeftPrefix"), " ", C("span", {
|
|
211
|
+
class: T("pagination-count-text")
|
|
212
|
+
}, [l]), " ", P("ap.apTable.pagination.totalLeftSuffix"), C("span", {
|
|
213
|
+
class: T("pagination--total-right")
|
|
214
|
+
}, [P("ap.apTable.pagination.totalRightPrefix"), " ", C("span", {
|
|
215
|
+
class: T("pagination-count-text")
|
|
216
|
+
}, [m(oe)]), " ", P("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
217
217
|
},
|
|
218
218
|
onChange: L,
|
|
219
219
|
dataSource: o.records
|
|
@@ -3,7 +3,7 @@ import { CompareFn, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/e
|
|
|
3
3
|
import { ApFormItemProps, ApFormSearchFormProps } from '../ap-form';
|
|
4
4
|
import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps, ApFormItemTreeSelectProps } from '../ap-form/items/interface';
|
|
5
5
|
import { Recordable } from '../type';
|
|
6
|
-
import { ComputedRef, CSSProperties,
|
|
6
|
+
import { ComputedRef, CSSProperties, VNode } from 'vue';
|
|
7
7
|
import { ApActionGroupProps } from '../ap-action';
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
|
|
@@ -260,9 +260,9 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
260
260
|
card?: boolean;
|
|
261
261
|
/**
|
|
262
262
|
* request额外请求的参数
|
|
263
|
-
*
|
|
263
|
+
* 数据变化后将会重新执行网络请求
|
|
264
264
|
*/
|
|
265
|
-
params?: ParamsType
|
|
265
|
+
params?: ParamsType;
|
|
266
266
|
/**
|
|
267
267
|
* 自定义渲染搜索表单
|
|
268
268
|
* @deprecated 未实现 暂不可用
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LruCacher } from './cacher/lru-cacher';
|
|
2
2
|
import { useApKeepAliveInject } from './hook';
|
|
3
|
+
import { matches as isNameMatches } from './utils';
|
|
3
4
|
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
4
5
|
import { CacheInterface, MatchPattern } from './interface';
|
|
5
6
|
export * from './interface';
|
|
@@ -104,4 +105,4 @@ declare const ApKeepAlive: {
|
|
|
104
105
|
onClick?: () => void;
|
|
105
106
|
};
|
|
106
107
|
}));
|
|
107
|
-
export { ApKeepAlive, LruCacher, useApKeepAliveInject };
|
|
108
|
+
export { ApKeepAlive, LruCacher, useApKeepAliveInject, isNameMatches };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { withInstall as e } from "@aplus-frontend/utils";
|
|
2
|
-
import
|
|
3
|
-
import { LruCacher as
|
|
4
|
-
import { useApKeepAliveInject as
|
|
5
|
-
import {
|
|
6
|
-
|
|
2
|
+
import o from "./keep-alive.mjs";
|
|
3
|
+
import { LruCacher as i } from "./cacher/lru-cacher.mjs";
|
|
4
|
+
import { useApKeepAliveInject as a } from "./hook.mjs";
|
|
5
|
+
import { matches as c } from "./utils.mjs";
|
|
6
|
+
import { ApKeepAliveProps as x, forceStopTags as h } from "./interface.mjs";
|
|
7
|
+
const t = e(o);
|
|
7
8
|
export {
|
|
8
9
|
t as ApKeepAlive,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
x as ApKeepAliveProps,
|
|
11
|
+
i as LruCacher,
|
|
12
|
+
h as forceStopTags,
|
|
13
|
+
c as isNameMatches,
|
|
14
|
+
a as useApKeepAliveInject
|
|
13
15
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { unref as g } from "vue";
|
|
2
|
-
import { isNoValue as
|
|
2
|
+
import { isNoValue as l } from "../utils.mjs";
|
|
3
3
|
const u = {
|
|
4
4
|
get(r) {
|
|
5
|
-
var c,
|
|
5
|
+
var c, a, i;
|
|
6
6
|
let e, t, o = [];
|
|
7
|
-
const s = ((c = r.props) == null ? void 0 : c.rowKey) || "key", n = (
|
|
8
|
-
return n && (e = n.getSearchFormValues(), o = g((
|
|
9
|
-
(
|
|
7
|
+
const s = ((c = r.props) == null ? void 0 : c.rowKey) || "key", n = (a = r.component) == null ? void 0 : a.exposed;
|
|
8
|
+
return n && (e = n.getSearchFormValues(), o = g((i = n.rowSelection) == null ? void 0 : i.selectedRows).map(
|
|
9
|
+
(p) => p[s]
|
|
10
10
|
), t = n.getPaging()), {
|
|
11
11
|
selectedKeys: o,
|
|
12
12
|
data: e,
|
|
@@ -17,8 +17,8 @@ const u = {
|
|
|
17
17
|
var s;
|
|
18
18
|
const o = (s = r.component) == null ? void 0 : s.exposed;
|
|
19
19
|
if (o) {
|
|
20
|
-
if (
|
|
21
|
-
e && o.setSearchFormValues(e), t && o.setPaging(t);
|
|
20
|
+
if (l(e)) return;
|
|
21
|
+
e && o.setSearchFormValues(e), t && o.setPaging(t, !1);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -18,5 +18,6 @@ export declare const getAliveKey: (node: VNode, currentModuleKey: PropertyKeyTyp
|
|
|
18
18
|
VnodeName: string;
|
|
19
19
|
vnodeSubPath: string;
|
|
20
20
|
};
|
|
21
|
+
export declare const getComponentName: (Component: VNode) => {};
|
|
21
22
|
export declare function matches(pattern: MatchPattern, name: string): boolean;
|
|
22
23
|
export declare function isNoValue(data: any): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isArray as f, isString as y, isRegExp as n } from "lodash-unified";
|
|
2
|
-
const
|
|
2
|
+
const l = (r) => {
|
|
3
3
|
var u;
|
|
4
4
|
const e = (u = r == null ? void 0 : r.subTree) == null ? void 0 : u.children;
|
|
5
5
|
if (typeof e == "string") return;
|
|
@@ -16,26 +16,27 @@ const o = (r) => {
|
|
|
16
16
|
}, g = (r) => {
|
|
17
17
|
if (r && !(typeof r == "string" || typeof r == "number" || typeof r == "boolean" || Array.isArray(r)))
|
|
18
18
|
return r;
|
|
19
|
-
},
|
|
19
|
+
}, m = (r) => {
|
|
20
20
|
if (r && !(typeof r == "string" || typeof r == "number" || typeof r == "boolean" || Array.isArray(r) || !r.type))
|
|
21
21
|
return r;
|
|
22
|
-
},
|
|
22
|
+
}, p = (r, e) => {
|
|
23
23
|
const t = typeof r.type == "object" && "name" in r.type && r.type.name || "";
|
|
24
24
|
let u = t;
|
|
25
25
|
return r.key && r.key !== e && (u = r.key), { VnodeName: t, vnodeSubPath: u };
|
|
26
|
-
};
|
|
26
|
+
}, a = (r) => typeof r == "object" && "name" in r && r.name || "";
|
|
27
27
|
function s(r, e) {
|
|
28
28
|
return f(r) ? r.some((t) => s(t, e)) : y(r) ? r.split(",").includes(e) : n(r) ? (r.lastIndex = 0, r.test(e)) : !1;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function A(r) {
|
|
31
31
|
return [void 0, null].includes(r);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
p as getAliveKey,
|
|
35
|
+
a as getComponentName,
|
|
35
36
|
b as getFirstVNodeChirldren,
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
l as getVNodeChirldren,
|
|
38
|
+
m as getVNodeObjByVNodeArrayChildren,
|
|
38
39
|
g as getVNodeObjByVNodeChild,
|
|
39
|
-
|
|
40
|
+
A as isNoValue,
|
|
40
41
|
s as matches
|
|
41
42
|
};
|
|
@@ -2,6 +2,7 @@ import { RadioOptionType, RadioOptionStyleType } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
value: string | number;
|
|
5
|
+
delay?: number;
|
|
5
6
|
options: RadioOptionType[];
|
|
6
7
|
optionStyle?: RadioOptionStyleType;
|
|
7
8
|
};
|
|
@@ -14,6 +15,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
14
15
|
}>, {
|
|
15
16
|
value: string | number;
|
|
16
17
|
options: RadioOptionType[];
|
|
18
|
+
delay: number;
|
|
17
19
|
optionStyle: RadioOptionStyleType;
|
|
18
20
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
21
|
export default _default;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Flex as
|
|
1
|
+
import { defineComponent as b, ref as V, isVNode as _, h as l, createElementBlock as r, openBlock as o, normalizeClass as f, unref as a, createVNode as w, withCtx as B, Fragment as N, renderList as z, normalizeStyle as F, createBlock as L, resolveDynamicComponent as x } from "vue";
|
|
2
|
+
import { Flex as A } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
import { useControllableValue as
|
|
7
|
-
const
|
|
5
|
+
import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
|
|
7
|
+
const G = ["onClick"], K = /* @__PURE__ */ b({
|
|
8
8
|
name: "ApRadioGroup",
|
|
9
9
|
__name: "ap-radio-group",
|
|
10
10
|
props: {
|
|
11
11
|
value: { default: "" },
|
|
12
|
+
delay: { default: 0 },
|
|
12
13
|
options: { default: () => [] },
|
|
13
14
|
optionStyle: { default: () => ({
|
|
14
15
|
height: 28,
|
|
@@ -16,37 +17,42 @@ const D = ["onClick"], J = /* @__PURE__ */ S({
|
|
|
16
17
|
}) }
|
|
17
18
|
},
|
|
18
19
|
emits: ["update:value", "change"],
|
|
19
|
-
setup(
|
|
20
|
-
const { b:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
), k = (e) =>
|
|
24
|
-
|
|
20
|
+
setup(h, { emit: g }) {
|
|
21
|
+
const { b: y, e: n } = D("ap-radio-group"), i = h, p = g, { value: v, updateValue: C } = E(
|
|
22
|
+
i,
|
|
23
|
+
p
|
|
24
|
+
), s = V(v.value), k = (e) => _(e) ? l(e) : typeof e == "function" ? l("span", e()) : l("span", e), S = (e) => {
|
|
25
|
+
s.value = e, setTimeout(() => {
|
|
26
|
+
C(e), p("change", e);
|
|
27
|
+
}, i.delay);
|
|
25
28
|
};
|
|
26
|
-
return (e,
|
|
27
|
-
var
|
|
28
|
-
return
|
|
29
|
-
class:
|
|
29
|
+
return (e, H) => {
|
|
30
|
+
var u;
|
|
31
|
+
return o(), r("div", {
|
|
32
|
+
class: f([a(y)()])
|
|
30
33
|
}, [
|
|
31
|
-
|
|
32
|
-
gap: (
|
|
34
|
+
w(a(A), {
|
|
35
|
+
gap: (u = e.optionStyle) == null ? void 0 : u.gap,
|
|
33
36
|
wrap: "wrap"
|
|
34
37
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
(
|
|
37
|
-
var
|
|
38
|
-
return
|
|
38
|
+
default: B(() => [
|
|
39
|
+
(o(!0), r(N, null, z(e.options.filter((t) => t.visible !== !1), (t) => {
|
|
40
|
+
var c, m, d;
|
|
41
|
+
return o(), r("div", {
|
|
39
42
|
key: t.value,
|
|
40
|
-
class:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
class: f([
|
|
44
|
+
a(n)("item"),
|
|
45
|
+
s.value === t.value ? a(n)("item--active") : ""
|
|
46
|
+
]),
|
|
47
|
+
style: F({
|
|
48
|
+
height: ((c = e.optionStyle) == null ? void 0 : c.height) + "px",
|
|
49
|
+
lineHeight: ((m = e.optionStyle) == null ? void 0 : m.height) + "px",
|
|
50
|
+
color: (d = e.optionStyle) == null ? void 0 : d.color
|
|
45
51
|
}),
|
|
46
|
-
onClick: (
|
|
52
|
+
onClick: (R) => S(t.value)
|
|
47
53
|
}, [
|
|
48
|
-
(
|
|
49
|
-
], 14,
|
|
54
|
+
(o(), L(x(k(t.label))))
|
|
55
|
+
], 14, G);
|
|
50
56
|
}), 128))
|
|
51
57
|
]),
|
|
52
58
|
_: 1
|
|
@@ -56,5 +62,5 @@ const D = ["onClick"], J = /* @__PURE__ */ S({
|
|
|
56
62
|
}
|
|
57
63
|
});
|
|
58
64
|
export {
|
|
59
|
-
|
|
65
|
+
K as default
|
|
60
66
|
};
|