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