mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-20 00:55:36 +08:00
refactor: 迁移requestClient到alovaInstance并移除旧版上传组件
重构项目中所有使用requestClient的API调用,替换为alovaInstance 移除已废弃的旧版上传组件及相关代码 调整上传组件类型定义以适配antdv-next更新 优化上传逻辑,移除不必要的进度事件和取消信号 更新类型定义文件,迁移axios配置到alova类型
This commit is contained in:
@@ -3,10 +3,7 @@
|
||||
去除使用`file-type`库进行文件类型检测 在Safari无法使用
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import type {
|
||||
UploadFile,
|
||||
UploadListType,
|
||||
} from 'antdv-next/es/upload/interface';
|
||||
import type { UploadFile, UploadProps } from 'antdv-next';
|
||||
|
||||
import type { BaseUploadProps, UploadEmits } from './props';
|
||||
|
||||
@@ -26,7 +23,7 @@ interface ImageUploadProps extends BaseUploadProps {
|
||||
* 同antdv的listType
|
||||
* @default picture-card
|
||||
*/
|
||||
listType?: UploadListType;
|
||||
listType?: UploadProps['listType'];
|
||||
/**
|
||||
* 使用list-type: picture-card时 是否显示动画
|
||||
* 会有一个`弹跳`的效果 默认关闭
|
||||
@@ -127,7 +124,7 @@ function currentPreview(file: UploadFile) {
|
||||
>
|
||||
<template #size>
|
||||
<span
|
||||
class="text-primary mx-1 font-medium"
|
||||
class="mx-1 font-medium text-primary"
|
||||
:class="{ 'upload-text__disabled': disabled }"
|
||||
>
|
||||
{{ maxSize }}MB
|
||||
@@ -135,7 +132,7 @@ function currentPreview(file: UploadFile) {
|
||||
</template>
|
||||
<template #ext>
|
||||
<span
|
||||
class="text-primary mx-1 font-medium"
|
||||
class="mx-1 font-medium text-primary"
|
||||
:class="{ 'upload-text__disabled': disabled }"
|
||||
>
|
||||
{{ acceptStr }}
|
||||
|
||||
Reference in New Issue
Block a user