|
@@ -1088,10 +1088,11 @@ export default {
|
|
|
tools.vue2json(this.$store.state.editor.editorTheme)
|
|
|
)
|
|
|
.then(() => {
|
|
|
- setTimeout(() => {
|
|
|
+ var param= setTimeout(() => {
|
|
|
this.showPreView = true;
|
|
|
this.isLoadingPreview = false;
|
|
|
}, 1000);
|
|
|
+ clearTimeout(param)
|
|
|
});
|
|
|
},
|
|
|
selectedElement(element) {
|
|
@@ -1253,9 +1254,10 @@ export default {
|
|
|
} else {
|
|
|
that.buttonData.backgroundSelectedImg = res;
|
|
|
that.selectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var param = setTimeout(() => {
|
|
|
that.selectedButtom = true;
|
|
|
}, 1);
|
|
|
+ clearTimeout(param)
|
|
|
}
|
|
|
};
|
|
|
img.src = res;
|
|
@@ -1284,13 +1286,15 @@ export default {
|
|
|
that.uploadButtonImg("both");
|
|
|
} else {
|
|
|
that.selectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var param = setTimeout(() => {
|
|
|
that.selectedButtom = true;
|
|
|
}, 1);
|
|
|
+ clearTimeout(param);
|
|
|
that.unSelectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var param2 = setTimeout(() => {
|
|
|
that.unSelectedButtom = true;
|
|
|
}, 1);
|
|
|
+ clearTimeout(param2);
|
|
|
}
|
|
|
};
|
|
|
img.src = res;
|
|
@@ -1358,15 +1362,17 @@ export default {
|
|
|
if (isSelected) {
|
|
|
that.buttonData.backgroundSelectedImg = res;
|
|
|
that.selectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var params = setTimeout(() => {
|
|
|
that.selectedButtom = true;
|
|
|
}, 1);
|
|
|
+ clearTimeout(params);
|
|
|
} else {
|
|
|
that.buttonData.backgroundUnselectedImg = res;
|
|
|
that.unSelectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var param = setTimeout(() => {
|
|
|
that.unSelectedButtom = true;
|
|
|
}, 1);
|
|
|
+ clearTimeout(param);
|
|
|
}
|
|
|
that.buttonData.itemId = that.itemId;
|
|
|
that.buttonData.width = img.width;
|
|
@@ -1415,13 +1421,15 @@ export default {
|
|
|
this.buttonData.backgroundSelectedImg = this.buttonData.backgroundUnselectedImg;
|
|
|
this.buttonData.backgroundUnselectedImg = temp;
|
|
|
this.selectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var params1 = setTimeout(() => {
|
|
|
this.selectedButtom = true;
|
|
|
}, 0.1);
|
|
|
+ clearTimeout(params1);
|
|
|
this.unSelectedButtom = false;
|
|
|
- setTimeout(() => {
|
|
|
+ var params2 = setTimeout(() => {
|
|
|
this.unSelectedButtom = true;
|
|
|
}, 0.1);
|
|
|
+ clearTimeout(params2);
|
|
|
}
|
|
|
},
|
|
|
components: {
|