@aplus-frontend/ui 0.6.0-beta.17 → 0.6.0-beta.18
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 +118 -109
- package/es/src/ap-field/date-range/index.vue.mjs +8 -7
- package/es/src/ap-field/number/index.vue.d.ts +2 -4
- package/es/src/ap-field/radio/index.vue.d.ts +2 -4
- package/es/src/ap-field/rate/index.vue.d.ts +2 -4
- package/es/src/ap-field/select/index.vue.d.ts +3 -6
- package/es/src/ap-field/slider/index.vue.d.ts +2 -4
- package/es/src/ap-field/text/index.vue2.mjs +42 -44
- package/es/src/ap-field/text/password.vue.mjs +15 -17
- package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
- package/es/src/ap-form/ap-form.vue2.mjs +18 -17
- package/es/src/ap-form/dependency/index.vue.mjs +24 -23
- package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
- package/es/src/ap-form/interface.d.ts +2 -2
- package/es/src/ap-form/item/index.vue.d.ts +5 -10
- package/es/src/ap-form/items/select/index.vue.mjs +12 -14
- package/es/src/ap-form/items/text/password.vue.mjs +9 -9
- package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
- package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
- package/es/src/ap-form/provider/index.vue.mjs +6 -5
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/set/index.vue.mjs +7 -6
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
- package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
- package/es/src/ap-grid/index.vue.mjs +79 -75
- package/es/src/ap-grid/interface.d.ts +13 -0
- package/es/src/ap-list/index.vue.d.ts +2 -9
- package/es/src/ap-list/index.vue.mjs +116 -106
- package/es/src/ap-list/interface.d.ts +20 -0
- package/es/src/ap-table/ap-table.vue.d.ts +10 -2
- package/es/src/ap-table/ap-table.vue2.mjs +87 -83
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +12 -11
- package/es/src/ap-table/constants.d.ts +4 -4
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +113 -105
- package/es/src/ap-table/interface.d.ts +14 -1
- package/es/src/ap-table/utils.d.ts +3 -3
- package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
- package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/es/src/business/ap-keep-alive/hook.mjs +31 -0
- package/es/src/business/ap-keep-alive/index.d.ts +101 -0
- package/es/src/business/ap-keep-alive/index.mjs +13 -0
- package/es/src/business/ap-keep-alive/interface.d.ts +35 -0
- package/es/src/business/ap-keep-alive/interface.mjs +54 -0
- package/es/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
- package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/es/src/business/ap-keep-alive/keeper/index.mjs +27 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/utils.d.ts +22 -0
- package/es/src/business/ap-keep-alive/utils.mjs +41 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/index.d.ts +32 -5
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
- package/es/src/business/batch-input-group/index.vue.mjs +9 -8
- package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +18 -16
- package/es/src/editable-table/form-item.vue.mjs +23 -23
- package/es/src/full-screen/interface.d.ts +5 -6
- package/es/src/index.mjs +199 -190
- package/es/src/mask/index.vue.mjs +21 -20
- package/es/src/resize-observer/interface.d.ts +2 -3
- package/es/src/scroll-bar/interface.d.ts +7 -7
- package/es/src/scroll-view/interface.d.ts +2 -3
- package/es/src/splitter/SplitBar.vue2.mjs +1 -0
- package/es/src/splitter/Splitter.vue2.mjs +1 -0
- package/es/src/text/group.vue.mjs +7 -6
- package/es/src/text/index.vue.mjs +20 -19
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +2 -4
- package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
- package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
- package/lib/src/ap-field/select/index.vue.d.ts +3 -6
- package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/dependency/index.vue.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +2 -2
- package/lib/src/ap-form/item/index.vue.d.ts +5 -10
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/provider/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +13 -0
- package/lib/src/ap-list/index.vue.d.ts +2 -9
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +20 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +4 -4
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +14 -1
- package/lib/src/ap-table/utils.d.ts +3 -3
- package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
- package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/hook.js +1 -0
- package/lib/src/business/ap-keep-alive/index.d.ts +101 -0
- package/lib/src/business/ap-keep-alive/index.js +1 -0
- package/lib/src/business/ap-keep-alive/interface.d.ts +35 -0
- package/lib/src/business/ap-keep-alive/interface.js +1 -0
- package/lib/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
- package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/utils.d.ts +22 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/index.d.ts +32 -5
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +5 -6
- package/lib/src/index.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/resize-observer/interface.d.ts +2 -3
- package/lib/src/scroll-bar/interface.d.ts +7 -7
- package/lib/src/scroll-view/interface.d.ts +2 -3
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/package.json +5 -4
- package/theme/ap-action/item.css +1 -1
- package/theme/ap-action/item.less +1 -1
- package/theme/ap-grid/index.css +6 -1
- package/theme/ap-grid/index.less +5 -0
- package/theme/ap-table/ap-table.css +6 -1
- package/theme/ap-table/ap-table.less +5 -0
- package/theme/ap-table-modal/index.css +6 -1
- package/theme/editable-table/index.css +1 -1
- package/theme/index.css +13 -1
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +4 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
3
|
-
import { useTablePaging as
|
|
1
|
+
import { defineComponent as _, ref as x, unref as t, computed as p, watch as ee, createElementBlock as s, openBlock as i, normalizeStyle as h, normalizeClass as l, renderSlot as u, createElementVNode as te, createCommentVNode as I, createVNode as g, Fragment as F, createBlock as V, withCtx as b, renderList as ae, mergeProps as ne } from "vue";
|
|
2
|
+
import { Empty as E, Spin as re, Pagination as oe } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useTablePaging as ie } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import { useOfflineList as
|
|
5
|
+
import { isUndefined as L, isNumber as le, omit as se } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ue } from "./hooks/use-offline-list.mjs";
|
|
7
7
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
-
import { RecycleScroller as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
8
|
+
import { RecycleScroller as ce, DynamicScroller as me, DynamicScrollerItem as de } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as fe } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const we = /* @__PURE__ */ _({
|
|
11
|
+
name: "ApList",
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: {
|
|
13
14
|
dataSource: {},
|
|
@@ -27,140 +28,149 @@ const be = /* @__PURE__ */ X({
|
|
|
27
28
|
rowKey: {},
|
|
28
29
|
adaptive: { type: Boolean, default: !1 }
|
|
29
30
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const R =
|
|
32
|
-
formRef:
|
|
33
|
-
submit:
|
|
34
|
-
reset:
|
|
35
|
-
handleTableChange:
|
|
36
|
-
data:
|
|
37
|
-
refresh:
|
|
38
|
-
refreshByDelete:
|
|
39
|
-
tableProps:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
setup(O, { expose: N }) {
|
|
32
|
+
const R = E.PRESENTED_IMAGE_SIMPLE, r = O, { b: d, e: y, bm: T, m: $ } = fe("ap-list"), k = x(), {
|
|
33
|
+
formRef: S,
|
|
34
|
+
submit: P,
|
|
35
|
+
reset: w,
|
|
36
|
+
handleTableChange: A,
|
|
37
|
+
data: v,
|
|
38
|
+
refresh: j,
|
|
39
|
+
refreshByDelete: q,
|
|
40
|
+
tableProps: B,
|
|
41
|
+
getPaging: K,
|
|
42
|
+
setPaging: M
|
|
43
|
+
} = ie({
|
|
44
|
+
async request(e) {
|
|
45
|
+
var n;
|
|
46
|
+
const a = await ((n = r.request) == null ? void 0 : n.call(r, e));
|
|
44
47
|
return {
|
|
45
48
|
data: (a == null ? void 0 : a.data) || [],
|
|
46
49
|
total: (a == null ? void 0 : a.total) || 0
|
|
47
50
|
};
|
|
48
51
|
},
|
|
49
|
-
defaultParams:
|
|
50
|
-
defaultData:
|
|
51
|
-
manual:
|
|
52
|
-
pagination:
|
|
53
|
-
formatParams:
|
|
54
|
-
}),
|
|
55
|
-
pagination:
|
|
56
|
-
dataSource:
|
|
57
|
-
onChange:
|
|
58
|
-
} =
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
61
|
-
|
|
52
|
+
defaultParams: r.params,
|
|
53
|
+
defaultData: r.defaultData,
|
|
54
|
+
manual: r.manual,
|
|
55
|
+
pagination: r.pagination,
|
|
56
|
+
formatParams: r.beforeSearchSubmit
|
|
57
|
+
}), W = { form: S }, {
|
|
58
|
+
pagination: D,
|
|
59
|
+
dataSource: G,
|
|
60
|
+
onChange: U
|
|
61
|
+
} = ue(r);
|
|
62
|
+
function H(e, a) {
|
|
63
|
+
if (t(f)) {
|
|
64
|
+
U(e, a);
|
|
62
65
|
return;
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
{ current:
|
|
67
|
+
A(
|
|
68
|
+
{ current: e, pageSize: a },
|
|
66
69
|
{},
|
|
67
70
|
{},
|
|
68
71
|
{ currentDataSource: [], action: "paginate" }
|
|
69
72
|
);
|
|
70
73
|
}
|
|
71
|
-
const c = p(() =>
|
|
72
|
-
var
|
|
73
|
-
return
|
|
74
|
-
}), f = p(() => !
|
|
75
|
-
|
|
76
|
-
() =>
|
|
77
|
-
(
|
|
74
|
+
const c = p(() => t(f) ? t(G) : t(v).records), m = p(() => L(r.loading) ? t(v).loading : r.loading), J = p(() => {
|
|
75
|
+
var e, a;
|
|
76
|
+
return r.pagination === !1 || r.virtual ? !1 : ((e = r.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(f) ? (((a = r.dataSource) == null ? void 0 : a.length) || 0) > t(D).pageSize : t(v).total > t(B).pagination.pageSize;
|
|
77
|
+
}), f = p(() => !L(r.dataSource));
|
|
78
|
+
ee(
|
|
79
|
+
() => t(m),
|
|
80
|
+
(e) => {
|
|
78
81
|
var a;
|
|
79
|
-
(a =
|
|
82
|
+
(a = r.onLoadingChange) == null || a.call(r, e);
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
|
-
function
|
|
83
|
-
var a,
|
|
84
|
-
(
|
|
85
|
+
function Q(e) {
|
|
86
|
+
var a, n;
|
|
87
|
+
(n = (a = k.value) == null ? void 0 : a.querySelector(e || ":first-child")) == null || n.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
85
88
|
}
|
|
86
|
-
function
|
|
89
|
+
function X(e = !1) {
|
|
87
90
|
var o;
|
|
88
|
-
const a = (o =
|
|
89
|
-
return (
|
|
91
|
+
const a = (o = S.value) == null ? void 0 : o.apForm, n = e ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
|
|
92
|
+
return (n == null ? void 0 : n()) || {};
|
|
93
|
+
}
|
|
94
|
+
function Y(e) {
|
|
95
|
+
var a, n, o;
|
|
96
|
+
(o = (n = (a = S.value) == null ? void 0 : a.apForm) == null ? void 0 : n.setFieldsValue) == null || o.call(n, e);
|
|
90
97
|
}
|
|
91
98
|
return N({
|
|
92
|
-
submit: () =>
|
|
93
|
-
reset: () =>
|
|
94
|
-
refresh: () =>
|
|
95
|
-
refreshByDelete: (
|
|
96
|
-
scrollToFirstRow:
|
|
97
|
-
getSearchFormValuesIfSetted:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
submit: () => P(),
|
|
100
|
+
reset: () => w(),
|
|
101
|
+
refresh: () => j(),
|
|
102
|
+
refreshByDelete: (e) => q(e),
|
|
103
|
+
scrollToFirstRow: Q,
|
|
104
|
+
getSearchFormValuesIfSetted: X,
|
|
105
|
+
setPaging: M,
|
|
106
|
+
getPaging: K,
|
|
107
|
+
setSearchFormValuesIfSetted: Y
|
|
108
|
+
}), (e, a) => (i(), s("div", {
|
|
109
|
+
class: l([t(d)(), { [t($)("adaptive")]: e.adaptive }]),
|
|
110
|
+
style: h(e.containerStyle)
|
|
101
111
|
}, [
|
|
102
|
-
u(
|
|
103
|
-
formIns:
|
|
104
|
-
submit:
|
|
105
|
-
reset:
|
|
112
|
+
u(e.$slots, "header", {
|
|
113
|
+
formIns: W,
|
|
114
|
+
submit: t(P),
|
|
115
|
+
reset: t(w)
|
|
106
116
|
}),
|
|
107
|
-
|
|
117
|
+
te("div", {
|
|
108
118
|
class: l([
|
|
109
|
-
|
|
110
|
-
{ [
|
|
119
|
+
t(d)("content-container"),
|
|
120
|
+
{ [t(T)("content-container", "spinning")]: m.value }
|
|
111
121
|
])
|
|
112
122
|
}, [
|
|
113
|
-
|
|
123
|
+
m.value ? (i(), s("div", {
|
|
114
124
|
key: 0,
|
|
115
|
-
class: l(
|
|
125
|
+
class: l(t(y)("spin-wrapper"))
|
|
116
126
|
}, [
|
|
117
|
-
g(
|
|
127
|
+
g(t(re), { spinning: m.value }, null, 8, ["spinning"])
|
|
118
128
|
], 2)) : I("", !0),
|
|
119
|
-
c.value.length === 0 ? u(
|
|
129
|
+
c.value.length === 0 ? u(e.$slots, "empty", {
|
|
120
130
|
key: 1,
|
|
121
|
-
loading:
|
|
131
|
+
loading: m.value
|
|
122
132
|
}, () => [
|
|
123
|
-
g(
|
|
133
|
+
g(t(E), { image: t(R) }, null, 8, ["image"])
|
|
124
134
|
]) : (i(), s("div", {
|
|
125
135
|
key: 2,
|
|
126
136
|
ref_key: "contentRef",
|
|
127
|
-
ref:
|
|
128
|
-
style:
|
|
129
|
-
class: l(
|
|
137
|
+
ref: k,
|
|
138
|
+
style: h(e.contentStyle),
|
|
139
|
+
class: l(t(y)("content"))
|
|
130
140
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
e.virtual ? (i(), s(F, { key: 0 }, [
|
|
142
|
+
t(le)(e.virtual) ? (i(), V(t(ce), {
|
|
133
143
|
key: 0,
|
|
134
|
-
class: l(
|
|
144
|
+
class: l(t(d)("scroll-wrapper")),
|
|
135
145
|
items: c.value,
|
|
136
|
-
"item-size":
|
|
137
|
-
"key-field":
|
|
146
|
+
"item-size": e.virtual,
|
|
147
|
+
"key-field": r.rowKey || "id"
|
|
138
148
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
u(
|
|
141
|
-
item:
|
|
149
|
+
default: b(({ item: n, index: o }) => [
|
|
150
|
+
u(e.$slots, "renderItem", {
|
|
151
|
+
item: n,
|
|
142
152
|
index: o
|
|
143
153
|
})
|
|
144
154
|
]),
|
|
145
155
|
_: 3
|
|
146
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (i(),
|
|
156
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), V(t(me), {
|
|
147
157
|
key: 1,
|
|
148
158
|
items: c.value,
|
|
149
|
-
"min-item-size":
|
|
150
|
-
class: l(
|
|
159
|
+
"min-item-size": e.virtual.minItemSize,
|
|
160
|
+
class: l(t(d)("scroll-wrapper"))
|
|
151
161
|
}, {
|
|
152
|
-
default:
|
|
153
|
-
var
|
|
162
|
+
default: b(({ item: n, index: o, active: Z }) => {
|
|
163
|
+
var z, C;
|
|
154
164
|
return [
|
|
155
|
-
g(
|
|
156
|
-
item:
|
|
157
|
-
active:
|
|
165
|
+
g(t(de), {
|
|
166
|
+
item: n,
|
|
167
|
+
active: Z,
|
|
158
168
|
"data-index": o,
|
|
159
|
-
"size-dependencies": (
|
|
169
|
+
"size-dependencies": (C = (z = e.virtual).sizeDependencies) == null ? void 0 : C.call(z, n)
|
|
160
170
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
u(
|
|
163
|
-
item:
|
|
171
|
+
default: b(() => [
|
|
172
|
+
u(e.$slots, "renderItem", {
|
|
173
|
+
item: n,
|
|
164
174
|
index: o
|
|
165
175
|
})
|
|
166
176
|
]),
|
|
@@ -170,30 +180,30 @@ const be = /* @__PURE__ */ X({
|
|
|
170
180
|
}),
|
|
171
181
|
_: 3
|
|
172
182
|
}, 8, ["items", "min-item-size", "class"]))
|
|
173
|
-
], 64)) : u(
|
|
183
|
+
], 64)) : u(e.$slots, "renderContent", {
|
|
174
184
|
key: 1,
|
|
175
185
|
dataSource: c.value
|
|
176
186
|
}, () => [
|
|
177
|
-
(i(!0), s(
|
|
178
|
-
item:
|
|
187
|
+
(i(!0), s(F, null, ae(c.value, (n, o) => u(e.$slots, "renderItem", {
|
|
188
|
+
item: n,
|
|
179
189
|
index: o
|
|
180
190
|
})), 256))
|
|
181
191
|
])
|
|
182
192
|
], 6))
|
|
183
193
|
], 2),
|
|
184
|
-
|
|
194
|
+
J.value ? (i(), s("div", {
|
|
185
195
|
key: 0,
|
|
186
|
-
class: l(
|
|
187
|
-
style:
|
|
196
|
+
class: l(t(y)("footer")),
|
|
197
|
+
style: h(e.footerWarpperStyle)
|
|
188
198
|
}, [
|
|
189
|
-
g(
|
|
190
|
-
f.value ?
|
|
191
|
-
{ onChange:
|
|
199
|
+
g(t(oe), ne(
|
|
200
|
+
f.value ? t(D) : t(se)(t(B).pagination, ["showTotal"]),
|
|
201
|
+
{ onChange: H }
|
|
192
202
|
), null, 16)
|
|
193
203
|
], 6)) : I("", !0)
|
|
194
204
|
], 6));
|
|
195
205
|
}
|
|
196
206
|
});
|
|
197
207
|
export {
|
|
198
|
-
|
|
208
|
+
we as default
|
|
199
209
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Ref, StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
|
+
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
4
5
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
5
6
|
/**
|
|
6
7
|
* 列表数据源,传入后`request`和`defaultData`都将失效
|
|
@@ -126,4 +127,23 @@ export type ApListExpose = {
|
|
|
126
127
|
* @returns
|
|
127
128
|
*/
|
|
128
129
|
getSearchFormValuesIfSetted: (transform?: boolean) => Recordable;
|
|
130
|
+
/**
|
|
131
|
+
* 设置查询表单的值
|
|
132
|
+
* @description 只有在自定义查询表单并且绑定了formRef才能设置查询表单的值
|
|
133
|
+
* @param fields 将要设置的值
|
|
134
|
+
* @returns
|
|
135
|
+
*/
|
|
136
|
+
setSearchFormValuesIfSetted: (fields: any) => void;
|
|
137
|
+
/**
|
|
138
|
+
* 获取分页参数
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
getPaging: () => InternalPagingType;
|
|
142
|
+
/**
|
|
143
|
+
* 设置表格分页参数
|
|
144
|
+
* @param nextPaging 新的分页参数
|
|
145
|
+
* @param refreshImmediately 是否立刻刷新数据,默认为`true`
|
|
146
|
+
* @returns
|
|
147
|
+
*/
|
|
148
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
129
149
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApColumnType, ApTableProps } from './interface';
|
|
2
2
|
import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
3
3
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
4
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef,
|
|
4
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode } from 'vue';
|
|
5
5
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType> & Partial<{}>> & PublicProps;
|
|
7
7
|
expose(exposed: ShallowUnwrapRef<{
|
|
@@ -10,6 +10,14 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
10
10
|
refresh: () => void;
|
|
11
11
|
setSearchFormValues: (fields: any) => void;
|
|
12
12
|
getSearchFormValues: (transform?: boolean) => Partial<any> | undefined;
|
|
13
|
+
setPaging: (nextPaging: Partial<{
|
|
14
|
+
current: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
}>, refreshImmediately?: boolean) => void;
|
|
17
|
+
getPaging: () => {
|
|
18
|
+
current?: number | undefined;
|
|
19
|
+
pageSize?: number | undefined;
|
|
20
|
+
};
|
|
13
21
|
getShownColumns: () => ColumnsType<RecordType>;
|
|
14
22
|
dataSource: ComputedRef<RecordType[]>;
|
|
15
23
|
rowSelection: {
|
|
@@ -26,7 +34,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
26
34
|
};
|
|
27
35
|
scrollBar: {
|
|
28
36
|
x: {
|
|
29
|
-
getCurrentScroll: () =>
|
|
37
|
+
getCurrentScroll: () => number;
|
|
30
38
|
scroll: (percent: number) => void | undefined;
|
|
31
39
|
};
|
|
32
40
|
y: undefined;
|