@aplus-frontend/ui 0.6.0-beta.9 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +307 -289
- package/es/src/ap-button/ap-button.vue.mjs +1 -1
- 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 +13 -7
- package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
- package/es/src/ap-form/interface.d.ts +9 -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-sorter/index.vue2.mjs +4 -1
- 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 +4 -8
- package/es/src/ap-form/search-form/index.vue.mjs +63 -62
- 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 +18 -0
- package/es/src/ap-grid/hooks/use-table-style.mjs +28 -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 +24 -5
- 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/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 +51 -49
- 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/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/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-button/ap-button.vue.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 +13 -7
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +9 -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-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 +4 -8
- 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 +18 -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 +24 -5
- 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/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-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/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/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 -634
- 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 -37
- package/theme/antd-global-overwrite/admin/modal.less +20 -41
- 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 +94 -683
- 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 +19 -43
- package/theme/antd-global-overwrite/aplus/modal.less +20 -49
- 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 +3 -3
- package/theme/ap-action/item.css +21 -10
- package/theme/ap-action/item.less +18 -6
- package/theme/ap-appendix/ap-appendix.css +10 -10
- package/theme/ap-appendix/ap-appendix.less +6 -6
- package/theme/ap-attachment/ap-attachment.css +4 -4
- package/theme/ap-batch-action/ap-batch-action.css +6 -6
- package/theme/ap-batch-action/ap-batch-action.less +3 -3
- package/theme/ap-button/ap-button.css +3 -3
- package/theme/ap-card/ap-card.css +4 -4
- 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 +9 -7
- package/theme/ap-descriptions/ap-descriptions.less +6 -4
- package/theme/ap-download/ap-download.css +6 -6
- 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 +4 -3
- package/theme/ap-expand-alert/ap-expand-alert.less +2 -2
- package/theme/ap-field/checkbox.css +3 -3
- package/theme/ap-field/index.css +3 -3
- package/theme/ap-field/number.css +3 -3
- package/theme/ap-field/radio.css +3 -3
- package/theme/ap-field/text-area.css +3 -3
- package/theme/ap-form/ap-form-item-group.css +3 -3
- package/theme/ap-form/ap-form-item.css +11 -8
- package/theme/ap-form/ap-form-item.less +8 -5
- package/theme/ap-form/drawer-form.css +3 -3
- package/theme/ap-form/index.css +25 -20
- package/theme/ap-form/item-text-group.css +3 -3
- package/theme/ap-form/item-text.css +3 -3
- package/theme/ap-form/modal-form.css +3 -3
- package/theme/ap-form/search-form-sorter.css +14 -12
- package/theme/ap-form/search-form-sorter.less +7 -5
- package/theme/ap-form/search-form.css +25 -20
- package/theme/ap-form/search-form.less +3 -3
- package/theme/ap-grid/editable.css +3 -3
- package/theme/ap-grid/index.css +73 -40
- package/theme/ap-grid/index.less +26 -8
- package/theme/ap-group-search/ap-extension-select.css +3 -3
- package/theme/ap-group-search/ap-group-search.css +3 -3
- package/theme/ap-group-search/ap-popover-select.css +3 -3
- package/theme/ap-image/ap-image.css +3 -3
- package/theme/ap-input-radio/ap-input-radio.css +3 -3
- package/theme/ap-label/ap-label.css +3 -3
- package/theme/ap-ladder/ap-ladder.css +6 -6
- package/theme/ap-layout/ap-info-layout.css +3 -3
- package/theme/ap-list/index.css +3 -3
- package/theme/ap-product-info/ap-product-info.css +23 -33
- 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 +5 -5
- package/theme/ap-size-input/ap-size-input.css +3 -3
- package/theme/ap-status/ap-status.css +3 -3
- package/theme/ap-summary/index.css +3 -3
- package/theme/ap-table/ap-table-index.css +3 -3
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +4 -4
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +80 -47
- package/theme/ap-table/ap-table.less +19 -7
- package/theme/ap-table/setting/index.css +18 -12
- package/theme/ap-table/setting/modal.css +10 -5
- package/theme/ap-table/setting/modal.less +6 -1
- package/theme/ap-table/setting/select-group.css +3 -3
- package/theme/ap-table/setting/sortable-item-meta.css +5 -5
- package/theme/ap-table/setting/sortable-item-meta.less +2 -2
- package/theme/ap-table/setting/sortable-item.css +3 -3
- package/theme/ap-table/setting/sorter.css +9 -8
- package/theme/ap-table/setting/sorter.less +4 -4
- package/theme/ap-table-modal/index.css +95 -60
- package/theme/ap-table-modal/index.less +15 -13
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag.css +7 -7
- package/theme/ap-tag/ap-tag.less +1 -1
- package/theme/ap-title/ap-title.css +3 -3
- package/theme/ap-upload/index.css +4 -4
- package/theme/ap-upload/multiple-file.css +3 -3
- package/theme/ap-upload/picture.css +3 -3
- package/theme/ap-upload/single-file.css +4 -4
- package/theme/ap-upload/upload.css +3 -3
- package/theme/ap-upload-single/index.css +7 -7
- package/theme/ap-upload-single/index.less +4 -4
- package/theme/ap-view/ap-view.css +10 -10
- package/theme/ap-view/ap-view.less +7 -7
- package/theme/batch-input-group/index.css +5 -5
- package/theme/batch-input-group/popover-input.css +5 -5
- package/theme/batch-input-group/popover-input.less +2 -2
- package/theme/check-card/index.css +11 -11
- package/theme/check-card/index.less +5 -5
- package/theme/editable-table/index.css +43 -27
- package/theme/full-screen/index.css +3 -3
- package/theme/index.css +350 -245
- package/theme/index.less +3 -0
- package/theme/mask/index.css +3 -3
- package/theme/mixins/config.less +3 -3
- package/theme/mixins/mixins.css +3 -3
- package/theme/mixins/mixins.less +2 -2
- package/theme/scroll-bar/index.css +3 -3
- package/theme/scroll-view/index.css +3 -3
- package/theme/splitter/index.css +7 -7
- package/theme/splitter/index.less +1 -1
- package/theme/text/group.css +3 -3
- package/theme/text/index.css +8 -8
- package/theme/text/index.less +4 -4
- package/theme/ui-mode.css +53 -83
- package/theme/ui-mode.less +103 -83
- package/theme/work-order-modal/index.css +3 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { isVNode as
|
|
1
|
+
import { isVNode as _, defineComponent as E, useSlots as K, ref as U, computed as z, unref as n, createVNode as d, Fragment as B, createBlock as w, openBlock as C, resolveDynamicComponent as M, mergeProps as j, createSlots as q, renderList as O, withCtx as x, renderSlot as $, normalizeProps as H, guardReactiveProps as W } from "vue";
|
|
2
2
|
import { Space as G, Tag as J, TreeSelect as Q, Spin as X } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import { isArray as Y, omit as Z } from "lodash-unified";
|
|
5
5
|
import { useRequest as ee } from "./use-request.mjs";
|
|
6
6
|
import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
|
|
7
7
|
function N(r) {
|
|
8
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
8
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !_(r);
|
|
9
9
|
}
|
|
10
|
-
const ie = /* @__PURE__ */
|
|
10
|
+
const ie = /* @__PURE__ */ E({
|
|
11
|
+
name: "ApFieldTreeSelect",
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: {
|
|
13
14
|
mode: {
|
|
@@ -169,10 +170,10 @@ const ie = /* @__PURE__ */ F({
|
|
|
169
170
|
},
|
|
170
171
|
emits: ["update:value"],
|
|
171
172
|
setup(r, {
|
|
172
|
-
expose:
|
|
173
|
-
emit:
|
|
173
|
+
expose: T,
|
|
174
|
+
emit: b
|
|
174
175
|
}) {
|
|
175
|
-
const a = r, D = K(), V =
|
|
176
|
+
const a = r, D = K(), V = b, s = U(), {
|
|
176
177
|
value: c,
|
|
177
178
|
updateValue: k
|
|
178
179
|
} = te(a, V), {
|
|
@@ -180,66 +181,66 @@ const ie = /* @__PURE__ */ F({
|
|
|
180
181
|
loading: y,
|
|
181
182
|
request: h
|
|
182
183
|
} = ee(a), I = z(() => {
|
|
183
|
-
var
|
|
184
|
+
var S, v;
|
|
184
185
|
let e;
|
|
185
|
-
const t =
|
|
186
|
+
const t = n(c), u = Y(t) ? t : [t].filter(Boolean);
|
|
186
187
|
if (!u.length)
|
|
187
|
-
return d(
|
|
188
|
-
const
|
|
188
|
+
return d(B, null, [a.emptyText]);
|
|
189
|
+
const o = [], f = ((S = a.fieldNames) == null ? void 0 : S.label) || "label", L = ((v = a.fieldNames) == null ? void 0 : v.value) || "value";
|
|
189
190
|
function g(l) {
|
|
190
191
|
var i;
|
|
191
192
|
for (const p of l) {
|
|
192
|
-
if (u.find((
|
|
193
|
+
if (u.find((R) => R === p[L]) && o.push(p[f]), o.length === u.length)
|
|
193
194
|
return;
|
|
194
195
|
(i = p.children) != null && i.length && g(p.children);
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
return g(
|
|
198
|
+
return g(n(m)), o.length ? o.length === 1 ? d("span", null, [o[0]]) : d(G, {
|
|
198
199
|
size: 4
|
|
199
|
-
}, N(e =
|
|
200
|
+
}, N(e = o.map((l, i) => d(J, {
|
|
200
201
|
style: "margin-right: 0px",
|
|
201
202
|
key: `${l}-${i}`
|
|
202
203
|
}, N(l) ? l : {
|
|
203
204
|
default: () => [l]
|
|
204
205
|
}))) ? e : {
|
|
205
206
|
default: () => [e]
|
|
206
|
-
}) : d(
|
|
207
|
+
}) : d(B, null, [a.emptyText]);
|
|
207
208
|
});
|
|
208
209
|
function P() {
|
|
209
210
|
var e, t;
|
|
210
211
|
(t = (e = s.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function A() {
|
|
213
214
|
var e, t;
|
|
214
215
|
(t = (e = s.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function F(e) {
|
|
217
218
|
return h(e);
|
|
218
219
|
}
|
|
219
|
-
return
|
|
220
|
+
return T({
|
|
220
221
|
request: h,
|
|
221
222
|
focus: P,
|
|
222
|
-
blur:
|
|
223
|
+
blur: A
|
|
223
224
|
}), (e, t) => e.mode === "read" ? (C(), w(M(I.value), {
|
|
224
225
|
key: 0
|
|
225
|
-
})) : (C(), w(
|
|
226
|
+
})) : (C(), w(n(Q), j({
|
|
226
227
|
key: 1
|
|
227
|
-
},
|
|
228
|
+
}, n(Z)(a, ["onUpdate:value", "value", "treeData", "loadData"]), {
|
|
228
229
|
ref_key: "treeSelectRef",
|
|
229
230
|
ref: s,
|
|
230
|
-
value:
|
|
231
|
-
"tree-data":
|
|
232
|
-
loading:
|
|
233
|
-
"load-data": e.loadData ?
|
|
234
|
-
"onUpdate:value":
|
|
231
|
+
value: n(c),
|
|
232
|
+
"tree-data": n(m),
|
|
233
|
+
loading: n(y),
|
|
234
|
+
"load-data": e.loadData ? F : void 0,
|
|
235
|
+
"onUpdate:value": n(k)
|
|
235
236
|
}), q({
|
|
236
237
|
_: 2
|
|
237
|
-
}, [O(D, (u,
|
|
238
|
-
name:
|
|
239
|
-
fn: x((f) => [$(e.$slots,
|
|
240
|
-
})),
|
|
238
|
+
}, [O(D, (u, o) => ({
|
|
239
|
+
name: o,
|
|
240
|
+
fn: x((f) => [$(e.$slots, o, H(W(f || {})))])
|
|
241
|
+
})), n(y) ? {
|
|
241
242
|
name: "notFoundContent",
|
|
242
|
-
fn: x(() => [d(
|
|
243
|
+
fn: x(() => [d(n(X), {
|
|
243
244
|
size: "small"
|
|
244
245
|
})]),
|
|
245
246
|
key: "0"
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Q, reactive as X, ref as E, unref as
|
|
2
|
-
import { Form as
|
|
1
|
+
import { defineComponent as Q, reactive as X, ref as E, unref as m, nextTick as Y, toRaw as B, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as oe, withCtx as le, renderSlot as ne } from "vue";
|
|
2
|
+
import { Form as se } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useProvideForm as ie } from "./context.mjs";
|
|
4
|
-
import { isArray as f, cloneDeep as ae, isFunction as
|
|
4
|
+
import { isArray as f, cloneDeep as ae, isFunction as M, isPlainObject as _, omit as ue } from "lodash-unified";
|
|
5
5
|
import { useUrlSearchParams as ce } from "@vueuse/core";
|
|
6
6
|
import { INTERNAL_FORM_INSTANCE_MARK as fe } from "./constant.mjs";
|
|
7
7
|
import { getRouteType as de, isDef as V } from "../utils/index.mjs";
|
|
8
8
|
import ge from "./utils/set.mjs";
|
|
9
|
-
import { genParams as b, setToParams as
|
|
10
|
-
import { useInjectFormProvider as
|
|
9
|
+
import { genParams as b, setToParams as x } from "./utils/params.mjs";
|
|
10
|
+
import { useInjectFormProvider as Fe } from "./provider/context.mjs";
|
|
11
11
|
const Re = /* @__PURE__ */ Q({
|
|
12
|
+
name: "ApForm",
|
|
12
13
|
__name: "ap-form",
|
|
13
14
|
props: {
|
|
14
15
|
layout: { default: "horizontal" },
|
|
@@ -40,54 +41,54 @@ const Re = /* @__PURE__ */ Q({
|
|
|
40
41
|
},
|
|
41
42
|
setup(C, { expose: N }) {
|
|
42
43
|
function S(e, t) {
|
|
43
|
-
return f(t) ? t.reduce((r,
|
|
44
|
+
return f(t) ? t.reduce((r, l) => r == null ? void 0 : r[l], e) : e == null ? void 0 : e[t];
|
|
44
45
|
}
|
|
45
|
-
const
|
|
46
|
-
function v(e, t, r = !0,
|
|
47
|
-
var
|
|
46
|
+
const o = C;
|
|
47
|
+
function v(e, t, r = !0, l) {
|
|
48
|
+
var n;
|
|
48
49
|
if (f(e)) {
|
|
49
|
-
let a =
|
|
50
|
+
let a = s;
|
|
50
51
|
for (let d = 0; d < e.length - 1; d++)
|
|
51
52
|
e[d] in a || (a[e[d]] = {}), a = a[e[d]];
|
|
52
|
-
|
|
53
|
+
l ? l(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
|
|
53
54
|
} else
|
|
54
|
-
|
|
55
|
+
l ? l(s, e) : s[e] = t;
|
|
55
56
|
let i = f(e) ? e[0] : e;
|
|
56
57
|
if (r) {
|
|
57
|
-
const a = { [i]:
|
|
58
|
-
|
|
58
|
+
const a = { [i]: s[i] };
|
|
59
|
+
p.triggerFormChange(o.name, a), (n = o.onValuesChange) == null || n.call(o, a, s, e);
|
|
59
60
|
}
|
|
60
61
|
T();
|
|
61
62
|
}
|
|
62
|
-
const u = E(),
|
|
63
|
-
|
|
63
|
+
const u = E(), U = ce(de()), p = Fe(), P = E(
|
|
64
|
+
o.syncToUrl ? b(o.syncToUrl, U, "get") : {}
|
|
64
65
|
);
|
|
65
|
-
let
|
|
66
|
-
const
|
|
67
|
-
let
|
|
66
|
+
let y = ae(w()), g = {};
|
|
67
|
+
const s = X(w());
|
|
68
|
+
let F = [];
|
|
68
69
|
function w() {
|
|
69
|
-
const e =
|
|
70
|
-
return
|
|
70
|
+
const e = o.initialValues || {};
|
|
71
|
+
return o.syncToUrlPriority ? {
|
|
71
72
|
...e,
|
|
72
|
-
...
|
|
73
|
+
...m(P)
|
|
73
74
|
} : {
|
|
74
|
-
...
|
|
75
|
+
...m(P),
|
|
75
76
|
...e
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
function W(e) {
|
|
79
80
|
var r;
|
|
80
|
-
const t =
|
|
81
|
-
|
|
81
|
+
const t = h(e, g);
|
|
82
|
+
p.triggerFormFinish(o.name, e), o.syncToUrl && x(U, b(o.syncToUrl, t, "set")), (r = o.onFinish) == null || r.call(o, t);
|
|
82
83
|
}
|
|
83
84
|
const q = async () => {
|
|
84
85
|
var e;
|
|
85
86
|
(e = u.value) == null || e.resetFields(), await Y(() => {
|
|
86
|
-
Object.keys(
|
|
87
|
-
|
|
87
|
+
Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, y), T(), o.syncToUrl && x(
|
|
88
|
+
U,
|
|
88
89
|
b(
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
o.syncToUrl,
|
|
91
|
+
h(y, g),
|
|
91
92
|
"set"
|
|
92
93
|
)
|
|
93
94
|
);
|
|
@@ -99,18 +100,18 @@ const Re = /* @__PURE__ */ Q({
|
|
|
99
100
|
var r;
|
|
100
101
|
return (r = u.value) == null ? void 0 : r.validateFields(e, t);
|
|
101
102
|
}, K = async (e, t) => {
|
|
102
|
-
var
|
|
103
|
-
const r = await ((
|
|
103
|
+
var l;
|
|
104
|
+
const r = await ((l = u.value) == null ? void 0 : l.validateFields(
|
|
104
105
|
e,
|
|
105
106
|
t
|
|
106
107
|
));
|
|
107
|
-
return
|
|
108
|
+
return h(r, g);
|
|
108
109
|
}, O = (e) => {
|
|
109
110
|
var t;
|
|
110
|
-
return e === !0 ?
|
|
111
|
+
return e === !0 ? B(s) : (t = u.value) == null ? void 0 : t.getFieldsValue(e);
|
|
111
112
|
}, L = (e) => {
|
|
112
113
|
const t = O(e);
|
|
113
|
-
return
|
|
114
|
+
return h(t, g);
|
|
114
115
|
}, $ = (e, t) => {
|
|
115
116
|
var r;
|
|
116
117
|
return (r = u.value) == null ? void 0 : r.validate(e, t);
|
|
@@ -118,26 +119,26 @@ const Re = /* @__PURE__ */ Q({
|
|
|
118
119
|
var r;
|
|
119
120
|
(r = u.value) == null || r.scrollToField(e, t);
|
|
120
121
|
}, H = (e) => {
|
|
121
|
-
Object.assign(
|
|
122
|
-
},
|
|
123
|
-
v(e, t, r,
|
|
122
|
+
Object.assign(s, e), T();
|
|
123
|
+
}, I = (e, t, r = !0, l) => {
|
|
124
|
+
v(e, t, r, l), T();
|
|
124
125
|
};
|
|
125
126
|
function R(e, t) {
|
|
126
|
-
return t || e(
|
|
127
|
-
|
|
127
|
+
return t || e(B(s)), F.push(e), () => {
|
|
128
|
+
F = F.filter((r) => r !== e);
|
|
128
129
|
};
|
|
129
130
|
}
|
|
130
131
|
function j({ initialValue: e, name: t, transform: r }) {
|
|
131
132
|
if (V(e) && V(t)) {
|
|
132
|
-
const
|
|
133
|
-
if (!V(
|
|
133
|
+
const l = S(m(P), t);
|
|
134
|
+
if (!V(l) || !o.syncToUrlPriority)
|
|
134
135
|
if (v(t, e, !1), f(t)) {
|
|
135
|
-
let i =
|
|
136
|
-
for (let
|
|
137
|
-
V(i[t[
|
|
136
|
+
let i = y;
|
|
137
|
+
for (let n = 0; n < t.length - 1; n++)
|
|
138
|
+
V(i[t[n]]) || (i[t[n]] = {}), i = i[t[n]];
|
|
138
139
|
i[t[t.length - 1]] = e;
|
|
139
140
|
} else
|
|
140
|
-
|
|
141
|
+
y[t] = e;
|
|
141
142
|
}
|
|
142
143
|
r && (g = ge(
|
|
143
144
|
g,
|
|
@@ -154,40 +155,40 @@ const Re = /* @__PURE__ */ Q({
|
|
|
154
155
|
return {
|
|
155
156
|
registerField: j,
|
|
156
157
|
registerWatch: R,
|
|
157
|
-
setFieldValue:
|
|
158
|
+
setFieldValue: I
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
function T() {
|
|
161
|
-
if (
|
|
162
|
-
const e =
|
|
163
|
-
|
|
162
|
+
if (F.length) {
|
|
163
|
+
const e = B(s);
|
|
164
|
+
F.forEach((t) => {
|
|
164
165
|
t(e);
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
+
function h(e, t) {
|
|
169
170
|
if (e == null)
|
|
170
171
|
return;
|
|
171
172
|
let r = f(e) ? [] : {};
|
|
172
|
-
return Object.keys(e).forEach((
|
|
173
|
-
const i = e[
|
|
174
|
-
if (
|
|
173
|
+
return Object.keys(e).forEach((l) => {
|
|
174
|
+
const i = e[l], n = t == null ? void 0 : t[l], a = M(n) ? n : n == null ? void 0 : n.transformer, d = M(n) ? !0 : n == null ? void 0 : n.flat;
|
|
175
|
+
if (M(a)) {
|
|
175
176
|
const c = a(i);
|
|
176
|
-
d ? f(c) && f(r) ? r = [...r, ...c] :
|
|
177
|
+
d ? f(c) && f(r) ? r = [...r, ...c] : _(c) && _(r) ? r = {
|
|
177
178
|
...r,
|
|
178
179
|
...c
|
|
179
|
-
} : r[
|
|
180
|
-
} else if (
|
|
181
|
-
const c =
|
|
180
|
+
} : r[l] = c : r[l] = c;
|
|
181
|
+
} else if (_(i) || f(i)) {
|
|
182
|
+
const c = h(
|
|
182
183
|
i,
|
|
183
|
-
|
|
184
|
+
n
|
|
184
185
|
);
|
|
185
|
-
r[
|
|
186
|
+
r[l] = c;
|
|
186
187
|
} else
|
|
187
|
-
r[
|
|
188
|
+
r[l] = i;
|
|
188
189
|
}), r;
|
|
189
190
|
}
|
|
190
|
-
const
|
|
191
|
+
const A = {
|
|
191
192
|
resetFields: q,
|
|
192
193
|
clearValidate: D,
|
|
193
194
|
validateFields: k,
|
|
@@ -195,42 +196,53 @@ const Re = /* @__PURE__ */ Q({
|
|
|
195
196
|
validate: $,
|
|
196
197
|
scrollToField: G,
|
|
197
198
|
setFieldsValue: H,
|
|
198
|
-
setFieldValue:
|
|
199
|
+
setFieldValue: I,
|
|
199
200
|
registerWatch: R,
|
|
200
201
|
validateFieldsReturnTransformed: K,
|
|
201
202
|
getFieldsValueTransformed: L,
|
|
202
203
|
getInternalInstance: J
|
|
203
204
|
};
|
|
204
205
|
return Z(
|
|
205
|
-
() =>
|
|
206
|
+
() => o.name,
|
|
206
207
|
(e) => {
|
|
207
|
-
e && (
|
|
208
|
-
|
|
208
|
+
e && (p.registerForm(e, A), z(() => {
|
|
209
|
+
p.unregisterForm(o.name);
|
|
209
210
|
}));
|
|
210
211
|
},
|
|
211
212
|
{
|
|
212
213
|
immediate: !0
|
|
213
214
|
}
|
|
214
215
|
), ie({
|
|
215
|
-
model: ee(() =>
|
|
216
|
+
model: ee(() => s),
|
|
216
217
|
updateModel: v,
|
|
217
218
|
internalInstance: {
|
|
218
219
|
registerWatch: R,
|
|
219
220
|
registerField: j,
|
|
220
|
-
setFieldValue:
|
|
221
|
+
setFieldValue: I
|
|
221
222
|
}
|
|
222
|
-
}), N(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
223
|
+
}), N(A), (e, t) => (re(), te(m(se), oe(
|
|
224
|
+
{
|
|
225
|
+
ref_key: "formRef",
|
|
226
|
+
ref: u
|
|
227
|
+
},
|
|
228
|
+
m(ue)(o, [
|
|
229
|
+
"initialValues",
|
|
230
|
+
"onValuesChange",
|
|
231
|
+
"onFinish",
|
|
232
|
+
"syncToUrl",
|
|
233
|
+
"syncToUrlPriority"
|
|
234
|
+
]),
|
|
235
|
+
{
|
|
236
|
+
model: s,
|
|
237
|
+
"data-form-name": e.name,
|
|
238
|
+
onFinish: W
|
|
239
|
+
}
|
|
240
|
+
), {
|
|
241
|
+
default: le(() => [
|
|
242
|
+
ne(e.$slots, "default")
|
|
231
243
|
]),
|
|
232
244
|
_: 3
|
|
233
|
-
}, 16, ["model"]));
|
|
245
|
+
}, 16, ["model", "data-form-name"]));
|
|
234
246
|
}
|
|
235
247
|
});
|
|
236
248
|
export {
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, ref as y, watchEffect as _, unref as d, renderSlot as g } from "vue";
|
|
2
2
|
import { useInjectForm as h } from "../context.mjs";
|
|
3
|
-
import { isArray as V, isNumber as
|
|
4
|
-
const
|
|
3
|
+
import { isArray as V, isNumber as x, cloneDeep as b } from "lodash-unified";
|
|
4
|
+
const F = /* @__PURE__ */ m({
|
|
5
|
+
name: "ApFormDependency",
|
|
5
6
|
__name: "index",
|
|
6
7
|
props: {
|
|
7
8
|
nameList: {}
|
|
8
9
|
},
|
|
9
|
-
setup(
|
|
10
|
-
function
|
|
11
|
-
return V(
|
|
10
|
+
setup(c) {
|
|
11
|
+
function f(e, n) {
|
|
12
|
+
return V(n) ? n.reduce((o, t) => o == null ? void 0 : o[t], e) : e == null ? void 0 : e[n];
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
-
model:
|
|
15
|
-
} = h(),
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
|
|
14
|
+
const a = c, {
|
|
15
|
+
model: l
|
|
16
|
+
} = h(), u = y({});
|
|
17
|
+
function i(e, n, o) {
|
|
18
|
+
let t = n;
|
|
19
|
+
for (let s = 0; s < e.length; s++) {
|
|
20
|
+
const r = e[s];
|
|
21
|
+
if (s === e.length - 1)
|
|
22
|
+
t[r] = o;
|
|
23
|
+
else {
|
|
24
|
+
const p = e[s + 1];
|
|
25
|
+
(typeof t[r] != "object" || t[r] === null) && (t[r] = x(p) ? [] : {}), t = t[r];
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
|
-
return
|
|
24
|
-
const
|
|
25
|
-
for (const
|
|
26
|
-
const o = [
|
|
27
|
-
|
|
29
|
+
return _(() => {
|
|
30
|
+
const e = b(u.value);
|
|
31
|
+
for (const n of a.nameList) {
|
|
32
|
+
const o = [n].flat(1), t = f(d(l), o);
|
|
33
|
+
i(o, e, t);
|
|
28
34
|
}
|
|
29
|
-
|
|
30
|
-
}), (
|
|
31
|
-
values:
|
|
35
|
+
u.value = e;
|
|
36
|
+
}), (e, n) => g(e.$slots, "default", {
|
|
37
|
+
values: u.value
|
|
32
38
|
});
|
|
33
39
|
}
|
|
34
40
|
});
|
|
35
41
|
export {
|
|
36
|
-
|
|
42
|
+
F as default
|
|
37
43
|
};
|
|
@@ -818,7 +818,7 @@ declare function __VLS_template(): {
|
|
|
818
818
|
hideRequiredMark: boolean;
|
|
819
819
|
validateOnRuleChange: boolean;
|
|
820
820
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
821
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "
|
|
821
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
822
822
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
823
823
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
824
824
|
resetFields: () => Promise<void>;
|
|
@@ -841,15 +841,17 @@ declare function __VLS_template(): {
|
|
|
841
841
|
};
|
|
842
842
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
843
843
|
declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
844
|
-
|
|
844
|
+
validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
845
|
+
setFieldsValue: (fields: Partial<any>) => void;
|
|
846
|
+
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
847
|
+
resetFields: () => Promise<void>;
|
|
845
848
|
clearValidate: (name?: NamePath) => void;
|
|
846
849
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
847
850
|
getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
|
|
848
|
-
|
|
849
|
-
scrollToField: (name: NamePath, options?: {}) => void;
|
|
850
|
-
setFieldValue: (key: string, newValue: any) => void;
|
|
851
|
-
setFieldsValue: (values: Record<string, any>) => void;
|
|
851
|
+
scrollToField: (name: NamePath, options?: any) => void;
|
|
852
852
|
getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
|
|
853
|
+
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
854
|
+
getFieldsValueTransformed: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
|
|
853
855
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
854
856
|
"update:open": (...args: any[]) => void;
|
|
855
857
|
}, string, PublicProps, Readonly<ApFormDrawerFormProps> & Readonly<{
|
|
@@ -963,6 +965,10 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
|
963
965
|
'onUpdate:visible': PropType<(visible: boolean) => void>;
|
|
964
966
|
'onUpdate:open': PropType<(open: boolean) => void>;
|
|
965
967
|
onClose: PropType< MouseEventHandler | KeyboardEventHandler>;
|
|
968
|
+
animate: {
|
|
969
|
+
type: BooleanConstructor;
|
|
970
|
+
default: boolean;
|
|
971
|
+
};
|
|
966
972
|
}>>, "open" | "onUpdate:open">;
|
|
967
973
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
968
974
|
formRef: ({
|
|
@@ -1760,7 +1766,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
|
1760
1766
|
hideRequiredMark: boolean;
|
|
1761
1767
|
validateOnRuleChange: boolean;
|
|
1762
1768
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
1763
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "
|
|
1769
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
1764
1770
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
1765
1771
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
1766
1772
|
resetFields: () => Promise<void>;
|