@aplus-frontend/ui 0.6.0-beta.8 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +307 -289
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +9 -8
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +1 -1
- package/es/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
- package/es/src/ap-drawer/components/ApDrawerClose.vue.mjs +4 -0
- package/es/src/ap-drawer/components/ApDrawerClose.vue2.mjs +25 -0
- package/es/src/ap-drawer/index.d.ts +2 -0
- package/es/src/ap-drawer/index.mjs +5 -2
- package/es/src/ap-drawer/utils/createDrawer.mjs +38 -33
- package/es/src/ap-field/date-range/index.vue.mjs +8 -7
- package/es/src/ap-field/hooks/use-date-timezone.mjs +17 -8
- package/es/src/ap-field/number/index.vue.d.ts +2 -4
- package/es/src/ap-field/radio/index.vue.d.ts +2 -4
- package/es/src/ap-field/rate/index.vue.d.ts +2 -4
- package/es/src/ap-field/select/index.vue.d.ts +3 -6
- package/es/src/ap-field/slider/index.vue.d.ts +2 -4
- package/es/src/ap-field/text/index.vue2.mjs +42 -44
- package/es/src/ap-field/text/password.vue.mjs +15 -17
- package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
- package/es/src/ap-form/ap-form.vue2.mjs +89 -77
- package/es/src/ap-form/dependency/index.vue.mjs +29 -23
- package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
- package/es/src/ap-form/interface.d.ts +13 -5
- package/es/src/ap-form/item/index.vue.d.ts +5 -10
- package/es/src/ap-form/item/index.vue.mjs +69 -73
- package/es/src/ap-form/item-group/index.vue.mjs +34 -35
- package/es/src/ap-form/items/select/index.vue.mjs +12 -14
- package/es/src/ap-form/items/text/password.vue.mjs +9 -9
- package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
- package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
- package/es/src/ap-form/provider/index.vue.mjs +6 -5
- package/es/src/ap-form/search-form/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 +79 -71
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +31 -13
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.mjs +99 -97
- package/es/src/ap-form/set/index.vue.mjs +20 -20
- package/es/src/ap-grid/editable/form-item.vue.mjs +39 -36
- package/es/src/ap-grid/editable/index.vue.mjs +13 -10
- package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
- 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/hooks/use-render-columns.mjs +8 -8
- package/es/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
- package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
- package/es/src/ap-grid/hooks/use-table-style.d.ts +16 -0
- package/es/src/ap-grid/hooks/use-table-style.mjs +26 -0
- package/es/src/ap-grid/index.vue.mjs +295 -243
- package/es/src/ap-grid/interface.d.ts +32 -3
- package/es/src/ap-grid/utils/table.mjs +15 -15
- package/es/src/ap-list/index.vue.d.ts +2 -9
- package/es/src/ap-list/index.vue.mjs +113 -103
- package/es/src/ap-list/interface.d.ts +24 -3
- package/es/src/ap-modal/interface.d.ts +2 -1
- package/es/src/ap-modal/utils/createModalStream.mjs +24 -24
- package/es/src/ap-table/ap-table.vue.d.ts +10 -2
- package/es/src/ap-table/ap-table.vue2.mjs +86 -82
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +42 -44
- package/es/src/ap-table/constants.d.ts +22 -22
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +25 -6
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +158 -130
- package/es/src/ap-table/interface.d.ts +17 -4
- package/es/src/ap-table/utils.d.ts +21 -21
- package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
- package/es/src/business/ap-card/ApCard.vue.d.ts +2 -4
- package/es/src/business/ap-card/ApCard.vue2.mjs +34 -33
- package/es/src/business/ap-card/index.d.ts +2 -4
- package/es/src/business/ap-card/interface.d.ts +5 -0
- package/es/src/business/ap-copy/ApCopy.d.ts +52 -0
- package/es/src/business/ap-copy/ApCopy.mjs +79 -0
- package/es/src/business/ap-copy/constans.d.ts +24 -0
- package/es/src/business/ap-copy/constans.mjs +25 -0
- package/es/src/business/ap-copy/index.d.ts +102 -0
- package/es/src/business/ap-copy/index.mjs +7 -0
- package/es/src/business/ap-copy/interface.d.ts +8 -0
- package/es/src/business/ap-copy/interface.mjs +1 -0
- package/es/src/business/ap-copy/style/css.d.ts +0 -0
- package/es/src/business/ap-copy/style/css.js +1 -0
- package/es/src/business/ap-copy/style/index.d.ts +0 -0
- package/es/src/business/ap-copy/style/index.js +1 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +92 -71
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +18 -17
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +27 -25
- package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
- package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/es/src/business/ap-keep-alive/hook.mjs +33 -0
- package/es/src/business/ap-keep-alive/index.d.ts +108 -0
- package/es/src/business/ap-keep-alive/index.mjs +15 -0
- package/es/src/business/ap-keep-alive/interface.d.ts +36 -0
- package/es/src/business/ap-keep-alive/interface.mjs +54 -0
- package/es/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
- package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/es/src/business/ap-keep-alive/keeper/index.mjs +28 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/utils.d.ts +23 -0
- package/es/src/business/ap-keep-alive/utils.mjs +42 -0
- package/es/src/business/ap-label/constans.mjs +1 -1
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
- package/es/src/business/ap-label/interface.d.ts +2 -3
- package/es/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
- package/es/src/business/ap-product-info/ApProductInfo.mjs +53 -54
- package/es/src/business/ap-product-info/constans.d.ts +4 -0
- package/es/src/business/ap-product-info/constans.mjs +4 -0
- package/es/src/business/ap-product-info/index.d.ts +15 -0
- package/es/src/business/ap-product-info/interface.d.ts +1 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue.mjs +4 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +73 -0
- package/es/src/business/ap-radio-group/index.d.ts +66 -0
- package/es/src/business/ap-radio-group/index.mjs +8 -0
- package/es/src/business/ap-radio-group/interface.d.ts +11 -0
- package/es/src/business/ap-radio-group/interface.mjs +1 -0
- package/es/src/business/ap-radio-group/style/css.d.ts +0 -0
- package/es/src/business/ap-radio-group/style/css.js +1 -0
- package/es/src/business/ap-radio-group/style/index.d.ts +0 -0
- package/es/src/business/ap-radio-group/style/index.js +1 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/index.d.ts +32 -5
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
- package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +135 -115
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +55 -51
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- 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 +14 -13
- package/es/src/business/batch-input-group/index.vue.mjs +10 -9
- package/es/src/business/hooks/usePageListApGrid.mjs +33 -28
- package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/es/src/business/index.d.ts +3 -0
- package/es/src/business/index.mjs +36 -30
- package/es/src/components.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +23 -23
- package/es/src/full-screen/interface.d.ts +5 -6
- package/es/src/index.mjs +112 -97
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/mask/index.vue.mjs +21 -20
- package/es/src/path-map.mjs +3 -1
- package/es/src/resize-observer/interface.d.ts +2 -3
- package/es/src/scroll-bar/interface.d.ts +7 -7
- package/es/src/scroll-view/interface.d.ts +2 -3
- package/es/src/splitter/SplitBar.vue2.mjs +1 -0
- package/es/src/splitter/Splitter.vue2.mjs +1 -0
- package/es/src/tests/mock-resize-observer.d.ts +2 -0
- package/es/src/tests/mock-warning.d.ts +1 -0
- package/es/src/tests/utils.d.ts +8 -0
- package/es/src/text/group.vue.mjs +7 -6
- package/es/src/text/index.vue.mjs +20 -19
- package/es/src/version.d.ts +2 -0
- package/es/src/version.mjs +4 -0
- package/es/src/work-order-modal/createWorkOrder.d.ts +2 -1
- package/es/src/work-order-modal/createWorkOrder.mjs +19 -15
- package/es/src/work-order-modal/interfaces.d.ts +4 -0
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +120 -105
- package/es/test/setup.d.ts +5 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
- package/lib/src/ap-drawer/components/ApDrawerClose.vue.js +1 -0
- package/lib/src/ap-drawer/components/ApDrawerClose.vue2.js +1 -0
- package/lib/src/ap-drawer/index.d.ts +2 -0
- package/lib/src/ap-drawer/index.js +1 -1
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-date-timezone.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +2 -4
- package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
- package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
- package/lib/src/ap-field/select/index.vue.d.ts +3 -6
- package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/dependency/index.vue.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +13 -5
- package/lib/src/ap-form/item/index.vue.d.ts +5 -10
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/provider/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/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/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-editable-columns.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/hooks/use-render-columns.js +1 -1
- package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
- package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
- package/lib/src/ap-grid/hooks/use-table-style.d.ts +16 -0
- package/lib/src/ap-grid/hooks/use-table-style.js +1 -0
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +32 -3
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +2 -9
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +24 -3
- package/lib/src/ap-modal/interface.d.ts +2 -1
- package/lib/src/ap-modal/utils/createModalStream.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +22 -22
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +25 -6
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +17 -4
- package/lib/src/ap-table/utils.d.ts +21 -21
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue.d.ts +2 -4
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
- package/lib/src/business/ap-card/index.d.ts +2 -4
- package/lib/src/business/ap-card/interface.d.ts +5 -0
- package/lib/src/business/ap-copy/ApCopy.d.ts +52 -0
- package/lib/src/business/ap-copy/ApCopy.js +1 -0
- package/lib/src/business/ap-copy/constans.d.ts +24 -0
- package/lib/src/business/ap-copy/constans.js +1 -0
- package/lib/src/business/ap-copy/index.d.ts +102 -0
- package/lib/src/business/ap-copy/index.js +1 -0
- package/lib/src/business/ap-copy/interface.d.ts +8 -0
- package/lib/src/business/ap-copy/interface.js +1 -0
- package/lib/src/business/ap-copy/style/css.cjs +1 -0
- package/lib/src/business/ap-copy/style/css.d.ts +0 -0
- package/lib/src/business/ap-copy/style/index.cjs +1 -0
- package/lib/src/business/ap-copy/style/index.d.ts +0 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
- package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/hook.js +1 -0
- package/lib/src/business/ap-keep-alive/index.d.ts +108 -0
- package/lib/src/business/ap-keep-alive/index.js +1 -0
- package/lib/src/business/ap-keep-alive/interface.d.ts +36 -0
- package/lib/src/business/ap-keep-alive/interface.js +1 -0
- package/lib/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
- package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/utils.d.ts +23 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -0
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -3
- package/lib/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/business/ap-product-info/constans.d.ts +4 -0
- package/lib/src/business/ap-product-info/constans.js +1 -1
- package/lib/src/business/ap-product-info/index.d.ts +15 -0
- package/lib/src/business/ap-product-info/interface.d.ts +1 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.js +1 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -0
- package/lib/src/business/ap-radio-group/index.d.ts +66 -0
- package/lib/src/business/ap-radio-group/index.js +1 -0
- package/lib/src/business/ap-radio-group/interface.d.ts +11 -0
- package/lib/src/business/ap-radio-group/interface.js +1 -0
- package/lib/src/business/ap-radio-group/style/css.cjs +1 -0
- package/lib/src/business/ap-radio-group/style/css.d.ts +0 -0
- package/lib/src/business/ap-radio-group/style/index.cjs +1 -0
- package/lib/src/business/ap-radio-group/style/index.d.ts +0 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/index.d.ts +32 -5
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- 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 +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.vue.d.ts +1 -1
- 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/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/lib/src/business/index.d.ts +3 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +5 -6
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/resize-observer/interface.d.ts +2 -3
- package/lib/src/scroll-bar/interface.d.ts +7 -7
- package/lib/src/scroll-view/interface.d.ts +2 -3
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/tests/mock-resize-observer.d.ts +2 -0
- package/lib/src/tests/mock-warning.d.ts +1 -0
- package/lib/src/tests/utils.d.ts +8 -0
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +2 -0
- package/lib/src/version.js +1 -0
- package/lib/src/work-order-modal/createWorkOrder.d.ts +2 -1
- package/lib/src/work-order-modal/createWorkOrder.js +1 -1
- package/lib/src/work-order-modal/interfaces.d.ts +4 -0
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/lib/test/setup.d.ts +5 -0
- package/package.json +18 -14
- package/theme/antd-global-overwrite/admin/alert.css +5 -18
- package/theme/antd-global-overwrite/admin/alert.less +25 -36
- package/theme/antd-global-overwrite/admin/button.css +13 -13
- package/theme/antd-global-overwrite/admin/button.less +24 -24
- package/theme/antd-global-overwrite/admin/drawer.css +3 -0
- package/theme/antd-global-overwrite/admin/drawer.less +5 -0
- package/theme/antd-global-overwrite/admin/field.css +42 -0
- package/theme/antd-global-overwrite/admin/field.less +43 -0
- package/theme/antd-global-overwrite/admin/index.css +93 -631
- package/theme/antd-global-overwrite/admin/index.less +1 -3
- package/theme/antd-global-overwrite/admin/message.css +2 -9
- package/theme/antd-global-overwrite/admin/message.less +2 -10
- package/theme/antd-global-overwrite/admin/modal.css +20 -34
- package/theme/antd-global-overwrite/admin/modal.less +20 -38
- package/theme/antd-global-overwrite/admin/table.css +11 -251
- package/theme/antd-global-overwrite/admin/table.less +4 -132
- package/theme/antd-global-overwrite/aplus/alert.css +8 -18
- package/theme/antd-global-overwrite/aplus/alert.less +27 -34
- package/theme/antd-global-overwrite/aplus/button.css +20 -20
- package/theme/antd-global-overwrite/aplus/button.less +24 -24
- package/theme/antd-global-overwrite/aplus/drawer.css +3 -0
- package/theme/antd-global-overwrite/aplus/drawer.less +5 -0
- package/theme/antd-global-overwrite/aplus/field.css +36 -0
- package/theme/antd-global-overwrite/aplus/field.less +36 -0
- package/theme/antd-global-overwrite/aplus/index.css +93 -679
- package/theme/antd-global-overwrite/aplus/index.less +0 -3
- package/theme/antd-global-overwrite/aplus/message.css +2 -9
- package/theme/antd-global-overwrite/aplus/message.less +2 -10
- package/theme/antd-global-overwrite/aplus/modal.css +18 -39
- package/theme/antd-global-overwrite/aplus/modal.less +19 -45
- package/theme/antd-global-overwrite/aplus/table.css +11 -236
- package/theme/antd-global-overwrite/aplus/table.less +4 -134
- package/theme/ap-action/item-dropdown.css +4 -4
- package/theme/ap-action/item.css +23 -12
- package/theme/ap-action/item.less +18 -6
- package/theme/ap-appendix/ap-appendix.css +13 -13
- package/theme/ap-appendix/ap-appendix.less +8 -8
- package/theme/ap-attachment/ap-attachment.css +6 -5
- package/theme/ap-attachment/ap-attachment.less +2 -2
- package/theme/ap-batch-action/ap-batch-action.css +7 -7
- package/theme/ap-batch-action/ap-batch-action.less +3 -3
- package/theme/ap-button/ap-button.css +4 -4
- package/theme/ap-card/ap-card.css +5 -5
- package/theme/ap-card/ap-card.less +1 -1
- package/theme/ap-copy/ap-copy.css +96 -0
- package/theme/ap-copy/ap-copy.less +61 -0
- package/theme/ap-descriptions/ap-descriptions.css +10 -8
- package/theme/ap-descriptions/ap-descriptions.less +6 -4
- package/theme/ap-download/ap-download.css +7 -7
- package/theme/ap-drawer/ap-drawer.css +66 -0
- package/theme/ap-drawer/ap-drawer.less +27 -0
- package/theme/ap-expand-alert/ap-expand-alert.css +5 -4
- package/theme/ap-expand-alert/ap-expand-alert.less +2 -1
- package/theme/ap-field/checkbox.css +4 -4
- package/theme/ap-field/index.css +4 -4
- package/theme/ap-field/number.css +4 -4
- package/theme/ap-field/radio.css +4 -4
- package/theme/ap-field/text-area.css +4 -4
- package/theme/ap-form/ap-form-item-group.css +4 -4
- package/theme/ap-form/ap-form-item.css +12 -9
- package/theme/ap-form/ap-form-item.less +8 -5
- package/theme/ap-form/drawer-form.css +4 -4
- package/theme/ap-form/index.css +34 -22
- package/theme/ap-form/item-text-group.css +4 -4
- package/theme/ap-form/item-text.css +4 -4
- package/theme/ap-form/modal-form.css +4 -4
- package/theme/ap-form/search-form-sorter.css +17 -16
- package/theme/ap-form/search-form-sorter.less +5 -4
- package/theme/ap-form/search-form.css +34 -22
- package/theme/ap-form/search-form.less +9 -1
- package/theme/ap-grid/editable.css +4 -4
- package/theme/ap-grid/index.css +83 -44
- package/theme/ap-grid/index.less +26 -9
- package/theme/ap-group-search/ap-extension-select.css +4 -4
- package/theme/ap-group-search/ap-group-search.css +4 -4
- package/theme/ap-group-search/ap-popover-select.css +4 -4
- package/theme/ap-image/ap-image.css +4 -4
- package/theme/ap-input-radio/ap-input-radio.css +4 -4
- package/theme/ap-label/ap-label.css +4 -4
- package/theme/ap-ladder/ap-ladder.css +7 -6
- package/theme/ap-ladder/ap-ladder.less +1 -0
- package/theme/ap-layout/ap-info-layout.css +4 -4
- package/theme/ap-list/index.css +4 -4
- package/theme/ap-product-info/ap-product-info.css +24 -34
- package/theme/ap-product-info/ap-product-info.less +28 -42
- package/theme/ap-radio-group/ap-radio-group.css +66 -0
- package/theme/ap-radio-group/ap-radio-group.less +26 -0
- package/theme/ap-select-layout/ap-select-layout.css +6 -6
- package/theme/ap-size-input/ap-size-input.css +4 -4
- package/theme/ap-status/ap-status.css +5 -5
- package/theme/ap-status/ap-status.less +1 -1
- package/theme/ap-summary/index.css +4 -4
- package/theme/ap-table/ap-table-index.css +4 -4
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +5 -5
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +90 -52
- package/theme/ap-table/ap-table.less +19 -7
- package/theme/ap-table/setting/index.css +19 -15
- package/theme/ap-table/setting/modal.css +11 -7
- package/theme/ap-table/setting/modal.less +5 -1
- package/theme/ap-table/setting/select-group.css +4 -4
- package/theme/ap-table/setting/sortable-item-meta.css +6 -6
- package/theme/ap-table/setting/sortable-item-meta.less +2 -2
- package/theme/ap-table/setting/sortable-item.css +4 -4
- package/theme/ap-table/setting/sorter.css +10 -10
- package/theme/ap-table/setting/sorter.less +4 -4
- package/theme/ap-table-modal/index.css +105 -65
- package/theme/ap-table-modal/index.less +15 -13
- package/theme/ap-tag/ap-tag-group.css +6 -6
- package/theme/ap-tag/ap-tag-group.less +2 -3
- package/theme/ap-tag/ap-tag.css +10 -10
- package/theme/ap-tag/ap-tag.less +4 -4
- package/theme/ap-title/ap-title.css +9 -7
- package/theme/ap-title/ap-title.less +5 -3
- package/theme/ap-upload/index.css +9 -9
- package/theme/ap-upload/multiple-file.css +5 -5
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +6 -6
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-upload/single-file.css +6 -6
- package/theme/ap-upload/single-file.less +2 -2
- package/theme/ap-upload/upload.css +4 -4
- package/theme/ap-upload-single/index.css +8 -8
- package/theme/ap-upload-single/index.less +4 -4
- package/theme/ap-view/ap-view.css +11 -11
- package/theme/ap-view/ap-view.less +7 -7
- package/theme/batch-input-group/index.css +7 -6
- package/theme/batch-input-group/popover-input.css +7 -6
- package/theme/batch-input-group/popover-input.less +3 -2
- package/theme/check-card/index.css +15 -15
- package/theme/check-card/index.less +5 -5
- package/theme/editable-table/index.css +53 -30
- package/theme/full-screen/index.css +4 -4
- package/theme/index.css +382 -270
- package/theme/index.less +3 -0
- package/theme/mask/index.css +4 -4
- package/theme/mixins/config.less +4 -4
- package/theme/mixins/mixins.css +4 -4
- package/theme/mixins/mixins.less +2 -2
- package/theme/scroll-bar/index.css +4 -4
- package/theme/scroll-view/index.css +4 -4
- package/theme/splitter/index.css +10 -10
- package/theme/splitter/index.less +1 -1
- package/theme/text/group.css +4 -4
- package/theme/text/index.css +10 -10
- package/theme/text/index.less +4 -4
- package/theme/ui-mode.css +51 -83
- package/theme/ui-mode.less +99 -83
- package/theme/work-order-modal/index.css +4 -4
|
@@ -3,8 +3,9 @@ import { ApTablePaginationConfig, ApTableValueFields, ApTableValueTypes, CommonF
|
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
import { TableProps } from '@aplus-frontend/antdv';
|
|
5
5
|
import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
|
|
6
|
-
import { ComputedRef, CSSProperties,
|
|
6
|
+
import { ComputedRef, CSSProperties, VNode } from 'vue';
|
|
7
7
|
import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots, VxeColumnProps } from 'vxe-table';
|
|
8
|
+
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
8
9
|
export type ColConfigType = VxeTableDefines.ColumnOptions;
|
|
9
10
|
export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth' | 'className' | 'class'> & {
|
|
10
11
|
children?: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
|
|
@@ -134,9 +135,9 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
134
135
|
card?: boolean;
|
|
135
136
|
/**
|
|
136
137
|
* request额外请求的参数
|
|
137
|
-
*
|
|
138
|
+
* 数据变化后将会重新发起网络请求
|
|
138
139
|
*/
|
|
139
|
-
params?: ParamsType
|
|
140
|
+
params?: ParamsType;
|
|
140
141
|
/**
|
|
141
142
|
* 请求获取dataSource
|
|
142
143
|
* @param params
|
|
@@ -239,6 +240,10 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
239
240
|
* 作为表单项时内部传递,请勿使用
|
|
240
241
|
*/
|
|
241
242
|
value?: any;
|
|
243
|
+
/**
|
|
244
|
+
* 行是否可以被高亮(传入函数可以获取当前被选中的行)
|
|
245
|
+
*/
|
|
246
|
+
rowHighlightable?: boolean | ((current: RecordType) => void);
|
|
242
247
|
};
|
|
243
248
|
export type ApGridVirtualConfig = {
|
|
244
249
|
x?: false | number;
|
|
@@ -289,6 +294,12 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
289
294
|
*/
|
|
290
295
|
rowSelection: {
|
|
291
296
|
selectedRows: ComputedRef<RecordType[]>;
|
|
297
|
+
/**
|
|
298
|
+
* 通过API调用设置行选中
|
|
299
|
+
* @param keys
|
|
300
|
+
* @returns
|
|
301
|
+
*/
|
|
302
|
+
setSelectedRowKeys: (keys: (string | number)[]) => void;
|
|
292
303
|
clearAll: () => void;
|
|
293
304
|
};
|
|
294
305
|
/**
|
|
@@ -303,4 +314,22 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
303
314
|
* @returns
|
|
304
315
|
*/
|
|
305
316
|
getDataSource: () => RecordType[];
|
|
317
|
+
/**
|
|
318
|
+
* 设置某一行被选中
|
|
319
|
+
* @param nextRow
|
|
320
|
+
* @returns
|
|
321
|
+
*/
|
|
322
|
+
setCurrentRow: (nextRow: Partial<RecordType>) => void;
|
|
323
|
+
/**
|
|
324
|
+
* 获取分页参数
|
|
325
|
+
* @returns
|
|
326
|
+
*/
|
|
327
|
+
getPaging: () => InternalPagingType;
|
|
328
|
+
/**
|
|
329
|
+
* 设置表格分页参数
|
|
330
|
+
* @param nextPaging 新的分页参数
|
|
331
|
+
* @param refreshImmediately 是否立刻刷新数据,默认为`true`
|
|
332
|
+
* @returns
|
|
333
|
+
*/
|
|
334
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
306
335
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { omit as
|
|
1
|
+
import { omit as l, isUndefined as s, 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
|
+
...l(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: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
32
33
|
} : t.checkboxConfig = {
|
|
33
34
|
highlight: !0,
|
|
34
35
|
checkMethod({ row: r }) {
|
|
@@ -37,12 +38,11 @@ function v(e) {
|
|
|
37
38
|
visibleMethod({ row: r }) {
|
|
38
39
|
return o.shown ? o.shown(r) : !0;
|
|
39
40
|
},
|
|
40
|
-
|
|
41
|
-
reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
|
|
41
|
+
reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
|
|
42
42
|
range: o.range || !1
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
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 = l(e.expandable, [
|
|
46
46
|
"renderContent",
|
|
47
47
|
"width",
|
|
48
48
|
"title"
|
|
@@ -50,22 +50,22 @@ function v(e) {
|
|
|
50
50
|
enabled: !1
|
|
51
51
|
}, t.virtualYConfig = {
|
|
52
52
|
enabled: !1
|
|
53
|
-
}) : (
|
|
53
|
+
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig",
|
|
55
|
+
function a(e, t, n) {
|
|
56
|
+
const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", u = n == null ? void 0 : n[o], f = u !== !1, d = i ? C : b, c = m(u) && u >= 0 ? u : d;
|
|
57
57
|
e[r] = {
|
|
58
|
-
enabled:
|
|
58
|
+
enabled: f,
|
|
59
59
|
gt: c,
|
|
60
60
|
oSize: (n == null ? void 0 : n.oSize) || 0
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function g(e) {
|
|
64
64
|
return e === !0 ? "left" : e;
|
|
65
65
|
}
|
|
66
66
|
function K(e, t) {
|
|
67
67
|
const n = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
68
|
-
let o = e === !0 ? void 0 :
|
|
68
|
+
let o = e === !0 ? void 0 : g(e.fixed);
|
|
69
69
|
return o || (o === !1 ? o = void 0 : o = t.some(
|
|
70
70
|
(r) => r.fixed === "left" || r.fixed === !0
|
|
71
71
|
) ? "left" : void 0), {
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { ApListProps } from './interface';
|
|
1
|
+
import { ApListExpose, ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
3
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
|
|
7
|
-
expose(exposed: ShallowUnwrapRef<
|
|
8
|
-
submit: () => void;
|
|
9
|
-
reset: () => void;
|
|
10
|
-
refresh: () => void;
|
|
11
|
-
refreshByDelete: (n: number) => void;
|
|
12
|
-
scrollToFirstRow: (selector?: string) => void;
|
|
13
|
-
getSearchFormValuesIfSetted: (transform?: boolean) => Partial<any>;
|
|
14
|
-
}>): void;
|
|
7
|
+
expose(exposed: ShallowUnwrapRef<ApListExpose>): void;
|
|
15
8
|
attrs: any;
|
|
16
9
|
slots: {
|
|
17
10
|
header?(_: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
3
|
-
import { useTablePaging as
|
|
1
|
+
import { defineComponent as _, ref as x, toRef as ee, unref as t, computed as p, watch as te, createElementBlock as s, openBlock as i, normalizeStyle as h, normalizeClass as l, renderSlot as u, createElementVNode as ae, createCommentVNode as I, createVNode as g, Fragment as F, createBlock as V, withCtx as b, renderList as ne, mergeProps as re } from "vue";
|
|
2
|
+
import { Empty as E, Spin as oe, Pagination as ie } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useTablePaging as le } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import { useOfflineList as
|
|
5
|
+
import { isUndefined as L, isNumber as se, omit as ue } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ce } from "./hooks/use-offline-list.mjs";
|
|
7
7
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
-
import { RecycleScroller as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
8
|
+
import { RecycleScroller as me, DynamicScroller as de, DynamicScrollerItem as fe } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as pe } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const De = /* @__PURE__ */ _({
|
|
11
|
+
name: "ApList",
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: {
|
|
13
14
|
dataSource: {},
|
|
@@ -27,140 +28,149 @@ const be = /* @__PURE__ */ X({
|
|
|
27
28
|
rowKey: {},
|
|
28
29
|
adaptive: { type: Boolean, default: !1 }
|
|
29
30
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
formRef:
|
|
31
|
+
setup(O, { expose: R }) {
|
|
32
|
+
const N = E.PRESENTED_IMAGE_SIMPLE, r = O, { b: d, e: y, bm: T, m: $ } = pe("ap-list"), k = x(), {
|
|
33
|
+
formRef: S,
|
|
33
34
|
submit: w,
|
|
34
35
|
reset: B,
|
|
35
|
-
handleTableChange:
|
|
36
|
-
data:
|
|
37
|
-
refresh:
|
|
38
|
-
refreshByDelete:
|
|
39
|
-
tableProps: D
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
handleTableChange: A,
|
|
37
|
+
data: v,
|
|
38
|
+
refresh: j,
|
|
39
|
+
refreshByDelete: q,
|
|
40
|
+
tableProps: D,
|
|
41
|
+
getPaging: K,
|
|
42
|
+
setPaging: M
|
|
43
|
+
} = le({
|
|
44
|
+
async request(e) {
|
|
45
|
+
var n;
|
|
46
|
+
const a = await ((n = r.request) == null ? void 0 : n.call(r, e));
|
|
44
47
|
return {
|
|
45
48
|
data: (a == null ? void 0 : a.data) || [],
|
|
46
49
|
total: (a == null ? void 0 : a.total) || 0
|
|
47
50
|
};
|
|
48
51
|
},
|
|
49
|
-
|
|
50
|
-
defaultData:
|
|
51
|
-
manual:
|
|
52
|
-
pagination:
|
|
53
|
-
formatParams:
|
|
54
|
-
}),
|
|
55
|
-
pagination:
|
|
56
|
-
dataSource:
|
|
57
|
-
onChange:
|
|
58
|
-
} =
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
61
|
-
|
|
52
|
+
params: ee(r, "params"),
|
|
53
|
+
defaultData: r.defaultData,
|
|
54
|
+
manual: r.manual,
|
|
55
|
+
pagination: r.pagination,
|
|
56
|
+
formatParams: r.beforeSearchSubmit
|
|
57
|
+
}), W = { form: S }, {
|
|
58
|
+
pagination: P,
|
|
59
|
+
dataSource: G,
|
|
60
|
+
onChange: U
|
|
61
|
+
} = ce(r);
|
|
62
|
+
function H(e, a) {
|
|
63
|
+
if (t(f)) {
|
|
64
|
+
U(e, a);
|
|
62
65
|
return;
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
{ current:
|
|
67
|
+
A(
|
|
68
|
+
{ current: e, pageSize: a },
|
|
66
69
|
{},
|
|
67
70
|
{},
|
|
68
71
|
{ currentDataSource: [], action: "paginate" }
|
|
69
72
|
);
|
|
70
73
|
}
|
|
71
|
-
const c = p(() =>
|
|
72
|
-
var
|
|
73
|
-
return
|
|
74
|
-
}), f = p(() => !
|
|
75
|
-
|
|
76
|
-
() =>
|
|
77
|
-
(
|
|
74
|
+
const c = p(() => t(f) ? t(G) : t(v).records), m = p(() => L(r.loading) ? t(v).loading : r.loading), J = p(() => {
|
|
75
|
+
var e, a;
|
|
76
|
+
return r.pagination === !1 || r.virtual ? !1 : ((e = r.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(f) ? (((a = r.dataSource) == null ? void 0 : a.length) || 0) > t(P).pageSize : t(v).total > t(D).pagination.pageSize;
|
|
77
|
+
}), f = p(() => !L(r.dataSource));
|
|
78
|
+
te(
|
|
79
|
+
() => t(m),
|
|
80
|
+
(e) => {
|
|
78
81
|
var a;
|
|
79
|
-
(a =
|
|
82
|
+
(a = r.onLoadingChange) == null || a.call(r, e);
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
|
-
function
|
|
83
|
-
var a,
|
|
84
|
-
(
|
|
85
|
+
function Q(e) {
|
|
86
|
+
var a, n;
|
|
87
|
+
(n = (a = k.value) == null ? void 0 : a.querySelector(e || ":first-child")) == null || n.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
85
88
|
}
|
|
86
|
-
function
|
|
89
|
+
function X(e = !1) {
|
|
87
90
|
var o;
|
|
88
|
-
const a = (o =
|
|
89
|
-
return (
|
|
91
|
+
const a = (o = S.value) == null ? void 0 : o.apForm, n = e ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
|
|
92
|
+
return (n == null ? void 0 : n()) || {};
|
|
90
93
|
}
|
|
91
|
-
|
|
94
|
+
function Y(e) {
|
|
95
|
+
var a, n, o;
|
|
96
|
+
(o = (n = (a = S.value) == null ? void 0 : a.apForm) == null ? void 0 : n.setFieldsValue) == null || o.call(n, e);
|
|
97
|
+
}
|
|
98
|
+
return R({
|
|
92
99
|
submit: () => w(),
|
|
93
100
|
reset: () => B(),
|
|
94
|
-
refresh: () =>
|
|
95
|
-
refreshByDelete: (
|
|
96
|
-
scrollToFirstRow:
|
|
97
|
-
getSearchFormValuesIfSetted:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
refresh: () => j(),
|
|
102
|
+
refreshByDelete: (e) => q(e),
|
|
103
|
+
scrollToFirstRow: Q,
|
|
104
|
+
getSearchFormValuesIfSetted: X,
|
|
105
|
+
setPaging: M,
|
|
106
|
+
getPaging: K,
|
|
107
|
+
setSearchFormValuesIfSetted: Y
|
|
108
|
+
}), (e, a) => (i(), s("div", {
|
|
109
|
+
class: l([t(d)(), { [t($)("adaptive")]: e.adaptive }]),
|
|
110
|
+
style: h(e.containerStyle)
|
|
101
111
|
}, [
|
|
102
|
-
u(
|
|
103
|
-
formIns:
|
|
104
|
-
submit:
|
|
105
|
-
reset:
|
|
112
|
+
u(e.$slots, "header", {
|
|
113
|
+
formIns: W,
|
|
114
|
+
submit: t(w),
|
|
115
|
+
reset: t(B)
|
|
106
116
|
}),
|
|
107
|
-
|
|
117
|
+
ae("div", {
|
|
108
118
|
class: l([
|
|
109
|
-
|
|
110
|
-
{ [
|
|
119
|
+
t(d)("content-container"),
|
|
120
|
+
{ [t(T)("content-container", "spinning")]: m.value }
|
|
111
121
|
])
|
|
112
122
|
}, [
|
|
113
|
-
|
|
123
|
+
m.value ? (i(), s("div", {
|
|
114
124
|
key: 0,
|
|
115
|
-
class: l(
|
|
125
|
+
class: l(t(y)("spin-wrapper"))
|
|
116
126
|
}, [
|
|
117
|
-
g(
|
|
127
|
+
g(t(oe), { spinning: m.value }, null, 8, ["spinning"])
|
|
118
128
|
], 2)) : I("", !0),
|
|
119
|
-
c.value.length === 0 ? u(
|
|
129
|
+
c.value.length === 0 ? u(e.$slots, "empty", {
|
|
120
130
|
key: 1,
|
|
121
|
-
loading:
|
|
131
|
+
loading: m.value
|
|
122
132
|
}, () => [
|
|
123
|
-
g(
|
|
133
|
+
g(t(E), { image: t(N) }, null, 8, ["image"])
|
|
124
134
|
]) : (i(), s("div", {
|
|
125
135
|
key: 2,
|
|
126
136
|
ref_key: "contentRef",
|
|
127
|
-
ref:
|
|
128
|
-
style:
|
|
129
|
-
class: l(
|
|
137
|
+
ref: k,
|
|
138
|
+
style: h(e.contentStyle),
|
|
139
|
+
class: l(t(y)("content"))
|
|
130
140
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
e.virtual ? (i(), s(F, { key: 0 }, [
|
|
142
|
+
t(se)(e.virtual) ? (i(), V(t(me), {
|
|
133
143
|
key: 0,
|
|
134
|
-
class: l(
|
|
144
|
+
class: l(t(d)("scroll-wrapper")),
|
|
135
145
|
items: c.value,
|
|
136
|
-
"item-size":
|
|
137
|
-
"key-field":
|
|
146
|
+
"item-size": e.virtual,
|
|
147
|
+
"key-field": r.rowKey || "id"
|
|
138
148
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
u(
|
|
141
|
-
item:
|
|
149
|
+
default: b(({ item: n, index: o }) => [
|
|
150
|
+
u(e.$slots, "renderItem", {
|
|
151
|
+
item: n,
|
|
142
152
|
index: o
|
|
143
153
|
})
|
|
144
154
|
]),
|
|
145
155
|
_: 3
|
|
146
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (i(),
|
|
156
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), V(t(de), {
|
|
147
157
|
key: 1,
|
|
148
158
|
items: c.value,
|
|
149
|
-
"min-item-size":
|
|
150
|
-
class: l(
|
|
159
|
+
"min-item-size": e.virtual.minItemSize,
|
|
160
|
+
class: l(t(d)("scroll-wrapper"))
|
|
151
161
|
}, {
|
|
152
|
-
default:
|
|
153
|
-
var
|
|
162
|
+
default: b(({ item: n, index: o, active: Z }) => {
|
|
163
|
+
var z, C;
|
|
154
164
|
return [
|
|
155
|
-
g(
|
|
156
|
-
item:
|
|
157
|
-
active:
|
|
165
|
+
g(t(fe), {
|
|
166
|
+
item: n,
|
|
167
|
+
active: Z,
|
|
158
168
|
"data-index": o,
|
|
159
|
-
"size-dependencies": (
|
|
169
|
+
"size-dependencies": (C = (z = e.virtual).sizeDependencies) == null ? void 0 : C.call(z, n)
|
|
160
170
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
u(
|
|
163
|
-
item:
|
|
171
|
+
default: b(() => [
|
|
172
|
+
u(e.$slots, "renderItem", {
|
|
173
|
+
item: n,
|
|
164
174
|
index: o
|
|
165
175
|
})
|
|
166
176
|
]),
|
|
@@ -170,30 +180,30 @@ const be = /* @__PURE__ */ X({
|
|
|
170
180
|
}),
|
|
171
181
|
_: 3
|
|
172
182
|
}, 8, ["items", "min-item-size", "class"]))
|
|
173
|
-
], 64)) : u(
|
|
183
|
+
], 64)) : u(e.$slots, "renderContent", {
|
|
174
184
|
key: 1,
|
|
175
185
|
dataSource: c.value
|
|
176
186
|
}, () => [
|
|
177
|
-
(i(!0), s(
|
|
178
|
-
item:
|
|
187
|
+
(i(!0), s(F, null, ne(c.value, (n, o) => u(e.$slots, "renderItem", {
|
|
188
|
+
item: n,
|
|
179
189
|
index: o
|
|
180
190
|
})), 256))
|
|
181
191
|
])
|
|
182
192
|
], 6))
|
|
183
193
|
], 2),
|
|
184
|
-
|
|
194
|
+
J.value ? (i(), s("div", {
|
|
185
195
|
key: 0,
|
|
186
|
-
class: l(
|
|
187
|
-
style:
|
|
196
|
+
class: l(t(y)("footer")),
|
|
197
|
+
style: h(e.footerWarpperStyle)
|
|
188
198
|
}, [
|
|
189
|
-
g(
|
|
190
|
-
f.value ?
|
|
191
|
-
{ onChange:
|
|
199
|
+
g(t(ie), re(
|
|
200
|
+
f.value ? t(P) : t(ue)(t(D).pagination, ["showTotal"]),
|
|
201
|
+
{ onChange: H }
|
|
192
202
|
), null, 16)
|
|
193
203
|
], 6)) : I("", !0)
|
|
194
204
|
], 6));
|
|
195
205
|
}
|
|
196
206
|
});
|
|
197
207
|
export {
|
|
198
|
-
|
|
208
|
+
De as default
|
|
199
209
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
|
+
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
4
5
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
5
6
|
/**
|
|
6
7
|
* 列表数据源,传入后`request`和`defaultData`都将失效
|
|
@@ -16,9 +17,10 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
16
17
|
*/
|
|
17
18
|
onItem?: (record: RecordType, index: number) => void;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* 依赖的额外的参数
|
|
21
|
+
* 变更后会重新发起网络请求
|
|
20
22
|
*/
|
|
21
|
-
params?: ParamsType
|
|
23
|
+
params?: ParamsType;
|
|
22
24
|
/**
|
|
23
25
|
* 请求数据
|
|
24
26
|
* @param params
|
|
@@ -126,4 +128,23 @@ export type ApListExpose = {
|
|
|
126
128
|
* @returns
|
|
127
129
|
*/
|
|
128
130
|
getSearchFormValuesIfSetted: (transform?: boolean) => Recordable;
|
|
131
|
+
/**
|
|
132
|
+
* 设置查询表单的值
|
|
133
|
+
* @description 只有在自定义查询表单并且绑定了formRef才能设置查询表单的值
|
|
134
|
+
* @param fields 将要设置的值
|
|
135
|
+
* @returns
|
|
136
|
+
*/
|
|
137
|
+
setSearchFormValuesIfSetted: (fields: any) => void;
|
|
138
|
+
/**
|
|
139
|
+
* 获取分页参数
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
getPaging: () => InternalPagingType;
|
|
143
|
+
/**
|
|
144
|
+
* 设置表格分页参数
|
|
145
|
+
* @param nextPaging 新的分页参数
|
|
146
|
+
* @param refreshImmediately 是否立刻刷新数据,默认为`true`
|
|
147
|
+
* @returns
|
|
148
|
+
*/
|
|
149
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
129
150
|
};
|
|
@@ -134,9 +134,10 @@ export type CreateModalStreamProps<ModalType extends ModalStreamTypeKey = ModalS
|
|
|
134
134
|
/**
|
|
135
135
|
* 弹框属性
|
|
136
136
|
* @param params 上一步弹框传递的参数
|
|
137
|
+
* @param next 下一步
|
|
137
138
|
* @returns
|
|
138
139
|
*/
|
|
139
|
-
props: (params: any) => Promise<ModalStreamType[ModalType]>;
|
|
140
|
+
props: (params: any, next: ModalStreamNextFunc<ModalType>) => Promise<ModalStreamType[ModalType]>;
|
|
140
141
|
} : never;
|
|
141
142
|
export type CreateModalStreamFunc<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = (streamList: CreateModalStreamProps<ModalType>[], firstModalId?: string) => void;
|
|
142
143
|
export type ApModalType = keyof Omit<ModalStaticFunctions, 'warn'>;
|
|
@@ -2,24 +2,24 @@ import { isValid as L } from "@aplus-frontend/utils";
|
|
|
2
2
|
import { createModal as P } from "./createModal.mjs";
|
|
3
3
|
import { Modal as V } from "@aplus-frontend/antdv";
|
|
4
4
|
import { ModalMessage as S } from "../enums/modalMessage.mjs";
|
|
5
|
-
const G = (
|
|
5
|
+
const G = (u, F) => {
|
|
6
6
|
var O;
|
|
7
|
-
const
|
|
8
|
-
let T,
|
|
9
|
-
const
|
|
10
|
-
modalId:
|
|
7
|
+
const y = F ?? (Array.isArray(u) ? (O = u[0]) == null ? void 0 : O.modalId : void 0), d = /* @__PURE__ */ new Map();
|
|
8
|
+
let T, _, E = 1e3;
|
|
9
|
+
const l = async ({
|
|
10
|
+
modalId: f,
|
|
11
11
|
params: o,
|
|
12
12
|
handleCurrentModal: t
|
|
13
13
|
}) => {
|
|
14
14
|
T = o;
|
|
15
|
-
const w =
|
|
15
|
+
const w = u.find((n) => n.modalId === f);
|
|
16
16
|
let s = !1;
|
|
17
|
-
if (
|
|
18
|
-
const n = d.get(
|
|
17
|
+
if (_) {
|
|
18
|
+
const n = d.get(_), i = {
|
|
19
19
|
...n,
|
|
20
20
|
destroy: () => {
|
|
21
|
-
var
|
|
22
|
-
(
|
|
21
|
+
var a;
|
|
22
|
+
(a = n == null ? void 0 : n.destroy) == null || a.call(n), d.delete(_);
|
|
23
23
|
},
|
|
24
24
|
open: () => {
|
|
25
25
|
s = !0;
|
|
@@ -31,22 +31,22 @@ const G = (_, F) => {
|
|
|
31
31
|
k(w);
|
|
32
32
|
}), s;
|
|
33
33
|
}, I = () => {
|
|
34
|
-
var
|
|
34
|
+
var f;
|
|
35
35
|
for (const [o, t] of d)
|
|
36
|
-
(
|
|
37
|
-
}, k = async (
|
|
36
|
+
(f = t == null ? void 0 : t.destroy) == null || f.call(t);
|
|
37
|
+
}, k = async (f) => {
|
|
38
38
|
var g, A, C, z;
|
|
39
39
|
const {
|
|
40
40
|
modalId: o,
|
|
41
41
|
modalType: t = "createModal",
|
|
42
42
|
props: w
|
|
43
|
-
} =
|
|
44
|
-
|
|
45
|
-
const s = d.get(o), n = await (w == null ? void 0 : w(T));
|
|
43
|
+
} = f;
|
|
44
|
+
_ = o;
|
|
45
|
+
const s = d.get(o), n = await (w == null ? void 0 : w(T, async (e) => (a = !0, await l(e))));
|
|
46
46
|
E = Math.max((n == null ? void 0 : n.zIndex) ?? 0, E), E += 1;
|
|
47
|
-
let i,
|
|
47
|
+
let i, a = !1;
|
|
48
48
|
if (t === "createModal") {
|
|
49
|
-
const e = n, m = async (r) => (
|
|
49
|
+
const e = n, m = async (r) => (a = !0, await l(r));
|
|
50
50
|
i = {
|
|
51
51
|
...e,
|
|
52
52
|
destroyOnClose: !1,
|
|
@@ -54,31 +54,31 @@ const G = (_, F) => {
|
|
|
54
54
|
onOk: async (r) => {
|
|
55
55
|
var N;
|
|
56
56
|
const c = await ((N = e == null ? void 0 : e.onOk) == null ? void 0 : N.call(e, r, m));
|
|
57
|
-
if (
|
|
57
|
+
if (a || I(), c)
|
|
58
58
|
throw new Error(S.NOT_NEED_CLOSE);
|
|
59
59
|
},
|
|
60
60
|
onCancel: async (r) => {
|
|
61
61
|
var N;
|
|
62
62
|
const c = await ((N = e == null ? void 0 : e.onCancel) == null ? void 0 : N.call(e, r, m));
|
|
63
|
-
if (
|
|
63
|
+
if (a || I(), c)
|
|
64
64
|
throw new Error(S.NOT_NEED_CLOSE);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
} else {
|
|
68
|
-
const e = n, m = async (r) => (
|
|
68
|
+
const e = n, m = async (r) => (a = !0, await l(r));
|
|
69
69
|
i = {
|
|
70
70
|
...e,
|
|
71
71
|
zIndex: E,
|
|
72
72
|
onOk: async () => {
|
|
73
73
|
var c;
|
|
74
74
|
const r = await ((c = e == null ? void 0 : e.onOk) == null ? void 0 : c.call(e, m));
|
|
75
|
-
if (
|
|
75
|
+
if (a || I(), r)
|
|
76
76
|
throw new Error(S.NOT_NEED_CLOSE);
|
|
77
77
|
},
|
|
78
78
|
onCancel: async () => {
|
|
79
79
|
var c;
|
|
80
80
|
const r = await ((c = e == null ? void 0 : e.onCancel) == null ? void 0 : c.call(e, m));
|
|
81
|
-
if (
|
|
81
|
+
if (a || I(), r)
|
|
82
82
|
throw new Error(S.NOT_NEED_CLOSE);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
@@ -91,7 +91,7 @@ const G = (_, F) => {
|
|
|
91
91
|
(A = e == null ? void 0 : e.open) == null || A.call(e), d.set(o, e);
|
|
92
92
|
} else
|
|
93
93
|
(z = (C = V) == null ? void 0 : C[t]) == null || z.call(C, i);
|
|
94
|
-
}, D =
|
|
94
|
+
}, D = u.find((f) => L(y) && f.modalId === y);
|
|
95
95
|
D !== void 0 && k(D);
|
|
96
96
|
};
|
|
97
97
|
export {
|