fix: 完善接口编辑正在编辑状态离开提示

This commit is contained in:
wenbo.dong 2017-10-12 18:05:10 +08:00
parent 442700b1f7
commit 85f7615bde

View File

@ -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)
}