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
5c736e96
Commit
5c736e96
authored
Mar 20, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面滚动显示返回顶部按钮
parent
0307599e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
+25
-0
ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
+48
-0
ruoyi-admin/src/main/resources/templates/include.html
+1
-0
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
View file @
5c736e96
...
...
@@ -1033,6 +1033,31 @@ label {
padding
:
5px
;
}
/** 向上滚动样式 **/
#scroll-up
{
border-width
:
0
;
position
:
fixed
;
right
:
2px
;
z-index
:
99
;
-webkit-transition-duration
:
.3s
;
transition-duration
:
.3s
;
opacity
:
0
;
filter
:
alpha
(
opacity
=
0
);
bottom
:
-24px
;
visibility
:
hidden
;
background-color
:
#aaa
;
color
:
#fff
;
font-size
:
14px
;
display
:
none
;
}
#scroll-up
.display
{
opacity
:
.7
;
filter
:
alpha
(
opacity
=
70
);
bottom
:
2px
;
visibility
:
visible
;
}
::-webkit-scrollbar
{
width
:
6px
;
height
:
10px
;
...
...
ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
View file @
5c736e96
...
...
@@ -12,6 +12,11 @@ $(function() {
});
}
// 回到顶部绑定
if
(
$
.
fn
.
toTop
!==
undefined
)
{
$
(
'#scroll-up'
).
toTop
();
}
// select2复选框事件绑定
if
(
$
.
fn
.
select2
!==
undefined
)
{
$
.
fn
.
select2
.
defaults
.
set
(
"theme"
,
"bootstrap"
);
...
...
@@ -154,6 +159,49 @@ $(function() {
});
});
(
function
(
$
)
{
'use strict'
;
$
.
fn
.
toTop
=
function
(
opt
)
{
var
elem
=
this
;
var
win
=
$
(
window
);
var
doc
=
$
(
'html, body'
);
var
options
=
$
.
extend
({
autohide
:
true
,
offset
:
50
,
speed
:
500
,
position
:
true
,
right
:
15
,
bottom
:
5
},
opt
);
elem
.
css
({
'cursor'
:
'pointer'
});
if
(
options
.
autohide
)
{
elem
.
css
(
'display'
,
'none'
);
}
if
(
options
.
position
)
{
elem
.
css
({
'position'
:
'fixed'
,
'right'
:
options
.
right
,
'bottom'
:
options
.
bottom
,
});
}
elem
.
click
(
function
()
{
doc
.
animate
({
scrollTop
:
0
},
options
.
speed
);
});
win
.
scroll
(
function
()
{
var
scrolling
=
win
.
scrollTop
();
if
(
options
.
autohide
)
{
if
(
scrolling
>
options
.
offset
)
{
elem
.
fadeIn
(
options
.
speed
);
}
else
elem
.
fadeOut
(
options
.
speed
);
}
});
};
})(
jQuery
);
/** 刷新选项卡 */
var
refreshItem
=
function
(){
var
topWindow
=
$
(
window
.
parent
.
document
);
...
...
ruoyi-admin/src/main/resources/templates/include.html
View file @
5c736e96
...
...
@@ -42,6 +42,7 @@
<script
th:src=
"@{/ruoyi/js/common.js?v=4.1.0}"
></script>
<script
th:src=
"@{/ruoyi/js/ry-ui.js?v=4.1.0}"
></script>
<script
th:inline=
"javascript"
>
var
ctx
=
[[@{
/
}]];
</script>
<a
id=
"scroll-up"
href=
"#"
class=
"btn btn-sm display"
><i
class=
"fa fa-angle-double-up"
></i></a>
</div>
<!-- ztree树插件 -->
...
...
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