Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
c1eda7cc
Commit
c1eda7cc
authored
Aug 10, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e131b7ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
src/modules/root/Main.jsx
+18
-13
No files found.
src/modules/root/Main.jsx
View file @
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'
>

</
span
>,
onOk
:
()
=>
{
routeHook
.
leave
()
},
});
})
},
[])
},
[])
function
showModal
(){
Modal
.
confirm
({
title
:
'确定要返回吗?'
,
content
:
'返回后,本次编辑的内容将不被保存'
,
okText
:
'确认返回'
,
cancelText
:
'留在本页'
,
icon
:
<
span
className=
'icon iconfont default-confirm-icon'
>

</
span
>,
onOk
:
()
=>
{
routeHook
.
leave
()
},
});
}
return
(
return
(
<
div
<
div
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment