Documentation
¶
Index ¶
- type CreateFromDataRequest
- type CreateFromSelectCommandRequest
- type KmgPage
- func CreateFromData(req CreateFromDataRequest) *KmgPage
- func CreateFromSelectCommand(req CreateFromSelectCommandRequest) *KmgPage
- func CreateFromSelectCommandAndHttpContext(Select *MysqlAst.SelectCommand, Ctx *kmgHttp.Context) *KmgPage
- func CreateFromSelectCommandAndHttpContextByItemPerPage(Select *MysqlAst.SelectCommand, Ctx *kmgHttp.Context, num int) *KmgPage
- func (page *KmgPage) GetAfterPageUrl() string
- func (page *KmgPage) GetBeforePageUrl() string
- func (page *KmgPage) GetMysqlOffset() int
- func (page *KmgPage) GetShowPageArray() []UrlParam
- func (page *KmgPage) GetTotalItem() int
- func (page *KmgPage) GetTotalPage() int
- func (page *KmgPage) GetUrlWithPage(pageNum int) string
- func (page *KmgPage) HtmlRender() string
- func (page *KmgPage) IsAfterPageActive() bool
- func (page *KmgPage) IsBeforePageActive() bool
- type UrlParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateFromDataRequest ¶
type CreateFromSelectCommandRequest ¶
type CreateFromSelectCommandRequest struct { Select *MysqlAst.SelectCommand //必填 Ctx kmgHttp.Context //可选 Url string //可选 ItemPerPage int //可选 CurrentPage int //可选 PageKeyName string //可选 }
@deprecated
type KmgPage ¶
type KmgPage struct { ItemPerPage int // 每页数据量 ShowPageNum int // 显示分页的页面的时候,显示出来的页数 如 10,11,12,13,14,15 就是显示了6个页 PageKeyName string // 页面参数的名字 CurrentPage int // 当前页数,默认为1 TotalItem int // 总数据量 BaseUrl string // 不包含页码参数的url,具体渲染url的时候会把页面参数加上 Data []map[string]string // 本次分页查询到的数据 TotalPage int // 共有多少个页面 StartIndex int EndIndex int }
func CreateFromData ¶
func CreateFromData(req CreateFromDataRequest) *KmgPage
func CreateFromSelectCommand ¶
func CreateFromSelectCommand(req CreateFromSelectCommandRequest) *KmgPage
@deprecated
func CreateFromSelectCommandAndHttpContext ¶
func CreateFromSelectCommandAndHttpContext(Select *MysqlAst.SelectCommand, Ctx *kmgHttp.Context) *KmgPage
func (*KmgPage) GetTotalPage ¶
func (*KmgPage) HtmlRender ¶
Click to show internal directories.
Click to hide internal directories.