Commit a37e9d06 by maolipeng

Merge branch 'feature/zhujian/0726/qwLiving' of…

Merge branch 'feature/zhujian/0726/qwLiving' of ssh://xmgit.ixm5.cn:10022/xiaomai-cloud-class/xiaomai-cloud-class-web into feature/zhujian/0726/qwLiving
parents 21b2bcc0 c1eda7cc
...@@ -10,21 +10,26 @@ function Main(props) { ...@@ -10,21 +10,26 @@ function Main(props) {
console.log("menuType", menuType); console.log("menuType", menuType);
useEffect(() => { useEffect(() => {
Bus.bind('showRouteChangeModal', () => { Bus.bind('showRouteChangeModal',showModal )
Modal.confirm({ return ()=>{
title: '确定要返回吗?', Bus.unbind('showRouteChangeModal',showModal)
content: '返回后,本次编辑的内容将不被保存', }
okText: '确认返回',
cancelText: '留在本页',
icon: <span className='icon iconfont default-confirm-icon'>&#xe6f4;</span>,
onOk: () => {
routeHook.leave()
},
});
})
}, []) }, [])
function showModal(){
Modal.confirm({
title: '确定要返回吗?',
content: '返回后,本次编辑的内容将不被保存',
okText: '确认返回',
cancelText: '留在本页',
icon: <span className='icon iconfont default-confirm-icon'>&#xe6f4;</span>,
onOk: () => {
routeHook.leave()
},
});
}
return ( return (
<div <div
......
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