perf: 上传逻辑优化
This commit is contained in:
@ -11,7 +11,11 @@ import {
|
|||||||
Message as AMessage,
|
Message as AMessage,
|
||||||
Textarea,
|
Textarea,
|
||||||
} from '@arco-design/web-vue';
|
} from '@arco-design/web-vue';
|
||||||
import { getTemplateUrlWriter, postWorksByLinkWriter, postWorksByFileWriter } from '@/api/all/generationWorkshop-writer.ts';
|
import {
|
||||||
|
getTemplateUrlWriter,
|
||||||
|
postWorksByLinkWriter,
|
||||||
|
postWorksByFileWriter,
|
||||||
|
} from '@/api/all/generationWorkshop-writer.ts';
|
||||||
import { slsWithCatch } from '@/utils/stroage.ts';
|
import { slsWithCatch } from '@/utils/stroage.ts';
|
||||||
|
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
@ -113,7 +117,6 @@ export default {
|
|||||||
|
|
||||||
// 文件上传处理
|
// 文件上传处理
|
||||||
const handleUpload = async (option) => {
|
const handleUpload = async (option) => {
|
||||||
try {
|
|
||||||
taskStatus.value = TASK_STATUS.LOADING;
|
taskStatus.value = TASK_STATUS.LOADING;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -131,9 +134,6 @@ export default {
|
|||||||
taskStatus.value = TASK_STATUS.SUCCESS;
|
taskStatus.value = TASK_STATUS.SUCCESS;
|
||||||
works.value = data;
|
works.value = data;
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
taskStatus.value = TASK_STATUS.DEFAULT;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 跳转编辑
|
// 跳转编辑
|
||||||
|
|||||||
Reference in New Issue
Block a user