Skip to content

Commit f62377c

Browse files
committed
fix: 修复 tinymce disabled 状态不切换的问题
1 parent 516b47f commit f62377c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/amis-ui/src/components/Tinymce.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ export default class TinymceEditor extends React.Component<TinymceEditorProps> {
8585
this.editor?.setContent((this.currentContent = props.model || ''));
8686
}
8787

88-
if (this.editor && !isEqual(this.props.config, prevProps.config)) {
88+
if (
89+
this.editor &&
90+
(!isEqual(this.props.config, prevProps.config) ||
91+
props.disabled !== prevProps.disabled)
92+
) {
8993
this.editor.contentWindow.removeEventListener(
9094
'unload',
9195
this.handleIframeUnload

0 commit comments

Comments
 (0)