@aplus-frontend/ui 0.6.0-beta.1 → 0.6.0-beta.10
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-action/group/index.vue.d.ts +1 -1
- package/es/src/ap-action/item-dropdown/index.vue.d.ts +1 -1
- package/es/src/ap-button/ap-button.vue.mjs +1 -1
- package/es/src/ap-field/date/helper.mjs +12 -12
- package/es/src/ap-field/date/index.vue.d.ts +1 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/tree-select/index.vue.d.ts +1 -1
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/item/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +8 -8
- package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +8 -8
- package/es/src/ap-form/render/item.vue.d.ts +1 -1
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +40 -36
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +88 -69
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/es/src/ap-form/search-form/index.vue.mjs +77 -76
- package/es/src/ap-grid/constants.d.ts +3 -3
- package/es/src/ap-grid/constants.mjs +9 -9
- package/es/src/ap-grid/editable/form-item.vue.mjs +94 -83
- package/es/src/ap-grid/editable/index.vue.mjs +89 -78
- package/es/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
- package/es/src/ap-grid/hooks/use-inner-params.mjs +24 -35
- package/es/src/ap-grid/index.vue.mjs +161 -139
- package/es/src/ap-grid/interface.d.ts +2 -2
- package/es/src/ap-grid/utils/table.mjs +32 -32
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +209 -198
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
- package/es/src/ap-table/constants.d.ts +30 -30
- 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 +147 -130
- package/es/src/ap-table/utils.d.ts +14 -14
- package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
- 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.vue.d.ts +3 -3
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +93 -73
- package/es/src/business/ap-expand-alert/index.d.ts +4 -4
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +109 -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-input-radio/ApInputRadio.vue2.mjs +27 -25
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/constans.mjs +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/ap-ladder/ApLadder.d.ts +1 -1
- package/es/src/business/ap-ladder/index.d.ts +3 -3
- package/es/src/business/ap-status/interface.d.ts +1 -1
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-view/ap-view.vue.d.ts +1 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +128 -112
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +64 -54
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +79 -73
- package/es/src/business/ap-view/hooks/use-view-provide.d.ts +1 -0
- package/es/src/business/ap-view/index.d.ts +3 -0
- package/es/src/business/ap-view/interface.d.ts +8 -0
- package/es/src/business/batch-input-group/form-item.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/business/hooks/usePageListApGrid.mjs +3 -5
- package/es/src/check-card/group.vue.d.ts +1 -1
- package/es/src/config-provider/config-provider-props.d.ts +0 -5
- package/es/src/config-provider/config-provider-props.mjs +0 -4
- package/es/src/config-provider/config-provider.d.ts +0 -138
- package/es/src/config-provider/config-provider.mjs +21 -26
- package/es/src/config-provider/hooks/use-global-config.d.ts +0 -5
- package/es/src/config-provider/index.d.ts +0 -652
- package/es/src/editable-table/form-item.vue.d.ts +2 -14
- package/es/src/editable-table/form-item.vue.mjs +84 -76
- package/es/src/editable-table/index.vue.d.ts +2 -16
- package/es/src/editable-table/index.vue.mjs +91 -83
- package/es/src/editable-table/interface.d.ts +7 -0
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/lib/src/ap-action/group/index.vue.d.ts +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.d.ts +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/item/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +8 -8
- package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +8 -8
- package/lib/src/ap-form/render/item.vue.d.ts +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/constants.d.ts +3 -3
- package/lib/src/ap-grid/constants.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/hooks/use-inner-params.d.ts +2 -1
- package/lib/src/ap-grid/hooks/use-inner-params.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +2 -2
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +30 -30
- 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/utils.d.ts +14 -14
- package/lib/src/ap-tag/ap-tag-group.vue.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.vue.d.ts +3 -3
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/index.d.ts +4 -4
- 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-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/ap-ladder/ApLadder.d.ts +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +3 -3
- package/lib/src/business/ap-status/interface.d.ts +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -0
- 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/hooks/use-view-provide.d.ts +1 -0
- package/lib/src/business/ap-view/index.d.ts +3 -0
- package/lib/src/business/ap-view/interface.d.ts +8 -0
- package/lib/src/business/batch-input-group/form-item.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/check-card/group.vue.d.ts +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +0 -5
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +0 -138
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +0 -5
- package/lib/src/config-provider/index.d.ts +0 -652
- package/lib/src/editable-table/form-item.vue.d.ts +2 -14
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +2 -16
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +7 -0
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/package.json +4 -4
- package/theme/antd-global-overwrite/admin/index.css +14 -27
- package/theme/antd-global-overwrite/admin/index.less +1 -0
- package/theme/antd-global-overwrite/admin/modal.css +8 -24
- package/theme/antd-global-overwrite/admin/modal.less +9 -24
- 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/admin/tooltip.css +3 -0
- package/theme/antd-global-overwrite/admin/tooltip.less +3 -0
- package/theme/antd-global-overwrite/aplus/index.css +13 -20
- package/theme/antd-global-overwrite/aplus/index.less +1 -0
- package/theme/antd-global-overwrite/aplus/modal.css +7 -17
- package/theme/antd-global-overwrite/aplus/modal.less +8 -18
- package/theme/antd-global-overwrite/aplus/table.css +3 -3
- package/theme/antd-global-overwrite/aplus/table.less +3 -3
- package/theme/antd-global-overwrite/aplus/tooltip.css +3 -0
- package/theme/antd-global-overwrite/aplus/tooltip.less +3 -0
- package/theme/ap-action/item-dropdown.css +19 -1
- package/theme/ap-action/item.css +20 -2
- package/theme/ap-appendix/ap-appendix.css +25 -5
- package/theme/ap-appendix/ap-appendix.less +6 -4
- package/theme/ap-attachment/ap-attachment.css +25 -6
- package/theme/ap-attachment/ap-attachment.less +6 -6
- package/theme/ap-batch-action/ap-batch-action.css +25 -4
- package/theme/ap-batch-action/ap-batch-action.less +6 -3
- package/theme/ap-button/ap-button.css +19 -1
- package/theme/ap-card/ap-card.css +19 -1
- package/theme/ap-descriptions/ap-descriptions.css +24 -6
- package/theme/ap-descriptions/ap-descriptions.less +5 -5
- package/theme/ap-download/ap-download.css +26 -11
- package/theme/ap-download/ap-download.less +8 -11
- package/theme/ap-expand-alert/ap-expand-alert.css +21 -3
- package/theme/ap-expand-alert/ap-expand-alert.less +5 -5
- package/theme/ap-field/checkbox.css +19 -1
- package/theme/ap-field/index.css +19 -1
- package/theme/ap-field/number.css +19 -1
- package/theme/ap-field/radio.css +19 -1
- package/theme/ap-field/text-area.css +19 -1
- package/theme/ap-form/ap-form-item-group.css +19 -1
- package/theme/ap-form/ap-form-item.css +26 -5
- package/theme/ap-form/ap-form-item.less +11 -5
- package/theme/ap-form/drawer-form.css +19 -1
- package/theme/ap-form/index.css +43 -10
- package/theme/ap-form/item-text-group.css +19 -1
- package/theme/ap-form/item-text.css +19 -1
- package/theme/ap-form/modal-form.css +19 -1
- package/theme/ap-form/search-form-sorter.css +24 -5
- package/theme/ap-form/search-form-sorter.less +1 -0
- package/theme/ap-form/search-form.css +43 -10
- package/theme/ap-form/search-form.less +12 -1
- package/theme/ap-grid/editable.css +19 -1
- package/theme/ap-grid/editable.less +3 -2
- package/theme/ap-grid/index.css +78 -15
- package/theme/ap-grid/index.less +21 -6
- package/theme/ap-group-search/ap-extension-select.css +19 -1
- package/theme/ap-group-search/ap-group-search.css +19 -1
- package/theme/ap-group-search/ap-popover-select.css +19 -1
- package/theme/ap-image/ap-image.css +19 -1
- package/theme/ap-input-radio/ap-input-radio.css +19 -1
- package/theme/ap-label/ap-label.css +19 -1
- package/theme/ap-ladder/ap-ladder.css +23 -4
- package/theme/ap-ladder/ap-ladder.less +4 -3
- package/theme/ap-layout/ap-info-layout.css +19 -1
- package/theme/ap-list/index.css +19 -1
- package/theme/ap-product-info/ap-product-info.css +19 -1
- package/theme/ap-select-layout/ap-select-layout.css +27 -9
- package/theme/ap-select-layout/ap-select-layout.less +8 -8
- package/theme/ap-size-input/ap-size-input.css +19 -1
- package/theme/ap-status/ap-status.css +21 -4
- package/theme/ap-status/ap-status.less +2 -4
- package/theme/ap-summary/index.css +22 -4
- package/theme/ap-summary/index.less +3 -3
- package/theme/ap-table/ap-table-index.css +24 -6
- package/theme/ap-table/ap-table-index.less +5 -5
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +19 -1
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +77 -29
- package/theme/ap-table/ap-table.less +7 -9
- package/theme/ap-table/setting/index.css +23 -6
- package/theme/ap-table/setting/modal.css +21 -4
- package/theme/ap-table/setting/modal.less +1 -2
- package/theme/ap-table/setting/select-group.css +21 -2
- package/theme/ap-table/setting/select-group.less +2 -1
- package/theme/ap-table/setting/sortable-item-meta.css +19 -1
- package/theme/ap-table/setting/sortable-item.css +19 -1
- package/theme/ap-table/setting/sorter.css +19 -2
- package/theme/ap-table-modal/index.css +77 -29
- package/theme/ap-tag/ap-tag-group.css +21 -3
- package/theme/ap-tag/ap-tag-group.less +4 -5
- package/theme/ap-tag/ap-tag.css +42 -15
- package/theme/ap-tag/ap-tag.less +37 -24
- package/theme/ap-title/ap-title.css +26 -6
- package/theme/ap-title/ap-title.less +7 -5
- package/theme/ap-upload/index.css +27 -9
- package/theme/ap-upload/multiple-file.css +21 -3
- package/theme/ap-upload/multiple-file.less +2 -2
- package/theme/ap-upload/picture.css +23 -5
- package/theme/ap-upload/picture.less +4 -4
- package/theme/ap-upload/single-file.css +21 -3
- package/theme/ap-upload/single-file.less +2 -2
- package/theme/ap-upload/upload.css +19 -1
- package/theme/ap-upload-single/index.css +19 -1
- package/theme/ap-view/ap-view.css +23 -1
- package/theme/ap-view/ap-view.less +4 -0
- package/theme/batch-input-group/index.css +20 -1
- package/theme/batch-input-group/popover-input.css +20 -1
- package/theme/batch-input-group/popover-input.less +1 -0
- package/theme/check-card/index.css +22 -4
- package/theme/editable-table/index.css +44 -11
- package/theme/full-screen/index.css +19 -1
- package/theme/index.css +305 -114
- package/theme/index.less +1 -0
- package/theme/mask/index.css +19 -1
- package/theme/mixins/config.less +1 -1
- package/theme/mixins/mixins.css +19 -1
- package/theme/mixins/mixins.less +25 -0
- package/theme/scroll-bar/index.css +19 -1
- package/theme/scroll-view/index.css +19 -1
- package/theme/splitter/index.css +21 -3
- package/theme/text/group.css +19 -1
- package/theme/text/index.css +20 -2
- package/theme/ui-mode.css +94 -0
- package/theme/ui-mode.less +95 -0
- package/theme/work-order-modal/index.css +19 -1
- package/es/src/config-provider/css-var.d.ts +0 -139
- package/es/src/config-provider/css-var.mjs +0 -278
- package/lib/src/config-provider/css-var.d.ts +0 -139
- package/lib/src/config-provider/css-var.js +0 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as Be, useSlots as Ie, getCurrentInstance as Ee, ref as F, computed as n, unref as o, watch as B, createElementBlock as I, openBlock as i, normalizeStyle as V, normalizeClass as g, createCommentVNode as y, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as m, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Pe, guardReactiveProps as Ne } from "vue";
|
|
2
|
+
import { VxeTable as Te, 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 S, omit as ze } from "lodash-unified";
|
|
7
|
+
import { ApForm as Ae } 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 Ve, getFieldProps as Le, getSearchFormItemRenderNode as De, recursionApColumns as oe } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as Oe } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as ae, Pagination as $e } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as Ke } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as We, getRowExpandProps as je, getRowSelectionProps as He } from "./utils/table.mjs";
|
|
15
|
+
import Me from "../ap-table/hooks/use-table-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as qe } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as Ue, sizeMap as Ge, ROW_SELECTION_FIELD as Xe } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as Je } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as Qe } 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 Ye } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as Ze } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as eo } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as oo } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as ao } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import ro from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const To = /* @__PURE__ */ Be({
|
|
26
28
|
name: "ApGrid",
|
|
27
29
|
__name: "index",
|
|
28
30
|
props: {
|
|
@@ -85,6 +87,7 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
85
87
|
loadingConfig: {},
|
|
86
88
|
headerCellConfig: {},
|
|
87
89
|
footerCellConfig: {},
|
|
90
|
+
round: { type: Boolean, default: void 0 },
|
|
88
91
|
columns: {},
|
|
89
92
|
rowSelection: { type: Boolean },
|
|
90
93
|
card: { type: Boolean, default: !1 },
|
|
@@ -100,7 +103,7 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
100
103
|
searchFormWrapperStyle: {},
|
|
101
104
|
tableWrapperStyle: {},
|
|
102
105
|
wrapperStyle: {},
|
|
103
|
-
manual: { type: Boolean, default:
|
|
106
|
+
manual: { type: Boolean, default: void 0 },
|
|
104
107
|
size: { default: "mini" },
|
|
105
108
|
adaptive: { type: Boolean, default: !1 },
|
|
106
109
|
columnResizable: { type: [Boolean, Object], default: !1 },
|
|
@@ -112,69 +115,77 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
112
115
|
},
|
|
113
116
|
setup(re, { expose: te }) {
|
|
114
117
|
var G;
|
|
115
|
-
const
|
|
118
|
+
const C = Ie(), a = re, w = (G = Ee()) == null ? void 0 : G.appContext.app;
|
|
116
119
|
w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(Z), w.__VXE_PC_UI_INSTALLED__ = !0);
|
|
117
|
-
const { e:
|
|
120
|
+
const { e: P, b: c, be: le } = eo("ap-grid"), ne = oo("valueTypeMap"), s = F([]), $ = F([]), u = F(), x = F(a.size), [, d] = Qe(), { t: se } = ao();
|
|
118
121
|
Z.setConfig({
|
|
119
122
|
i18n: (e, r) => se(`ap.${e}`, r)
|
|
120
123
|
});
|
|
121
|
-
const { renderConfig: ie, updateSignal: de } =
|
|
124
|
+
const { renderConfig: ie, updateSignal: de } = Je(s);
|
|
122
125
|
let K = 0;
|
|
123
126
|
const ce = n(() => {
|
|
124
|
-
if (
|
|
125
|
-
return
|
|
127
|
+
if (u.value)
|
|
128
|
+
return u.value.$el.querySelector(
|
|
126
129
|
".vxe-table--header-inner-wrapper"
|
|
127
130
|
);
|
|
128
131
|
}), W = n(() => {
|
|
129
132
|
var e, r, l;
|
|
130
133
|
return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
131
|
-
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !
|
|
132
|
-
)) == null ? void 0 : r.sort((t,
|
|
133
|
-
let
|
|
134
|
-
return ee(
|
|
134
|
+
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
|
|
135
|
+
)) == null ? void 0 : r.sort((t, p) => {
|
|
136
|
+
let b = ee(t.order);
|
|
137
|
+
return ee(p.order) - b;
|
|
135
138
|
})) == null ? void 0 : l.map((t) => {
|
|
136
|
-
const
|
|
139
|
+
const p = Ve(
|
|
137
140
|
t,
|
|
138
|
-
|
|
139
|
-
),
|
|
141
|
+
Le(t.fieldProps, {})
|
|
142
|
+
), b = {
|
|
140
143
|
...t,
|
|
141
144
|
fieldProps: {
|
|
142
145
|
label: t.title,
|
|
143
146
|
name: t.dataIndex,
|
|
144
|
-
|
|
147
|
+
// tips: 在表格中的查询表单项默认是带边框的
|
|
148
|
+
bordered: !0,
|
|
149
|
+
...p || {},
|
|
145
150
|
_signal: K
|
|
146
151
|
},
|
|
147
152
|
renderNode: void 0
|
|
148
153
|
};
|
|
149
|
-
return
|
|
150
|
-
|
|
154
|
+
return b.renderNode = De(
|
|
155
|
+
b,
|
|
151
156
|
o(ne)
|
|
152
|
-
),
|
|
157
|
+
), b;
|
|
153
158
|
})) || [];
|
|
154
|
-
}), ue = n(() =>
|
|
159
|
+
}), ue = n(() => {
|
|
160
|
+
var r;
|
|
161
|
+
return Ye(a.manual) ? a.manual : Ze(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
|
|
162
|
+
var t;
|
|
163
|
+
return ((t = l.type) == null ? void 0 : t.name) === "ApView";
|
|
164
|
+
});
|
|
165
|
+
}), pe = n(() => [
|
|
155
166
|
c(),
|
|
156
167
|
a.card ? null : c("wrapper"),
|
|
157
168
|
a.adaptive ? c("adaptive") : null,
|
|
158
169
|
a.sticky ? c("sticky") : null
|
|
159
|
-
].filter(Boolean)), j = n(() => oe(o(
|
|
170
|
+
].filter(Boolean)), j = n(() => oe(o(s), (e) => {
|
|
160
171
|
if (e.sorter === !0)
|
|
161
172
|
return e.key || e.dataIndex;
|
|
162
|
-
}).filter(Boolean)), H = n(() => oe(o(
|
|
173
|
+
}).filter(Boolean)), H = n(() => oe(o(s), (e) => {
|
|
163
174
|
if (e.filters && !e.onFilter)
|
|
164
175
|
return e.key || e.dataIndex;
|
|
165
176
|
}).filter(Boolean)), {
|
|
166
|
-
formRef:
|
|
167
|
-
submit:
|
|
168
|
-
reset:
|
|
169
|
-
refresh:
|
|
177
|
+
formRef: N,
|
|
178
|
+
submit: T,
|
|
179
|
+
reset: z,
|
|
180
|
+
refresh: me,
|
|
170
181
|
data: f,
|
|
171
182
|
tableProps: M,
|
|
172
|
-
setDataSource:
|
|
173
|
-
|
|
174
|
-
} =
|
|
183
|
+
setDataSource: fe,
|
|
184
|
+
handleTableChangeOptional: ge
|
|
185
|
+
} = Oe({
|
|
175
186
|
async request(e) {
|
|
176
187
|
var l;
|
|
177
|
-
if (!
|
|
188
|
+
if (!k.value.preserveSelectedRowKeys && S(a.dataSource) && _(), !S(a.dataSource)) {
|
|
178
189
|
const t = e.pageSize * (e.current - 1);
|
|
179
190
|
return {
|
|
180
191
|
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
|
|
@@ -192,20 +203,21 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
192
203
|
sortFields: j,
|
|
193
204
|
defaultParams: a.params,
|
|
194
205
|
defaultData: a.defaultData,
|
|
195
|
-
manual:
|
|
206
|
+
manual: o(ue),
|
|
196
207
|
formatParams: a.beforeSearchSubmit,
|
|
197
|
-
pagination: a.pagination
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
pagination: a.pagination,
|
|
209
|
+
onClickReset: ke
|
|
210
|
+
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = Ke(ge);
|
|
211
|
+
qe({
|
|
212
|
+
columns: n(() => s.value),
|
|
201
213
|
columnsBackup: n(() => $.value),
|
|
202
|
-
size: n(() =>
|
|
214
|
+
size: n(() => Ge[x.value]),
|
|
203
215
|
updateColumns(e) {
|
|
204
216
|
var r;
|
|
205
|
-
|
|
217
|
+
s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
|
|
206
218
|
},
|
|
207
219
|
updateSize(e) {
|
|
208
|
-
|
|
220
|
+
x.value = Ue[e];
|
|
209
221
|
},
|
|
210
222
|
renderConfig: n(() => ({
|
|
211
223
|
className: le("table-header", "title"),
|
|
@@ -214,61 +226,65 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
214
226
|
dataSource: n(() => o(f).records),
|
|
215
227
|
getSearchFormValues: U,
|
|
216
228
|
setSearchFormValues: q,
|
|
217
|
-
submit:
|
|
218
|
-
reset:
|
|
229
|
+
submit: T,
|
|
230
|
+
reset: z
|
|
219
231
|
});
|
|
220
|
-
const
|
|
221
|
-
() =>
|
|
232
|
+
const be = n(
|
|
233
|
+
() => s.value.some(
|
|
222
234
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
223
235
|
) ? "left" : void 0
|
|
224
236
|
), ye = n(
|
|
225
|
-
() =>
|
|
237
|
+
() => S(a.loading) ? f.loading : a.loading
|
|
226
238
|
), Se = n(
|
|
227
|
-
() =>
|
|
228
|
-
), { selectedRows:
|
|
239
|
+
() => S(a.dataSource) ? f.records : a.dataSource
|
|
240
|
+
), { selectedRows: R, rowSelection: k, ...we } = Me({
|
|
229
241
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
230
242
|
dataSource: Se,
|
|
231
243
|
rowKey: a.rowKey
|
|
232
|
-
}),
|
|
233
|
-
const e =
|
|
234
|
-
e && (
|
|
244
|
+
}), A = () => {
|
|
245
|
+
const e = u.value;
|
|
246
|
+
e && (R.value = [
|
|
235
247
|
...e.getCheckboxReserveRecords(),
|
|
236
248
|
...e.getCheckboxRecords()
|
|
237
249
|
]);
|
|
238
|
-
},
|
|
239
|
-
const e =
|
|
240
|
-
e && (
|
|
250
|
+
}, xe = () => {
|
|
251
|
+
const e = u.value;
|
|
252
|
+
e && (R.value = [e.getRadioRecord()]);
|
|
241
253
|
};
|
|
242
|
-
function
|
|
254
|
+
function Re() {
|
|
243
255
|
var e;
|
|
244
256
|
return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
|
|
245
257
|
}
|
|
246
258
|
function q(e) {
|
|
247
259
|
var r, l, t;
|
|
248
|
-
(t = (l = (r =
|
|
260
|
+
(t = (l = (r = N.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
|
|
249
261
|
}
|
|
250
262
|
function U(e = !1) {
|
|
251
|
-
var l, t,
|
|
263
|
+
var l, t, p;
|
|
252
264
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
253
|
-
return (
|
|
265
|
+
return (p = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : p.call(t, !0);
|
|
254
266
|
}
|
|
255
267
|
function _() {
|
|
256
|
-
|
|
257
|
-
const e =
|
|
258
|
-
e && (
|
|
268
|
+
we.clearAll();
|
|
269
|
+
const e = u.value;
|
|
270
|
+
e && (k.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
259
271
|
}
|
|
260
|
-
|
|
272
|
+
function ke() {
|
|
273
|
+
const e = u.value;
|
|
274
|
+
e && (e.clearSort(), e.clearFilter());
|
|
275
|
+
}
|
|
276
|
+
async function Fe(e, r) {
|
|
261
277
|
var t;
|
|
262
278
|
const l = f.records[e];
|
|
263
279
|
if (l)
|
|
264
|
-
return (t =
|
|
280
|
+
return (t = u.value) == null ? void 0 : t.scrollToRow(l, r);
|
|
265
281
|
}
|
|
266
282
|
return B(
|
|
267
283
|
() => [a.columnResizable, a.columns],
|
|
268
284
|
() => {
|
|
269
285
|
var r;
|
|
270
|
-
const e =
|
|
271
|
-
|
|
286
|
+
const e = Re();
|
|
287
|
+
s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
|
|
272
288
|
},
|
|
273
289
|
{
|
|
274
290
|
deep: !0,
|
|
@@ -277,7 +293,7 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
277
293
|
), B(
|
|
278
294
|
() => a.dataSource,
|
|
279
295
|
(e) => {
|
|
280
|
-
|
|
296
|
+
fe(e);
|
|
281
297
|
},
|
|
282
298
|
{ immediate: !0, deep: !0 }
|
|
283
299
|
), B(
|
|
@@ -289,40 +305,40 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
289
305
|
), B(
|
|
290
306
|
() => a.size,
|
|
291
307
|
(e) => {
|
|
292
|
-
|
|
308
|
+
x.value = e;
|
|
293
309
|
}
|
|
294
310
|
), te({
|
|
295
|
-
submit:
|
|
296
|
-
reset:
|
|
297
|
-
refresh:
|
|
311
|
+
submit: T,
|
|
312
|
+
reset: z,
|
|
313
|
+
refresh: me,
|
|
298
314
|
setSearchFormValues: q,
|
|
299
315
|
getSearchFormValues: U,
|
|
300
|
-
getShowColumns: () => o(
|
|
316
|
+
getShowColumns: () => o(s),
|
|
301
317
|
rowSelection: {
|
|
302
|
-
selectedRows: n(() =>
|
|
318
|
+
selectedRows: n(() => R.value),
|
|
303
319
|
clearAll: _
|
|
304
320
|
},
|
|
305
|
-
scrollToRow:
|
|
321
|
+
scrollToRow: Fe,
|
|
306
322
|
getDataSource: () => o(f.records)
|
|
307
|
-
}), (e, r) => (
|
|
308
|
-
class: g(
|
|
309
|
-
style:
|
|
323
|
+
}), (e, r) => (i(), I("div", {
|
|
324
|
+
class: g(pe.value),
|
|
325
|
+
style: V(e.wrapperStyle)
|
|
310
326
|
}, [
|
|
311
|
-
o(
|
|
327
|
+
o(S)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (i(), I("div", {
|
|
312
328
|
key: 0,
|
|
313
|
-
class: g(e.card ? o(
|
|
314
|
-
style:
|
|
329
|
+
class: g(e.card ? o(P)("search-wrapper") : null),
|
|
330
|
+
style: V(e.searchFormWrapperStyle)
|
|
315
331
|
}, [
|
|
316
|
-
X(o(
|
|
332
|
+
X(o(Ae).SearchForm, h(e.searchForm || {}, {
|
|
317
333
|
ref_key: "formRef",
|
|
318
|
-
ref:
|
|
334
|
+
ref: N,
|
|
319
335
|
"custom-reset": "",
|
|
320
336
|
"submit-loading": o(M).loading,
|
|
321
|
-
onSubmit: o(
|
|
322
|
-
onReset: o(
|
|
337
|
+
onSubmit: o(T),
|
|
338
|
+
onReset: o(z)
|
|
323
339
|
}), J({
|
|
324
340
|
default: v(() => [
|
|
325
|
-
(
|
|
341
|
+
(i(!0), I(Q, null, L(W.value, (l) => (i(), m(D(l.renderNode.Comp), h({
|
|
326
342
|
key: l.dataIndex,
|
|
327
343
|
item: l,
|
|
328
344
|
ref_for: !0
|
|
@@ -333,39 +349,44 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
333
349
|
]),
|
|
334
350
|
_: 2
|
|
335
351
|
}, [
|
|
336
|
-
|
|
352
|
+
C.searchFormExtra ? {
|
|
337
353
|
name: "extra",
|
|
338
354
|
fn: v(() => [
|
|
339
|
-
|
|
355
|
+
O(e.$slots, "searchFormExtra")
|
|
340
356
|
]),
|
|
341
357
|
key: "0"
|
|
342
358
|
} : void 0
|
|
343
359
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
344
|
-
], 6)) :
|
|
345
|
-
|
|
346
|
-
class: g([o(
|
|
347
|
-
style:
|
|
360
|
+
], 6)) : y("", !0),
|
|
361
|
+
E("div", {
|
|
362
|
+
class: g([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
363
|
+
style: V(e.tableWrapperStyle)
|
|
348
364
|
}, [
|
|
349
|
-
|
|
365
|
+
E("div", {
|
|
350
366
|
class: g(o(c)("header-wrapper"))
|
|
351
367
|
}, [
|
|
352
|
-
|
|
353
|
-
selectedRows: o(
|
|
354
|
-
selectedRowKeys: o(
|
|
355
|
-
shownColumns:
|
|
368
|
+
O(e.$slots, "title", {
|
|
369
|
+
selectedRows: o(R),
|
|
370
|
+
selectedRowKeys: o(k).selectedRowKeys,
|
|
371
|
+
shownColumns: s.value,
|
|
356
372
|
clearAll: _
|
|
357
373
|
})
|
|
358
374
|
], 2),
|
|
359
|
-
|
|
375
|
+
E("div", {
|
|
360
376
|
class: g(o(c)("vxe-wrapper"))
|
|
361
377
|
}, [
|
|
362
|
-
(
|
|
378
|
+
(i(), m(o(Te), h(o(We)(a), {
|
|
363
379
|
ref_key: "tableRef",
|
|
364
|
-
ref:
|
|
380
|
+
ref: u,
|
|
365
381
|
key: o(de),
|
|
366
382
|
data: o(f).records,
|
|
367
|
-
"sort-config": {
|
|
368
|
-
|
|
383
|
+
"sort-config": {
|
|
384
|
+
remote: j.value.length > 0,
|
|
385
|
+
trigger: "cell"
|
|
386
|
+
},
|
|
387
|
+
"filter-config": {
|
|
388
|
+
remote: H.value.length > 0
|
|
389
|
+
},
|
|
369
390
|
loading: ye.value,
|
|
370
391
|
style: {
|
|
371
392
|
"--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
|
|
@@ -378,16 +399,15 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
378
399
|
"--vxe-ui-table-row-hover-radio-checked-background-color": o(d).controlItemBgActiveHover,
|
|
379
400
|
"--vxe-ui-font-color": o(d).colorTextBase,
|
|
380
401
|
"--vxe-ui-table-border-color": o(d).colorBorderSecondary,
|
|
381
|
-
"--vxe-ui-table-header-font-color": o(d).colorTextBase
|
|
382
|
-
"--vxe-ui-table-cell-padding-mini": "8px"
|
|
402
|
+
"--vxe-ui-table-header-font-color": o(d).colorTextBase
|
|
383
403
|
},
|
|
384
|
-
size:
|
|
385
|
-
onSortChange: o(
|
|
386
|
-
onFilterChange: o(
|
|
387
|
-
onCheckboxChange:
|
|
388
|
-
onCheckboxRangeChange:
|
|
389
|
-
onCheckboxAll:
|
|
390
|
-
onRadioChange:
|
|
404
|
+
size: x.value,
|
|
405
|
+
onSortChange: o(he),
|
|
406
|
+
onFilterChange: o(ve),
|
|
407
|
+
onCheckboxChange: A,
|
|
408
|
+
onCheckboxRangeChange: A,
|
|
409
|
+
onCheckboxAll: A,
|
|
410
|
+
onRadioChange: xe
|
|
391
411
|
}), J({
|
|
392
412
|
empty: v(() => [
|
|
393
413
|
X(o(ae), {
|
|
@@ -395,45 +415,47 @@ const Bo = /* @__PURE__ */ ke({
|
|
|
395
415
|
}, null, 8, ["image"])
|
|
396
416
|
]),
|
|
397
417
|
default: v(() => [
|
|
398
|
-
a.expandable ? (
|
|
418
|
+
a.expandable && s.value.length ? (i(), m(o(Y), h({ key: 0 }, o(je)(e.expandable), { fixed: be.value }), {
|
|
399
419
|
content: v((l) => [
|
|
400
|
-
(
|
|
420
|
+
(i(), m(D(a.expandable.renderContent(l))))
|
|
401
421
|
]),
|
|
402
422
|
_: 1
|
|
403
|
-
}, 16, ["fixed"])) :
|
|
404
|
-
a.rowSelection ? (
|
|
405
|
-
(
|
|
423
|
+
}, 16, ["fixed"])) : y("", !0),
|
|
424
|
+
a.rowSelection && s.value.length ? (i(), m(o(Y), h({ key: 1 }, o(He)(o(k), s.value), { field: o(Xe) }), null, 16, ["field"])) : y("", !0),
|
|
425
|
+
(i(!0), I(Q, null, L(o(ie), (l) => (i(), m(D(l), {
|
|
406
426
|
key: l.props.colId
|
|
407
427
|
}))), 128))
|
|
408
428
|
]),
|
|
409
429
|
_: 2
|
|
410
430
|
}, [
|
|
411
|
-
|
|
431
|
+
L(o(ze)(C, ["searchFormExtra"]), (l, t) => ({
|
|
412
432
|
name: t,
|
|
413
|
-
fn: v((
|
|
414
|
-
|
|
433
|
+
fn: v((p) => [
|
|
434
|
+
O(e.$slots, t, Pe(Ne(p || {})))
|
|
415
435
|
])
|
|
416
436
|
}))
|
|
417
437
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
418
438
|
], 2),
|
|
419
|
-
|
|
439
|
+
E("div", {
|
|
420
440
|
class: g(o(c)("pagination-wrapper"))
|
|
421
441
|
}, [
|
|
422
|
-
e.sticky ? (
|
|
442
|
+
e.sticky ? (i(), m(o(ro), {
|
|
423
443
|
key: 0,
|
|
424
444
|
direction: "horizontal",
|
|
425
445
|
"scroll-container": ce.value,
|
|
426
|
-
"extra-size": -4.2
|
|
427
|
-
|
|
428
|
-
|
|
446
|
+
"extra-size": -4.2,
|
|
447
|
+
"bar-color": "var(--basic-scrollbar-thumb-color-base, #bfbfbf)",
|
|
448
|
+
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
449
|
+
}, null, 8, ["scroll-container"])) : y("", !0),
|
|
450
|
+
e.pagination !== !1 ? (i(), m(o($e), h({
|
|
429
451
|
key: 1,
|
|
430
452
|
class: o(c)("pagination")
|
|
431
|
-
}, o(M).pagination, { onChange: o(
|
|
453
|
+
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : y("", !0)
|
|
432
454
|
], 2)
|
|
433
455
|
], 6)
|
|
434
456
|
], 6));
|
|
435
457
|
}
|
|
436
458
|
});
|
|
437
459
|
export {
|
|
438
|
-
|
|
460
|
+
To as default
|
|
439
461
|
};
|
|
@@ -119,7 +119,7 @@ export type ApGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>,
|
|
|
119
119
|
*/
|
|
120
120
|
range?: boolean;
|
|
121
121
|
};
|
|
122
|
-
export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowKey' | 'rowClassName' | 'footer' | 'loading'> & Pick<VxeTableProps<RecordType>, 'rowClassName' | 'stripe' | 'headerRowClassName' | 'footerRowClassName' | 'cellClassName' | 'headerCellClassName' | 'footerCellClassName' | 'rowStyle' | 'headerRowStyle' | 'footerRowStyle' | 'cellStyle' | 'headerCellStyle' | 'footerCellStyle' | 'height' | 'minHeight' | 'maxHeight' | 'mergeCells' | 'mergeFooterItems' | 'cellConfig' | 'loading' | 'loadingConfig' | 'headerCellConfig' | 'footerCellConfig'> & {
|
|
122
|
+
export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowKey' | 'rowClassName' | 'footer' | 'loading'> & Pick<VxeTableProps<RecordType>, 'rowClassName' | 'stripe' | 'headerRowClassName' | 'footerRowClassName' | 'cellClassName' | 'headerCellClassName' | 'footerCellClassName' | 'rowStyle' | 'headerRowStyle' | 'footerRowStyle' | 'cellStyle' | 'headerCellStyle' | 'footerCellStyle' | 'height' | 'minHeight' | 'maxHeight' | 'mergeCells' | 'mergeFooterItems' | 'cellConfig' | 'loading' | 'loadingConfig' | 'headerCellConfig' | 'footerCellConfig' | 'round'> & {
|
|
123
123
|
/**
|
|
124
124
|
* 列配置
|
|
125
125
|
*/
|
|
@@ -200,7 +200,7 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
200
200
|
/**
|
|
201
201
|
* 表格尺寸(只支持中等大小和小尺寸)
|
|
202
202
|
*/
|
|
203
|
-
size?: 'medium' | '
|
|
203
|
+
size?: 'medium' | 'mini';
|
|
204
204
|
/**
|
|
205
205
|
* 表格是否自适应高度
|
|
206
206
|
*/
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { omit as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { omit as u, isUndefined as l, isFunction as h, isNumber as m } from "lodash-unified";
|
|
2
|
+
import { isDef as w } from "../../utils/index.mjs";
|
|
3
|
+
const y = 20, C = 50, b = (e) => e.some((t) => !!t.html);
|
|
4
|
+
function v(e) {
|
|
4
5
|
var i;
|
|
5
6
|
const t = {
|
|
6
|
-
...
|
|
7
|
+
...u(e, [
|
|
7
8
|
"columns",
|
|
8
9
|
"request",
|
|
9
10
|
"searchForm",
|
|
10
11
|
"dataSource",
|
|
11
12
|
"rowKey",
|
|
12
|
-
"value"
|
|
13
|
+
"value",
|
|
14
|
+
"round"
|
|
13
15
|
])
|
|
14
16
|
};
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
if (t.rowConfig = {
|
|
18
|
+
isHover: !0,
|
|
19
|
+
keyField: e.rowKey
|
|
20
|
+
}, t.columnConfig = {}, b(e.columns || []) && (t.rowConfig.useKey = !0, t.columnConfig.useKey = !0), e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig.resizable = !0), e.rowSelection) {
|
|
18
21
|
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
19
22
|
o.type === "radio" ? t.radioConfig = {
|
|
20
23
|
highlight: !0,
|
|
@@ -25,7 +28,7 @@ function R(e) {
|
|
|
25
28
|
return o.shown ? o.shown(r) : !0;
|
|
26
29
|
},
|
|
27
30
|
checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
|
|
28
|
-
reserve:
|
|
31
|
+
reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
29
32
|
} : t.checkboxConfig = {
|
|
30
33
|
highlight: !0,
|
|
31
34
|
checkMethod({ row: r }) {
|
|
@@ -35,11 +38,11 @@ function R(e) {
|
|
|
35
38
|
return o.shown ? o.shown(r) : !0;
|
|
36
39
|
},
|
|
37
40
|
checkRowKeys: o.defaultSelectedRowKeys,
|
|
38
|
-
reserve:
|
|
41
|
+
reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
|
|
39
42
|
range: o.range || !1
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
|
-
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig =
|
|
45
|
+
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = u(e.expandable, [
|
|
43
46
|
"renderContent",
|
|
44
47
|
"width",
|
|
45
48
|
"title"
|
|
@@ -47,34 +50,31 @@ function R(e) {
|
|
|
47
50
|
enabled: !1
|
|
48
51
|
}, t.virtualYConfig = {
|
|
49
52
|
enabled: !1
|
|
50
|
-
}) : (
|
|
51
|
-
isHover: !0,
|
|
52
|
-
keyField: e.rowKey
|
|
53
|
-
}, t.round = !0, t;
|
|
53
|
+
}) : (f(t, "X", e.virtual), f(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
e[
|
|
58
|
-
enabled:
|
|
55
|
+
function f(e, t, n) {
|
|
56
|
+
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o], a = d !== !1, s = i ? y : C, c = m(d) && d >= 0 ? d : s;
|
|
57
|
+
e[r] = {
|
|
58
|
+
enabled: a,
|
|
59
59
|
gt: c,
|
|
60
|
-
oSize: (
|
|
60
|
+
oSize: (n == null ? void 0 : n.oSize) || 0
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
function x(e) {
|
|
64
64
|
return e === !0 ? "left" : e;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
return
|
|
70
|
-
(
|
|
66
|
+
function K(e, t) {
|
|
67
|
+
const n = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
68
|
+
let o = e === !0 ? void 0 : x(e.fixed);
|
|
69
|
+
return o || (o === !1 ? o = void 0 : o = t.some(
|
|
70
|
+
(r) => r.fixed === "left" || r.fixed === !0
|
|
71
71
|
) ? "left" : void 0), {
|
|
72
|
-
type:
|
|
73
|
-
width:
|
|
74
|
-
fixed:
|
|
72
|
+
type: n,
|
|
73
|
+
width: i,
|
|
74
|
+
fixed: o
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function k(e) {
|
|
78
78
|
const t = (e == null ? void 0 : e.width) || "auto";
|
|
79
79
|
return {
|
|
80
80
|
type: "expand",
|
|
@@ -83,7 +83,7 @@ function g(e) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
k as getRowExpandProps,
|
|
87
|
+
K as getRowSelectionProps,
|
|
88
|
+
v as toVxeProps
|
|
89
89
|
};
|
|
@@ -14,8 +14,8 @@ declare function __VLS_template(): {
|
|
|
14
14
|
};
|
|
15
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
16
|
declare const __VLS_component: DefineComponent<ApInfoLayoutAdminProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutAdminProps> & Readonly<{}>, {
|
|
17
|
-
bordered: boolean;
|
|
18
17
|
headerStyle: CSSProperties;
|
|
18
|
+
bordered: boolean;
|
|
19
19
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
20
20
|
containerRef: HTMLDivElement;
|
|
21
21
|
headerRef: HTMLDivElement;
|