Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
7bca4fcb
Commit
7bca4fcb
authored
Jun 27, 2020
by
tys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭顶部tab页时,左侧菜单定位到当前显示页
parent
1b7a735f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
ruoyi-admin/src/main/resources/static/ruoyi/index.js
+16
-1
ruoyi-admin/src/main/resources/templates/index.html
+1
-8
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/index.js
View file @
7bca4fcb
...
@@ -71,7 +71,16 @@ $(window).bind("load resize", function() {
...
@@ -71,7 +71,16 @@ $(window).bind("load resize", function() {
}
}
}
}
});
});
function
syncMenuTab
(
dataId
)
{
var
$dataObj
=
$
(
'a[href$="'
+
decodeURI
(
dataId
)
+
'"]'
);
if
(
!
$dataObj
.
hasClass
(
"noactive"
))
{
$
(
'.nav ul'
).
removeClass
(
"in"
);
$dataObj
.
parents
(
"ul"
).
addClass
(
"in"
)
$dataObj
.
parents
(
"li"
).
addClass
(
"active"
).
siblings
().
removeClass
(
"active"
).
find
(
'li'
).
removeClass
(
"active"
);
$dataObj
.
parents
(
"ul"
).
css
(
'height'
,
'auto'
).
height
();
$dataObj
.
click
();
}
}
function
NavToggle
()
{
function
NavToggle
()
{
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
}
}
...
@@ -387,6 +396,8 @@ $(function() {
...
@@ -387,6 +396,8 @@ $(function() {
}
}
scrollToTab
(
$
(
'.menuTab.active'
));
scrollToTab
(
$
(
'.menuTab.active'
));
setIframeUrl
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
setIframeUrl
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
syncMenuTab
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
return
false
;
return
false
;
}
}
...
@@ -551,6 +562,7 @@ $(function() {
...
@@ -551,6 +562,7 @@ $(function() {
callback
:
function
(
key
,
opt
)
{
callback
:
function
(
key
,
opt
)
{
setActiveTab
(
this
);
setActiveTab
(
this
);
tabCloseOther
();
tabCloseOther
();
syncMenuTab
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
}
}
},
},
"close_left"
:
{
"close_left"
:
{
...
@@ -566,6 +578,7 @@ $(function() {
...
@@ -566,6 +578,7 @@ $(function() {
$
(
this
).
remove
();
$
(
this
).
remove
();
});
});
$
(
'.page-tabs-content'
).
css
(
"margin-left"
,
"0"
);
$
(
'.page-tabs-content'
).
css
(
"margin-left"
,
"0"
);
syncMenuTab
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
}
}
},
},
"close_right"
:
{
"close_right"
:
{
...
@@ -577,6 +590,7 @@ $(function() {
...
@@ -577,6 +590,7 @@ $(function() {
$
(
'.menuTab[data-id="'
+
$
(
this
).
data
(
'id'
)
+
'"]'
).
remove
();
$
(
'.menuTab[data-id="'
+
$
(
this
).
data
(
'id'
)
+
'"]'
).
remove
();
$
(
this
).
remove
();
$
(
this
).
remove
();
});
});
syncMenuTab
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
}
}
},
},
"close_all"
:
{
"close_all"
:
{
...
@@ -584,6 +598,7 @@ $(function() {
...
@@ -584,6 +598,7 @@ $(function() {
icon
:
"fa-window-close"
,
icon
:
"fa-window-close"
,
callback
:
function
(
key
,
opt
)
{
callback
:
function
(
key
,
opt
)
{
tabCloseAll
();
tabCloseAll
();
syncMenuTab
(
$
(
'.page-tabs-content'
).
find
(
'.active'
).
attr
(
'data-id'
));
}
}
},
},
"step"
:
"---------"
,
"step"
:
"---------"
,
...
...
ruoyi-admin/src/main/resources/templates/index.html
View file @
7bca4fcb
...
@@ -310,14 +310,7 @@ $(function() {
...
@@ -310,14 +310,7 @@ $(function() {
if
(
isLinkage
)
{
if
(
isLinkage
)
{
$
(
".menuTabs"
).
on
(
"click"
,
".menuTab"
,
function
()
{
$
(
".menuTabs"
).
on
(
"click"
,
".menuTab"
,
function
()
{
var
dataId
=
$
(
this
).
attr
(
"data-id"
);
var
dataId
=
$
(
this
).
attr
(
"data-id"
);
var
$dataObj
=
$
(
'a[href$="'
+
decodeURI
(
dataId
)
+
'"]'
);
syncMenuTab
(
dataId
);
if
(
!
$dataObj
.
hasClass
(
"noactive"
))
{
$
(
'.nav ul'
).
removeClass
(
"in"
);
$dataObj
.
parents
(
"ul"
).
addClass
(
"in"
)
$dataObj
.
parents
(
"li"
).
addClass
(
"active"
).
siblings
().
removeClass
(
"active"
).
find
(
'li'
).
removeClass
(
"active"
);
$dataObj
.
parents
(
"ul"
).
css
(
'height'
,
'auto'
).
height
();
$dataObj
.
click
();
}
})
})
}
}
});
});
...
...
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