富文本组件增加watch防止富文本无法加载的情况发生。
This commit is contained in:
parent
208346a480
commit
a6ae0ba4b0
|
@ -80,8 +80,12 @@ onBeforeUnmount(() => {
|
||||||
|
|
||||||
const handleCreated = (editor) => {
|
const handleCreated = (editor) => {
|
||||||
editorRef.value = editor
|
editorRef.value = editor
|
||||||
valueHtml.value =props.modelValue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(()=>props.modelValue,()=>{
|
||||||
|
valueHtml.value = props.modelValue
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
@ -50,11 +50,10 @@ onBeforeUnmount(() => {
|
||||||
|
|
||||||
const handleCreated = (editor) => {
|
const handleCreated = (editor) => {
|
||||||
editorRef.value = editor
|
editorRef.value = editor
|
||||||
valueHtml.value = props.modelValue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => props.modelValue, (val) => {
|
watch(()=>props.modelValue,()=>{
|
||||||
valueHtml.value = val
|
valueHtml.value = props.modelValue
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue