设为首页 加入收藏

TOP

Beego学习笔记6:分页的实现(二)
2017-12-07 14:22:13 】 浏览:721
Tags:Beego 学习 笔记 实现
ss" href="/Home/Edit?Id=0">添加</a> </div> <table class="table table-striped table-hover table-bordered "> <thead> <th style="text-align: center">ID</th> <th style="text-align: center">名称</th> <th style="text-align: center">昵称</th> <th style="text-align: center">密码</th> <th style="text-align: center">Email</th> <th style="text-align: center">性别</th> <th style="text-align: center">手机号</th> <th style="text-align: center">操作</th> </thead> <tbody id="sortable"> {{range $index, $item := .datas}} <tr class="sort-item" id="module_{{$item.Id}}" value="{{$item.Id}}"> <td style="text-align: center;width: 150px;"><span class="label label-default" >{{$item.Id}}</span></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Name}}</strong></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Nickname}}</strong></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Pwd}}</strong></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Email}}</strong></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Sex}}</strong></td> <td style="text-align: center;width: 240px;" ><strong>{{$item.Phone}}</strong></td> <td style="text-align: center;width: 150px;"> <a href="/Home/Edit?Id={{$item.Id}}" class="label label-info" title="修改" >修改</a> <a href="/Home/Delete?Id={{$item.Id}}" class="label label-info" title="删除">删除</a> </td> </tr> {{end}} </tbody> </table> <div class="am-cf"> <div class="am-fr"> <ul class="am-pagination"> <li class=""><a href="/Home/List?page={{.paginator.firstpage}}">«</a></li> {{range $index,$page := .paginator.pages}} <li {{if eq $.paginator.currpage $page }}class="am-active"{{end}}> <a href="/Home/List?page={{$page}}">{{$page}}</a></li> {{end}} <li><a href="/Home/List?page={{.paginator.lastpage}}">»</a></li> </ul> </div> <div class="am-jl"> 共{{.totals}}条记录 共记{{.paginator.totalpages}} 页 当前{{.paginator.currpage}}页 </div> </div> <script type="text/java script" src="http://cdn.staticfile.org/jquery/2.0.3/jquery.min.js"></script>              </body> </html>

  

4>     运行起来,看看效果

 

 

&nb

首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Beego学习笔记四:编写Model 下一篇Beego 学习比较8:SQL语句

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目