@aplus-frontend/ui 0.6.0-beta.12 → 0.6.0-beta.14
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.mjs +3 -3
- package/es/src/ap-action/item/index.vue2.mjs +5 -5
- package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
- package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
- package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
- package/es/src/ap-button/ap-button.vue.mjs +2 -2
- package/es/src/ap-button/ap-confirm-button.vue.mjs +2 -2
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -4
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
- package/es/src/ap-download/ap-download.vue.mjs +1 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +4 -4
- package/es/src/ap-field/date-range/index.vue.mjs +8 -8
- package/es/src/ap-field/hooks/use-date-timezone.mjs +17 -8
- package/es/src/ap-field/index.mjs +36 -36
- package/es/src/ap-field/number/index.vue.mjs +8 -8
- package/es/src/ap-field/radio/index.vue.mjs +1 -1
- package/es/src/ap-field/rate/index.vue.mjs +2 -2
- package/es/src/ap-field/segmented/index.vue.mjs +1 -1
- package/es/src/ap-field/select/index.vue.mjs +2 -2
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/slider/index.vue.mjs +4 -4
- package/es/src/ap-field/switch/index.vue.mjs +3 -3
- package/es/src/ap-field/text/index.vue2.mjs +2 -2
- package/es/src/ap-field/text/password.vue.mjs +2 -2
- package/es/src/ap-field/text-area/index.vue.mjs +3 -3
- package/es/src/ap-field/tree-select/index.vue.mjs +3 -3
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +1 -2
- package/es/src/ap-form/ap-form.vue2.mjs +2 -2
- package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
- package/es/src/ap-form/interface.d.ts +3 -3
- package/es/src/ap-form/item/index.vue.mjs +38 -34
- package/es/src/ap-form/item-group/index.vue.mjs +3 -3
- package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
- package/es/src/ap-form/items/date/index.vue.mjs +2 -2
- package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
- package/es/src/ap-form/items/number/index.vue.mjs +2 -2
- package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/es/src/ap-form/items/select/index.vue.mjs +2 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
- package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
- package/es/src/ap-form/items/text/password.vue.mjs +2 -2
- package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.mjs +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
- package/es/src/ap-form/render/item.vue.mjs +2 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +7 -7
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +23 -23
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +9 -6
- package/es/src/ap-form/search-form/index.vue.mjs +1 -1
- package/es/src/ap-form/set/index.vue.mjs +1 -1
- package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/es/src/ap-grid/editable/form-item.vue.mjs +39 -36
- package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/es/src/ap-grid/editable/index.vue.mjs +15 -12
- package/es/src/ap-grid/hooks/use-render-columns.mjs +8 -8
- package/es/src/ap-grid/index.vue.d.ts +2 -4
- package/es/src/ap-grid/index.vue.mjs +110 -95
- package/es/src/ap-grid/interface.d.ts +10 -0
- package/es/src/ap-grid/utils/table.mjs +15 -14
- package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +1 -1
- package/es/src/ap-list/index.vue.d.ts +2 -4
- package/es/src/ap-list/index.vue.mjs +1 -1
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.d.ts +2 -4
- package/es/src/ap-table/ap-table.vue2.mjs +13 -13
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
- package/es/src/ap-table/constants.d.ts +23 -23
- package/es/src/ap-table/constants.mjs +45 -45
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/ap-table/hooks/use-table-column-state.mjs +3 -3
- package/es/src/ap-table/utils.d.ts +23 -23
- package/es/src/ap-tag/ap-tag-group.vue.mjs +8 -8
- package/es/src/ap-tag/ap-tag.vue.mjs +2 -2
- package/es/src/ap-upload/apUpload.vue.mjs +5 -5
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
- package/es/src/ap-upload/components/Picture.vue.d.ts +2 -7
- package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +2 -2
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +9 -9
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +1 -1
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
- package/es/src/business/ap-card/ApCard.vue2.mjs +7 -7
- package/es/src/business/ap-copy/ApCopy.mjs +43 -43
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -11
- package/es/src/business/ap-expand-alert/index.d.ts +4 -6
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +5 -5
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -5
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +4 -4
- package/es/src/business/ap-group-search/images/icon-down.vue.mjs +2 -2
- package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +2 -2
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +2 -2
- package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
- package/es/src/business/ap-ladder/components/RenderValue.mjs +2 -2
- package/es/src/business/ap-product-info/ApProductInfo.mjs +23 -24
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +23 -23
- package/es/src/business/ap-radio-group/index.d.ts +5 -0
- package/es/src/business/ap-select-layout/index.d.ts +2 -4
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
- package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
- package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +96 -84
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +5 -5
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +6 -6
- package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
- package/es/src/business/ap-view/index.d.ts +12 -3
- package/es/src/business/ap-view/interface.d.ts +7 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
- package/es/src/business/batch-input-group/index.vue.mjs +1 -1
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
- package/es/src/business/hooks/usePageListApGrid.mjs +17 -20
- package/es/src/check-card/index.vue2.mjs +3 -3
- package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
- package/es/src/editable-table/form-item.vue.d.ts +2 -4
- package/es/src/editable-table/form-item.vue.mjs +2 -2
- package/es/src/editable-table/index.vue.d.ts +2 -4
- package/es/src/editable-table/index.vue.mjs +2 -2
- package/es/src/full-screen/index.vue.mjs +3 -3
- package/es/src/hooks/useFullScreen.mjs +5 -5
- package/es/src/mask/index.vue.mjs +10 -10
- package/es/src/portal/index.vue.mjs +2 -2
- package/es/src/scroll-bar/index.vue.mjs +3 -3
- package/es/src/scroll-bar/internal.vue.mjs +2 -2
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/scroll-view/index.vue.mjs +9 -9
- package/es/src/splitter/Panel.vue2.mjs +4 -4
- package/es/src/splitter/SplitBar.vue2.mjs +7 -7
- package/es/src/splitter/Splitter.vue2.mjs +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/text/group.vue.mjs +2 -2
- package/es/src/text/index.vue.mjs +4 -4
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +2 -3
- package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
- package/es/test/setup.d.ts +5 -0
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-date-timezone.js +1 -1
- package/lib/src/ap-field/index.js +1 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/interface.d.ts +3 -3
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +9 -6
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-render-columns.js +1 -1
- package/lib/src/ap-grid/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +10 -0
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +2 -4
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
- package/lib/src/ap-table/constants.d.ts +23 -23
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/ap-table/utils.d.ts +23 -23
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +2 -7
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
- package/lib/src/business/ap-expand-alert/index.d.ts +4 -6
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-radio-group/index.d.ts +5 -0
- package/lib/src/business/ap-select-layout/index.d.ts +2 -4
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/lib/src/business/ap-view/ap-view.vue.d.ts +4 -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 +2 -3
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/lib/src/business/ap-view/index.d.ts +12 -3
- package/lib/src/business/ap-view/interface.d.ts +7 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
- package/lib/src/editable-table/form-item.vue.d.ts +2 -4
- package/lib/src/editable-table/index.vue.d.ts +2 -4
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- 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 +2 -3
- package/lib/test/setup.d.ts +5 -0
- package/package.json +6 -5
- package/theme/ap-action/item.css +12 -1
- package/theme/ap-action/item.less +13 -1
- package/theme/ap-copy/ap-copy.css +2 -0
- package/theme/ap-copy/ap-copy.less +2 -0
- package/theme/ap-grid/index.css +12 -1
- package/theme/ap-radio-group/ap-radio-group.css +2 -1
- package/theme/ap-radio-group/ap-radio-group.less +3 -1
- package/theme/ap-table/ap-table.css +12 -1
- package/theme/ap-table-modal/index.css +12 -1
- package/theme/editable-table/index.css +12 -1
- package/theme/index.css +25 -3
- package/theme/ui-mode.css +9 -1
- package/theme/ui-mode.less +17 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as a, watch as u, computed as
|
|
2
|
-
import { useToken as
|
|
1
|
+
import { ref as a, watch as u, computed as p, unref as i } from "vue";
|
|
2
|
+
import { useToken as m } from "@aplus-frontend/antdv/es/theme/internal";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { renderWithColumns as l } from "../utils/renderer.mjs";
|
|
5
5
|
import { useNamespace as s } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
6
|
import { useGlobalConfig as f } from "../../config-provider/hooks/use-global-config.mjs";
|
|
7
|
-
const
|
|
8
|
-
const [, o] =
|
|
7
|
+
const h = (e) => {
|
|
8
|
+
const [, o] = m(), { be: t } = s("ap-grid"), n = f("valueTypeMap"), r = a(Date.now());
|
|
9
9
|
return u(
|
|
10
10
|
() => e.value,
|
|
11
11
|
() => {
|
|
@@ -15,15 +15,15 @@ const w = (e) => {
|
|
|
15
15
|
deep: !0
|
|
16
16
|
}
|
|
17
17
|
), {
|
|
18
|
-
renderConfig:
|
|
18
|
+
renderConfig: p(() => l(
|
|
19
19
|
e.value,
|
|
20
|
-
o.value.
|
|
20
|
+
o.value.colorTextTertiary,
|
|
21
21
|
t("table-header", "title"),
|
|
22
|
-
|
|
22
|
+
i(n)
|
|
23
23
|
)),
|
|
24
24
|
updateSignal: r
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
h as useRenderColumns
|
|
29
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeTableSlots } from 'vxe-table';
|
|
2
2
|
import { ApGridColumnType, ApGridExpose, ApGridProps } from './interface';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
4
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
6
|
expose(exposed: ShallowUnwrapRef<ApGridExpose>): void;
|
|
@@ -35,9 +35,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
35
35
|
}) => any;
|
|
36
36
|
};
|
|
37
37
|
emit: {};
|
|
38
|
-
}>) => VNode
|
|
39
|
-
[key: string]: any;
|
|
40
|
-
}> & {
|
|
38
|
+
}>) => VNode & {
|
|
41
39
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
42
40
|
};
|
|
43
41
|
export default _default;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as Ee, useSlots as Pe, getCurrentInstance as Ne, 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 Te, guardReactiveProps as ze } from "vue";
|
|
2
|
+
import { VxeTable as Ae, 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, isFunction as _e, omit as Ve } from "lodash-unified";
|
|
7
|
+
import { ApForm as Le } 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 {
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
9
|
+
import { noRenderAsFormItemValueList as De } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as ee, updateFormProps as Oe, getFieldProps as $e, getSearchFormItemRenderNode as Ke, recursionApColumns as oe } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as He } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as ae, Pagination as We } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as je } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Me, getRowExpandProps as qe, getRowSelectionProps as Ue } from "./utils/table.mjs";
|
|
15
|
+
import Ge from "../ap-table/hooks/use-table-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as Xe } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as Je, sizeMap as Qe, ROW_SELECTION_FIELD as Ye } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as Ze } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as eo } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { isDef as
|
|
22
|
-
import { getValidVNodeList as
|
|
23
|
-
import { useNamespace as
|
|
24
|
-
import { useGlobalConfig as
|
|
25
|
-
import { useLocale as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
21
|
+
import { isDef as oo } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as ao } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as ro } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as to } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as lo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import no from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const _o = /* @__PURE__ */ Ee({
|
|
28
28
|
name: "ApGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -111,34 +111,35 @@ const To = /* @__PURE__ */ Be({
|
|
|
111
111
|
footer: {},
|
|
112
112
|
virtual: { type: [Boolean, Object], default: void 0 },
|
|
113
113
|
expandable: {},
|
|
114
|
-
value: {}
|
|
114
|
+
value: {},
|
|
115
|
+
rowHighlightable: { type: [Boolean, Function], default: !1 }
|
|
115
116
|
},
|
|
116
117
|
setup(re, { expose: te }) {
|
|
117
118
|
var G;
|
|
118
|
-
const C =
|
|
119
|
-
|
|
120
|
-
const { e: P, b:
|
|
119
|
+
const C = Pe(), a = re, S = (G = Ne()) == null ? void 0 : G.appContext.app;
|
|
120
|
+
S && !S.__VXE_PC_UI_INSTALLED__ && (S.use(Z), S.__VXE_PC_UI_INSTALLED__ = !0);
|
|
121
|
+
const { e: P, b: u, be: le } = ro("ap-grid"), ne = to("valueTypeMap"), s = F([]), $ = F([]), d = F(), x = F(a.size), [, c] = eo(), { t: se } = lo();
|
|
121
122
|
Z.setConfig({
|
|
122
123
|
i18n: (e, r) => se(`ap.${e}`, r)
|
|
123
124
|
});
|
|
124
|
-
const { renderConfig: ie, updateSignal: de } =
|
|
125
|
+
const { renderConfig: ie, updateSignal: de } = Ze(s);
|
|
125
126
|
let K = 0;
|
|
126
127
|
const ce = n(() => {
|
|
127
|
-
if (
|
|
128
|
-
return
|
|
128
|
+
if (d.value)
|
|
129
|
+
return d.value.$el.querySelector(
|
|
129
130
|
".vxe-table--header-inner-wrapper"
|
|
130
131
|
);
|
|
131
|
-
}),
|
|
132
|
+
}), H = n(() => {
|
|
132
133
|
var e, r, l;
|
|
133
134
|
return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
134
|
-
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !
|
|
135
|
+
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !De.includes(t.valueType)
|
|
135
136
|
)) == null ? void 0 : r.sort((t, p) => {
|
|
136
137
|
let b = ee(t.order);
|
|
137
138
|
return ee(p.order) - b;
|
|
138
139
|
})) == null ? void 0 : l.map((t) => {
|
|
139
|
-
const p =
|
|
140
|
+
const p = Oe(
|
|
140
141
|
t,
|
|
141
|
-
|
|
142
|
+
$e(t.fieldProps, {})
|
|
142
143
|
), b = {
|
|
143
144
|
...t,
|
|
144
145
|
fieldProps: {
|
|
@@ -151,26 +152,26 @@ const To = /* @__PURE__ */ Be({
|
|
|
151
152
|
},
|
|
152
153
|
renderNode: void 0
|
|
153
154
|
};
|
|
154
|
-
return b.renderNode =
|
|
155
|
+
return b.renderNode = Ke(
|
|
155
156
|
b,
|
|
156
157
|
o(ne)
|
|
157
158
|
), b;
|
|
158
159
|
})) || [];
|
|
159
160
|
}), ue = n(() => {
|
|
160
161
|
var r;
|
|
161
|
-
return
|
|
162
|
+
return oo(a.manual) ? a.manual : ao(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
|
|
162
163
|
var t;
|
|
163
164
|
return ((t = l.type) == null ? void 0 : t.name) === "ApView";
|
|
164
165
|
});
|
|
165
166
|
}), pe = n(() => [
|
|
166
|
-
|
|
167
|
-
a.card ? null :
|
|
168
|
-
a.adaptive ?
|
|
169
|
-
a.sticky ?
|
|
170
|
-
].filter(Boolean)),
|
|
167
|
+
u(),
|
|
168
|
+
a.card ? null : u("wrapper"),
|
|
169
|
+
a.adaptive ? u("adaptive") : null,
|
|
170
|
+
a.sticky ? u("sticky") : null
|
|
171
|
+
].filter(Boolean)), W = n(() => oe(o(s), (e) => {
|
|
171
172
|
if (e.sorter === !0)
|
|
172
173
|
return e.key || e.dataIndex;
|
|
173
|
-
}).filter(Boolean)),
|
|
174
|
+
}).filter(Boolean)), j = n(() => oe(o(s), (e) => {
|
|
174
175
|
if (e.filters && !e.onFilter)
|
|
175
176
|
return e.key || e.dataIndex;
|
|
176
177
|
}).filter(Boolean)), {
|
|
@@ -182,10 +183,10 @@ const To = /* @__PURE__ */ Be({
|
|
|
182
183
|
tableProps: M,
|
|
183
184
|
setDataSource: fe,
|
|
184
185
|
handleTableChangeOptional: ge
|
|
185
|
-
} =
|
|
186
|
+
} = He({
|
|
186
187
|
async request(e) {
|
|
187
188
|
var l;
|
|
188
|
-
if (!k.value.preserveSelectedRowKeys &&
|
|
189
|
+
if (!k.value.preserveSelectedRowKeys && w(a.dataSource) && _(), !w(a.dataSource)) {
|
|
189
190
|
const t = e.pageSize * (e.current - 1);
|
|
190
191
|
return {
|
|
191
192
|
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
|
|
@@ -199,29 +200,29 @@ const To = /* @__PURE__ */ Be({
|
|
|
199
200
|
};
|
|
200
201
|
},
|
|
201
202
|
namespace: "ap-grid",
|
|
202
|
-
filterFields:
|
|
203
|
-
sortFields:
|
|
203
|
+
filterFields: j,
|
|
204
|
+
sortFields: W,
|
|
204
205
|
defaultParams: a.params,
|
|
205
206
|
defaultData: a.defaultData,
|
|
206
207
|
manual: o(ue),
|
|
207
208
|
formatParams: a.beforeSearchSubmit,
|
|
208
209
|
pagination: a.pagination,
|
|
209
|
-
onClickReset:
|
|
210
|
-
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } =
|
|
211
|
-
|
|
210
|
+
onClickReset: Be
|
|
211
|
+
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = je(ge);
|
|
212
|
+
Xe({
|
|
212
213
|
columns: n(() => s.value),
|
|
213
214
|
columnsBackup: n(() => $.value),
|
|
214
|
-
size: n(() =>
|
|
215
|
+
size: n(() => Qe[x.value]),
|
|
215
216
|
updateColumns(e) {
|
|
216
217
|
var r;
|
|
217
218
|
s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
|
|
218
219
|
},
|
|
219
220
|
updateSize(e) {
|
|
220
|
-
x.value =
|
|
221
|
+
x.value = Je[e];
|
|
221
222
|
},
|
|
222
223
|
renderConfig: n(() => ({
|
|
223
224
|
className: le("table-header", "title"),
|
|
224
|
-
color:
|
|
225
|
+
color: c.value.colorTextTertiary
|
|
225
226
|
})),
|
|
226
227
|
dataSource: n(() => o(f).records),
|
|
227
228
|
getSearchFormValues: U,
|
|
@@ -234,24 +235,29 @@ const To = /* @__PURE__ */ Be({
|
|
|
234
235
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
235
236
|
) ? "left" : void 0
|
|
236
237
|
), ye = n(
|
|
237
|
-
() =>
|
|
238
|
-
),
|
|
239
|
-
() =>
|
|
240
|
-
), { selectedRows: R, rowSelection: k, ...
|
|
238
|
+
() => w(a.loading) ? f.loading : a.loading
|
|
239
|
+
), we = n(
|
|
240
|
+
() => w(a.dataSource) ? f.records : a.dataSource
|
|
241
|
+
), { selectedRows: R, rowSelection: k, ...Se } = Ge({
|
|
241
242
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
242
|
-
dataSource:
|
|
243
|
+
dataSource: we,
|
|
243
244
|
rowKey: a.rowKey
|
|
244
245
|
}), A = () => {
|
|
245
|
-
const e =
|
|
246
|
+
const e = d.value;
|
|
246
247
|
e && (R.value = [
|
|
247
248
|
...e.getCheckboxReserveRecords(),
|
|
248
249
|
...e.getCheckboxRecords()
|
|
249
250
|
]);
|
|
250
251
|
}, xe = () => {
|
|
251
|
-
const e =
|
|
252
|
+
const e = d.value;
|
|
252
253
|
e && (R.value = [e.getRadioRecord()]);
|
|
254
|
+
}, Re = ({
|
|
255
|
+
row: e
|
|
256
|
+
}) => {
|
|
257
|
+
const r = a.rowHighlightable;
|
|
258
|
+
_e(r) && r(e);
|
|
253
259
|
};
|
|
254
|
-
function
|
|
260
|
+
function ke() {
|
|
255
261
|
var e;
|
|
256
262
|
return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
|
|
257
263
|
}
|
|
@@ -265,25 +271,32 @@ const To = /* @__PURE__ */ Be({
|
|
|
265
271
|
return (p = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : p.call(t, !0);
|
|
266
272
|
}
|
|
267
273
|
function _() {
|
|
268
|
-
|
|
269
|
-
const e =
|
|
274
|
+
Se.clearAll();
|
|
275
|
+
const e = d.value;
|
|
270
276
|
e && (k.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
271
277
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
278
|
+
function Fe(e) {
|
|
279
|
+
const r = d.value;
|
|
280
|
+
if (!r)
|
|
281
|
+
return;
|
|
282
|
+
const l = String(e[a.rowKey]), t = r.getRowById(l);
|
|
283
|
+
r.setCurrentRow(t);
|
|
284
|
+
}
|
|
285
|
+
function Be() {
|
|
286
|
+
const e = d.value;
|
|
274
287
|
e && (e.clearSort(), e.clearFilter());
|
|
275
288
|
}
|
|
276
|
-
async function
|
|
289
|
+
async function Ie(e, r) {
|
|
277
290
|
var t;
|
|
278
291
|
const l = f.records[e];
|
|
279
292
|
if (l)
|
|
280
|
-
return (t =
|
|
293
|
+
return (t = d.value) == null ? void 0 : t.scrollToRow(l, r);
|
|
281
294
|
}
|
|
282
295
|
return B(
|
|
283
296
|
() => [a.columnResizable, a.columns],
|
|
284
297
|
() => {
|
|
285
298
|
var r;
|
|
286
|
-
const e =
|
|
299
|
+
const e = ke();
|
|
287
300
|
s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
|
|
288
301
|
},
|
|
289
302
|
{
|
|
@@ -318,18 +331,19 @@ const To = /* @__PURE__ */ Be({
|
|
|
318
331
|
selectedRows: n(() => R.value),
|
|
319
332
|
clearAll: _
|
|
320
333
|
},
|
|
321
|
-
scrollToRow:
|
|
322
|
-
getDataSource: () => o(f.records)
|
|
334
|
+
scrollToRow: Ie,
|
|
335
|
+
getDataSource: () => o(f.records),
|
|
336
|
+
setCurrentRow: Fe
|
|
323
337
|
}), (e, r) => (i(), I("div", {
|
|
324
338
|
class: g(pe.value),
|
|
325
339
|
style: V(e.wrapperStyle)
|
|
326
340
|
}, [
|
|
327
|
-
o(
|
|
341
|
+
o(w)(e.dataSource) && e.searchForm !== !1 && H.value.length > 0 ? (i(), I("div", {
|
|
328
342
|
key: 0,
|
|
329
343
|
class: g(e.card ? o(P)("search-wrapper") : null),
|
|
330
344
|
style: V(e.searchFormWrapperStyle)
|
|
331
345
|
}, [
|
|
332
|
-
X(o(
|
|
346
|
+
X(o(Le).SearchForm, h(e.searchForm || {}, {
|
|
333
347
|
ref_key: "formRef",
|
|
334
348
|
ref: N,
|
|
335
349
|
"custom-reset": "",
|
|
@@ -338,7 +352,7 @@ const To = /* @__PURE__ */ Be({
|
|
|
338
352
|
onReset: o(z)
|
|
339
353
|
}), J({
|
|
340
354
|
default: v(() => [
|
|
341
|
-
(i(!0), I(Q, null, L(
|
|
355
|
+
(i(!0), I(Q, null, L(H.value, (l) => (i(), m(D(l.renderNode.Comp), h({
|
|
342
356
|
key: l.dataIndex,
|
|
343
357
|
item: l,
|
|
344
358
|
ref_for: !0
|
|
@@ -363,7 +377,7 @@ const To = /* @__PURE__ */ Be({
|
|
|
363
377
|
style: V(e.tableWrapperStyle)
|
|
364
378
|
}, [
|
|
365
379
|
E("div", {
|
|
366
|
-
class: g(o(
|
|
380
|
+
class: g(o(u)("header-wrapper"))
|
|
367
381
|
}, [
|
|
368
382
|
O(e.$slots, "title", {
|
|
369
383
|
selectedRows: o(R),
|
|
@@ -373,33 +387,33 @@ const To = /* @__PURE__ */ Be({
|
|
|
373
387
|
})
|
|
374
388
|
], 2),
|
|
375
389
|
E("div", {
|
|
376
|
-
class: g(o(
|
|
390
|
+
class: g(o(u)("vxe-wrapper"))
|
|
377
391
|
}, [
|
|
378
|
-
(i(), m(o(
|
|
392
|
+
(i(), m(o(Ae), h(o(Me)(a), {
|
|
379
393
|
ref_key: "tableRef",
|
|
380
|
-
ref:
|
|
394
|
+
ref: d,
|
|
381
395
|
key: o(de),
|
|
382
396
|
data: o(f).records,
|
|
383
397
|
"sort-config": {
|
|
384
|
-
remote:
|
|
398
|
+
remote: W.value.length > 0,
|
|
385
399
|
trigger: "cell"
|
|
386
400
|
},
|
|
387
401
|
"filter-config": {
|
|
388
|
-
remote:
|
|
402
|
+
remote: j.value.length > 0
|
|
389
403
|
},
|
|
390
404
|
loading: ye.value,
|
|
391
405
|
style: {
|
|
392
|
-
"--vxe-ui-table-row-checkbox-checked-background-color": o(
|
|
393
|
-
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(
|
|
394
|
-
"--vxe-ui-font-primary-color": o(
|
|
406
|
+
"--vxe-ui-table-row-checkbox-checked-background-color": o(c).controlItemBgActive,
|
|
407
|
+
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(c).controlItemBgActiveHover,
|
|
408
|
+
"--vxe-ui-font-primary-color": o(c).colorPrimary,
|
|
395
409
|
"--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
|
|
396
410
|
"--vxe-ui-table-cell-padding-default": "12px",
|
|
397
411
|
"--vxe-ui-table-cell-padding-medium": "9px",
|
|
398
|
-
"--vxe-ui-table-row-radio-checked-background-color": o(
|
|
399
|
-
"--vxe-ui-table-row-hover-radio-checked-background-color": o(
|
|
400
|
-
"--vxe-ui-font-color": o(
|
|
401
|
-
"--vxe-ui-table-border-color": o(
|
|
402
|
-
"--vxe-ui-table-header-font-color": o(
|
|
412
|
+
"--vxe-ui-table-row-radio-checked-background-color": o(c).controlItemBgActive,
|
|
413
|
+
"--vxe-ui-table-row-hover-radio-checked-background-color": o(c).controlItemBgActiveHover,
|
|
414
|
+
"--vxe-ui-font-color": o(c).colorTextBase,
|
|
415
|
+
"--vxe-ui-table-border-color": o(c).colorBorderSecondary,
|
|
416
|
+
"--vxe-ui-table-header-font-color": o(c).colorTextBase
|
|
403
417
|
},
|
|
404
418
|
size: x.value,
|
|
405
419
|
onSortChange: o(he),
|
|
@@ -407,7 +421,8 @@ const To = /* @__PURE__ */ Be({
|
|
|
407
421
|
onCheckboxChange: A,
|
|
408
422
|
onCheckboxRangeChange: A,
|
|
409
423
|
onCheckboxAll: A,
|
|
410
|
-
onRadioChange: xe
|
|
424
|
+
onRadioChange: xe,
|
|
425
|
+
onCurrentChange: Re
|
|
411
426
|
}), J({
|
|
412
427
|
empty: v(() => [
|
|
413
428
|
X(o(ae), {
|
|
@@ -415,31 +430,31 @@ const To = /* @__PURE__ */ Be({
|
|
|
415
430
|
}, null, 8, ["image"])
|
|
416
431
|
]),
|
|
417
432
|
default: v(() => [
|
|
418
|
-
a.expandable && s.value.length ? (i(), m(o(Y), h({ key: 0 }, o(
|
|
433
|
+
a.expandable && s.value.length ? (i(), m(o(Y), h({ key: 0 }, o(qe)(e.expandable), { fixed: be.value }), {
|
|
419
434
|
content: v((l) => [
|
|
420
435
|
(i(), m(D(a.expandable.renderContent(l))))
|
|
421
436
|
]),
|
|
422
437
|
_: 1
|
|
423
438
|
}, 16, ["fixed"])) : y("", !0),
|
|
424
|
-
a.rowSelection && s.value.length ? (i(), m(o(Y), h({ key: 1 }, o(
|
|
439
|
+
a.rowSelection && s.value.length ? (i(), m(o(Y), h({ key: 1 }, o(Ue)(o(k), s.value), { field: o(Ye) }), null, 16, ["field"])) : y("", !0),
|
|
425
440
|
(i(!0), I(Q, null, L(o(ie), (l) => (i(), m(D(l), {
|
|
426
441
|
key: l.props.colId
|
|
427
442
|
}))), 128))
|
|
428
443
|
]),
|
|
429
444
|
_: 2
|
|
430
445
|
}, [
|
|
431
|
-
L(o(
|
|
446
|
+
L(o(Ve)(C, ["searchFormExtra"]), (l, t) => ({
|
|
432
447
|
name: t,
|
|
433
448
|
fn: v((p) => [
|
|
434
|
-
O(e.$slots, t,
|
|
449
|
+
O(e.$slots, t, Te(ze(p || {})))
|
|
435
450
|
])
|
|
436
451
|
}))
|
|
437
452
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
438
453
|
], 2),
|
|
439
454
|
E("div", {
|
|
440
|
-
class: g(o(
|
|
455
|
+
class: g(o(u)("pagination-wrapper"))
|
|
441
456
|
}, [
|
|
442
|
-
e.sticky ? (i(), m(o(
|
|
457
|
+
e.sticky ? (i(), m(o(no), {
|
|
443
458
|
key: 0,
|
|
444
459
|
direction: "horizontal",
|
|
445
460
|
"scroll-container": ce.value,
|
|
@@ -447,9 +462,9 @@ const To = /* @__PURE__ */ Be({
|
|
|
447
462
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
448
463
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
449
464
|
}, null, 8, ["scroll-container"])) : y("", !0),
|
|
450
|
-
e.pagination !== !1 ? (i(), m(o(
|
|
465
|
+
e.pagination !== !1 ? (i(), m(o(We), h({
|
|
451
466
|
key: 1,
|
|
452
|
-
class: o(
|
|
467
|
+
class: o(u)("pagination")
|
|
453
468
|
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : y("", !0)
|
|
454
469
|
], 2)
|
|
455
470
|
], 6)
|
|
@@ -457,5 +472,5 @@ const To = /* @__PURE__ */ Be({
|
|
|
457
472
|
}
|
|
458
473
|
});
|
|
459
474
|
export {
|
|
460
|
-
|
|
475
|
+
_o as default
|
|
461
476
|
};
|
|
@@ -239,6 +239,10 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
239
239
|
* 作为表单项时内部传递,请勿使用
|
|
240
240
|
*/
|
|
241
241
|
value?: any;
|
|
242
|
+
/**
|
|
243
|
+
* 行是否可以被高亮(传入函数可以获取当前被选中的行)
|
|
244
|
+
*/
|
|
245
|
+
rowHighlightable?: boolean | ((current: RecordType) => void);
|
|
242
246
|
};
|
|
243
247
|
export type ApGridVirtualConfig = {
|
|
244
248
|
x?: false | number;
|
|
@@ -303,4 +307,10 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
303
307
|
* @returns
|
|
304
308
|
*/
|
|
305
309
|
getDataSource: () => RecordType[];
|
|
310
|
+
/**
|
|
311
|
+
* 设置某一行被选中
|
|
312
|
+
* @param nextRow
|
|
313
|
+
* @returns
|
|
314
|
+
*/
|
|
315
|
+
setCurrentRow: (nextRow: Partial<RecordType>) => void;
|
|
306
316
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { omit as
|
|
1
|
+
import { omit as s, isUndefined as u, isFunction as h, isNumber as m } from "lodash-unified";
|
|
2
2
|
import { isDef as w } from "../../utils/index.mjs";
|
|
3
|
-
const
|
|
3
|
+
const C = 20, b = 50, y = (e) => e.some((t) => !!t.html);
|
|
4
4
|
function v(e) {
|
|
5
5
|
var i;
|
|
6
6
|
const t = {
|
|
7
|
-
...
|
|
7
|
+
...s(e, [
|
|
8
8
|
"columns",
|
|
9
9
|
"request",
|
|
10
10
|
"searchForm",
|
|
@@ -16,8 +16,9 @@ function v(e) {
|
|
|
16
16
|
};
|
|
17
17
|
if (t.rowConfig = {
|
|
18
18
|
isHover: !0,
|
|
19
|
-
keyField: e.rowKey
|
|
20
|
-
|
|
19
|
+
keyField: e.rowKey,
|
|
20
|
+
isCurrent: !!e.rowHighlightable
|
|
21
|
+
}, t.columnConfig = {}, y(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) {
|
|
21
22
|
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
22
23
|
o.type === "radio" ? t.radioConfig = {
|
|
23
24
|
highlight: !0,
|
|
@@ -28,7 +29,7 @@ function v(e) {
|
|
|
28
29
|
return o.shown ? o.shown(r) : !0;
|
|
29
30
|
},
|
|
30
31
|
checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
|
|
31
|
-
reserve:
|
|
32
|
+
reserve: u(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
32
33
|
} : t.checkboxConfig = {
|
|
33
34
|
highlight: !0,
|
|
34
35
|
checkMethod({ row: r }) {
|
|
@@ -38,11 +39,11 @@ function v(e) {
|
|
|
38
39
|
return o.shown ? o.shown(r) : !0;
|
|
39
40
|
},
|
|
40
41
|
checkRowKeys: o.defaultSelectedRowKeys,
|
|
41
|
-
reserve:
|
|
42
|
+
reserve: u(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
|
|
42
43
|
range: o.range || !1
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig =
|
|
46
|
+
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = s(e.expandable, [
|
|
46
47
|
"renderContent",
|
|
47
48
|
"width",
|
|
48
49
|
"title"
|
|
@@ -50,22 +51,22 @@ function v(e) {
|
|
|
50
51
|
enabled: !1
|
|
51
52
|
}, t.virtualYConfig = {
|
|
52
53
|
enabled: !1
|
|
53
|
-
}) : (
|
|
54
|
+
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o],
|
|
56
|
+
function a(e, t, n) {
|
|
57
|
+
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o], f = d !== !1, l = i ? C : b, c = m(d) && d >= 0 ? d : l;
|
|
57
58
|
e[r] = {
|
|
58
|
-
enabled:
|
|
59
|
+
enabled: f,
|
|
59
60
|
gt: c,
|
|
60
61
|
oSize: (n == null ? void 0 : n.oSize) || 0
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function g(e) {
|
|
64
65
|
return e === !0 ? "left" : e;
|
|
65
66
|
}
|
|
66
67
|
function K(e, t) {
|
|
67
68
|
const n = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
68
|
-
let o = e === !0 ? void 0 :
|
|
69
|
+
let o = e === !0 ? void 0 : g(e.fixed);
|
|
69
70
|
return o || (o === !1 ? o = void 0 : o = t.some(
|
|
70
71
|
(r) => r.fixed === "left" || r.fixed === !0
|
|
71
72
|
) ? "left" : void 0), {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n, computed as s, onMounted as a,
|
|
1
|
+
import { defineComponent as n, computed as s, onMounted as a, createBlock as i, openBlock as p, resolveDynamicComponent as m, normalizeProps as l, guardReactiveProps as c, createSlots as d, renderList as u, withCtx as f, renderSlot as _ } from "vue";
|
|
2
2
|
import "./ap-info-layout-aplus/ap-info-layout.vue.mjs";
|
|
3
3
|
import "./ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
@@ -31,7 +31,7 @@ const g = /* @__PURE__ */ n({
|
|
|
31
31
|
b() || console.warn(
|
|
32
32
|
"[DEPRECATED] This component is deprecated and will be removed in next minor version. "
|
|
33
33
|
);
|
|
34
|
-
}), (o, $) => (
|
|
34
|
+
}), (o, $) => (p(), i(m(t.value), l(c(o.$props)), d({ _: 2 }, [
|
|
35
35
|
u(o.$slots, (k, e) => ({
|
|
36
36
|
name: e,
|
|
37
37
|
fn: f(() => [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u, ref as t,
|
|
1
|
+
import { defineComponent as u, ref as t, createElementBlock as p, openBlock as y, normalizeClass as s, unref as e, createElementVNode as n, normalizeStyle as h, renderSlot as d } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import { useNamespace as v } from "../../config-provider/hooks/use-namespace.mjs";
|
|
4
4
|
import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
|
|
@@ -12,7 +12,7 @@ const L = /* @__PURE__ */ u({
|
|
|
12
12
|
const l = t(), a = t(), f = () => {
|
|
13
13
|
l.value && a.value && (l.value.scrollTop > 0 ? a.value.classList.add(o("header-shadow")) : a.value.classList.remove(o("header-shadow")));
|
|
14
14
|
}, { b: i, e: o, m: c } = v("ap-info-layout-admin"), m = _("uiMode", "admin");
|
|
15
|
-
return (r, k) => (
|
|
15
|
+
return (r, k) => (y(), p("div", {
|
|
16
16
|
ref_key: "containerRef",
|
|
17
17
|
ref: l,
|
|
18
18
|
class: s([e(i)(), `${e(c)(e(m))}`]),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as t, onActivated as y, onDeactivated as B,
|
|
1
|
+
import { defineComponent as $, computed as t, onActivated as y, onDeactivated as B, createElementBlock as E, openBlock as d, normalizeClass as a, createBlock as H, createElementVNode as o, Teleport as k, renderSlot as s, createVNode as A, unref as N } from "vue";
|
|
2
2
|
import { Divider as T } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
|
|
@@ -41,9 +41,7 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
|
|
|
41
41
|
}): any;
|
|
42
42
|
};
|
|
43
43
|
emit: {};
|
|
44
|
-
}>) => VNode
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}> & {
|
|
44
|
+
}>) => VNode & {
|
|
47
45
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
48
46
|
};
|
|
49
47
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, ref as Y, unref as e, computed as p, watch as Z,
|
|
1
|
+
import { defineComponent as X, ref as Y, unref as e, computed as p, watch as Z, createElementBlock as s, openBlock as i, normalizeStyle as v, normalizeClass as l, renderSlot as u, createElementVNode as _, createCommentVNode as I, createVNode as g, Fragment as E, createBlock as O, withCtx as h, renderList as x, mergeProps as ee } from "vue";
|
|
2
2
|
import { Empty as V, Spin as te, Pagination as ae } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useTablePaging as ne } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|