mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-27 05:30:14 +08:00
fix: 完善接口编辑正在编辑状态离开提示
This commit is contained in:
parent
442700b1f7
commit
85f7615bde
@ -242,6 +242,14 @@ class InterfaceEditForm extends Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
let editor = this.editor = new Editor('#desc');
|
let editor = this.editor = new Editor('#desc');
|
||||||
|
const initEditorHTML = this.state.desc;
|
||||||
|
editor.customConfig.onchange = function (html) {
|
||||||
|
if (initEditorHTML === html) {
|
||||||
|
EditFormContext.props.changeEditStatus(false);
|
||||||
|
} else {
|
||||||
|
EditFormContext.props.changeEditStatus(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
editor.create();
|
editor.create();
|
||||||
editor.txt.html(this.state.desc)
|
editor.txt.html(this.state.desc)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user