warning清理

This commit is contained in:
pixel
2019-10-30 17:21:11 +08:00
parent 3f04b0e635
commit 508fb9b70e
2 changed files with 46 additions and 43 deletions
+15 -13
View File
@@ -1,12 +1,13 @@
<template>
<div class="edit_container">
<quill-editor
v-model="content"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
@change="onEditorChange($event)">
</quill-editor>
@blur="onEditorBlur($event)"
@change="onEditorChange($event)"
@focus="onEditorFocus($event)"
ref="myQuillEditor"
v-model="content"
></quill-editor>
<button v-on:click="saveHtml">保存</button>
</div>
</template>
@@ -19,19 +20,20 @@
content: `<p>hello world</p>`,
editorOption: {}
}
},computed: {
},
computed: {
editor() {
return this.$refs.myQuillEditor.quill;
},
},methods: {
onEditorReady(editor) { // 准备编辑器
return this.$refs.myQuillEditor.quill
}
},
methods: {
// onEditorReady(editor) { // 准备编辑器
// },
onEditorBlur() {}, // 失去焦点事件
onEditorFocus() {}, // 获得焦点事件
onEditorChange() {}, // 内容改变事件
saveHtml:function(event){
alert(this.content);
}
saveHtml() {} // 保存方法
}
}
</script>
@@ -91,15 +91,16 @@ export default {
}
return (isPng || isJPG) && isLt2M
},
uploadSuccess(res, file) {
console.log(res, file)
uploadSuccess(res) {
this.$message({
type: 'success',
message: '上传成功'
})
if(res.success){
this.getTableData()
}
},
uploadError(err) {
uploadError() {
this.$message({
type: 'error',
message: '上传失败'