|
@@ -53,7 +53,7 @@
|
|
|
class="intLink"
|
|
|
title="插入图片"
|
|
|
src="../../img/menu_image.png"
|
|
|
- @mousedown="$refs.ImageInput.click()"
|
|
|
+ @mousedown="insertImage"
|
|
|
/>
|
|
|
<input
|
|
|
ref="ImageInput"
|
|
@@ -141,15 +141,20 @@ export default {
|
|
|
/**
|
|
|
* @param {Event} event
|
|
|
*/
|
|
|
- async addImage(event) {
|
|
|
+ insertImage(event) {
|
|
|
+ event.preventDefault();
|
|
|
if (!this.checkEditorFocus()) {
|
|
|
window.getSelection().removeAllRanges();
|
|
|
this.$el.nextSibling.focus();
|
|
|
} else {
|
|
|
// console.log(event, event.target.files[0]);
|
|
|
- imageHandle.bind(this.$parent)(event);
|
|
|
+ this.$refs.ImageInput.click();
|
|
|
}
|
|
|
},
|
|
|
+ async addImage(event) {
|
|
|
+ // console.log(event, event.target.files[0]);
|
|
|
+ imageHandle.bind(this.$parent)(event);
|
|
|
+ },
|
|
|
/**
|
|
|
* @param {Event} event
|
|
|
*/
|