feat: 新增重置方法

This commit is contained in:
2025-08-01 22:02:27 +08:00
parent d4e3b50d14
commit f382d33527
5 changed files with 15 additions and 0 deletions
@@ -112,6 +112,9 @@ export default {
return return
} }
this.editor.setValue(val) this.editor.setValue(val)
},
resetField() {
this.editor.setValue('')
} }
} }
} }
@@ -82,6 +82,9 @@ export default {
return return
} }
this.editor.setValue(val) this.editor.setValue(val)
},
resetField() {
this.editor.setValue('')
} }
} }
} }
@@ -64,6 +64,9 @@ export default {
}, },
onSave(value, render) { onSave(value, render) {
this.$emit('save', value, render) this.$emit('save', value, render)
},
resetField() {
this.content = ''
} }
} }
} }
@@ -289,6 +289,9 @@ export default {
return return
} }
this.editor.insertText(text) this.editor.insertText(text)
},
resetField() {
this.setHtml('')
} }
} }
} }
@@ -82,6 +82,9 @@ export default {
return return
} }
this.editor.setValue(val) this.editor.setValue(val)
},
resetField() {
this.editor.setValue('')
} }
} }
} }