mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-27 05:30:14 +08:00
fix: 完善接口编辑正在编辑状态离开提示
This commit is contained in:
parent
f7b97f00b3
commit
c826c747e7
@ -242,6 +242,14 @@ class InterfaceEditForm extends Component {
|
||||
})
|
||||
|
||||
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.txt.html(this.state.desc)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user