style:分页
Showing
5 changed files
with
32 additions
and
4 deletions
| ... | @@ -232,7 +232,7 @@ div.navigation { | ... | @@ -232,7 +232,7 @@ div.navigation { |
| 232 | font-weight: 600!important; | 232 | font-weight: 600!important; |
| 233 | } | 233 | } |
| 234 | .layui-laypage .layui-laypage-curr .layui-laypage-em { | 234 | .layui-laypage .layui-laypage-curr .layui-laypage-em { |
| 235 | background-color: #0091FF; | 235 | background-color: #0091FF!important; |
| 236 | } | 236 | } |
| 237 | /* 消息模块 */ | 237 | /* 消息模块 */ |
| 238 | .sysNews { | 238 | .sysNews { | ... | ... |
| 1 | .sysnews-center { | ||
| 2 | padding-bottom: 15px; | ||
| 3 | } | ||
| 1 | .sysnews-center-tab { | 4 | .sysnews-center-tab { |
| 2 | width: 1200px; | 5 | width: 1200px; |
| 3 | margin: 0 auto; | 6 | margin: 0 auto; |
| ... | @@ -49,4 +52,8 @@ | ... | @@ -49,4 +52,8 @@ |
| 49 | } | 52 | } |
| 50 | .sysnews-list li p:hover { | 53 | .sysnews-list li p:hover { |
| 51 | color: #1E9FFF; | 54 | color: #1E9FFF; |
| 55 | } | ||
| 56 | .page { | ||
| 57 | text-align: center; | ||
| 58 | margin: 15px 0; | ||
| 52 | } | 59 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -6,4 +6,7 @@ function newsCenterData() { | ... | @@ -6,4 +6,7 @@ function newsCenterData() { |
| 6 | $('.sysNewsList .newsDetail').addClass('ellipsis'); | 6 | $('.sysNewsList .newsDetail').addClass('ellipsis'); |
| 7 | $(this).removeClass('ellipsis'); | 7 | $(this).removeClass('ellipsis'); |
| 8 | }) | 8 | }) |
| 9 | $('.sysNewsList .newsDetail').mouseout(function () { | ||
| 10 | $('.sysNewsList .newsDetail').addClass('ellipsis'); | ||
| 11 | }) | ||
| 9 | } | 12 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -15,12 +15,29 @@ layui.use('laydate', function () { | ... | @@ -15,12 +15,29 @@ layui.use('laydate', function () { |
| 15 | elem: '#date2' //指定元素 | 15 | elem: '#date2' //指定元素 |
| 16 | }); | 16 | }); |
| 17 | }); | 17 | }); |
| 18 | layui.use('laypage', function () { | ||
| 19 | let laypage = layui.laypage; | ||
| 20 | laypage.render({ | ||
| 21 | elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号 | ||
| 22 | , curr: data.curr//让起始页,也就是点击的页码 | ||
| 23 | , count: data.total //数据总数,从服务端得到 | ||
| 24 | , theme: '#0091FF' | ||
| 25 | , jump: function (obj, first) { | ||
| 26 | if (!first) { | ||
| 27 | } | ||
| 28 | } | ||
| 29 | }); | ||
| 30 | }); | ||
| 18 | $(function () { | 31 | $(function () { |
| 19 | initNewsData() | 32 | initNewsData() |
| 20 | }) | 33 | }) |
| 21 | function initNewsData(){ | 34 | function initNewsData() { |
| 22 | $('.sysnews-center-tab ul li').click(function(){ | 35 | $('.sysnews-center-tab ul li').click(function () { |
| 23 | $('.sysnews-center-tab ul li').removeClass('sysnewsTabActive'); | 36 | $('.sysnews-center-tab ul li').removeClass('sysnewsTabActive'); |
| 24 | $(this).addClass('sysnewsTabActive') | 37 | $(this).addClass('sysnewsTabActive') |
| 25 | }) | 38 | }) |
| 26 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 39 | } | ||
| 40 | var data = { //数据 | ||
| 41 | total: 10, | ||
| 42 | curr: 1 | ||
| 43 | }; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment