Commit c1eda7cc by zhujian

fix

parent e131b7ae
......@@ -10,7 +10,13 @@ function Main(props) {
console.log("menuType", menuType);
useEffect(() => {
Bus.bind('showRouteChangeModal', () => {
Bus.bind('showRouteChangeModal',showModal )
return ()=>{
Bus.unbind('showRouteChangeModal',showModal)
}
}, [])
function showModal(){
Modal.confirm({
title: '确定要返回吗?',
content: '返回后,本次编辑的内容将不被保存',
......@@ -22,8 +28,7 @@ function Main(props) {
},
});
})
}, [])
}
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment