fix(测试计划): 修复附件图片预览未直接显示当前图片的缺陷

--bug=1041288 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001041288
This commit is contained in:
teukkk 2024-05-28 15:45:43 +08:00 committed by 刘瑞斌
parent d387202f78
commit e2ceab55ff
1 changed files with 1 additions and 1 deletions

View File

@ -632,7 +632,6 @@
// //
async function handlePreview(item: MsFileItem) { async function handlePreview(item: MsFileItem) {
try { try {
previewVisible.value = true;
const res = await previewFile({ const res = await previewFile({
projectId: currentProjectId.value, projectId: currentProjectId.value,
caseId: detailForm.value.id, caseId: detailForm.value.id,
@ -641,6 +640,7 @@
}); });
const blob = new Blob([res], { type: 'image/jpeg' }); const blob = new Blob([res], { type: 'image/jpeg' });
imageUrl.value = URL.createObjectURL(blob); imageUrl.value = URL.createObjectURL(blob);
previewVisible.value = true;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }