优化 AI 绘图提示词模板,给文件上传增加锁定遮罩层

This commit is contained in:
RockYang
2025-02-28 07:50:10 +08:00
parent 04b364c1cd
commit f98dcee7d4
6 changed files with 38 additions and 51 deletions

View File

@@ -53,6 +53,7 @@ import {isImage, removeArrayItem} from "@/utils/libs";
import {GetFileIcon} from "@/store/system";
import {checkSession} from "@/store/cache";
import {useSharedStore} from "@/store/sharedata";
import {closeLoading, showLoading} from "@/utils/dialog";
const props = defineProps({
userId: Number,
@@ -111,14 +112,17 @@ const onScroll = (options) => {
const afterRead = (file) => {
const formData = new FormData();
formData.append("file", file.file, file.name);
showLoading("文件上传中...");
// 执行上传操作
httpPost("/api/upload", formData)
.then((res) => {
fileData.items.unshift(res.data);
ElMessage.success({ message: "上传成功", duration: 500 });
closeLoading()
})
.catch((e) => {
ElMessage.error("图片上传失败:" + e.message);
closeLoading()
});
};