@aplus-frontend/ui 0.0.1-beta.9 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +196 -138
- package/es/src/ap-action/group/index.vue.mjs +35 -27
- package/es/src/ap-action/interface.d.ts +2 -1
- package/es/src/ap-action/item/index.vue2.mjs +19 -19
- package/es/src/ap-action/item-dropdown/index.vue.mjs +34 -34
- package/es/src/ap-action/style/item.css +6 -1
- package/es/src/ap-custom-column/column-select.vue.d.ts +18 -0
- package/es/src/ap-custom-column/column-select.vue.mjs +102 -0
- package/es/src/ap-custom-column/column-select.vue2.mjs +4 -0
- package/es/src/ap-custom-column/custom-column.vue.d.ts +18 -0
- package/es/src/ap-custom-column/custom-column.vue.mjs +86 -0
- package/es/src/ap-custom-column/custom-column.vue2.mjs +4 -0
- package/es/src/ap-custom-column/index.d.ts +7 -0
- package/es/src/ap-custom-column/index.mjs +9 -0
- package/es/src/ap-custom-column/interfaces.d.ts +41 -0
- package/es/src/ap-custom-column/interfaces.mjs +1 -0
- package/es/src/ap-custom-column/storage.d.ts +8 -0
- package/es/src/ap-custom-column/storage.mjs +29 -0
- package/es/src/ap-custom-column/styles/column-select.css +44 -0
- package/es/src/ap-custom-column/styles/custom-column.css +46 -0
- package/es/src/ap-custom-column/useCacheColumnSetting.d.ts +10 -0
- package/es/src/ap-custom-column/useCacheColumnSetting.mjs +9 -0
- package/es/src/ap-custom-column/utils.d.ts +3 -0
- package/es/src/ap-custom-column/utils.mjs +17 -0
- package/es/src/ap-download/ap-download.vue.d.ts +41 -0
- package/es/src/ap-download/ap-download.vue.mjs +56 -0
- package/es/src/ap-download/ap-download.vue2.mjs +4 -0
- package/es/src/ap-download/hooks/index.d.ts +9 -0
- package/es/src/ap-download/hooks/index.mjs +20 -0
- package/es/src/ap-download/index.d.ts +4 -0
- package/es/src/ap-download/index.mjs +2 -0
- package/es/src/ap-download/interface.d.ts +33 -0
- package/es/src/ap-download/interface.mjs +1 -0
- package/es/src/ap-download/style/ap-download.css +51 -0
- package/es/src/ap-field/checkbox/index.vue.mjs +16 -16
- package/es/src/ap-field/date/index.vue.d.ts +63 -5
- package/es/src/ap-field/date/index.vue.mjs +115 -46
- package/es/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/es/src/ap-field/date-range/index.vue.mjs +137 -58
- package/es/src/ap-field/interface.d.ts +4 -8
- package/es/src/ap-field/number/index.vue.mjs +8 -8
- package/es/src/ap-field/radio/index.vue.mjs +6 -6
- package/es/src/ap-field/select/index.vue.d.ts +45 -179
- package/es/src/ap-field/select/index.vue.mjs +137 -66
- package/es/src/ap-field/switch/index.vue.d.ts +2 -2
- package/es/src/ap-field/switch/index.vue.mjs +31 -31
- package/es/src/ap-field/text/index.vue.d.ts +4 -1
- package/es/src/ap-field/text/index.vue.mjs +11 -10
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +8 -8
- package/es/src/ap-form/ap-form-item-group/helper.d.ts +10 -0
- package/es/src/ap-form/ap-form-item-group/helper.mjs +30 -11
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +60 -2
- package/es/src/ap-form/ap-form-item-group/index.vue2.mjs +2 -56
- package/es/src/ap-form/ap-form-item.vue.d.ts +23 -5
- package/es/src/ap-form/ap-form-item.vue.mjs +149 -2
- package/es/src/ap-form/ap-form-item.vue2.mjs +2 -80
- package/es/src/ap-form/ap-form-list.vue.d.ts +35 -0
- package/es/src/ap-form/ap-form-list.vue.mjs +41 -0
- package/es/src/ap-form/ap-form-list.vue2.mjs +4 -0
- package/es/src/ap-form/ap-form.vue.d.ts +66 -0
- package/es/src/ap-form/ap-form.vue.mjs +4 -0
- package/es/src/ap-form/ap-form.vue2.mjs +89 -0
- package/es/src/ap-form/context.d.ts +11 -0
- package/es/src/ap-form/context.mjs +17 -0
- package/es/src/ap-form/index.d.ts +15 -939
- package/es/src/ap-form/index.mjs +24 -11
- package/es/src/ap-form/interface.d.ts +62 -1
- package/es/src/ap-form/interface.mjs +1 -0
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +47 -0
- package/es/src/ap-form/items/checkbox/index.vue.mjs +61 -0
- package/es/src/ap-form/items/checkbox/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/date/index.vue.d.ts +65 -0
- package/es/src/ap-form/items/date/index.vue.mjs +78 -0
- package/es/src/ap-form/items/date/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/date-range/index.vue.d.ts +64 -0
- package/es/src/ap-form/items/date-range/index.vue.mjs +78 -0
- package/es/src/ap-form/items/date-range/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/index.d.ts +9 -1
- package/es/src/ap-form/items/index.mjs +8 -0
- package/es/src/ap-form/items/interface.d.ts +39 -6
- package/es/src/ap-form/items/number/index.vue.d.ts +63 -0
- package/es/src/ap-form/items/number/index.vue.mjs +84 -0
- package/es/src/ap-form/items/number/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/radio/index.vue.d.ts +50 -0
- package/es/src/ap-form/items/radio/index.vue.mjs +74 -0
- package/es/src/ap-form/items/radio/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/select/index.vue.d.ts +69 -0
- package/es/src/ap-form/items/select/index.vue.mjs +89 -0
- package/es/src/ap-form/items/select/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/switch/index.vue.d.ts +60 -0
- package/es/src/ap-form/items/switch/index.vue.mjs +68 -0
- package/es/src/ap-form/items/switch/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/text/index.vue.d.ts +0 -3
- package/es/src/ap-form/items/text/index.vue.mjs +24 -31
- package/es/src/ap-form/items/text-area/index.vue.d.ts +52 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +79 -0
- package/es/src/ap-form/items/text-area/index.vue2.mjs +4 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +378 -0
- package/es/src/ap-form/modal-form/index.vue.mjs +239 -0
- package/es/src/ap-form/modal-form/index.vue2.mjs +4 -0
- package/es/src/ap-form/search-form/index.vue.d.ts +79 -0
- package/es/src/ap-form/search-form/index.vue.mjs +209 -0
- package/es/src/ap-form/search-form/index.vue2.mjs +4 -0
- package/es/src/ap-form/style/ap-form-item.css +46 -0
- package/es/src/ap-form/style/modal-form.css +17 -0
- package/es/src/ap-form/style/search-form.css +3 -0
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +42 -0
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs +62 -0
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +4 -0
- package/es/src/ap-layout/index.d.ts +3 -0
- package/es/src/ap-layout/index.mjs +1 -0
- package/es/src/ap-layout/interface.d.ts +4 -0
- package/es/src/ap-layout/style/ap-info-layout.css +19 -0
- package/es/src/ap-table/ap-table.vue.d.ts +193 -0
- package/es/src/ap-table/ap-table.vue.mjs +277 -0
- package/es/src/ap-table/ap-table.vue2.mjs +4 -0
- package/es/src/ap-table/components/index/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/index/index.vue.mjs +4 -0
- package/es/src/ap-table/components/index/index.vue2.mjs +21 -0
- package/es/src/ap-table/components/interface.d.ts +20 -0
- package/es/src/ap-table/components/style/index.css +12 -0
- package/es/src/ap-table/components/style/pagination.css +12 -0
- package/es/src/ap-table/constants.d.ts +12340 -0
- package/es/src/ap-table/constants.mjs +55 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +82 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +142 -0
- package/es/src/ap-table/index.d.ts +5 -0
- package/es/src/ap-table/index.mjs +6 -0
- package/es/src/ap-table/interface.d.ts +180 -0
- package/es/src/ap-table/interface.mjs +1 -0
- package/es/src/ap-table/style/ap-table.css +46 -0
- package/es/src/ap-table/utils.d.ts +32 -0
- package/es/src/ap-table/utils.mjs +63 -0
- package/es/src/ap-tag/ap-tag-group.vue.d.ts +34 -0
- package/es/src/ap-tag/ap-tag-group.vue.mjs +137 -0
- package/es/src/ap-tag/ap-tag-group.vue2.mjs +4 -0
- package/es/src/ap-tag/ap-tag.vue.d.ts +34 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +41 -0
- package/es/src/ap-tag/ap-tag.vue2.mjs +4 -0
- package/es/src/ap-tag/index.d.ts +5 -0
- package/es/src/ap-tag/index.mjs +3 -0
- package/es/src/ap-tag/interface.d.ts +35 -0
- package/es/src/ap-tag/interface.mjs +1 -0
- package/es/src/ap-tag/style/ap-tag-group.css +6 -0
- package/es/src/ap-tag/style/ap-tag.css +40 -0
- package/es/src/ap-upload/apUpload.vue.d.ts +111 -0
- package/es/src/ap-upload/apUpload.vue.mjs +95 -0
- package/es/src/ap-upload/apUpload.vue2.mjs +4 -0
- package/es/src/ap-upload/apUploadTypes.d.ts +90 -0
- package/es/src/ap-upload/apUploadTypes.mjs +4 -0
- package/es/src/ap-upload/assets/single-file-icon.png.mjs +4 -0
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +4 -0
- package/es/src/ap-upload/components/MultipleFile.vue.mjs +4 -0
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +197 -0
- package/es/src/ap-upload/components/Picture.vue.d.ts +4 -0
- package/es/src/ap-upload/components/Picture.vue.mjs +4 -0
- package/es/src/ap-upload/components/Picture.vue2.mjs +219 -0
- package/es/src/ap-upload/components/SingleFile.vue.d.ts +4 -0
- package/es/src/ap-upload/components/SingleFile.vue.mjs +4 -0
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +213 -0
- package/es/src/ap-upload/hooks/useOss.d.ts +19 -0
- package/es/src/ap-upload/hooks/useOss.mjs +62 -0
- package/es/src/ap-upload/index.d.ts +5 -0
- package/es/src/ap-upload/index.mjs +11 -0
- package/es/src/ap-upload/styles/multiple-file.css +58 -0
- package/es/src/ap-upload/styles/picture.css +112 -0
- package/es/src/ap-upload/styles/single-file.css +98 -0
- package/es/src/ap-upload/styles/upload.css +6 -0
- package/es/src/ap-upload/utils/accept.d.ts +13 -0
- package/es/src/ap-upload/utils/accept.mjs +51 -0
- package/es/src/ap-upload/utils/returnData.d.ts +19 -0
- package/es/src/ap-upload/utils/returnData.mjs +21 -0
- package/es/src/basic/help.vue.d.ts +4 -4
- package/es/src/basic/index.d.ts +8 -8
- package/es/src/components.d.ts +2 -0
- package/es/src/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider.d.ts +11 -11
- package/es/src/config-provider/config-provider.mjs +26 -33
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/es/src/config-provider/index.d.ts +31 -31
- package/es/src/design-token/index.mjs +8 -2
- package/es/src/hooks/useControllableValue.mjs +11 -14
- package/es/src/icon-picker/icon-picker.vue.d.ts +1 -1
- package/es/src/icon-picker/index.d.ts +15 -15
- package/es/src/index.d.ts +7 -0
- package/es/src/index.mjs +226 -161
- package/es/src/locale/lang/en.mjs +14 -1
- package/es/src/locale/lang/zh-cn.mjs +14 -1
- package/es/src/modal/basic.vue.d.ts +1 -2
- package/es/src/modal/basic.vue2.mjs +10 -11
- package/es/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/es/src/modal/index.d.ts +2 -2
- package/es/src/modal/style/index.css +0 -103
- package/es/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/es/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/es/src/pro-form/hooks/use-label-width.d.ts +3 -3
- package/es/src/pro-form/index.d.ts +4 -1
- package/es/src/pro-form/index.mjs +12 -9
- package/es/src/pro-form/pro-form.vue.d.ts +1 -1
- package/es/src/pro-form/style/index.css +0 -3
- package/es/src/pro-form/style/table-form.css +104 -0
- package/es/src/pro-form/table-form-inner.vue.d.ts +44 -0
- package/es/src/pro-form/table-form-inner.vue.mjs +176 -0
- package/es/src/pro-form/table-form-inner.vue2.mjs +4 -0
- package/es/src/pro-form/table-form.vue.d.ts +42 -0
- package/es/src/pro-form/table-form.vue.mjs +41 -0
- package/es/src/pro-form/table-form.vue2.mjs +4 -0
- package/es/src/pro-form/types/form.d.ts +1 -1
- package/es/src/pro-form/types/table-form.d.ts +37 -0
- package/es/src/pro-form/types/table-form.mjs +1 -0
- package/es/src/pro-table/hooks/use-data-source.mjs +45 -46
- package/es/src/prompt/utils.d.ts +1 -1
- package/es/src/scroll-bar/index.d.ts +12 -12
- package/es/src/theme/antd-global-overwrite/admin/alert.css +47 -0
- package/es/src/theme/antd-global-overwrite/admin/button.css +27 -0
- package/es/src/theme/antd-global-overwrite/admin/form.css +65 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +525 -0
- package/es/src/theme/antd-global-overwrite/admin/message.css +17 -0
- package/es/src/theme/antd-global-overwrite/admin/modal.css +117 -0
- package/es/src/theme/antd-global-overwrite/admin/pagination.css +68 -0
- package/es/src/theme/antd-global-overwrite/admin/steps.css +103 -0
- package/es/src/theme/antd-global-overwrite/admin/table.css +81 -0
- package/es/src/theme/antd-global-overwrite/aplus/alert.css +47 -0
- package/es/src/theme/antd-global-overwrite/aplus/button.css +27 -0
- package/es/src/theme/antd-global-overwrite/aplus/form.css +90 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +554 -0
- package/es/src/theme/antd-global-overwrite/aplus/message.css +17 -0
- package/es/src/theme/antd-global-overwrite/aplus/modal.css +111 -0
- package/es/src/theme/antd-global-overwrite/aplus/pagination.css +81 -0
- package/es/src/theme/antd-global-overwrite/aplus/steps.css +103 -0
- package/es/src/theme/antd-global-overwrite/aplus/table.css +78 -0
- package/es/src/theme/ap-action/item.css +6 -1
- package/es/src/theme/ap-download/ap-download.css +51 -0
- package/es/src/theme/ap-form/ap-form-item.css +46 -0
- package/es/src/theme/ap-form/modal-form.css +17 -0
- package/es/src/theme/ap-form/search-form.css +3 -0
- package/es/src/theme/ap-layout/ap-info-layout.css +19 -0
- package/es/src/theme/ap-table/ap-table-index.css +12 -0
- package/es/src/theme/ap-table/ap-table-pagination.css +12 -0
- package/es/src/theme/ap-table/ap-table.css +46 -0
- package/es/src/theme/ap-tag/ap-tag-group.css +6 -0
- package/es/src/theme/ap-tag/ap-tag.css +40 -0
- package/es/src/theme/ap-upload/multiple-file.css +58 -0
- package/es/src/theme/ap-upload/picture.css +112 -0
- package/es/src/theme/ap-upload/single-file.css +98 -0
- package/es/src/theme/ap-upload/upload.css +6 -0
- package/es/src/theme/custom-column/column-select.css +44 -0
- package/es/src/theme/custom-column/custom-column.css +46 -0
- package/es/src/theme/modal/index.css +0 -103
- package/es/src/theme/pro-form/form.css +0 -3
- package/es/src/theme/pro-form/table-form-inner.css +104 -0
- package/es/src/theme/work-order-modal/index.css +3 -0
- package/es/src/utils/config-provider-preset.d.ts +79 -0
- package/es/src/utils/config-provider-preset.mjs +30 -0
- package/es/src/utils/index.d.ts +16 -0
- package/es/src/utils/index.mjs +40 -20
- package/es/src/utils/slot.d.ts +7 -1
- package/es/src/utils/slot.mjs +25 -15
- package/es/src/work-order-modal/createWorkOrder.d.ts +1 -0
- package/es/src/work-order-modal/createWorkOrder.mjs +19 -0
- package/es/src/work-order-modal/help-message.vue.d.ts +3 -0
- package/es/src/work-order-modal/help-message.vue.mjs +4 -0
- package/es/src/work-order-modal/help-message.vue2.mjs +33 -0
- package/es/src/work-order-modal/index.d.ts +5 -0
- package/es/src/work-order-modal/index.mjs +7 -0
- package/es/src/work-order-modal/interfaces.d.ts +23 -0
- package/es/src/work-order-modal/interfaces.mjs +4 -0
- package/es/src/work-order-modal/style/index.css +3 -0
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +18 -0
- package/es/src/work-order-modal/work-order-modal.vue.mjs +180 -0
- package/es/src/work-order-modal/work-order-modal.vue2.mjs +4 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/interface.d.ts +2 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/item.css +6 -1
- package/lib/src/ap-custom-column/column-select.vue.d.ts +18 -0
- package/lib/src/ap-custom-column/column-select.vue.js +1 -0
- package/lib/src/ap-custom-column/column-select.vue2.js +1 -0
- package/lib/src/ap-custom-column/custom-column.vue.d.ts +18 -0
- package/lib/src/ap-custom-column/custom-column.vue.js +1 -0
- package/lib/src/ap-custom-column/custom-column.vue2.js +1 -0
- package/lib/src/ap-custom-column/index.d.ts +7 -0
- package/lib/src/ap-custom-column/index.js +1 -0
- package/lib/src/ap-custom-column/interfaces.d.ts +41 -0
- package/lib/src/ap-custom-column/interfaces.js +1 -0
- package/lib/src/ap-custom-column/storage.d.ts +8 -0
- package/lib/src/ap-custom-column/storage.js +1 -0
- package/lib/src/ap-custom-column/styles/column-select.css +44 -0
- package/lib/src/ap-custom-column/styles/custom-column.css +46 -0
- package/lib/src/ap-custom-column/useCacheColumnSetting.d.ts +10 -0
- package/lib/src/ap-custom-column/useCacheColumnSetting.js +1 -0
- package/lib/src/ap-custom-column/utils.d.ts +3 -0
- package/lib/src/ap-custom-column/utils.js +1 -0
- package/lib/src/ap-download/ap-download.vue.d.ts +41 -0
- package/lib/src/ap-download/ap-download.vue.js +1 -0
- package/lib/src/ap-download/ap-download.vue2.js +1 -0
- package/lib/src/ap-download/hooks/index.d.ts +9 -0
- package/lib/src/ap-download/hooks/index.js +1 -0
- package/lib/src/ap-download/index.d.ts +4 -0
- package/lib/src/ap-download/index.js +1 -0
- package/lib/src/ap-download/interface.d.ts +33 -0
- package/lib/src/ap-download/interface.js +1 -0
- package/lib/src/ap-download/style/ap-download.css +51 -0
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +63 -5
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +4 -8
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +45 -179
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +2 -2
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +4 -1
- package/lib/src/ap-field/text/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/helper.d.ts +10 -0
- package/lib/src/ap-form/ap-form-item-group/helper.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue2.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +23 -5
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue2.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.d.ts +35 -0
- package/lib/src/ap-form/ap-form-list.vue.js +1 -0
- package/lib/src/ap-form/ap-form-list.vue2.js +1 -0
- package/lib/src/ap-form/ap-form.vue.d.ts +66 -0
- package/lib/src/ap-form/ap-form.vue.js +1 -0
- package/lib/src/ap-form/ap-form.vue2.js +1 -0
- package/lib/src/ap-form/context.d.ts +11 -0
- package/lib/src/ap-form/context.js +1 -0
- package/lib/src/ap-form/index.d.ts +15 -939
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +62 -1
- package/lib/src/ap-form/interface.js +1 -0
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +47 -0
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -0
- package/lib/src/ap-form/items/checkbox/index.vue2.js +1 -0
- package/lib/src/ap-form/items/date/index.vue.d.ts +65 -0
- package/lib/src/ap-form/items/date/index.vue.js +1 -0
- package/lib/src/ap-form/items/date/index.vue2.js +1 -0
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +64 -0
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -0
- package/lib/src/ap-form/items/date-range/index.vue2.js +1 -0
- package/lib/src/ap-form/items/index.d.ts +9 -1
- package/lib/src/ap-form/items/index.js +1 -1
- package/lib/src/ap-form/items/interface.d.ts +39 -6
- package/lib/src/ap-form/items/number/index.vue.d.ts +63 -0
- package/lib/src/ap-form/items/number/index.vue.js +1 -0
- package/lib/src/ap-form/items/number/index.vue2.js +1 -0
- package/lib/src/ap-form/items/radio/index.vue.d.ts +50 -0
- package/lib/src/ap-form/items/radio/index.vue.js +1 -0
- package/lib/src/ap-form/items/radio/index.vue2.js +1 -0
- package/lib/src/ap-form/items/select/index.vue.d.ts +69 -0
- package/lib/src/ap-form/items/select/index.vue.js +1 -0
- package/lib/src/ap-form/items/select/index.vue2.js +1 -0
- package/lib/src/ap-form/items/switch/index.vue.d.ts +60 -0
- package/lib/src/ap-form/items/switch/index.vue.js +1 -0
- package/lib/src/ap-form/items/switch/index.vue2.js +1 -0
- package/lib/src/ap-form/items/text/index.vue.d.ts +0 -3
- package/lib/src/ap-form/items/text/index.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +52 -0
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -0
- package/lib/src/ap-form/items/text-area/index.vue2.js +1 -0
- package/lib/src/ap-form/modal-form/index.vue.d.ts +378 -0
- package/lib/src/ap-form/modal-form/index.vue.js +1 -0
- package/lib/src/ap-form/modal-form/index.vue2.js +1 -0
- package/lib/src/ap-form/search-form/index.vue.d.ts +79 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -0
- package/lib/src/ap-form/search-form/index.vue2.js +1 -0
- package/lib/src/ap-form/style/ap-form-item.css +46 -0
- package/lib/src/ap-form/style/modal-form.css +17 -0
- package/lib/src/ap-form/style/search-form.css +3 -0
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +42 -0
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.js +1 -0
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue2.js +1 -0
- package/lib/src/ap-layout/index.d.ts +3 -0
- package/lib/src/ap-layout/index.js +1 -0
- package/lib/src/ap-layout/interface.d.ts +4 -0
- package/lib/src/ap-layout/style/ap-info-layout.css +19 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +193 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -0
- package/lib/src/ap-table/components/index/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/index/index.vue.js +1 -0
- package/lib/src/ap-table/components/index/index.vue2.js +1 -0
- package/lib/src/ap-table/components/interface.d.ts +20 -0
- package/lib/src/ap-table/components/style/index.css +12 -0
- package/lib/src/ap-table/components/style/pagination.css +12 -0
- package/lib/src/ap-table/constants.d.ts +12340 -0
- package/lib/src/ap-table/constants.js +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +82 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -0
- package/lib/src/ap-table/index.d.ts +5 -0
- package/lib/src/ap-table/index.js +1 -0
- package/lib/src/ap-table/interface.d.ts +180 -0
- package/lib/src/ap-table/interface.js +1 -0
- package/lib/src/ap-table/style/ap-table.css +46 -0
- package/lib/src/ap-table/utils.d.ts +32 -0
- package/lib/src/ap-table/utils.js +1 -0
- package/lib/src/ap-tag/ap-tag-group.vue.d.ts +34 -0
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -0
- package/lib/src/ap-tag/ap-tag-group.vue2.js +1 -0
- package/lib/src/ap-tag/ap-tag.vue.d.ts +34 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -0
- package/lib/src/ap-tag/ap-tag.vue2.js +1 -0
- package/lib/src/ap-tag/index.d.ts +5 -0
- package/lib/src/ap-tag/index.js +1 -0
- package/lib/src/ap-tag/interface.d.ts +35 -0
- package/lib/src/ap-tag/interface.js +1 -0
- package/lib/src/ap-tag/style/ap-tag-group.css +6 -0
- package/lib/src/ap-tag/style/ap-tag.css +40 -0
- package/lib/src/ap-upload/apUpload.vue.d.ts +111 -0
- package/lib/src/ap-upload/apUpload.vue.js +1 -0
- package/lib/src/ap-upload/apUpload.vue2.js +1 -0
- package/lib/src/ap-upload/apUploadTypes.d.ts +90 -0
- package/lib/src/ap-upload/apUploadTypes.js +1 -0
- package/lib/src/ap-upload/assets/single-file-icon.png.js +1 -0
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +4 -0
- package/lib/src/ap-upload/components/MultipleFile.vue.js +1 -0
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -0
- package/lib/src/ap-upload/components/Picture.vue.d.ts +4 -0
- package/lib/src/ap-upload/components/Picture.vue.js +1 -0
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -0
- package/lib/src/ap-upload/components/SingleFile.vue.d.ts +4 -0
- package/lib/src/ap-upload/components/SingleFile.vue.js +1 -0
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -0
- package/lib/src/ap-upload/hooks/useOss.d.ts +19 -0
- package/lib/src/ap-upload/hooks/useOss.js +1 -0
- package/lib/src/ap-upload/index.d.ts +5 -0
- package/lib/src/ap-upload/index.js +1 -0
- package/lib/src/ap-upload/styles/multiple-file.css +58 -0
- package/lib/src/ap-upload/styles/picture.css +112 -0
- package/lib/src/ap-upload/styles/single-file.css +98 -0
- package/lib/src/ap-upload/styles/upload.css +6 -0
- package/lib/src/ap-upload/utils/accept.d.ts +13 -0
- package/lib/src/ap-upload/utils/accept.js +1 -0
- package/lib/src/ap-upload/utils/returnData.d.ts +19 -0
- package/lib/src/ap-upload/utils/returnData.js +1 -0
- package/lib/src/basic/help.vue.d.ts +4 -4
- package/lib/src/basic/help.vue2.js +1 -1
- package/lib/src/basic/index.d.ts +8 -8
- package/lib/src/components.d.ts +2 -0
- package/lib/src/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider.d.ts +11 -11
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/lib/src/config-provider/index.d.ts +31 -31
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/hooks/useMessage.js +1 -1
- package/lib/src/icon-picker/icon-picker.vue.d.ts +1 -1
- package/lib/src/icon-picker/index.d.ts +15 -15
- package/lib/src/index.d.ts +7 -0
- 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/modal/basic.vue.d.ts +1 -2
- package/lib/src/modal/basic.vue2.js +1 -1
- package/lib/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/lib/src/modal/index.d.ts +2 -2
- package/lib/src/modal/style/index.css +0 -103
- package/lib/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-cascader.vue.js +1 -1
- package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/lib/src/pro-form/components/api-select.vue.js +1 -1
- package/lib/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree-select.vue.js +1 -1
- package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +3 -3
- package/lib/src/pro-form/index.d.ts +4 -1
- package/lib/src/pro-form/index.js +1 -1
- package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
- package/lib/src/pro-form/style/index.css +0 -3
- package/lib/src/pro-form/style/table-form.css +104 -0
- package/lib/src/pro-form/table-form-inner.vue.d.ts +44 -0
- package/lib/src/pro-form/table-form-inner.vue.js +1 -0
- package/lib/src/pro-form/table-form-inner.vue2.js +1 -0
- package/lib/src/pro-form/table-form.vue.d.ts +42 -0
- package/lib/src/pro-form/table-form.vue.js +1 -0
- package/lib/src/pro-form/table-form.vue2.js +1 -0
- package/lib/src/pro-form/types/form.d.ts +1 -1
- package/lib/src/pro-form/types/table-form.d.ts +37 -0
- package/lib/src/pro-form/types/table-form.js +1 -0
- package/lib/src/pro-table/components/editable/editable-cell.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/column-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/redo-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/size-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/table-action.vue.js +1 -1
- package/lib/src/pro-table/hooks/use-data-source.js +1 -1
- package/lib/src/prompt/utils.d.ts +1 -1
- package/lib/src/scroll-bar/index.d.ts +12 -12
- package/lib/src/theme/antd-global-overwrite/admin/alert.css +47 -0
- package/lib/src/theme/antd-global-overwrite/admin/button.css +27 -0
- package/lib/src/theme/antd-global-overwrite/admin/form.css +65 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +525 -0
- package/lib/src/theme/antd-global-overwrite/admin/message.css +17 -0
- package/lib/src/theme/antd-global-overwrite/admin/modal.css +117 -0
- package/lib/src/theme/antd-global-overwrite/admin/pagination.css +68 -0
- package/lib/src/theme/antd-global-overwrite/admin/steps.css +103 -0
- package/lib/src/theme/antd-global-overwrite/admin/table.css +81 -0
- package/lib/src/theme/antd-global-overwrite/aplus/alert.css +47 -0
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +27 -0
- package/lib/src/theme/antd-global-overwrite/aplus/form.css +90 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +554 -0
- package/lib/src/theme/antd-global-overwrite/aplus/message.css +17 -0
- package/lib/src/theme/antd-global-overwrite/aplus/modal.css +111 -0
- package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +81 -0
- package/lib/src/theme/antd-global-overwrite/aplus/steps.css +103 -0
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +78 -0
- package/lib/src/theme/ap-action/item.css +6 -1
- package/lib/src/theme/ap-download/ap-download.css +51 -0
- package/lib/src/theme/ap-form/ap-form-item.css +46 -0
- package/lib/src/theme/ap-form/modal-form.css +17 -0
- package/lib/src/theme/ap-form/search-form.css +3 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +19 -0
- package/lib/src/theme/ap-table/ap-table-index.css +12 -0
- package/lib/src/theme/ap-table/ap-table-pagination.css +12 -0
- package/lib/src/theme/ap-table/ap-table.css +46 -0
- package/lib/src/theme/ap-tag/ap-tag-group.css +6 -0
- package/lib/src/theme/ap-tag/ap-tag.css +40 -0
- package/lib/src/theme/ap-upload/multiple-file.css +58 -0
- package/lib/src/theme/ap-upload/picture.css +112 -0
- package/lib/src/theme/ap-upload/single-file.css +98 -0
- package/lib/src/theme/ap-upload/upload.css +6 -0
- package/lib/src/theme/custom-column/column-select.css +44 -0
- package/lib/src/theme/custom-column/custom-column.css +46 -0
- package/lib/src/theme/modal/index.css +0 -103
- package/lib/src/theme/pro-form/form.css +0 -3
- package/lib/src/theme/pro-form/table-form-inner.css +104 -0
- package/lib/src/theme/work-order-modal/index.css +3 -0
- package/lib/src/utils/config-provider-preset.d.ts +79 -0
- package/lib/src/utils/config-provider-preset.js +1 -0
- package/lib/src/utils/index.d.ts +16 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/slot.d.ts +7 -1
- package/lib/src/utils/slot.js +1 -1
- package/lib/src/work-order-modal/createWorkOrder.d.ts +1 -0
- package/lib/src/work-order-modal/createWorkOrder.js +1 -0
- package/lib/src/work-order-modal/help-message.vue.d.ts +3 -0
- package/lib/src/work-order-modal/help-message.vue.js +1 -0
- package/lib/src/work-order-modal/help-message.vue2.js +1 -0
- package/lib/src/work-order-modal/index.d.ts +5 -0
- package/lib/src/work-order-modal/index.js +1 -0
- package/lib/src/work-order-modal/interfaces.d.ts +23 -0
- package/lib/src/work-order-modal/interfaces.js +1 -0
- package/lib/src/work-order-modal/style/index.css +3 -0
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +18 -0
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -0
- package/lib/src/work-order-modal/work-order-modal.vue2.js +1 -0
- package/package.json +17 -7
- package/es/src/ap-form/ap-form.d.ts +0 -1681
- package/es/src/ap-form/ap-form.mjs +0 -5
- package/lib/src/ap-form/ap-form.d.ts +0 -1681
- package/lib/src/ap-form/ap-form.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../ap-action/index.js");require("../ap-field/index.js");require("../ap-form/index.js");require("./components/index/index.vue.js");const e=require("../ap-form/items/date/index.vue.js"),t=require("../ap-form/items/date-range/index.vue.js"),_=require("../ap-form/items/number/index.vue.js"),u=require("../ap-form/items/radio/index.vue.js"),r=require("../ap-form/items/select/index.vue.js"),n=require("../ap-form/items/switch/index.vue.js"),i=require("../ap-form/items/text/index.vue.js"),s=require("../ap-form/items/text-area/index.vue.js"),a=require("../ap-form/items/checkbox/index.vue.js"),p=require("../ap-field/date/index.vue.js"),c=require("../ap-field/date-range/index.vue.js"),d=require("../ap-field/number/index.vue.js"),l=require("../ap-field/radio/index.vue.js"),v=require("../ap-field/select/index.vue.js"),o=require("../ap-field/switch/index.vue.js"),x=require("../ap-field/text/index.vue.js"),g=require("../ap-field/text-area/index.vue.js"),q=require("../ap-field/checkbox/index.vue.js"),f=require("../ap-action/group/index.vue.js"),y=require("./components/index/index.vue2.js"),$={date:e.default,dateRange:t.default,number:_.default,radio:u.default,select:r.default,switch:n.default,text:i.default,textArea:s.default,checkbox:a.default},m={date:p.default,dateRange:c.default,number:d.default,radio:l.default,select:v.default,switch:o.default,text:x.default,textArea:g.default,checkbox:q.default,action:f.default,index:y.default},b=["action","index"];exports.apTableFormItemMap=$;exports.apTableRenderItemMap=m;exports.noRenderAsFormItemValueList=b;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { RequestData } from '../interface';
|
|
3
|
+
import { ApFormSearchFormExpose } from '../../ap-form';
|
|
4
|
+
import { TablePaginationConfig, FilterValue, SorterResult, TableCurrentDataSource } from 'ant-design-vue/es/table/interface';
|
|
5
|
+
|
|
6
|
+
export type UseTablePagingParams<DataType, ParamsType> = {
|
|
7
|
+
request: (params: any) => Promise<RequestData<DataType>>;
|
|
8
|
+
/**
|
|
9
|
+
* 是否手动执行,页面初始化后不执行网络请求,需要手动触发
|
|
10
|
+
* @param params
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
manual?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description 默认情况下,请求第几页
|
|
16
|
+
* @default 1
|
|
17
|
+
*/
|
|
18
|
+
defaultCurrent?: number;
|
|
19
|
+
/**
|
|
20
|
+
* 默认每页请求的数据条数
|
|
21
|
+
* @default 10
|
|
22
|
+
*/
|
|
23
|
+
defaultPageSize?: number;
|
|
24
|
+
/**
|
|
25
|
+
* 额外的默认请求参数,这个参数变更不会触发网络请求
|
|
26
|
+
*/
|
|
27
|
+
defaultParams?: ParamsType;
|
|
28
|
+
/**
|
|
29
|
+
* 默认的数据源
|
|
30
|
+
*/
|
|
31
|
+
defaultData?: DataType[];
|
|
32
|
+
/**
|
|
33
|
+
* 数据请求前格式化请求参数
|
|
34
|
+
* @param values
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
formatParams?: (values: any) => any;
|
|
38
|
+
/**
|
|
39
|
+
* 特殊类型参数类型对照表(会根据该对照表运行默认的参数格式化)
|
|
40
|
+
*/
|
|
41
|
+
paramsValueTypeMap?: Record<string, any>;
|
|
42
|
+
/**
|
|
43
|
+
* 重设表单需要忽略的字段
|
|
44
|
+
*/
|
|
45
|
+
resetFieldsIgnores?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* 需要后端筛选的字段列表
|
|
48
|
+
*/
|
|
49
|
+
filterFields?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* 需要后端筛选的排序字段列表
|
|
52
|
+
*/
|
|
53
|
+
sortFields?: string[];
|
|
54
|
+
};
|
|
55
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
56
|
+
formRef: Ref<ApFormSearchFormExpose | undefined>;
|
|
57
|
+
submit: () => void;
|
|
58
|
+
reset: () => void;
|
|
59
|
+
refresh: () => void;
|
|
60
|
+
refreshByDelete: (n: number) => void;
|
|
61
|
+
data: Ref<{
|
|
62
|
+
total: number;
|
|
63
|
+
records: DataType[];
|
|
64
|
+
loading: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
current: Ref<number>;
|
|
67
|
+
pageSize: Ref<number>;
|
|
68
|
+
handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
69
|
+
tableProps: ComputedRef<{
|
|
70
|
+
loading: boolean;
|
|
71
|
+
pagination: {
|
|
72
|
+
current: number;
|
|
73
|
+
pageSize: number;
|
|
74
|
+
total: number;
|
|
75
|
+
showSizeChanger: boolean;
|
|
76
|
+
showQuickJumper: boolean;
|
|
77
|
+
showTotal: (total: number) => string;
|
|
78
|
+
};
|
|
79
|
+
onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
80
|
+
dataSource: DataType[];
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),C=require("../utils.js"),I=require("lodash-unified");require("../../config-provider/index.js");const K=require("../../config-provider/hooks/use-locale.js"),N=({manual:O=!1,defaultCurrent:j=1,defaultPageSize:F=10,request:$,defaultParams:D={},defaultData:L=[],formatParams:S,paramsValueTypeMap:T,resetFieldsIgnores:P,filterFields:M=[],sortFields:R=[]})=>{let v=0,f={};const x=e=>S?S(e):e,c=r.ref(),i=r.ref(j),g=r.ref(F),{t:b}=K.useLocale(),o=r.ref({total:0,records:L,loading:!1}),z=async e=>{var n;const a=x(e),t=Date.now();v=t,o.value.loading=!0;try{const s=await $({...D,...a});v===t&&(o.value.total=s.total||((n=s.data)==null?void 0:n.length)||0,o.value.records=[...s.data||[]])}catch{v===t&&(o.value.records=[],o.value.total=0)}finally{o.value.loading=!1}},q=e=>{const a={};return Object.entries(e).forEach(([t,n])=>{if(a[t]=n,T&&n){const s=T[t];s&&(a[t]=C.parseFieldValue(s,n))}}),a},A=e=>{var n,s,d,p,h,l,u;const a=((s=(n=c.value)==null?void 0:n.apForm)==null?void 0:s.getFieldsValue())||{},t={};Object.entries(a).forEach(([y,H])=>{P&&P.indexOf(y)>-1&&(t[y]=H)}),(p=(d=c.value)==null?void 0:d.apForm)==null||p.resetFields(),(u=(l=(h=c.value)==null?void 0:h.apForm)==null?void 0:l.setFieldsValue)==null||u.call(l,t),e==null||e()},m=e=>{f=e;const a=q(e);z(a)},B=e=>{m({...f,...e})},V=()=>{var a,t;const e=((t=(a=c.value)==null?void 0:a.apForm)==null?void 0:t.getFieldsValue(!0))||{};m({...e,current:1,pageSize:f.pageSize||F})},E=()=>{A(V)},J=()=>{m(f)},Q=e=>{const a=r.unref(o).total-e,t=Math.ceil(a/r.unref(g)),n=r.unref(i)>t?t:r.unref(i);B({current:n>0?n:1})},w=(e,a,t)=>{var h,l;const n=((l=(h=c.value)==null?void 0:h.apForm)==null?void 0:l.getFieldsValue(!0))||{};i.value=e.current,g.value=e.pageSize;const s=I.isArray(t)?[...t]:[t],d={};for(const u of s)R.includes(u.field)&&(d[C.dataIndexToStr(u.field)]=u.order);const p={};for(const u of Object.keys(a))M.includes(u)&&(p[u]=a[u]);m({...n,filter:p,sort:d,current:e.current,pageSize:e.pageSize})};r.onMounted(()=>{var a,t;const e=((t=(a=c.value)==null?void 0:a.apForm)==null?void 0:t.getFieldsValue(!0))||{};if(f={current:r.unref(i),pageSize:r.unref(g),...e},!O){const n=q(f);z(n)}});const U=r.computed(()=>r.unref(o).total===0?"-":`${r.unref(i.value)}/${Math.ceil(r.unref(o).total/r.unref(g))}`),G=r.computed(()=>({loading:r.unref(o).loading,pagination:{current:r.unref(i),pageSize:r.unref(g),total:r.unref(o).total,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${b("ap.apTable.pagination.totalLeft",{total:e})} ${b("ap.apTable.pagination.totalRight",{page:r.unref(U)})}`},onChange:w,dataSource:r.unref(o).records}));return{formRef:c,submit:V,reset:E,refresh:J,refreshByDelete:Q,data:o,current:i,pageSize:g,handleTableChange:w,tableProps:G}};exports.useTablePaging=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./ap-table.vue2.js");require("./interface.js");const e=require("./hooks/use-table-paging.js");exports.useTablePaging=e.useTablePaging;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { ColumnType, TableProps } from 'ant-design-vue/es/table';
|
|
2
|
+
import { CompareFn, SortOrder } from 'ant-design-vue/es/table/interface';
|
|
3
|
+
import { ApFormSearchFormProps } from '../ap-form';
|
|
4
|
+
import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextProps } from 'src/ap-form/items/interface';
|
|
5
|
+
import { Recordable } from '../type';
|
|
6
|
+
import { CSSProperties } from 'vue';
|
|
7
|
+
import { ApActionGroupProps } from '../ap-action';
|
|
8
|
+
import { ApTableIndexProps } from './components/interface';
|
|
9
|
+
|
|
10
|
+
export type ValueEnumType = {
|
|
11
|
+
text: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* ApTable默认支持的值类型(将会用于表单生成和默认值格式化)
|
|
18
|
+
*/
|
|
19
|
+
export type ApTableValueFields = {
|
|
20
|
+
/** 日期选择器 */
|
|
21
|
+
date: ApFormItemDateProps;
|
|
22
|
+
/** 日期范围选择器 */
|
|
23
|
+
dateRange: ApFormItemDateRangeProps;
|
|
24
|
+
/** 数字输入框 */
|
|
25
|
+
number: ApFormItemNumberProps;
|
|
26
|
+
/** 单选 */
|
|
27
|
+
radio: ApFormItemRadioProps;
|
|
28
|
+
/** 下拉选择 */
|
|
29
|
+
select: ApFormItemSelectProps;
|
|
30
|
+
/** 开关 */
|
|
31
|
+
switch: ApFormItemSwitchProps;
|
|
32
|
+
/** 文本输入 */
|
|
33
|
+
text: ApFormItemTextProps;
|
|
34
|
+
/** 多行文本输入 */
|
|
35
|
+
textArea: ApFormItemTextAreaProps;
|
|
36
|
+
/** 多选 */
|
|
37
|
+
checkbox: ApFormItemCheckboxProps;
|
|
38
|
+
/**
|
|
39
|
+
* 操作列
|
|
40
|
+
*/
|
|
41
|
+
action: ApActionGroupProps;
|
|
42
|
+
/**
|
|
43
|
+
* 索引列
|
|
44
|
+
*/
|
|
45
|
+
index: ApTableIndexProps;
|
|
46
|
+
};
|
|
47
|
+
export type ValueEnum = Record<string, ValueEnumType>;
|
|
48
|
+
export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children'> & {
|
|
49
|
+
sorter?: string | boolean | CompareFn<T> | {
|
|
50
|
+
compare?: CompareFn<T>;
|
|
51
|
+
/** Config multiple sorter order priority */
|
|
52
|
+
multiple?: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text'> = ExtraProColumnType<any> & {
|
|
56
|
+
children?: ApColumnType[];
|
|
57
|
+
/**
|
|
58
|
+
* 表单项所占据的格子数(1-24格)
|
|
59
|
+
*/
|
|
60
|
+
span?: number;
|
|
61
|
+
/**
|
|
62
|
+
* 在title之后展示一个icon并触发tooltip
|
|
63
|
+
*/
|
|
64
|
+
tooltip?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 是否可以复制
|
|
67
|
+
*/
|
|
68
|
+
copyable?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* 是否搜索表单中隐藏
|
|
71
|
+
*/
|
|
72
|
+
hideInSearch?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 是否在表格中隐藏
|
|
75
|
+
*/
|
|
76
|
+
hideInTable?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 值的枚举,会自动转化把值当成 key 来取出要显示的内容(也会作为select等组件的选项)
|
|
79
|
+
*/
|
|
80
|
+
valueEnum?: ValueEnum;
|
|
81
|
+
/**
|
|
82
|
+
* 自定义查询表单渲染
|
|
83
|
+
*/
|
|
84
|
+
customRenderFormItem?: (config: ApColumnType) => any;
|
|
85
|
+
/**
|
|
86
|
+
* 指定值类型(将会用于默认渲染和查询表单生成)
|
|
87
|
+
*/
|
|
88
|
+
valueType?: keyof ApTableValueFields;
|
|
89
|
+
/**
|
|
90
|
+
* 值类型额外配置的参数(用于查询表单渲染)
|
|
91
|
+
*/
|
|
92
|
+
fieldProps?: ApTableValueFields[ValueType];
|
|
93
|
+
};
|
|
94
|
+
export type RequestData<T> = {
|
|
95
|
+
data: T[] | undefined;
|
|
96
|
+
total: number;
|
|
97
|
+
} & Record<string, any>;
|
|
98
|
+
export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends keyof ApTableValueFields = 'text'> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size'> & {
|
|
99
|
+
/**
|
|
100
|
+
* 列配置
|
|
101
|
+
*/
|
|
102
|
+
columns?: ApColumnType<any>[];
|
|
103
|
+
/**
|
|
104
|
+
* 是否启用卡片样式
|
|
105
|
+
*/
|
|
106
|
+
card?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* request额外请求的参数,这些参数在变更时将不会自动发起网络请求
|
|
109
|
+
*/
|
|
110
|
+
params?: ParamsType;
|
|
111
|
+
/**
|
|
112
|
+
* 自定义渲染搜索表单
|
|
113
|
+
* @deprecated 未实现 暂不可用
|
|
114
|
+
*/
|
|
115
|
+
searchFormRender?: (props: ApTableProps<RecordType, ParamsType, ValueType>, defaultDom: any) => any;
|
|
116
|
+
/**
|
|
117
|
+
* 请求获取dataSource
|
|
118
|
+
* @param params
|
|
119
|
+
* @returns
|
|
120
|
+
*/
|
|
121
|
+
request?: (params: ParamsType & {
|
|
122
|
+
pageSize?: number;
|
|
123
|
+
current?: number;
|
|
124
|
+
sort?: Record<string, SortOrder>;
|
|
125
|
+
filter?: Recordable<any>;
|
|
126
|
+
}) => Promise<Partial<RequestData<RecordType>>>;
|
|
127
|
+
/**
|
|
128
|
+
* 数据加载完成后触发
|
|
129
|
+
* @deprecated 已弃用,请自行实现类似效果
|
|
130
|
+
* @returns
|
|
131
|
+
*/
|
|
132
|
+
onLoad?: (data: RecordType[]) => void;
|
|
133
|
+
/**
|
|
134
|
+
* 表格的默认数据源,这些数据源将会在第一次请求后被替换
|
|
135
|
+
*/
|
|
136
|
+
defaultData?: RecordType[];
|
|
137
|
+
/**
|
|
138
|
+
* 表格loading状态变更后触发
|
|
139
|
+
* @param loading
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
143
|
+
/**
|
|
144
|
+
* 查询表单配置,设置为false表示不渲染查询表单
|
|
145
|
+
*/
|
|
146
|
+
searchForm?: false | ApFormSearchFormProps;
|
|
147
|
+
/**
|
|
148
|
+
* 查询表单提交之前,一般用于自定义对查询数据进行变更
|
|
149
|
+
* @param params
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
beforeSearchSubmit?: (params: Partial<ParamsType>) => any;
|
|
153
|
+
/**
|
|
154
|
+
* 是否显示分页器(特定的分页器)或者指定默认的当前页和pageSize
|
|
155
|
+
*/
|
|
156
|
+
pagination?: false | {
|
|
157
|
+
defaultCurrent?: number;
|
|
158
|
+
defaultPageSize?: number;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* 自定义查询表单容器样式
|
|
162
|
+
*/
|
|
163
|
+
searchFormWrapperStyle?: CSSProperties;
|
|
164
|
+
/**
|
|
165
|
+
* 自定义表格样式
|
|
166
|
+
*/
|
|
167
|
+
tableWrapperStyle?: CSSProperties;
|
|
168
|
+
/**
|
|
169
|
+
* 是否手动发起第一次网络请求
|
|
170
|
+
*/
|
|
171
|
+
manual?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* 表格尺寸(只支持中等大小和小尺寸)
|
|
174
|
+
*/
|
|
175
|
+
size?: 'middle' | 'small';
|
|
176
|
+
};
|
|
177
|
+
export type ApTableExpose = {
|
|
178
|
+
submit: () => void;
|
|
179
|
+
reset: () => void;
|
|
180
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.aplus-ap-table-wrapper {
|
|
2
|
+
padding: 16px;
|
|
3
|
+
background-color: #fff;
|
|
4
|
+
}
|
|
5
|
+
.aplus-ap-table__search-wrapper {
|
|
6
|
+
padding: 16px;
|
|
7
|
+
padding-bottom: 0;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
margin-bottom: 16px;
|
|
10
|
+
}
|
|
11
|
+
.aplus-ap-table__table-wrapper {
|
|
12
|
+
padding: 16px;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-table-table .ant-pagination {
|
|
16
|
+
margin-bottom: 0 !important;
|
|
17
|
+
}
|
|
18
|
+
.aplus-ap-table-table .ant-pagination .ant-pagination-total-text {
|
|
19
|
+
flex: 1;
|
|
20
|
+
}
|
|
21
|
+
.aplus-ap-table-table tr > th.ant-table-cell {
|
|
22
|
+
background-color: #F2F6F9;
|
|
23
|
+
border-bottom-color: #E9EDF3;
|
|
24
|
+
}
|
|
25
|
+
.aplus-ap-table-table tr > th.ant-table-cell::before {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
.aplus-ap-table-table tr > td.ant-table-cell {
|
|
29
|
+
border-top-color: #E9EDF3;
|
|
30
|
+
}
|
|
31
|
+
.aplus-ap-table-table-admin .ant-pagination {
|
|
32
|
+
margin-bottom: 0 !important;
|
|
33
|
+
}
|
|
34
|
+
.aplus-ap-table-table-admin .ant-pagination .ant-pagination-total-text {
|
|
35
|
+
flex: 1;
|
|
36
|
+
}
|
|
37
|
+
.aplus-ap-table-table-admin tr > th.ant-table-cell {
|
|
38
|
+
background-color: #FAFAFA;
|
|
39
|
+
border-bottom-color: #E9E9E9;
|
|
40
|
+
}
|
|
41
|
+
.aplus-ap-table-table-admin tr > th.ant-table-cell::before {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
.aplus-ap-table-table-admin tr > td.ant-table-cell {
|
|
45
|
+
border-top-color: #E9E9E9;
|
|
46
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ValueEnum, ValueEnumType } from './interface';
|
|
2
|
+
|
|
3
|
+
export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
|
|
4
|
+
export declare const formatParamsValueType: (type: FieldValueType | Record<string, FieldValueType>, value: any, cb: (t: FieldValueType, value: any) => any) => any;
|
|
5
|
+
/**
|
|
6
|
+
* 解析数值
|
|
7
|
+
* @param t 值类型
|
|
8
|
+
* @param value 值
|
|
9
|
+
*/
|
|
10
|
+
export declare const parseFieldValue: (t: FieldValueType, value: any) => any;
|
|
11
|
+
/**
|
|
12
|
+
* 对表格的dataIndex进行拼接处理
|
|
13
|
+
* @param dataIndex
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function dataIndexToStr(dataIndex: string | number | (string | number)[]): string | number;
|
|
17
|
+
type OptionType = {
|
|
18
|
+
label?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
value?: any;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
type ValueEnumMap = Map<string | number | boolean, ValueEnumType>;
|
|
25
|
+
export declare const objectToMap: (value: ValueEnum | undefined) => ValueEnumMap;
|
|
26
|
+
/**
|
|
27
|
+
* valueEnum转options array
|
|
28
|
+
* @param valueEnumParams
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare const valueEnumToArray: (valueEnumParams: ValueEnum) => OptionType;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash-unified"),c=(e,t,n)=>{let s={};return o.isObject(e)?Object.keys(e).forEach(a=>{o.isObject(e[a])?s[a]=c(e[a],t[a],n):s[a]=n(e[a],t)}):s=n(e,t),s},i=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,s]=t;return[n.startOf("day").valueOf(),s.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return o.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function f(e){return o.isArray(e)?e.join("."):e}function l(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const u=e=>l(e)==="map"?e:new Map(Object.entries(e||{})),d=e=>{const t=[],n=u(e);return n.forEach((s,a)=>{const r=n.get(a)||n.get(`${a}`);if(r){if(typeof r=="object"&&(r!=null&&r.text)){t.push({text:r==null?void 0:r.text,value:a,label:r==null?void 0:r.text,disabled:r.disabled});return}t.push({text:r,label:r,value:a})}}),t};exports.dataIndexToStr=f;exports.formatParamsValueType=c;exports.objectToMap=u;exports.parseFieldValue=i;exports.valueEnumToArray=d;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ApTagGroupProps, ApTagProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTagGroupProps>, {
|
|
5
|
+
list: () => ApTagProps[];
|
|
6
|
+
space: number;
|
|
7
|
+
ellipsisColor: string;
|
|
8
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTagGroupProps>, {
|
|
9
|
+
list: () => ApTagProps[];
|
|
10
|
+
space: number;
|
|
11
|
+
ellipsisColor: string;
|
|
12
|
+
}>>>, {
|
|
13
|
+
space: number;
|
|
14
|
+
list: ApTagProps[];
|
|
15
|
+
ellipsisColor: string;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("ant-design-vue"),y=require("@ant-design/icons-vue");require("./ap-tag.vue2.js");require("../config-provider/index.js");require("./style/ap-tag-group.css");const w=require("../config-provider/hooks/use-namespace.js"),x=require("./ap-tag.vue.js"),E=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:"16",height:"16",viewBox:"0 0 16 16"},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"master_svg0_1133_24991"},[e.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})])]),e.createElementVNode("g",{"clip-path":"url(#master_svg0_1133_24991)"},[e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"8",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"3.25",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"12.75",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})])])],-1),k=e.defineComponent({__name:"ap-tag-group",props:{list:{default:()=>[]},space:{default:4},ellipsisColor:{default:"#34B77C"}},setup(p){const l=p,{b:m}=w.useNamespace("tag-group"),s=e.ref(),d=e.computed(()=>e.unref(r)<l.list.length),f=e.computed(()=>l.list.slice(0,e.unref(r))),r=e.ref(0),c=e.ref(0),a=e.ref(l.list.length),g=e.computed(()=>l.list.map(t=>t.text).join("、")),v=e.computed(()=>[m()].filter(Boolean)),n=()=>{if(!s.value)return;const t=s.value.scrollWidth,o=s.value.clientWidth;if(e.unref(c)<=e.unref(a)){const i=Math.floor((e.unref(c)+e.unref(a))/2);t<=o?(r.value=i,c.value=i+1):a.value=i-1,e.nextTick(()=>{requestAnimationFrame(n)})}else t>o&&(r.value=r.value-1,e.nextTick(()=>{requestAnimationFrame(n)}))},u=()=>{c.value=0,a.value=l.list.length,r.value=0};return e.watch(()=>l.list,(t,o)=>{t!==o&&(u(),e.nextTick(()=>n()))},{immediate:!0}),e.onMounted(()=>{window.addEventListener("resize",()=>{u(),n()})}),e.onUnmounted(()=>{window.removeEventListener("resize",()=>{u(),n()})}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(_.Tooltip),{title:g.value,trigger:"hover"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(v.value),ref_key:"container",ref:s,style:e.normalizeStyle({pointerEvents:d.value?"auto":"none"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(i,h)=>(e.openBlock(),e.createBlock(x.default,e.mergeProps({ref_for:!0},i,{key:h,style:{marginRight:`${t.space}px`}}),null,16,["style"]))),128)),d.value?(e.openBlock(),e.createBlock(e.unref(y),{key:0,style:e.normalizeStyle({color:t.ellipsisColor})},{component:e.withCtx(()=>[E]),_:1},8,["style"])):e.createCommentVNode("",!0)],6)]),_:1},8,["title"]))}});exports.default=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ap-tag-group.vue.js");exports.default=e.default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ApTagProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTagProps>, {
|
|
5
|
+
size: string;
|
|
6
|
+
color: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTagProps>, {
|
|
9
|
+
size: string;
|
|
10
|
+
color: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
}>>>, {
|
|
13
|
+
color: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
size: "small" | "middle" | "large";
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../config-provider/index.js");require("./style/ap-tag.css");const S=require("../config-provider/hooks/use-global-config.js"),b=require("../config-provider/hooks/use-namespace.js"),$=t.defineComponent({name:"ApTag",__name:"ap-tag",props:{text:{},color:{default:"#34B77C"},size:{default:"middle"},disabled:{type:Boolean,default:!1}},setup(i){const a=i,p=S.useGlobalConfig("uiMode"),{b:n,bm:r}=b.useNamespace("tag");function l(e,s){e.length===4&&(e=`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`);const d=parseInt(e.slice(1,3),16),m=parseInt(e.slice(3,5),16),g=parseInt(e.slice(5,7),16),f=Math.round(s*255).toString(16).padStart(2,"0");return`#${d.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${f}`}const c=t.computed(()=>({"--tag-main-color":a.color,"--tag-main-color-opacity":l(a.color,.06)})),o=t.computed(()=>[n("wrapper"),r("wrapper",a.size)].filter(Boolean)),u=t.computed(()=>{const e=[n("inner-wrapper"),r("inner-wrapper",a.size)];return a.disabled&&(p.value==="aplus"?e.push(r("inner-wrapper","disabled")):e.push(r("inner-wrapper","disabled-admin"))),e});return(e,s)=>(t.openBlock(),t.createElementBlock("span",{style:t.normalizeStyle(c.value),class:t.normalizeClass(o.value)},[t.createElementVNode("span",{class:t.normalizeClass(u.value)},t.toDisplayString(e.text),3)],6))}});exports.default=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ap-tag.vue.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("./ap-tag.vue2.js");require("./ap-tag-group.vue2.js");require("./interface.js");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface ApTagProps {
|
|
2
|
+
/**
|
|
3
|
+
* 标签内容
|
|
4
|
+
*/
|
|
5
|
+
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* 标签颜色
|
|
8
|
+
*/
|
|
9
|
+
color?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 标签大小
|
|
12
|
+
*/
|
|
13
|
+
size?: 'small' | 'middle' | 'large';
|
|
14
|
+
/**
|
|
15
|
+
* 是否禁用
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ApTagGroupProps {
|
|
21
|
+
/**
|
|
22
|
+
* 标签组内容
|
|
23
|
+
*/
|
|
24
|
+
list: ApTagProps[];
|
|
25
|
+
/**
|
|
26
|
+
* 标签之间间距
|
|
27
|
+
* @default 4
|
|
28
|
+
*/
|
|
29
|
+
space?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 省略号颜色
|
|
32
|
+
* @default #34B77C
|
|
33
|
+
*/
|
|
34
|
+
ellipsisColor?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.aplus-tag-wrapper {
|
|
2
|
+
text-wrap: nowrap;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
.aplus-tag-inner-wrapper {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
border: 1px solid var(--tag-main-color);
|
|
9
|
+
background-color: var(--tag-main-color-opacity);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
color: var(--tag-main-color);
|
|
12
|
+
}
|
|
13
|
+
.aplus-tag-inner-wrapper--large {
|
|
14
|
+
padding: 0 8px;
|
|
15
|
+
line-height: 26px;
|
|
16
|
+
height: 28px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
}
|
|
19
|
+
.aplus-tag-inner-wrapper--middle {
|
|
20
|
+
line-height: 22px;
|
|
21
|
+
padding: 0 8px;
|
|
22
|
+
height: 24px;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
}
|
|
25
|
+
.aplus-tag-inner-wrapper--small {
|
|
26
|
+
padding: 0 6px;
|
|
27
|
+
line-height: 19px;
|
|
28
|
+
height: 20px;
|
|
29
|
+
font-size: 12px;
|
|
30
|
+
}
|
|
31
|
+
.aplus-tag-inner-wrapper--disabled {
|
|
32
|
+
border: 1px solid #DEE4ED;
|
|
33
|
+
background-color: #526a900f;
|
|
34
|
+
color: #8896b0;
|
|
35
|
+
}
|
|
36
|
+
.aplus-tag-inner-wrapper--disabled-admin {
|
|
37
|
+
border: 1px solid #d9d9d9;
|
|
38
|
+
background-color: #9999990f;
|
|
39
|
+
color: #999;
|
|
40
|
+
}
|