Unverified 提交 efce482b 作者: liuzhidong 提交者: GitHub

feat(Tinymce): add dynamics to the read-only state of the rich text editor (#725)

*富文本目前只支持初始化配置,本次增加了只读状态动态设置,只需更改readonly的值
上级 bcad95d3
...@@ -174,6 +174,10 @@ ...@@ -174,6 +174,10 @@
const disabled = computed(() => { const disabled = computed(() => {
const { options } = props; const { options } = props;
const getdDisabled = options && Reflect.get(options, 'readonly'); const getdDisabled = options && Reflect.get(options, 'readonly');
const editor = unref(editorRef);
if (editor) {
editor.setMode(getdDisabled ? 'readonly' : 'design');
}
return getdDisabled ?? false; return getdDisabled ?? false;
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论