完善登录页面

This commit is contained in:
陈淳
2022-10-12 14:20:03 +08:00
parent 24cda70cbc
commit 4a54eb56a7
34 changed files with 353 additions and 54 deletions

View File

@@ -66,13 +66,25 @@ onMounted(() => {
visible.value = true;
});
const afterRead = (file: any) => {
file.status = "uploading";
file.message = "上传中...";
var formData = new FormData();
formData.append("file", file.file);
//一个文件
if(file.length==undefined)
{
formData.append("file", file.file);
}
else
{
//多个文件
file.forEach((f:any) => {
formData.append("file", f.file);
});
}
fileApi.upload("image", formData)
.then((response: any) => {
images.value.push(response.data);
images.value.push(...response.data);
file.status = "done";
file.message = "成功";
})