Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b1edbe5e
authored
2021-01-18 12:01:44 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:分页
1 parent
ccb3b579
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
3 deletions
staticCss/header.css
staticCss/sysnews-center.css
staticJs/header.js
staticJs/sysnews-center.js
staticViews/sysnews-center.html
staticCss/header.css
View file @
b1edbe5
...
...
@@ -232,7 +232,7 @@ div.navigation {
font-weight
:
600
!important
;
}
.layui-laypage
.layui-laypage-curr
.layui-laypage-em
{
background-color
:
#0091FF
;
background-color
:
#0091FF
!important
;
}
/* 消息模块 */
.sysNews
{
...
...
staticCss/sysnews-center.css
View file @
b1edbe5
.sysnews-center
{
padding-bottom
:
15px
;
}
.sysnews-center-tab
{
width
:
1200px
;
margin
:
0
auto
;
...
...
@@ -50,3 +53,7 @@
.sysnews-list
li
p
:hover
{
color
:
#1E9FFF
;
}
.page
{
text-align
:
center
;
margin
:
15px
0
;
}
\ No newline at end of file
...
...
staticJs/header.js
View file @
b1edbe5
...
...
@@ -6,4 +6,7 @@ function newsCenterData() {
$
(
'.sysNewsList .newsDetail'
).
addClass
(
'ellipsis'
);
$
(
this
).
removeClass
(
'ellipsis'
);
})
$
(
'.sysNewsList .newsDetail'
).
mouseout
(
function
()
{
$
(
'.sysNewsList .newsDetail'
).
addClass
(
'ellipsis'
);
})
}
\ No newline at end of file
...
...
staticJs/sysnews-center.js
View file @
b1edbe5
...
...
@@ -15,12 +15,29 @@ layui.use('laydate', function () {
elem
:
'#date2'
//指定元素
});
});
layui
.
use
(
'laypage'
,
function
()
{
let
laypage
=
layui
.
laypage
;
laypage
.
render
({
elem
:
'page'
//注意,这里的 test1 是 ID,不用加 # 号
,
curr
:
data
.
curr
//让起始页,也就是点击的页码
,
count
:
data
.
total
//数据总数,从服务端得到
,
theme
:
'#0091FF'
,
jump
:
function
(
obj
,
first
)
{
if
(
!
first
)
{
}
}
});
});
$
(
function
()
{
initNewsData
()
})
function
initNewsData
(){
$
(
'.sysnews-center-tab ul li'
).
click
(
function
()
{
function
initNewsData
()
{
$
(
'.sysnews-center-tab ul li'
).
click
(
function
()
{
$
(
'.sysnews-center-tab ul li'
).
removeClass
(
'sysnewsTabActive'
);
$
(
this
).
addClass
(
'sysnewsTabActive'
)
})
}
var
data
=
{
//数据
total
:
10
,
curr
:
1
};
\ No newline at end of file
...
...
staticViews/sysnews-center.html
View file @
b1edbe5
...
...
@@ -43,6 +43,7 @@
<span
class=
"list-type"
>
已阅
</span>
</li>
</ul>
<div
id=
"page"
class=
"page"
></div>
</div>
</div>
</body>
...
...
Please
register
or
sign in
to post a comment