mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 修复 diffEditor disabled 状态不更新的问题 (#11078)
This commit is contained in:
parent
cf86d4f04e
commit
07b80316c9
@ -24,6 +24,12 @@ export default class DiffEditor extends React.Component<DiffEditorProps> {
|
||||
if (this.modifiedEditor && value !== prevProps.value) {
|
||||
this.modifiedEditor.getModel().setValue(value || '');
|
||||
}
|
||||
|
||||
if (this.props.disabled !== prevProps.disabled && this.modifiedEditor) {
|
||||
this.modifiedEditor.updateOptions?.({
|
||||
readOnly: this.props.disabled
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
Loading…
Reference in New Issue
Block a user