提交 0ed01877 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

warning清理

上级 3c8112a6
<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>
<button v-on:click="saveHtml">保存</button>
</div>
<div class="edit_container">
<quill-editor
:options="editorOption"
@blur="onEditorBlur($event)"
@change="onEditorChange($event)"
@focus="onEditorFocus($event)"
ref="myQuillEditor"
v-model="content"
></quill-editor>
<button v-on:click="saveHtml">保存</button>
</div>
</template>
<script>
export default {
name: 'App',
data(){
return {
content: `<p>hello world</p>`,
editorOption: {}
}
},computed: {
editor() {
return this.$refs.myQuillEditor.quill;
},
},methods: {
onEditorReady(editor) { // 准备编辑器
},
onEditorBlur(){}, // 失去焦点事件
onEditorFocus(){}, // 获得焦点事件
onEditorChange(){}, // 内容改变事件
saveHtml:function(event){
alert(this.content);
}
}
export default {
name: 'App',
data() {
return {
content: `<p>hello world</p>`,
editorOption: {}
}
},
computed: {
editor() {
return this.$refs.myQuillEditor.quill
}
},
methods: {
// onEditorReady(editor) { // 准备编辑器
// },
onEditorBlur() {}, // 失去焦点事件
onEditorFocus() {}, // 获得焦点事件
onEditorChange() {}, // 内容改变事件
saveHtml() {} // 保存方法
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
\ No newline at end of file
......@@ -91,15 +91,16 @@ export default {
}
return (isPng || isJPG) && isLt2M
},
uploadSuccess(res, file) {
console.log(res, file)
uploadSuccess(res) {
this.$message({
type: 'success',
message: '上传成功'
})
this.getTableData()
if(res.success){
this.getTableData()
}
},
uploadError(err) {
uploadError() {
this.$message({
type: 'error',
message: '上传失败'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册