@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-button/ap-button.vue.mjs +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +57 -58
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/item/index.vue.mjs +33 -28
- package/es/src/ap-form/items/checkbox/index.vue.mjs +1 -0
- package/es/src/ap-form/items/date/index.vue.mjs +8 -7
- package/es/src/ap-form/items/date-range/index.vue.mjs +1 -0
- package/es/src/ap-form/items/number/index.vue.mjs +9 -8
- package/es/src/ap-form/items/radio/index.vue.mjs +1 -0
- package/es/src/ap-form/items/select/index.vue.mjs +7 -6
- package/es/src/ap-form/items/switch/index.vue.mjs +1 -0
- package/es/src/ap-form/items/text/index.vue2.mjs +8 -7
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +1 -0
- package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -5
- package/es/src/ap-form/render/item.vue.mjs +5 -4
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +10 -10
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +8 -8
- package/es/src/ap-form/search-form/index.vue.mjs +36 -35
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
- package/es/src/ap-grid/editable/index.vue.mjs +1 -1
- package/es/src/ap-grid/index.vue.mjs +149 -140
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +206 -199
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
- package/es/src/ap-tag/interface.d.ts +4 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -12
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +108 -99
- package/es/src/business/ap-export-group/index.d.ts +3 -0
- package/es/src/business/ap-export-group/interface.d.ts +7 -2
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-view/ap-view.vue2.mjs +120 -114
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +63 -55
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +38 -38
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +2 -4
- package/es/src/check-card/index.vue2.mjs +1 -1
- package/es/src/config-provider/css-var.mjs +2 -2
- package/es/src/design-token/index.mjs +9 -3
- package/es/src/editable-table/form-item.vue.mjs +1 -1
- package/es/src/editable-table/index.vue.mjs +27 -27
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.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.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +4 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +3 -0
- package/lib/src/business/ap-export-group/interface.d.ts +7 -2
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +4 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/package.json +1 -1
- package/theme/antd-global-overwrite/admin/index.css +5 -8
- package/theme/antd-global-overwrite/admin/modal.css +2 -5
- package/theme/antd-global-overwrite/admin/modal.less +3 -3
- package/theme/antd-global-overwrite/admin/table.css +3 -3
- package/theme/antd-global-overwrite/admin/table.less +3 -3
- package/theme/antd-global-overwrite/aplus/index.css +5 -8
- package/theme/antd-global-overwrite/aplus/modal.css +2 -5
- package/theme/antd-global-overwrite/aplus/modal.less +3 -3
- package/theme/antd-global-overwrite/aplus/table.css +3 -3
- package/theme/antd-global-overwrite/aplus/table.less +3 -3
- package/theme/ap-action/item-dropdown.css +5 -5
- package/theme/ap-action/item-dropdown.less +1 -1
- package/theme/ap-action/item.css +5 -5
- package/theme/ap-action/item.less +1 -1
- package/theme/ap-appendix/ap-appendix.css +7 -5
- package/theme/ap-appendix/ap-appendix.less +4 -2
- package/theme/ap-attachment/ap-attachment.css +7 -7
- package/theme/ap-attachment/ap-attachment.less +4 -4
- package/theme/ap-batch-action/ap-batch-action.css +9 -6
- package/theme/ap-batch-action/ap-batch-action.less +6 -3
- package/theme/ap-button/ap-button.css +3 -3
- package/theme/ap-card/ap-card.css +3 -3
- package/theme/ap-descriptions/ap-descriptions.css +6 -8
- package/theme/ap-descriptions/ap-descriptions.less +3 -5
- package/theme/ap-download/ap-download.css +10 -13
- package/theme/ap-download/ap-download.less +8 -11
- package/theme/ap-expand-alert/ap-expand-alert.css +4 -4
- package/theme/ap-expand-alert/ap-expand-alert.less +3 -4
- package/theme/ap-field/checkbox.css +4 -4
- package/theme/ap-field/checkbox.less +2 -1
- package/theme/ap-field/index.css +5 -5
- package/theme/ap-field/number.css +3 -3
- package/theme/ap-field/radio.css +4 -4
- package/theme/ap-field/radio.less +1 -1
- package/theme/ap-field/text-area.css +3 -3
- package/theme/ap-form/ap-form-item-group.css +3 -3
- package/theme/ap-form/ap-form-item.css +10 -8
- package/theme/ap-form/ap-form-item.less +8 -6
- package/theme/ap-form/drawer-form.css +3 -3
- package/theme/ap-form/index.css +21 -19
- package/theme/ap-form/item-text-group.css +3 -3
- package/theme/ap-form/item-text.css +3 -3
- package/theme/ap-form/modal-form.css +3 -3
- package/theme/ap-form/search-form-sorter.css +12 -12
- package/theme/ap-form/search-form-sorter.less +7 -7
- package/theme/ap-form/search-form.css +21 -19
- package/theme/ap-form/search-form.less +5 -5
- package/theme/ap-grid/editable.css +5 -5
- package/theme/ap-grid/editable.less +3 -2
- package/theme/ap-grid/index.css +43 -32
- package/theme/ap-grid/index.less +20 -9
- package/theme/ap-group-search/ap-extension-select.css +3 -3
- package/theme/ap-group-search/ap-group-search.css +3 -3
- package/theme/ap-group-search/ap-popover-select.css +3 -3
- package/theme/ap-image/ap-image.css +3 -3
- package/theme/ap-input-radio/ap-input-radio.css +3 -3
- package/theme/ap-label/ap-label.css +3 -3
- package/theme/ap-ladder/ap-ladder.css +6 -6
- package/theme/ap-ladder/ap-ladder.less +3 -3
- package/theme/ap-layout/ap-info-layout.css +3 -3
- package/theme/ap-list/index.css +4 -4
- package/theme/ap-list/index.less +2 -1
- package/theme/ap-product-info/ap-product-info.css +3 -3
- package/theme/ap-select-layout/ap-select-layout.css +11 -11
- package/theme/ap-select-layout/ap-select-layout.less +8 -8
- package/theme/ap-size-input/ap-size-input.css +3 -3
- package/theme/ap-status/ap-status.css +5 -6
- package/theme/ap-status/ap-status.less +2 -4
- package/theme/ap-summary/index.css +6 -6
- package/theme/ap-summary/index.less +3 -3
- package/theme/ap-table/ap-table-index.css +8 -8
- package/theme/ap-table/ap-table-index.less +5 -5
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +3 -3
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +46 -42
- package/theme/ap-table/ap-table.less +10 -9
- package/theme/ap-table/setting/index.css +7 -7
- package/theme/ap-table/setting/modal.css +5 -5
- package/theme/ap-table/setting/select-group.css +3 -3
- package/theme/ap-table/setting/sortable-item-meta.css +3 -3
- package/theme/ap-table/setting/sortable-item.css +3 -3
- package/theme/ap-table/setting/sorter.css +5 -5
- package/theme/ap-table-modal/index.css +46 -42
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag-group.less +2 -2
- package/theme/ap-tag/ap-tag.css +27 -18
- package/theme/ap-tag/ap-tag.less +37 -24
- package/theme/ap-title/ap-title.css +5 -5
- package/theme/ap-title/ap-title.less +2 -2
- package/theme/ap-upload/index.css +6 -6
- package/theme/ap-upload/multiple-file.css +4 -4
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +5 -5
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-upload/single-file.css +3 -3
- package/theme/ap-upload/upload.css +3 -3
- package/theme/ap-upload-single/index.css +3 -3
- package/theme/ap-view/ap-view.css +7 -3
- package/theme/ap-view/ap-view.less +4 -0
- package/theme/batch-input-group/index.css +5 -5
- package/theme/batch-input-group/popover-input.css +3 -3
- package/theme/check-card/index.css +22 -22
- package/theme/check-card/index.less +17 -15
- package/theme/editable-table/index.css +36 -32
- package/theme/editable-table/index.less +9 -7
- package/theme/full-screen/index.css +3 -3
- package/theme/index.css +174 -147
- package/theme/mask/index.css +3 -3
- package/theme/mixins/config.less +26 -4
- package/theme/mixins/mixins.css +3 -3
- package/theme/scroll-bar/index.css +3 -3
- package/theme/scroll-view/index.css +3 -3
- package/theme/splitter/index.css +8 -8
- package/theme/text/group.css +3 -3
- package/theme/text/index.css +5 -5
- package/theme/work-order-modal/index.css +3 -3
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as F, computed as n, unref as o, watch as B, createElementBlock as I, openBlock as s, normalizeStyle as V, normalizeClass as g, createCommentVNode as b, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as p, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Ee, guardReactiveProps as Pe } from "vue";
|
|
2
|
+
import { VxeTable as Ne, VxeColumn as Y } 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 Z } from "vxe-pc-ui";
|
|
6
|
-
import { isUndefined as
|
|
7
|
-
import { ApForm as
|
|
6
|
+
import { isUndefined as w, omit as Te } from "lodash-unified";
|
|
7
|
+
import { ApForm as ze } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
|
-
import { noRenderAsFormItemValueList as
|
|
10
|
-
import { getColumnOrder as ee, updateFormProps as
|
|
11
|
-
import { useTablePaging as
|
|
12
|
-
import { Empty as ae, 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 _e } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as ee, updateFormProps as Ae, getFieldProps as Ve, getSearchFormItemRenderNode as Le, recursionApColumns as oe } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as De } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as ae, Pagination as Oe } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as $e } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Ke, getRowExpandProps as We, getRowSelectionProps as je } from "./utils/table.mjs";
|
|
15
|
+
import He from "../ap-table/hooks/use-table-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as Me } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as qe, sizeMap as Ue, ROW_SELECTION_FIELD as Ge } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as Xe } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as Je } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
|
|
21
|
+
import { isDef as Qe } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as Ye } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as Ze } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as eo } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as oo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import ao from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const No = /* @__PURE__ */ Fe({
|
|
26
28
|
name: "ApGrid",
|
|
27
29
|
__name: "index",
|
|
28
30
|
props: {
|
|
@@ -100,8 +102,8 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
100
102
|
searchFormWrapperStyle: {},
|
|
101
103
|
tableWrapperStyle: {},
|
|
102
104
|
wrapperStyle: {},
|
|
103
|
-
manual: { type: Boolean, default:
|
|
104
|
-
size: { default:
|
|
105
|
+
manual: { type: Boolean, default: void 0 },
|
|
106
|
+
size: { default: "mini" },
|
|
105
107
|
adaptive: { type: Boolean, default: !1 },
|
|
106
108
|
columnResizable: { type: [Boolean, Object], default: !1 },
|
|
107
109
|
rowKey: { default: "key" },
|
|
@@ -112,13 +114,13 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
112
114
|
},
|
|
113
115
|
setup(re, { expose: te }) {
|
|
114
116
|
var G;
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const { e:
|
|
117
|
+
const C = Be(), a = re, x = (G = Ie()) == null ? void 0 : G.appContext.app;
|
|
118
|
+
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(Z), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
119
|
+
const { e: P, b: c, be: le } = Ze("ap-grid"), ne = eo("valueTypeMap"), i = F([]), $ = F([]), m = F(), y = F(a.size), [, d] = Je(), { t: se } = oo();
|
|
118
120
|
Z.setConfig({
|
|
119
121
|
i18n: (e, r) => se(`ap.${e}`, r)
|
|
120
122
|
});
|
|
121
|
-
const { renderConfig:
|
|
123
|
+
const { renderConfig: ie, updateSignal: de } = Xe(i);
|
|
122
124
|
let K = 0;
|
|
123
125
|
const ce = n(() => {
|
|
124
126
|
if (m.value)
|
|
@@ -128,15 +130,15 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
128
130
|
}), W = n(() => {
|
|
129
131
|
var e, r, l;
|
|
130
132
|
return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
131
|
-
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !
|
|
133
|
+
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
|
|
132
134
|
)) == null ? void 0 : r.sort((t, u) => {
|
|
133
|
-
let
|
|
134
|
-
return ee(u.order) -
|
|
135
|
+
let S = ee(t.order);
|
|
136
|
+
return ee(u.order) - S;
|
|
135
137
|
})) == null ? void 0 : l.map((t) => {
|
|
136
|
-
const u =
|
|
138
|
+
const u = Ae(
|
|
137
139
|
t,
|
|
138
|
-
|
|
139
|
-
),
|
|
140
|
+
Ve(t.fieldProps, {})
|
|
141
|
+
), S = {
|
|
140
142
|
...t,
|
|
141
143
|
fieldProps: {
|
|
142
144
|
label: t.title,
|
|
@@ -146,35 +148,41 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
146
148
|
},
|
|
147
149
|
renderNode: void 0
|
|
148
150
|
};
|
|
149
|
-
return
|
|
150
|
-
|
|
151
|
+
return S.renderNode = Le(
|
|
152
|
+
S,
|
|
151
153
|
o(ne)
|
|
152
|
-
),
|
|
154
|
+
), S;
|
|
153
155
|
})) || [];
|
|
154
|
-
}), ue = n(() =>
|
|
156
|
+
}), ue = n(() => {
|
|
157
|
+
var r;
|
|
158
|
+
return Qe(a.manual) ? a.manual : Ye(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
|
|
159
|
+
var t;
|
|
160
|
+
return ((t = l.type) == null ? void 0 : t.name) === "ApView";
|
|
161
|
+
});
|
|
162
|
+
}), pe = n(() => [
|
|
155
163
|
c(),
|
|
156
164
|
a.card ? null : c("wrapper"),
|
|
157
165
|
a.adaptive ? c("adaptive") : null,
|
|
158
166
|
a.sticky ? c("sticky") : null
|
|
159
|
-
].filter(Boolean)), j = n(() => oe(o(
|
|
167
|
+
].filter(Boolean)), j = n(() => oe(o(i), (e) => {
|
|
160
168
|
if (e.sorter === !0)
|
|
161
169
|
return e.key || e.dataIndex;
|
|
162
|
-
}).filter(Boolean)), H = n(() => oe(o(
|
|
170
|
+
}).filter(Boolean)), H = n(() => oe(o(i), (e) => {
|
|
163
171
|
if (e.filters && !e.onFilter)
|
|
164
172
|
return e.key || e.dataIndex;
|
|
165
173
|
}).filter(Boolean)), {
|
|
166
|
-
formRef:
|
|
167
|
-
submit:
|
|
168
|
-
reset:
|
|
169
|
-
refresh:
|
|
174
|
+
formRef: N,
|
|
175
|
+
submit: T,
|
|
176
|
+
reset: z,
|
|
177
|
+
refresh: me,
|
|
170
178
|
data: f,
|
|
171
179
|
tableProps: M,
|
|
172
|
-
setDataSource:
|
|
173
|
-
handleTableChange:
|
|
174
|
-
} =
|
|
180
|
+
setDataSource: fe,
|
|
181
|
+
handleTableChange: ge
|
|
182
|
+
} = De({
|
|
175
183
|
async request(e) {
|
|
176
184
|
var l;
|
|
177
|
-
if (!
|
|
185
|
+
if (!k.value.preserveSelectedRowKeys && w(a.dataSource) && A(), !w(a.dataSource)) {
|
|
178
186
|
const t = e.pageSize * (e.current - 1);
|
|
179
187
|
return {
|
|
180
188
|
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
|
|
@@ -192,72 +200,72 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
192
200
|
sortFields: j,
|
|
193
201
|
defaultParams: a.params,
|
|
194
202
|
defaultData: a.defaultData,
|
|
195
|
-
manual:
|
|
203
|
+
manual: o(ue),
|
|
196
204
|
formatParams: a.beforeSearchSubmit,
|
|
197
205
|
pagination: a.pagination
|
|
198
|
-
}), { sortChangeEvent:
|
|
199
|
-
|
|
200
|
-
columns: n(() =>
|
|
206
|
+
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = $e(ge);
|
|
207
|
+
Me({
|
|
208
|
+
columns: n(() => i.value),
|
|
201
209
|
columnsBackup: n(() => $.value),
|
|
202
|
-
size: n(() =>
|
|
210
|
+
size: n(() => y.value ? Ue[y.value] : "middle"),
|
|
203
211
|
updateColumns(e) {
|
|
204
212
|
var r;
|
|
205
|
-
|
|
213
|
+
i.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
|
|
206
214
|
},
|
|
207
215
|
updateSize(e) {
|
|
208
|
-
|
|
216
|
+
y.value = qe[e];
|
|
209
217
|
},
|
|
210
218
|
renderConfig: n(() => ({
|
|
211
219
|
className: le("table-header", "title"),
|
|
212
|
-
color:
|
|
220
|
+
color: d.value.colorPrimary
|
|
213
221
|
})),
|
|
214
222
|
dataSource: n(() => o(f).records),
|
|
215
223
|
getSearchFormValues: U,
|
|
216
224
|
setSearchFormValues: q,
|
|
217
|
-
submit:
|
|
218
|
-
reset:
|
|
225
|
+
submit: T,
|
|
226
|
+
reset: z
|
|
219
227
|
});
|
|
220
|
-
const
|
|
221
|
-
() =>
|
|
228
|
+
const ye = n(
|
|
229
|
+
() => i.value.some(
|
|
222
230
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
223
231
|
) ? "left" : void 0
|
|
224
|
-
), ye = n(
|
|
225
|
-
() => b(a.loading) ? f.loading : a.loading
|
|
226
232
|
), Se = n(
|
|
227
|
-
() =>
|
|
228
|
-
),
|
|
233
|
+
() => w(a.loading) ? f.loading : a.loading
|
|
234
|
+
), be = n(
|
|
235
|
+
() => w(a.dataSource) ? f.records : a.dataSource
|
|
236
|
+
), { selectedRows: R, rowSelection: k, ...we } = He({
|
|
229
237
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
230
|
-
dataSource:
|
|
238
|
+
dataSource: be,
|
|
231
239
|
rowKey: a.rowKey
|
|
232
|
-
}),
|
|
240
|
+
}), _ = () => {
|
|
233
241
|
const e = m.value;
|
|
234
|
-
e && (
|
|
242
|
+
e && (R.value = [
|
|
235
243
|
...e.getCheckboxReserveRecords(),
|
|
236
244
|
...e.getCheckboxRecords()
|
|
237
245
|
]);
|
|
238
|
-
},
|
|
246
|
+
}, xe = () => {
|
|
239
247
|
const e = m.value;
|
|
240
|
-
e && (
|
|
248
|
+
e && (R.value = [e.getRadioRecord()]);
|
|
241
249
|
};
|
|
242
|
-
function
|
|
250
|
+
function Re() {
|
|
243
251
|
var e;
|
|
244
252
|
return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
|
|
245
253
|
}
|
|
246
254
|
function q(e) {
|
|
247
255
|
var r, l, t;
|
|
248
|
-
(t = (l = (r =
|
|
256
|
+
(t = (l = (r = N.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
|
|
249
257
|
}
|
|
250
258
|
function U(e = !1) {
|
|
251
259
|
var l, t, u;
|
|
252
260
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
253
|
-
return (u = (t = (l =
|
|
261
|
+
return (u = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : u.call(t, !0);
|
|
254
262
|
}
|
|
255
|
-
function
|
|
256
|
-
|
|
263
|
+
function A() {
|
|
264
|
+
we.clearAll();
|
|
257
265
|
const e = m.value;
|
|
258
|
-
e && (
|
|
266
|
+
e && (k.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
259
267
|
}
|
|
260
|
-
async function
|
|
268
|
+
async function ke(e, r) {
|
|
261
269
|
var t;
|
|
262
270
|
const l = f.records[e];
|
|
263
271
|
if (l)
|
|
@@ -267,8 +275,8 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
267
275
|
() => [a.columnResizable, a.columns],
|
|
268
276
|
() => {
|
|
269
277
|
var r;
|
|
270
|
-
const e =
|
|
271
|
-
|
|
278
|
+
const e = Re();
|
|
279
|
+
i.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
|
|
272
280
|
},
|
|
273
281
|
{
|
|
274
282
|
deep: !0,
|
|
@@ -277,7 +285,7 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
277
285
|
), B(
|
|
278
286
|
() => a.dataSource,
|
|
279
287
|
(e) => {
|
|
280
|
-
|
|
288
|
+
fe(e);
|
|
281
289
|
},
|
|
282
290
|
{ immediate: !0, deep: !0 }
|
|
283
291
|
), B(
|
|
@@ -289,40 +297,40 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
289
297
|
), B(
|
|
290
298
|
() => a.size,
|
|
291
299
|
(e) => {
|
|
292
|
-
|
|
300
|
+
y.value = e;
|
|
293
301
|
}
|
|
294
302
|
), te({
|
|
295
|
-
submit:
|
|
296
|
-
reset:
|
|
297
|
-
refresh:
|
|
303
|
+
submit: T,
|
|
304
|
+
reset: z,
|
|
305
|
+
refresh: me,
|
|
298
306
|
setSearchFormValues: q,
|
|
299
307
|
getSearchFormValues: U,
|
|
300
|
-
getShowColumns: () => o(
|
|
308
|
+
getShowColumns: () => o(i),
|
|
301
309
|
rowSelection: {
|
|
302
|
-
selectedRows: n(() =>
|
|
303
|
-
clearAll:
|
|
310
|
+
selectedRows: n(() => R.value),
|
|
311
|
+
clearAll: A
|
|
304
312
|
},
|
|
305
|
-
scrollToRow:
|
|
313
|
+
scrollToRow: ke,
|
|
306
314
|
getDataSource: () => o(f.records)
|
|
307
|
-
}), (e, r) => (s(),
|
|
308
|
-
class: g(
|
|
309
|
-
style:
|
|
315
|
+
}), (e, r) => (s(), I("div", {
|
|
316
|
+
class: g(pe.value),
|
|
317
|
+
style: V(e.wrapperStyle)
|
|
310
318
|
}, [
|
|
311
|
-
o(
|
|
319
|
+
o(w)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (s(), I("div", {
|
|
312
320
|
key: 0,
|
|
313
|
-
class: g(e.card ? o(
|
|
314
|
-
style:
|
|
321
|
+
class: g(e.card ? o(P)("search-wrapper") : null),
|
|
322
|
+
style: V(e.searchFormWrapperStyle)
|
|
315
323
|
}, [
|
|
316
|
-
X(o(
|
|
324
|
+
X(o(ze).SearchForm, h(e.searchForm || {}, {
|
|
317
325
|
ref_key: "formRef",
|
|
318
|
-
ref:
|
|
326
|
+
ref: N,
|
|
319
327
|
"custom-reset": "",
|
|
320
328
|
"submit-loading": o(M).loading,
|
|
321
|
-
onSubmit: o(
|
|
322
|
-
onReset: o(
|
|
329
|
+
onSubmit: o(T),
|
|
330
|
+
onReset: o(z)
|
|
323
331
|
}), J({
|
|
324
332
|
default: v(() => [
|
|
325
|
-
(s(!0),
|
|
333
|
+
(s(!0), I(Q, null, L(W.value, (l) => (s(), p(D(l.renderNode.Comp), h({
|
|
326
334
|
key: l.dataIndex,
|
|
327
335
|
item: l,
|
|
328
336
|
ref_for: !0
|
|
@@ -333,60 +341,61 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
333
341
|
]),
|
|
334
342
|
_: 2
|
|
335
343
|
}, [
|
|
336
|
-
|
|
344
|
+
C.searchFormExtra ? {
|
|
337
345
|
name: "extra",
|
|
338
346
|
fn: v(() => [
|
|
339
|
-
|
|
347
|
+
O(e.$slots, "searchFormExtra")
|
|
340
348
|
]),
|
|
341
349
|
key: "0"
|
|
342
350
|
} : void 0
|
|
343
351
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
344
|
-
], 6)) :
|
|
345
|
-
|
|
346
|
-
class: g([o(
|
|
347
|
-
style:
|
|
352
|
+
], 6)) : b("", !0),
|
|
353
|
+
E("div", {
|
|
354
|
+
class: g([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
355
|
+
style: V(e.tableWrapperStyle)
|
|
348
356
|
}, [
|
|
349
|
-
|
|
357
|
+
E("div", {
|
|
350
358
|
class: g(o(c)("header-wrapper"))
|
|
351
359
|
}, [
|
|
352
|
-
|
|
353
|
-
selectedRows: o(
|
|
354
|
-
selectedRowKeys: o(
|
|
355
|
-
shownColumns:
|
|
356
|
-
clearAll:
|
|
360
|
+
O(e.$slots, "title", {
|
|
361
|
+
selectedRows: o(R),
|
|
362
|
+
selectedRowKeys: o(k).selectedRowKeys,
|
|
363
|
+
shownColumns: i.value,
|
|
364
|
+
clearAll: A
|
|
357
365
|
})
|
|
358
366
|
], 2),
|
|
359
|
-
|
|
367
|
+
E("div", {
|
|
360
368
|
class: g(o(c)("vxe-wrapper"))
|
|
361
369
|
}, [
|
|
362
|
-
(s(), p(o(
|
|
370
|
+
(s(), p(o(Ne), h(o(Ke)(a), {
|
|
363
371
|
ref_key: "tableRef",
|
|
364
372
|
ref: m,
|
|
365
|
-
key: o(
|
|
373
|
+
key: o(de),
|
|
366
374
|
data: o(f).records,
|
|
367
375
|
"sort-config": { remote: j.value.length > 0 },
|
|
368
376
|
"filter-config": { remote: H.value.length > 0 },
|
|
369
|
-
loading:
|
|
377
|
+
loading: Se.value,
|
|
370
378
|
style: {
|
|
371
|
-
"--vxe-ui-table-row-checkbox-checked-background-color": o(
|
|
372
|
-
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(
|
|
373
|
-
"--vxe-ui-font-primary-color": o(
|
|
379
|
+
"--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
|
|
380
|
+
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
|
|
381
|
+
"--vxe-ui-font-primary-color": o(d).colorPrimary,
|
|
374
382
|
"--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
|
|
375
383
|
"--vxe-ui-table-cell-padding-default": "12px",
|
|
376
384
|
"--vxe-ui-table-cell-padding-medium": "9px",
|
|
377
|
-
"--vxe-ui-table-row-radio-checked-background-color": o(
|
|
378
|
-
"--vxe-ui-table-row-hover-radio-checked-background-color": o(
|
|
379
|
-
"--vxe-ui-font-color": o(
|
|
380
|
-
"--vxe-ui-table-border-color": o(
|
|
381
|
-
"--vxe-ui-table-header-font-color": o(
|
|
385
|
+
"--vxe-ui-table-row-radio-checked-background-color": o(d).controlItemBgActive,
|
|
386
|
+
"--vxe-ui-table-row-hover-radio-checked-background-color": o(d).controlItemBgActiveHover,
|
|
387
|
+
"--vxe-ui-font-color": o(d).colorTextBase,
|
|
388
|
+
"--vxe-ui-table-border-color": o(d).colorBorderSecondary,
|
|
389
|
+
"--vxe-ui-table-header-font-color": o(d).colorTextBase,
|
|
390
|
+
"--vxe-ui-table-cell-padding-mini": "8px"
|
|
382
391
|
},
|
|
383
|
-
size:
|
|
384
|
-
onSortChange: o(
|
|
385
|
-
onFilterChange: o(
|
|
386
|
-
onCheckboxChange:
|
|
387
|
-
onCheckboxRangeChange:
|
|
388
|
-
onCheckboxAll:
|
|
389
|
-
onRadioChange:
|
|
392
|
+
size: y.value,
|
|
393
|
+
onSortChange: o(he),
|
|
394
|
+
onFilterChange: o(ve),
|
|
395
|
+
onCheckboxChange: _,
|
|
396
|
+
onCheckboxRangeChange: _,
|
|
397
|
+
onCheckboxAll: _,
|
|
398
|
+
onRadioChange: xe
|
|
390
399
|
}), J({
|
|
391
400
|
empty: v(() => [
|
|
392
401
|
X(o(ae), {
|
|
@@ -394,45 +403,45 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
394
403
|
}, null, 8, ["image"])
|
|
395
404
|
]),
|
|
396
405
|
default: v(() => [
|
|
397
|
-
a.expandable ? (s(), p(o(Y), h({ key: 0 }, o(
|
|
406
|
+
a.expandable ? (s(), p(o(Y), h({ key: 0 }, o(We)(e.expandable), { fixed: ye.value }), {
|
|
398
407
|
content: v((l) => [
|
|
399
|
-
(s(), p(
|
|
408
|
+
(s(), p(D(a.expandable.renderContent(l))))
|
|
400
409
|
]),
|
|
401
410
|
_: 1
|
|
402
|
-
}, 16, ["fixed"])) :
|
|
403
|
-
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(
|
|
404
|
-
(s(!0),
|
|
411
|
+
}, 16, ["fixed"])) : b("", !0),
|
|
412
|
+
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k), i.value), { field: o(Ge) }), null, 16, ["field"])) : b("", !0),
|
|
413
|
+
(s(!0), I(Q, null, L(o(ie), (l) => (s(), p(D(l), {
|
|
405
414
|
key: l.props.colId
|
|
406
415
|
}))), 128))
|
|
407
416
|
]),
|
|
408
417
|
_: 2
|
|
409
418
|
}, [
|
|
410
|
-
|
|
419
|
+
L(o(Te)(C, ["searchFormExtra"]), (l, t) => ({
|
|
411
420
|
name: t,
|
|
412
421
|
fn: v((u) => [
|
|
413
|
-
|
|
422
|
+
O(e.$slots, t, Ee(Pe(u || {})))
|
|
414
423
|
])
|
|
415
424
|
}))
|
|
416
425
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
417
426
|
], 2),
|
|
418
|
-
|
|
427
|
+
E("div", {
|
|
419
428
|
class: g(o(c)("pagination-wrapper"))
|
|
420
429
|
}, [
|
|
421
|
-
e.sticky ? (s(), p(o(
|
|
430
|
+
e.sticky ? (s(), p(o(ao), {
|
|
422
431
|
key: 0,
|
|
423
432
|
direction: "horizontal",
|
|
424
433
|
"scroll-container": ce.value,
|
|
425
434
|
"extra-size": -4.2
|
|
426
|
-
}, null, 8, ["scroll-container"])) :
|
|
427
|
-
e.pagination !== !1 ? (s(), p(o(
|
|
435
|
+
}, null, 8, ["scroll-container"])) : b("", !0),
|
|
436
|
+
e.pagination !== !1 ? (s(), p(o(Oe), h({
|
|
428
437
|
key: 1,
|
|
429
438
|
class: o(c)("pagination")
|
|
430
|
-
}, o(M).pagination, { onChange: o(
|
|
439
|
+
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : b("", !0)
|
|
431
440
|
], 2)
|
|
432
441
|
], 6)
|
|
433
442
|
], 6));
|
|
434
443
|
}
|
|
435
444
|
});
|
|
436
445
|
export {
|
|
437
|
-
|
|
446
|
+
No as default
|
|
438
447
|
};
|
|
@@ -19,7 +19,7 @@ export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
|
|
|
19
19
|
/**
|
|
20
20
|
* 在title之后展示一个icon并触发tooltip
|
|
21
21
|
*/
|
|
22
|
-
tooltip?: string;
|
|
22
|
+
tooltip?: string | ((column: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>) => VNode);
|
|
23
23
|
/**
|
|
24
24
|
* 是否可以复制
|
|
25
25
|
*/
|