mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 04:40:37 +00:00
no message
This commit is contained in:
parent
a5571ba1d4
commit
e0bd225ac2
@ -22,7 +22,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
show(v) {
|
||||
if (!v) {
|
||||
if (v) {
|
||||
this.$store.state.previewImageIndex = Math.max(this.$store.state.previewImageIndex, 0)
|
||||
this.$store.state.previewImageIndex = Math.min(this.$store.state.previewImageIndex, this.$store.state.previewImageList.length - 1)
|
||||
} else {
|
||||
this.$store.state.previewImageIndex = 0;
|
||||
this.$store.state.previewImageList = [];
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@
|
||||
let index = 0;
|
||||
const imgElm = editor.selection.getNode();
|
||||
if (imgElm && imgElm.nodeName === "IMG") {
|
||||
index = array.findIndex(item => item === imgElm.getAttribute("src"));
|
||||
index = array.findIndex(item => item.src === imgElm.getAttribute("src"));
|
||||
}
|
||||
this.$store.state.previewImageIndex = index;
|
||||
this.$store.state.previewImageList = array;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user