feat: 新增 支付管理 - 应用信息模块

This commit is contained in:
吃货
2025-07-05 00:55:24 +08:00
parent e0080bb3e0
commit 4562d204e0
9 changed files with 1637 additions and 15 deletions

View File

@@ -1,11 +1,17 @@
import type { UploadStatus } from 'element-plus';
import type { AxiosResponse } from '@vben/request';
import type { AxiosProgressEvent } from '#/api/infra/file';
export type UploadListType = 'picture' | 'picture-card' | 'text';
export type UploadStatus = 'error' | 'removed' | 'success' | 'uploading';
export type UploadStatus =
| 'error'
| 'fail'
| 'removed'
| 'success'
| 'uploading';
export enum UploadResultStatus {
DONE = 'success',
ERROR = 'error',
REMOVED = 'removed',
SUCCESS = 'success',
@@ -27,11 +33,11 @@ export function convertToUploadStatus(
status: UploadResultStatus,
): UploadStatus {
switch (status) {
case UploadResultStatus.DONE: {
case UploadResultStatus.SUCCESS: {
return 'success';
}
case UploadResultStatus.ERROR: {
return 'error';
return 'fail';
}
case UploadResultStatus.REMOVED: {
return 'removed';
@@ -44,3 +50,28 @@ export function convertToUploadStatus(
}
}
}
export interface FileUploadProps {
// 根据后缀,或者其他
accept?: string[];
api?: (
file: File,
onUploadProgress?: AxiosProgressEvent,
) => Promise<AxiosResponse<any>>;
// 上传的目录
directory?: string;
disabled?: boolean;
helpText?: string;
listType?: UploadListType;
// 最大数量的文件Infinity不限制
maxNumber?: number;
// 文件最大多少MB
maxSize?: number;
// 是否支持多选
multiple?: boolean;
// support xxx.xxx.xx
resultField?: string;
// 是否显示下面的描述
showDescription?: boolean;
value?: string | string[];
}