Documentation
¶
Overview ¶
分页管理.
Index ¶
- type Page
- func (page *Page) EnableAjax(actionName string)
- func (page *Page) FirstPage(styles ...string) string
- func (page *Page) GetContent(mode int) string
- func (page *Page) GetLink(url, text, title, style string) string
- func (page *Page) GetUrl(pageNo int) string
- func (page *Page) LastPage(styles ...string) string
- func (page *Page) NextPage(styles ...string) string
- func (page *Page) PageBar(styles ...string) string
- func (page *Page) PrevPage(styles ...string) string
- func (page *Page) SelectBar() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
Url *url2.URL // 当前页面的URL对象
Route string // 当前页面的路由规则(在静态分页下有效)
TotalSize int // 总共数据条数
TotalPage int // 总页数
CurrentPage int // 当前页码
PageName string // 分页参数名称(GET参数)
NextPageTag string // 下一页标签
PrevPageTag string // 上一页标签
FirstPageTag string // 首页标签
LastPageTag string // 尾页标签
PrevBar string // 上一分页条
NextBar string // 下一分页条
PageBarNum int // 控制分页条的数量
AjaxActionName string // AJAX方法名,当该属性有值时,表示使用AJAX分页
}
分页对象
func New ¶
创建一个分页对象,输入参数分别为: 总数量、每页数量、当前页码、当前的URL(可以只是URI+QUERY)、(可选)路由规则(例如: /user/list/:page、/order/list/*page)
Click to show internal directories.
Click to hide internal directories.