@aplus-frontend/ui 0.0.1-beta.9 → 0.0.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 +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 +1 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +54 -48
- package/es/src/ap-field/interface.d.ts +3 -3
- 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/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 +80 -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 +80 -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 +189 -0
- package/es/src/ap-table/ap-table.vue.mjs +267 -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 +11075 -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 +184 -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 +14 -0
- package/es/src/ap-table/utils.mjs +35 -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 +38 -0
- package/es/src/theme/antd-global-overwrite/admin/form.css +65 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +536 -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 +38 -0
- package/es/src/theme/antd-global-overwrite/aplus/form.css +90 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +565 -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 +8 -0
- package/es/src/utils/index.mjs +29 -17
- 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 +182 -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 +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -3
- 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/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 +189 -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 +11075 -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 +184 -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 +14 -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 +38 -0
- package/lib/src/theme/antd-global-overwrite/admin/form.css +65 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +536 -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 +38 -0
- package/lib/src/theme/antd-global-overwrite/aplus/form.css +90 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +565 -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 +8 -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,197 @@
|
|
|
1
|
+
import { defineComponent as $, inject as a, ref as q, watch as D, nextTick as j, openBlock as h, createElementBlock as _, normalizeClass as W, unref as n, createVNode as w, withCtx as F, createElementVNode as R, createTextVNode as G, toDisplayString as A, withModifiers as H, createBlock as J, resolveDynamicComponent as K, createCommentVNode as Q } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import { getPath as U, getName as V, getReturnData as v } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as X, getOssInstance as Y } from "../hooks/useOss.mjs";
|
|
5
|
+
import { message as u, Upload as Z, Button as ee } from "ant-design-vue";
|
|
6
|
+
import { UploadOutlined as te } from "@ant-design/icons-vue";
|
|
7
|
+
import { fileMatchesAccept as se, getAcceptText as oe } from "../utils/accept.mjs";
|
|
8
|
+
import "../styles/multiple-file.css";
|
|
9
|
+
import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const ae = { class: "multiple-file-context" }, ie = { key: 0 }, re = { key: 1 }, xe = /* @__PURE__ */ $({
|
|
11
|
+
__name: "MultipleFile",
|
|
12
|
+
setup(ue) {
|
|
13
|
+
const { b: k } = ne("ap-upload-multiple-file"), { put: E } = X(), L = a("theme"), P = a("dirName"), x = a("accept") || "*", T = a("maxSize") || 500, I = a("title") || "上传文件", f = a("subTitle"), i = a("maxCount"), c = a("uploadingCount"), N = a("beforeUpload"), b = a("customRequest"), S = a("getOssAccess"), o = a("value"), p = [], l = a("needName"), d = q(null);
|
|
14
|
+
D(
|
|
15
|
+
() => o == null ? void 0 : o.value,
|
|
16
|
+
function(e) {
|
|
17
|
+
!d.value.fileList.length && e && j(() => {
|
|
18
|
+
const t = e.map((s) => {
|
|
19
|
+
const r = U(l, s), C = V(l, s), y = new File(
|
|
20
|
+
[s],
|
|
21
|
+
C,
|
|
22
|
+
{}
|
|
23
|
+
);
|
|
24
|
+
return y.response = r, y.uid = r, y;
|
|
25
|
+
});
|
|
26
|
+
if (i && t.length > i) {
|
|
27
|
+
u.warning(
|
|
28
|
+
`文件初始化个数超过${i}个,后续上传的文件会与数据不同步`
|
|
29
|
+
);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
t.forEach((s) => {
|
|
33
|
+
m.push(s), p.push({
|
|
34
|
+
uid: s.uid,
|
|
35
|
+
path: s.response
|
|
36
|
+
});
|
|
37
|
+
}), d.value.fileList = t;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
let m = [], B;
|
|
42
|
+
function g(e) {
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
const t = d.value.fileList.findIndex(
|
|
45
|
+
(s) => s.uid === e.uid
|
|
46
|
+
);
|
|
47
|
+
t >= 0 && d.value.fileList.splice(t, 1);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function O(e) {
|
|
51
|
+
if (i && i > 1 && m.length >= i)
|
|
52
|
+
return clearTimeout(B), B = setTimeout(() => {
|
|
53
|
+
u.warning(`最多上传${i}个文件`);
|
|
54
|
+
}), g(e), !1;
|
|
55
|
+
if (typeof N == "function") {
|
|
56
|
+
if (N(e) === !1)
|
|
57
|
+
return g(e), !1;
|
|
58
|
+
} else {
|
|
59
|
+
if (e.size > T * 1024 * 1024)
|
|
60
|
+
return u.warning(`文件大小不超过${T}MB`), g(e), !1;
|
|
61
|
+
if (!se(e, x))
|
|
62
|
+
return u.warning("不支持该格式的文件"), g(e), !1;
|
|
63
|
+
}
|
|
64
|
+
i && i === 1 && (m = [], o.value = void 0), m.push(e);
|
|
65
|
+
}
|
|
66
|
+
async function z(e) {
|
|
67
|
+
if (c.value++, typeof b == "function") {
|
|
68
|
+
b({
|
|
69
|
+
onProgress: (t) => {
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
e.onProgress({
|
|
72
|
+
percent: t
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
onError: (t) => {
|
|
77
|
+
u.warning(t || "网络异常"), setTimeout(() => {
|
|
78
|
+
e.onError({
|
|
79
|
+
name: t,
|
|
80
|
+
message: t
|
|
81
|
+
});
|
|
82
|
+
}), c.value--;
|
|
83
|
+
},
|
|
84
|
+
onSuccess: (t) => {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
e.onSuccess(t);
|
|
87
|
+
}), o.value ? o.value.push(
|
|
88
|
+
v(l, t, e.file.name)
|
|
89
|
+
) : o.value = [
|
|
90
|
+
v(l, t, e.file.name)
|
|
91
|
+
], p.push({
|
|
92
|
+
uid: e.file.uid,
|
|
93
|
+
path: t
|
|
94
|
+
}), c.value--;
|
|
95
|
+
},
|
|
96
|
+
file: e.file
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
const t = await Y(S);
|
|
102
|
+
e.file.oss = t, E({
|
|
103
|
+
file: e.file,
|
|
104
|
+
dirName: P,
|
|
105
|
+
oss: t,
|
|
106
|
+
successCallBack(s) {
|
|
107
|
+
e.onSuccess(s), o.value ? o.value.push(
|
|
108
|
+
v(l, s, e.file.name)
|
|
109
|
+
) : o.value = [
|
|
110
|
+
v(l, s, e.file.name)
|
|
111
|
+
], p.push({
|
|
112
|
+
uid: e.file.uid,
|
|
113
|
+
path: s
|
|
114
|
+
}), c.value--;
|
|
115
|
+
},
|
|
116
|
+
errorCallBack(s) {
|
|
117
|
+
u.warning(s || "网络异常"), e.onError({
|
|
118
|
+
name: s,
|
|
119
|
+
message: s
|
|
120
|
+
}), c.value--;
|
|
121
|
+
},
|
|
122
|
+
progressCallBack(s) {
|
|
123
|
+
e.onProgress({
|
|
124
|
+
percent: s
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
} catch (t) {
|
|
129
|
+
u.warning(typeof (t == null ? void 0 : t.message) == "string" ? t.message : "网络异常"), e.onError({
|
|
130
|
+
name: (t == null ? void 0 : t.message) || "网络异常",
|
|
131
|
+
message: (t == null ? void 0 : t.message) || "网络异常"
|
|
132
|
+
}), c.value--;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function M(e) {
|
|
136
|
+
var s;
|
|
137
|
+
if (e.response) {
|
|
138
|
+
if (Array.isArray(o.value)) {
|
|
139
|
+
const r = p.findIndex((C) => C.uid === e.uid);
|
|
140
|
+
r >= 0 && (o == null || o.value.splice(r, 1), p.splice(r, 1)), o.value.length === 0 && (o.value = void 0);
|
|
141
|
+
}
|
|
142
|
+
} else
|
|
143
|
+
(s = e == null ? void 0 : e.oss) == null || s.pauseUpload();
|
|
144
|
+
const t = m.findIndex(
|
|
145
|
+
(r) => r.uid === e.uid
|
|
146
|
+
);
|
|
147
|
+
return m.splice(t, 1), Promise.resolve(!0);
|
|
148
|
+
}
|
|
149
|
+
return (e, t) => (h(), _("div", {
|
|
150
|
+
class: W({
|
|
151
|
+
[n(k)()]: !0,
|
|
152
|
+
[n(k)("admin")]: n(L) === "admin"
|
|
153
|
+
})
|
|
154
|
+
}, [
|
|
155
|
+
w(n(Z), {
|
|
156
|
+
ref_key: "uploadRef",
|
|
157
|
+
ref: d,
|
|
158
|
+
accept: n(x),
|
|
159
|
+
multiple: "",
|
|
160
|
+
maxCount: n(i),
|
|
161
|
+
progress: {
|
|
162
|
+
strokeWidth: 3,
|
|
163
|
+
showInfo: !1,
|
|
164
|
+
strokeColor: "#0070FF"
|
|
165
|
+
},
|
|
166
|
+
beforeUpload: O,
|
|
167
|
+
customRequest: z,
|
|
168
|
+
onRemove: M
|
|
169
|
+
}, {
|
|
170
|
+
default: F(() => [
|
|
171
|
+
R("div", ae, [
|
|
172
|
+
w(n(ee), { class: "file-btn" }, {
|
|
173
|
+
default: F(() => [
|
|
174
|
+
w(n(te)),
|
|
175
|
+
G(" " + A(n(I)), 1)
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}),
|
|
179
|
+
R("div", {
|
|
180
|
+
class: "sub-title",
|
|
181
|
+
onClick: t[0] || (t[0] = H(() => {
|
|
182
|
+
}, ["stop"]))
|
|
183
|
+
}, [
|
|
184
|
+
typeof n(f) == "string" ? (h(), _("div", ie, A(n(f) || `支持扩展名:${n(oe)(n(x))}`), 1)) : n(f) ? (h(), _("div", re, [
|
|
185
|
+
(h(), J(K(n(f))))
|
|
186
|
+
])) : Q("", !0)
|
|
187
|
+
])
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["accept", "maxCount"])
|
|
192
|
+
], 2));
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
export {
|
|
196
|
+
xe as default
|
|
197
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { createElementVNode as f, defineComponent as G, inject as u, ref as I, watch as H, openBlock as p, createElementBlock as m, normalizeClass as J, unref as o, Fragment as K, renderList as Q, withDirectives as W, createVNode as C, createCommentVNode as P, vShow as X, toDisplayString as B } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import { getPath as Y, getName as Z, getReturnData as w } from "../utils/returnData.mjs";
|
|
4
|
+
import { CloseOutlined as F, PlusOutlined as ee } from "@ant-design/icons-vue";
|
|
5
|
+
import { useOss as te, getOssInstance as D } from "../hooks/useOss.mjs";
|
|
6
|
+
import { fileMatchesAccept as ne, getAcceptText as se } from "../utils/accept.mjs";
|
|
7
|
+
import { message as d, Progress as ie } from "ant-design-vue";
|
|
8
|
+
import "../styles/picture.css";
|
|
9
|
+
import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const oe = ["accept"], ce = { class: "picture-context" }, ue = { class: "picture-item-box" }, re = ["src"], le = { class: "picture-item-shadow" }, de = ["onClick"], fe = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "picture-item-uploading"
|
|
13
|
+
}, pe = /* @__PURE__ */ f("div", null, "上传", -1), me = { class: "picture-title" }, he = { key: 0 }, ge = { key: 1 }, Re = /* @__PURE__ */ G({
|
|
14
|
+
__name: "Picture",
|
|
15
|
+
setup(ve) {
|
|
16
|
+
const { b: k } = ae("ap-upload-picture"), { put: O } = te(), S = u("theme"), T = u("dirName"), y = u("accept") || "image/*", x = u("maxSize") || 5, N = u("title"), r = u("maxCount"), h = u("uploadingCount"), $ = u("beforeUpload"), b = u("customRequest"), R = u("getOssAccess"), _ = I(null), c = u("value"), g = u("needName");
|
|
17
|
+
let a = I([]);
|
|
18
|
+
const v = [];
|
|
19
|
+
H(
|
|
20
|
+
() => c == null ? void 0 : c.value,
|
|
21
|
+
async function(e) {
|
|
22
|
+
if (!a.value.length && e) {
|
|
23
|
+
const s = [];
|
|
24
|
+
for (let t of e) {
|
|
25
|
+
const n = Y(g, t), i = Z(g, t), l = await D(R), V = await l.getSignatureUrl(n), j = {
|
|
26
|
+
...new File([t], i, {}),
|
|
27
|
+
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
28
|
+
thumbUrl: V,
|
|
29
|
+
status: "success",
|
|
30
|
+
percent: 100,
|
|
31
|
+
path: n
|
|
32
|
+
};
|
|
33
|
+
s.push(j), l.destroy();
|
|
34
|
+
}
|
|
35
|
+
if (r && s.length > r) {
|
|
36
|
+
d.warning(
|
|
37
|
+
`文件初始化个数超过${r}个,后续上传的文件会与数据不同步`
|
|
38
|
+
);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
s.forEach((t) => {
|
|
42
|
+
a.value.push(t), v.push({
|
|
43
|
+
uid: t.uid,
|
|
44
|
+
path: t.path
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
function z() {
|
|
51
|
+
var e;
|
|
52
|
+
(e = _.value) == null || e.click();
|
|
53
|
+
}
|
|
54
|
+
function M(e) {
|
|
55
|
+
const s = e.target;
|
|
56
|
+
E(s == null ? void 0 : s.files);
|
|
57
|
+
}
|
|
58
|
+
function E(e) {
|
|
59
|
+
if (e != null && e.length)
|
|
60
|
+
for (let s = 0; s < e.length; s++)
|
|
61
|
+
L(e[s]);
|
|
62
|
+
_.value && (_.value.value = "");
|
|
63
|
+
}
|
|
64
|
+
let A;
|
|
65
|
+
function L(e) {
|
|
66
|
+
if (r && r > 1 && a.value.length >= r)
|
|
67
|
+
return clearTimeout(A), A = setTimeout(() => {
|
|
68
|
+
d.warning(`最多上传${r}个图片`);
|
|
69
|
+
}), !1;
|
|
70
|
+
if (typeof $ == "function") {
|
|
71
|
+
if ($(e) === !1)
|
|
72
|
+
return !1;
|
|
73
|
+
} else {
|
|
74
|
+
if (e.size > x * 1024 * 1024)
|
|
75
|
+
return d.warning(`文件大小不超过${x}MB`), !1;
|
|
76
|
+
if (!/image\/\w+/.test(e.type) || !ne(e, y))
|
|
77
|
+
return d.warning("不支持该格式的图片"), !1;
|
|
78
|
+
}
|
|
79
|
+
const s = new FileReader();
|
|
80
|
+
s.readAsDataURL(e), s.onload = function() {
|
|
81
|
+
const t = {
|
|
82
|
+
...e,
|
|
83
|
+
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
84
|
+
thumbUrl: this.result,
|
|
85
|
+
status: "uploading",
|
|
86
|
+
percent: 0
|
|
87
|
+
};
|
|
88
|
+
q(t, e);
|
|
89
|
+
}, s.onerror = function() {
|
|
90
|
+
d.warning("图片解析失败");
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async function q(e, s) {
|
|
94
|
+
if (h.value++, typeof b == "function") {
|
|
95
|
+
b({
|
|
96
|
+
onProgress: (t) => {
|
|
97
|
+
const n = a.value.find((i) => i.uid === e.uid);
|
|
98
|
+
n && (n.percent = t);
|
|
99
|
+
},
|
|
100
|
+
onError: (t) => {
|
|
101
|
+
d.warning(t || "网络异常");
|
|
102
|
+
const n = a.value.findIndex((i) => i.uid === e.uid);
|
|
103
|
+
n > -1 && a.value.splice(n, 1), h.value--;
|
|
104
|
+
},
|
|
105
|
+
onSuccess: (t) => {
|
|
106
|
+
const n = a.value.find((i) => i.uid === e.uid);
|
|
107
|
+
n && (n.status = "success", n.path = t), c.value ? c.value.push(w(g, t, s.name)) : c.value = [w(g, t, s.name)], v.push({
|
|
108
|
+
uid: e.uid,
|
|
109
|
+
path: t
|
|
110
|
+
}), h.value--;
|
|
111
|
+
},
|
|
112
|
+
file: s
|
|
113
|
+
});
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const t = await D(R);
|
|
118
|
+
e.oss = t, a.value.push(e), O({
|
|
119
|
+
file: s,
|
|
120
|
+
dirName: T,
|
|
121
|
+
oss: t,
|
|
122
|
+
successCallBack(n) {
|
|
123
|
+
const i = a.value.find((l) => l.uid === e.uid);
|
|
124
|
+
i && (i.status = "success", i.path = n), c.value ? c.value.push(w(g, n, s.name)) : c.value = [w(g, n, s.name)], v.push({
|
|
125
|
+
uid: e.uid,
|
|
126
|
+
path: n
|
|
127
|
+
}), h.value--;
|
|
128
|
+
},
|
|
129
|
+
errorCallBack(n) {
|
|
130
|
+
d.warning(n || "网络异常");
|
|
131
|
+
const i = a.value.findIndex((l) => l.uid === e.uid);
|
|
132
|
+
i > -1 && a.value.splice(i, 1), h.value--;
|
|
133
|
+
},
|
|
134
|
+
progressCallBack(n) {
|
|
135
|
+
const i = a.value.find((l) => l.uid === e.uid);
|
|
136
|
+
i && (i.percent = n);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
} catch (t) {
|
|
140
|
+
d.warning(typeof (t == null ? void 0 : t.message) == "string" ? t.message : "网络异常");
|
|
141
|
+
const n = a.value.findIndex((i) => i.uid === e.uid);
|
|
142
|
+
n > -1 && a.value.splice(n, 1), h.value--;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function U(e) {
|
|
146
|
+
var t;
|
|
147
|
+
if (e.path) {
|
|
148
|
+
if (Array.isArray(c.value)) {
|
|
149
|
+
const n = v.findIndex((i) => i.uid === e.uid);
|
|
150
|
+
n >= 0 && (c == null || c.value.splice(n, 1), v.splice(n, 1)), c.value.length === 0 && (c.value = void 0);
|
|
151
|
+
}
|
|
152
|
+
} else
|
|
153
|
+
(t = e == null ? void 0 : e.oss) == null || t.pauseUpload();
|
|
154
|
+
const s = a.value.findIndex((n) => n.uid === e.uid);
|
|
155
|
+
return a.value.splice(s, 1), Promise.resolve(!0);
|
|
156
|
+
}
|
|
157
|
+
return (e, s) => (p(), m("div", {
|
|
158
|
+
class: J({
|
|
159
|
+
[o(k)()]: !0,
|
|
160
|
+
[o(k)("admin")]: o(S) === "admin"
|
|
161
|
+
})
|
|
162
|
+
}, [
|
|
163
|
+
f("input", {
|
|
164
|
+
style: { display: "none" },
|
|
165
|
+
type: "file",
|
|
166
|
+
ref_key: "fileRef",
|
|
167
|
+
ref: _,
|
|
168
|
+
accept: o(y),
|
|
169
|
+
onChange: M
|
|
170
|
+
}, null, 40, oe),
|
|
171
|
+
f("div", ce, [
|
|
172
|
+
(p(!0), m(K, null, Q(o(a), (t) => (p(), m("div", {
|
|
173
|
+
class: "picture-item",
|
|
174
|
+
key: t.uid
|
|
175
|
+
}, [
|
|
176
|
+
f("div", ue, [
|
|
177
|
+
f("img", {
|
|
178
|
+
src: t.thumbUrl,
|
|
179
|
+
alt: ""
|
|
180
|
+
}, null, 8, re),
|
|
181
|
+
W(f("div", le, [
|
|
182
|
+
f("div", {
|
|
183
|
+
class: "picture-item-close",
|
|
184
|
+
onClick: (n) => U(t)
|
|
185
|
+
}, [
|
|
186
|
+
C(o(F))
|
|
187
|
+
], 8, de),
|
|
188
|
+
t.status === "uploading" ? (p(), m("div", fe, [
|
|
189
|
+
C(o(ie), {
|
|
190
|
+
percent: t.percent,
|
|
191
|
+
strokeColor: "#ffffff",
|
|
192
|
+
trailColor: "rgba(255, 255, 255, 0.3)",
|
|
193
|
+
size: 4,
|
|
194
|
+
showInfo: !1
|
|
195
|
+
}, null, 8, ["percent"])
|
|
196
|
+
])) : P("", !0)
|
|
197
|
+
], 512), [
|
|
198
|
+
[X, t.status === "uploading"]
|
|
199
|
+
])
|
|
200
|
+
])
|
|
201
|
+
]))), 128)),
|
|
202
|
+
o(r) === void 0 || o(a).length < o(r) ? (p(), m("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
class: "picture-upload",
|
|
205
|
+
onClick: z
|
|
206
|
+
}, [
|
|
207
|
+
C(o(ee)),
|
|
208
|
+
pe
|
|
209
|
+
])) : P("", !0)
|
|
210
|
+
]),
|
|
211
|
+
f("div", me, [
|
|
212
|
+
o(N) ? (p(), m("div", he, B(o(N)), 1)) : (p(), m("div", ge, B(`支持扩展名:${o(se)(o(y))},图片大小小于${o(x)}MB`), 1))
|
|
213
|
+
])
|
|
214
|
+
], 2));
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
export {
|
|
218
|
+
Re as default
|
|
219
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { defineComponent as Z, inject as l, ref as g, watch as V, computed as ee, openBlock as h, createElementBlock as b, normalizeClass as te, unref as n, createElementVNode as r, toDisplayString as A, createCommentVNode as S, normalizeStyle as ne, createBlock as ae, withModifiers as se, createVNode as oe } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import { getName as le, getReturnData as U } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as re, useOssInit as ie } from "../hooks/useOss.mjs";
|
|
5
|
+
import { fileMatchesAccept as ce, getAcceptText as ue } from "../utils/accept.mjs";
|
|
6
|
+
import { message as c, Progress as ve } from "ant-design-vue";
|
|
7
|
+
import { DeleteOutlined as fe } from "@ant-design/icons-vue";
|
|
8
|
+
import I from "../assets/single-file-icon.png.mjs";
|
|
9
|
+
import "../styles/single-file.css";
|
|
10
|
+
import { useNamespace as pe } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const de = ["accept"], me = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "state-un"
|
|
14
|
+
}, ge = ["src"], he = { class: "state-un-title" }, _e = { class: "state-un-subtitle" }, Ce = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "state-ing"
|
|
17
|
+
}, De = { class: "left" }, ke = ["src"], ye = { class: "center" }, we = { class: "center-progress" }, Re = /* @__PURE__ */ Z({
|
|
18
|
+
__name: "SingleFile",
|
|
19
|
+
setup(Fe) {
|
|
20
|
+
const { b: _ } = pe("ap-upload-single-file"), { put: $, client: z } = re(), C = l("theme"), q = l("dirName"), D = l("accept") || "*", k = l("maxSize") || 500, j = l("title") || "点击或将文件拖拽到这里上传", y = l("subTitle"), a = l("value"), w = l("needName"), u = l("uploadingCount"), P = l("beforeUpload"), x = l("customRequest"), G = l("getOssAccess"), s = g(null);
|
|
21
|
+
V(
|
|
22
|
+
() => a == null ? void 0 : a.value,
|
|
23
|
+
function(e) {
|
|
24
|
+
const t = le(w, e);
|
|
25
|
+
s.value === null && e && (o.value = 3, s.value = new File([e], t, {}));
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
const o = g(1), p = g(0), d = g(null), O = ee(() => s.value && (a == null ? void 0 : a.value));
|
|
29
|
+
function H() {
|
|
30
|
+
var e;
|
|
31
|
+
o.value === 1 && ((e = d.value) == null || e.click());
|
|
32
|
+
}
|
|
33
|
+
function R(e) {
|
|
34
|
+
e.preventDefault(), e.stopPropagation();
|
|
35
|
+
}
|
|
36
|
+
function J(e) {
|
|
37
|
+
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
38
|
+
}
|
|
39
|
+
function K(e) {
|
|
40
|
+
T(e);
|
|
41
|
+
}
|
|
42
|
+
function Q(e) {
|
|
43
|
+
if (e.preventDefault(), e.stopPropagation(), o.value !== 1)
|
|
44
|
+
return;
|
|
45
|
+
var t = e.dataTransfer, i = [], L = 0, M = t.files.length;
|
|
46
|
+
function v() {
|
|
47
|
+
L === M - 1 && K(i), L++;
|
|
48
|
+
}
|
|
49
|
+
if (t.items !== void 0)
|
|
50
|
+
for (var F = 0; F < t.items.length; F++) {
|
|
51
|
+
var B = t.items[F];
|
|
52
|
+
if (B.kind === "file" && B.webkitGetAsEntry().isFile) {
|
|
53
|
+
var Y = B.getAsFile();
|
|
54
|
+
i.push(Y), v();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else
|
|
58
|
+
for (let N = 0; N < M; N++) {
|
|
59
|
+
var m = t.files[N];
|
|
60
|
+
if (m.type)
|
|
61
|
+
i.push(m), v();
|
|
62
|
+
else
|
|
63
|
+
try {
|
|
64
|
+
var E = new FileReader();
|
|
65
|
+
E.readAsDataURL(m.slice(0, 3)), E.addEventListener(
|
|
66
|
+
"load",
|
|
67
|
+
function(f) {
|
|
68
|
+
console.warn(f, "load"), i.push(m), v();
|
|
69
|
+
},
|
|
70
|
+
!1
|
|
71
|
+
), E.addEventListener(
|
|
72
|
+
"error",
|
|
73
|
+
function(f) {
|
|
74
|
+
console.warn(f, "error"), c.warning("不支持上传文件夹"), v();
|
|
75
|
+
},
|
|
76
|
+
!1
|
|
77
|
+
);
|
|
78
|
+
} catch (f) {
|
|
79
|
+
console.warn(f), c.warning("不支持上传文件夹"), v();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function W(e) {
|
|
84
|
+
const t = e.target;
|
|
85
|
+
T(t == null ? void 0 : t.files), d.value && (d.value.value = "");
|
|
86
|
+
}
|
|
87
|
+
async function T(e) {
|
|
88
|
+
if (e != null && e.length) {
|
|
89
|
+
if (typeof P == "function") {
|
|
90
|
+
if (P(e[0]) === !1)
|
|
91
|
+
return;
|
|
92
|
+
} else {
|
|
93
|
+
if (e[0].size > k * 1024 * 1024) {
|
|
94
|
+
c.warning(`文件大小不超过${k}MB`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (!ce(e[0], D)) {
|
|
98
|
+
c.warning("不支持该格式的文件");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (s.value = e[0], o.value = 2, p.value = 0, a.value = "", u.value++, typeof x == "function") {
|
|
103
|
+
x({
|
|
104
|
+
onProgress: (t) => {
|
|
105
|
+
p.value = t;
|
|
106
|
+
},
|
|
107
|
+
onError: (t) => {
|
|
108
|
+
c.warning(t || "网络异常"), o.value = 1, s.value = null, u.value--;
|
|
109
|
+
},
|
|
110
|
+
onSuccess: (t) => {
|
|
111
|
+
a.value = U(
|
|
112
|
+
w,
|
|
113
|
+
t,
|
|
114
|
+
s.value.name
|
|
115
|
+
), o.value = 3, u.value--;
|
|
116
|
+
},
|
|
117
|
+
file: e[0]
|
|
118
|
+
});
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
await ie(G), $({
|
|
123
|
+
file: s.value,
|
|
124
|
+
dirName: q,
|
|
125
|
+
oss: z,
|
|
126
|
+
successCallBack(t) {
|
|
127
|
+
a.value = U(
|
|
128
|
+
w,
|
|
129
|
+
t,
|
|
130
|
+
s.value.name
|
|
131
|
+
), o.value = 3, u.value--;
|
|
132
|
+
},
|
|
133
|
+
errorCallBack(t) {
|
|
134
|
+
c.warning(t || "网络异常"), o.value = 1, s.value = null, u.value--;
|
|
135
|
+
},
|
|
136
|
+
progressCallBack(t) {
|
|
137
|
+
p.value = t;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
} catch (t) {
|
|
141
|
+
c.warning(typeof (t == null ? void 0 : t.message) == "string" ? t.message : "网络异常"), o.value = 1, s.value = null, u.value--;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function X() {
|
|
146
|
+
s.value && !(a != null && a.value) && z.pauseUpload(), o.value = 1, s.value = null, a.value = void 0;
|
|
147
|
+
}
|
|
148
|
+
return (e, t) => {
|
|
149
|
+
var i;
|
|
150
|
+
return h(), b("div", {
|
|
151
|
+
class: te({
|
|
152
|
+
[n(_)()]: !0,
|
|
153
|
+
[n(_)("admin")]: n(C) === "admin",
|
|
154
|
+
[n(_)("un")]: o.value === 1
|
|
155
|
+
}),
|
|
156
|
+
onClick: H,
|
|
157
|
+
onDragenter: R,
|
|
158
|
+
onDragover: J,
|
|
159
|
+
onDragleave: R,
|
|
160
|
+
onDrop: Q
|
|
161
|
+
}, [
|
|
162
|
+
r("input", {
|
|
163
|
+
style: { display: "none" },
|
|
164
|
+
type: "file",
|
|
165
|
+
ref_key: "fileRef",
|
|
166
|
+
ref: d,
|
|
167
|
+
accept: n(D),
|
|
168
|
+
onChange: W
|
|
169
|
+
}, null, 40, de),
|
|
170
|
+
o.value === 1 ? (h(), b("div", me, [
|
|
171
|
+
r("img", {
|
|
172
|
+
class: "state-un-icon",
|
|
173
|
+
src: n(I)
|
|
174
|
+
}, null, 8, ge),
|
|
175
|
+
r("div", he, A(n(j)), 1),
|
|
176
|
+
r("div", _e, A(typeof n(y) == "string" && n(y).length > 0 ? n(y) : `支持扩展名:${n(ue)(n(D))},文件大小小于${n(k)}MB`), 1)
|
|
177
|
+
])) : S("", !0),
|
|
178
|
+
[2, 3].includes(o.value) ? (h(), b("div", Ce, [
|
|
179
|
+
r("div", De, [
|
|
180
|
+
r("img", { src: n(I) }, null, 8, ke)
|
|
181
|
+
]),
|
|
182
|
+
r("div", ye, [
|
|
183
|
+
r("div", {
|
|
184
|
+
class: "center-title",
|
|
185
|
+
style: ne({
|
|
186
|
+
color: O.value ? "#0070FF" : "#182948"
|
|
187
|
+
})
|
|
188
|
+
}, A((i = s.value) == null ? void 0 : i.name), 5),
|
|
189
|
+
r("div", we, [
|
|
190
|
+
O.value ? S("", !0) : (h(), ae(n(ve), {
|
|
191
|
+
key: 0,
|
|
192
|
+
percent: p.value,
|
|
193
|
+
size: 4,
|
|
194
|
+
showInfo: !1,
|
|
195
|
+
trailColor: n(C) === "admin" ? "#D9D9D9" : "#DEE4ED",
|
|
196
|
+
strokeColor: n(C) === "admin" ? "#34B77C" : "#0070FF"
|
|
197
|
+
}, null, 8, ["percent", "trailColor", "strokeColor"]))
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
r("div", {
|
|
201
|
+
class: "right",
|
|
202
|
+
onClick: se(X, ["stop"])
|
|
203
|
+
}, [
|
|
204
|
+
oe(n(fe))
|
|
205
|
+
])
|
|
206
|
+
])) : S("", !0)
|
|
207
|
+
], 34);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
Re as default
|
|
213
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Oss } from '@aplus-frontend/oss';
|
|
2
|
+
export type { Oss } from '@aplus-frontend/oss';
|
|
3
|
+
declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack }: {
|
|
4
|
+
file: File;
|
|
5
|
+
dirName: string;
|
|
6
|
+
oss: any;
|
|
7
|
+
successCallBack: (saveUrl: string, previewUrl: string) => void;
|
|
8
|
+
errorCallBack: (msg: string) => void;
|
|
9
|
+
progressCallBack: (p: number) => void;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
export declare function useOss(): {
|
|
12
|
+
client: Oss;
|
|
13
|
+
put: typeof put;
|
|
14
|
+
};
|
|
15
|
+
export declare function useOssInit(getOssAccess: any): Promise<{
|
|
16
|
+
client: Oss;
|
|
17
|
+
put: typeof put;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function getOssInstance(getOssAccess: any): Promise< Oss>;
|