mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-04 16:37:06 +00:00
perf: 优化任务详情右键预览图片
This commit is contained in:
parent
5d1d108811
commit
c748d8f5f6
@ -303,7 +303,12 @@
|
||||
$A.messageWarning("没有可预览的图片")
|
||||
return;
|
||||
}
|
||||
this.$store.state.previewImageIndex = 0;
|
||||
let index = 0;
|
||||
const imgElm = editor.selection.getNode();
|
||||
if (imgElm && imgElm.nodeName === "IMG") {
|
||||
index = array.findIndex(item => item === imgElm.getAttribute("src"));
|
||||
}
|
||||
this.$store.state.previewImageIndex = index;
|
||||
this.$store.state.previewImageList = array;
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user