refactor: ♻️ 代码规范优化
This commit is contained in:
@@ -192,7 +192,11 @@ const handleSuccess = (fileInfo: FileInfo) => {
|
||||
modelValue.value = [...modelValue.value, fileInfo.url];
|
||||
};
|
||||
|
||||
const handleError = (error: any) => {
|
||||
/**
|
||||
* 上传失败
|
||||
*/
|
||||
const handleError = (_error: any) => {
|
||||
console.error(_error);
|
||||
ElMessage.error("上传失败");
|
||||
};
|
||||
|
||||
@@ -223,8 +227,8 @@ function handleDownload(file: UploadUserFile) {
|
||||
color: var(--el-text-color-regular);
|
||||
cursor: pointer;
|
||||
opacity: 0.75;
|
||||
transition: opacity var(--el-transition-duration);
|
||||
transform: translateY(-50%);
|
||||
transition: opacity var(--el-transition-duration);
|
||||
}
|
||||
|
||||
:deep(.el-upload-list) {
|
||||
|
||||
@@ -169,7 +169,7 @@ function handleUpload(options: UploadRequestOptions) {
|
||||
/**
|
||||
* 上传文件超出限制
|
||||
*/
|
||||
function handleExceed(files: File[], uploadFiles: UploadUserFile[]) {
|
||||
function handleExceed() {
|
||||
ElMessage.warning("最多只能上传" + props.limit + "张图片");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user