@aplus-frontend/ui 0.6.0-beta.16 → 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 +4 -8
- package/es/src/ap-form/search-form/index.vue.mjs +50 -50
- 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-card/ApCard.vue2.mjs +1 -1
- 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-radio-group/ap-radio-group.vue2.mjs +23 -23
- 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 +10 -9
- 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 +4 -8
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- 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-card/ApCard.vue2.js +1 -1
- 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-radio-group/ap-radio-group.vue2.js +1 -1
- 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 +7 -6
- package/theme/antd-global-overwrite/admin/field.css +12 -0
- package/theme/antd-global-overwrite/admin/field.less +16 -0
- package/theme/antd-global-overwrite/admin/index.css +12 -0
- package/theme/antd-global-overwrite/aplus/field.css +12 -0
- package/theme/antd-global-overwrite/aplus/field.less +16 -0
- package/theme/antd-global-overwrite/aplus/index.css +12 -0
- package/theme/ap-action/item.css +1 -1
- package/theme/ap-action/item.less +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-card/ap-card.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 +14 -2
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +4 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as Ve, useSlots as Ke, getCurrentInstance as Le, ref as F, computed as n, unref as o, nextTick as De, watch as B, createElementBlock as I, openBlock as c, normalizeStyle as V, normalizeClass as h, createCommentVNode as S, createElementVNode as E, createVNode as J, mergeProps as v, createSlots as Q, withCtx as C, Fragment as Y, renderList as K, createBlock as f, resolveDynamicComponent as L, renderSlot as D, normalizeProps as Oe, guardReactiveProps as $e } from "vue";
|
|
2
|
+
import { VxeTable as He, VxeColumn as Z } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
5
5
|
import { VxeUI as ee } from "vxe-pc-ui";
|
|
6
|
-
import { isUndefined as R, isFunction as oe, omit as
|
|
7
|
-
import { ApForm as
|
|
6
|
+
import { isUndefined as R, isFunction as oe, omit as Me } from "lodash-unified";
|
|
7
|
+
import { ApForm as We } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
|
-
import { noRenderAsFormItemValueList as
|
|
10
|
-
import { getColumnOrder as ae, updateFormProps as
|
|
11
|
-
import { useTablePaging as
|
|
12
|
-
import { Empty as re, Pagination as
|
|
13
|
-
import { useInnerParams as
|
|
14
|
-
import { toVxeProps as
|
|
15
|
-
import
|
|
16
|
-
import { useProvideApTable as
|
|
17
|
-
import { sizeReverseMap as
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
9
|
+
import { noRenderAsFormItemValueList as je } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as ae, updateFormProps as qe, getFieldProps as Ue, getSearchFormItemRenderNode as Ge, recursionApColumns as te } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as Xe } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as re, Pagination as Je } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as Qe } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Ye, getRowExpandProps as Ze, getRowSelectionProps as eo } from "./utils/table.mjs";
|
|
15
|
+
import oo from "./hooks/use-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as ao } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as to, sizeMap as ro, ROW_SELECTION_FIELD as lo } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as no } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as so } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { isDef as
|
|
22
|
-
import { getValidVNodeList as
|
|
23
|
-
import { useNamespace as
|
|
24
|
-
import { useGlobalConfig as
|
|
25
|
-
import { useLocale as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
21
|
+
import { isDef as io } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as co } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as uo } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as po } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as fo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import mo from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const Ho = /* @__PURE__ */ Ve({
|
|
28
28
|
name: "ApGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -116,13 +116,13 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
116
116
|
},
|
|
117
117
|
setup(le, { expose: ne }) {
|
|
118
118
|
var X;
|
|
119
|
-
const b =
|
|
119
|
+
const b = Ke(), t = le, x = (X = Le()) == null ? void 0 : X.appContext.app;
|
|
120
120
|
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(ee), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
121
|
-
const { e: P, b: u, be: se } =
|
|
121
|
+
const { e: P, b: u, be: se } = uo("ap-grid"), ie = po("valueTypeMap"), i = F([]), O = F([]), s = F(), k = F(t.size), [, d] = so(), { t: ce } = fo();
|
|
122
122
|
ee.setConfig({
|
|
123
123
|
i18n: (e, a) => ce(`ap.${e}`, a)
|
|
124
124
|
});
|
|
125
|
-
const { renderConfig: de, updateSignal: ue } =
|
|
125
|
+
const { renderConfig: de, updateSignal: ue } = no(i);
|
|
126
126
|
let $ = 0;
|
|
127
127
|
const pe = n(() => {
|
|
128
128
|
if (s.value)
|
|
@@ -132,14 +132,14 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
132
132
|
}), H = n(() => {
|
|
133
133
|
var e, a, r;
|
|
134
134
|
return $++, ((r = (a = (e = t.columns) == null ? void 0 : e.filter(
|
|
135
|
-
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !
|
|
135
|
+
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !je.includes(l.valueType)
|
|
136
136
|
)) == null ? void 0 : a.sort((l, p) => {
|
|
137
137
|
let w = ae(l.order);
|
|
138
138
|
return ae(p.order) - w;
|
|
139
139
|
})) == null ? void 0 : r.map((l) => {
|
|
140
|
-
const p =
|
|
140
|
+
const p = qe(
|
|
141
141
|
l,
|
|
142
|
-
|
|
142
|
+
Ue(l.fieldProps, {})
|
|
143
143
|
), w = {
|
|
144
144
|
...l,
|
|
145
145
|
fieldProps: {
|
|
@@ -152,14 +152,14 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
152
152
|
},
|
|
153
153
|
renderNode: void 0
|
|
154
154
|
};
|
|
155
|
-
return w.renderNode =
|
|
155
|
+
return w.renderNode = Ge(
|
|
156
156
|
w,
|
|
157
157
|
o(ie)
|
|
158
158
|
), w;
|
|
159
159
|
})) || [];
|
|
160
160
|
}), fe = n(() => {
|
|
161
161
|
var a;
|
|
162
|
-
return
|
|
162
|
+
return io(t.manual) ? t.manual : co(((a = b.searchFormExtra) == null ? void 0 : a.call(b)) || []).some((r) => {
|
|
163
163
|
var l;
|
|
164
164
|
return ((l = r.type) == null ? void 0 : l.name) === "ApView";
|
|
165
165
|
});
|
|
@@ -182,8 +182,10 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
182
182
|
data: m,
|
|
183
183
|
tableProps: j,
|
|
184
184
|
setDataSource: he,
|
|
185
|
-
handleTableChangeOptional: ve
|
|
186
|
-
|
|
185
|
+
handleTableChangeOptional: ve,
|
|
186
|
+
getPaging: Ce,
|
|
187
|
+
setPaging: be
|
|
188
|
+
} = Xe({
|
|
187
189
|
async request(e) {
|
|
188
190
|
var r;
|
|
189
191
|
if (!g.value.preserveSelectedRowKeys && R(t.dataSource) && _(), !R(t.dataSource)) {
|
|
@@ -207,19 +209,19 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
207
209
|
manual: o(fe),
|
|
208
210
|
formatParams: t.beforeSearchSubmit,
|
|
209
211
|
pagination: t.pagination,
|
|
210
|
-
onClickReset:
|
|
212
|
+
onClickReset: ze,
|
|
211
213
|
onAfterRequest: G
|
|
212
|
-
}), { sortChangeEvent:
|
|
213
|
-
|
|
214
|
+
}), { sortChangeEvent: ye, filterChangeEvent: we, paginationChangeEvent: Se } = Qe(ve);
|
|
215
|
+
ao({
|
|
214
216
|
columns: n(() => i.value),
|
|
215
217
|
columnsBackup: n(() => O.value),
|
|
216
|
-
size: n(() =>
|
|
218
|
+
size: n(() => ro[k.value]),
|
|
217
219
|
updateColumns(e) {
|
|
218
220
|
var a;
|
|
219
221
|
i.value = e, (a = t.onShownColumnsChange) == null || a.call(t, e);
|
|
220
222
|
},
|
|
221
223
|
updateSize(e) {
|
|
222
|
-
k.value =
|
|
224
|
+
k.value = to[e];
|
|
223
225
|
},
|
|
224
226
|
renderConfig: n(() => ({
|
|
225
227
|
className: se("table-header", "title"),
|
|
@@ -231,19 +233,19 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
231
233
|
submit: N,
|
|
232
234
|
reset: A
|
|
233
235
|
});
|
|
234
|
-
const
|
|
236
|
+
const Re = n(
|
|
235
237
|
() => i.value.some(
|
|
236
238
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
237
239
|
) ? "left" : void 0
|
|
238
|
-
),
|
|
240
|
+
), xe = n(
|
|
239
241
|
() => R(t.loading) ? m.loading : t.loading
|
|
240
|
-
),
|
|
242
|
+
), ke = n(
|
|
241
243
|
() => R(t.dataSource) ? m.records : t.dataSource
|
|
242
|
-
), { selectedRows: z, rowSelection: g, ...y } =
|
|
244
|
+
), { selectedRows: z, rowSelection: g, ...y } = oo({
|
|
243
245
|
...t.rowSelection === !0 ? {} : t.rowSelection,
|
|
244
|
-
dataSource:
|
|
246
|
+
dataSource: ke,
|
|
245
247
|
rowKey: t.rowKey
|
|
246
|
-
}),
|
|
248
|
+
}), Fe = ({
|
|
247
249
|
checked: e,
|
|
248
250
|
row: a
|
|
249
251
|
}) => {
|
|
@@ -255,7 +257,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
255
257
|
];
|
|
256
258
|
y.selectChange(a, e, l);
|
|
257
259
|
}
|
|
258
|
-
},
|
|
260
|
+
}, Be = ({
|
|
259
261
|
checked: e
|
|
260
262
|
}) => {
|
|
261
263
|
const a = s.value;
|
|
@@ -263,22 +265,22 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
263
265
|
...a.getCheckboxReserveRecords(),
|
|
264
266
|
...a.getCheckboxRecords()
|
|
265
267
|
]);
|
|
266
|
-
},
|
|
268
|
+
}, Ie = () => {
|
|
267
269
|
const e = s.value;
|
|
268
270
|
e && y.selectRangeChange(e.getCheckboxRecords(), [
|
|
269
271
|
...e.getCheckboxReserveRecords(),
|
|
270
272
|
...e.getCheckboxRecords()
|
|
271
273
|
]);
|
|
272
|
-
},
|
|
274
|
+
}, Ee = () => {
|
|
273
275
|
const e = s.value;
|
|
274
276
|
e && (z.value = [e.getRadioRecord()]);
|
|
275
|
-
},
|
|
277
|
+
}, Pe = ({
|
|
276
278
|
row: e
|
|
277
279
|
}) => {
|
|
278
280
|
const a = t.rowHighlightable;
|
|
279
281
|
oe(a) && a(e);
|
|
280
282
|
};
|
|
281
|
-
function
|
|
283
|
+
function Te() {
|
|
282
284
|
var e;
|
|
283
285
|
return ((e = t.columns) == null ? void 0 : e.filter((a) => !a.hideInTable)) || [];
|
|
284
286
|
}
|
|
@@ -296,22 +298,22 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
296
298
|
const e = s.value;
|
|
297
299
|
e && (g.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
298
300
|
}
|
|
299
|
-
function
|
|
301
|
+
function Ne(e) {
|
|
300
302
|
oe(t.rowKey) || (y.selectMultiByKeys(e), G());
|
|
301
303
|
}
|
|
302
|
-
function
|
|
304
|
+
function Ae(e) {
|
|
303
305
|
const a = s.value;
|
|
304
306
|
if (!a)
|
|
305
307
|
return;
|
|
306
308
|
const r = String(e[t.rowKey]), l = a.getRowById(r);
|
|
307
309
|
a.setCurrentRow(l);
|
|
308
310
|
}
|
|
309
|
-
function
|
|
311
|
+
function ze() {
|
|
310
312
|
const e = s.value;
|
|
311
313
|
e && (e.clearSort(), e.clearFilter());
|
|
312
314
|
}
|
|
313
315
|
function G() {
|
|
314
|
-
|
|
316
|
+
De(() => {
|
|
315
317
|
var e, a;
|
|
316
318
|
g.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(g.value.selectedRowKeys[0]) : (a = s.value) == null || a.setCheckboxRowKey(
|
|
317
319
|
g.value.selectedRowKeys,
|
|
@@ -319,7 +321,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
319
321
|
);
|
|
320
322
|
});
|
|
321
323
|
}
|
|
322
|
-
async function
|
|
324
|
+
async function _e(e, a) {
|
|
323
325
|
var l;
|
|
324
326
|
const r = m.records[e];
|
|
325
327
|
if (r)
|
|
@@ -329,7 +331,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
329
331
|
() => [t.columnResizable, t.columns],
|
|
330
332
|
() => {
|
|
331
333
|
var a;
|
|
332
|
-
const e =
|
|
334
|
+
const e = Te();
|
|
333
335
|
i.value = e, (a = t.onShownColumnsChange) == null || a.call(t, e), O.value = e;
|
|
334
336
|
},
|
|
335
337
|
{
|
|
@@ -362,12 +364,14 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
362
364
|
getShowColumns: () => o(i),
|
|
363
365
|
rowSelection: {
|
|
364
366
|
selectedRows: n(() => z.value),
|
|
365
|
-
setSelectedRowKeys:
|
|
367
|
+
setSelectedRowKeys: Ne,
|
|
366
368
|
clearAll: _
|
|
367
369
|
},
|
|
368
|
-
scrollToRow:
|
|
370
|
+
scrollToRow: _e,
|
|
369
371
|
getDataSource: () => o(m.records),
|
|
370
|
-
setCurrentRow:
|
|
372
|
+
setCurrentRow: Ae,
|
|
373
|
+
getPaging: Ce,
|
|
374
|
+
setPaging: be
|
|
371
375
|
}), (e, a) => (c(), I("div", {
|
|
372
376
|
class: h(me.value),
|
|
373
377
|
style: V(e.wrapperStyle)
|
|
@@ -377,7 +381,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
377
381
|
class: h(e.card ? o(P)("search-wrapper") : null),
|
|
378
382
|
style: V(e.searchFormWrapperStyle)
|
|
379
383
|
}, [
|
|
380
|
-
J(o(
|
|
384
|
+
J(o(We).SearchForm, v(e.searchForm || {}, {
|
|
381
385
|
ref_key: "formRef",
|
|
382
386
|
ref: T,
|
|
383
387
|
"custom-reset": "",
|
|
@@ -423,7 +427,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
423
427
|
E("div", {
|
|
424
428
|
class: h(o(u)("vxe-wrapper"))
|
|
425
429
|
}, [
|
|
426
|
-
(c(), f(o(
|
|
430
|
+
(c(), f(o(He), v(o(Ye)(t), {
|
|
427
431
|
ref_key: "tableRef",
|
|
428
432
|
ref: s,
|
|
429
433
|
key: o(ue),
|
|
@@ -435,7 +439,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
435
439
|
"filter-config": {
|
|
436
440
|
remote: W.value.length > 0
|
|
437
441
|
},
|
|
438
|
-
loading:
|
|
442
|
+
loading: xe.value,
|
|
439
443
|
style: {
|
|
440
444
|
"--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
|
|
441
445
|
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
|
|
@@ -450,13 +454,13 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
450
454
|
"--vxe-ui-table-header-font-color": o(d).colorTextBase
|
|
451
455
|
},
|
|
452
456
|
size: k.value,
|
|
453
|
-
onSortChange: o(
|
|
454
|
-
onFilterChange: o(
|
|
455
|
-
onCheckboxChange:
|
|
456
|
-
onCheckboxRangeChange:
|
|
457
|
-
onCheckboxAll:
|
|
458
|
-
onRadioChange:
|
|
459
|
-
onCurrentChange:
|
|
457
|
+
onSortChange: o(ye),
|
|
458
|
+
onFilterChange: o(we),
|
|
459
|
+
onCheckboxChange: Fe,
|
|
460
|
+
onCheckboxRangeChange: Ie,
|
|
461
|
+
onCheckboxAll: Be,
|
|
462
|
+
onRadioChange: Ee,
|
|
463
|
+
onCurrentChange: Pe
|
|
460
464
|
}), Q({
|
|
461
465
|
empty: C(() => [
|
|
462
466
|
J(o(re), {
|
|
@@ -464,23 +468,23 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
464
468
|
}, null, 8, ["image"])
|
|
465
469
|
]),
|
|
466
470
|
default: C(() => [
|
|
467
|
-
t.expandable && i.value.length ? (c(), f(o(Z), v({ key: 0 }, o(
|
|
471
|
+
t.expandable && i.value.length ? (c(), f(o(Z), v({ key: 0 }, o(Ze)(e.expandable), { fixed: Re.value }), {
|
|
468
472
|
content: C((r) => [
|
|
469
473
|
(c(), f(L(t.expandable.renderContent(r))))
|
|
470
474
|
]),
|
|
471
475
|
_: 1
|
|
472
476
|
}, 16, ["fixed"])) : S("", !0),
|
|
473
|
-
t.rowSelection && i.value.length ? (c(), f(o(Z), v({ key: 1 }, o(
|
|
477
|
+
t.rowSelection && i.value.length ? (c(), f(o(Z), v({ key: 1 }, o(eo)(o(g), i.value), { field: o(lo) }), null, 16, ["field"])) : S("", !0),
|
|
474
478
|
(c(!0), I(Y, null, K(o(de), (r) => (c(), f(L(r), {
|
|
475
479
|
key: r.props.colId
|
|
476
480
|
}))), 128))
|
|
477
481
|
]),
|
|
478
482
|
_: 2
|
|
479
483
|
}, [
|
|
480
|
-
K(o(
|
|
484
|
+
K(o(Me)(b, ["searchFormExtra"]), (r, l) => ({
|
|
481
485
|
name: l,
|
|
482
486
|
fn: C((p) => [
|
|
483
|
-
D(e.$slots, l,
|
|
487
|
+
D(e.$slots, l, Oe($e(p || {})))
|
|
484
488
|
])
|
|
485
489
|
}))
|
|
486
490
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
@@ -488,7 +492,7 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
488
492
|
E("div", {
|
|
489
493
|
class: h(o(u)("pagination-wrapper"))
|
|
490
494
|
}, [
|
|
491
|
-
e.sticky ? (c(), f(o(
|
|
495
|
+
e.sticky ? (c(), f(o(mo), {
|
|
492
496
|
key: 0,
|
|
493
497
|
direction: "horizontal",
|
|
494
498
|
"scroll-container": pe.value,
|
|
@@ -496,15 +500,15 @@ const Oo = /* @__PURE__ */ ze({
|
|
|
496
500
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
497
501
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
498
502
|
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
499
|
-
e.pagination !== !1 ? (c(), f(o(
|
|
503
|
+
e.pagination !== !1 ? (c(), f(o(Je), v({
|
|
500
504
|
key: 1,
|
|
501
505
|
class: o(u)("pagination")
|
|
502
|
-
}, o(j).pagination, { onChange: o(
|
|
506
|
+
}, o(j).pagination, { onChange: o(Se) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
503
507
|
], 2)
|
|
504
508
|
], 6)
|
|
505
509
|
], 6));
|
|
506
510
|
}
|
|
507
511
|
});
|
|
508
512
|
export {
|
|
509
|
-
|
|
513
|
+
Ho as default
|
|
510
514
|
};
|
|
@@ -5,6 +5,7 @@ import { TableProps } from '@aplus-frontend/antdv';
|
|
|
5
5
|
import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
|
|
6
6
|
import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
|
|
7
7
|
import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots, VxeColumnProps } from 'vxe-table';
|
|
8
|
+
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
8
9
|
export type ColConfigType = VxeTableDefines.ColumnOptions;
|
|
9
10
|
export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth' | 'className' | 'class'> & {
|
|
10
11
|
children?: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
|
|
@@ -319,4 +320,16 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
319
320
|
* @returns
|
|
320
321
|
*/
|
|
321
322
|
setCurrentRow: (nextRow: Partial<RecordType>) => void;
|
|
323
|
+
/**
|
|
324
|
+
* 获取分页参数
|
|
325
|
+
* @returns
|
|
326
|
+
*/
|
|
327
|
+
getPaging: () => InternalPagingType;
|
|
328
|
+
/**
|
|
329
|
+
* 设置表格分页参数
|
|
330
|
+
* @param nextPaging 新的分页参数
|
|
331
|
+
* @param refreshImmediately 是否立刻刷新数据,默认为`true`
|
|
332
|
+
* @returns
|
|
333
|
+
*/
|
|
334
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
322
335
|
};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { ApListProps } from './interface';
|
|
1
|
+
import { ApListExpose, ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
3
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__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> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
|
|
7
|
-
expose(exposed: ShallowUnwrapRef<
|
|
8
|
-
submit: () => void;
|
|
9
|
-
reset: () => void;
|
|
10
|
-
refresh: () => void;
|
|
11
|
-
refreshByDelete: (n: number) => void;
|
|
12
|
-
scrollToFirstRow: (selector?: string) => void;
|
|
13
|
-
getSearchFormValuesIfSetted: (transform?: boolean) => Partial<any>;
|
|
14
|
-
}>): void;
|
|
7
|
+
expose(exposed: ShallowUnwrapRef<ApListExpose>): void;
|
|
15
8
|
attrs: any;
|
|
16
9
|
slots: {
|
|
17
10
|
header?(_: {
|