tiny-vue
tiny-vue copied to clipboard
🐛 [Bug]: RichTextEditor在加载内容,修改modal value不生效
Version
3.16
Vue Version
3
Link to minimal reproduction
- RichTextEditor 设置v-modal,绑定到一个变量
- 通过方法,修改v-modal的值
- 发现变量值已经发生了变更,但是RichTextEdit中的内容并没有发生变化
Step to reproduce
示例代码:
<template>
<div>
<tiny-button @click="setValue">change</tiny-button>
<tiny-rich-text-editor v-model="value"></tiny-rich-text-editor>
<div class="result">
<hr />
<pre>{{ value }}</pre>
</div>
</div>
</template>
<script lang="ts">
import { RichTextEditor, Button } from '@opentiny/vue'
export default {
components: {
TinyRichTextEditor: RichTextEditor,
TinyButton: Button
},
data() {
return {
value: '你好 Opentiny!'
}
},
methods: {
setValue(){
this.value="==changed=="
}
}
}
</script>
<style scoped>
.result {
margin-top: 16px;
font-size: 14px;
line-height: 1.3;
word-break: break-all;
}
</style>
What is expected
期望改变modal value的值,编辑器中显示的内容也会发生改变
What is actually happening
No response
What is your project name
RichTextEditor
Any additional comments (optional)
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]: RichTextEditor is loading content, modifying the modal value does not take effect