小调整,修复一bug

This commit is contained in:
xing 2023-02-14 23:44:48 +08:00
parent 72a37d3bc8
commit 8dded98f39
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ var twentyFifteen = PageEle{
<span class="meta-nav screen-reader-text"> </span>%d</span>`,
}
func (p PageEle) Current(page, totalPage int) string {
func (p PageEle) Current(page, totalPage, totalRow int) string {
return fmt.Sprintf(p.CurrentEle, page)
}

View File

@ -33,8 +33,8 @@ func (i *IndexHandle) ParseIndex(parm *IndexParams) (err error) {
i.Stats = constraints.ParamError
return
}
i.Param.CacheKey = i.Param.getSearchKey()
i.Param.ParseParams()
i.Param.CacheKey = i.Param.getSearchKey()
i.GinH["title"] = i.Param.getTitle()
i.GinH["search"] = i.Param.Search
i.GinH["header"] = i.Param.Header

View File

@ -6,7 +6,7 @@ import (
)
type Elements interface {
Current(page, totalPage int) string
Current(page, totalPage, totalRows int) string
Prev(url string) string
Next(url string) string
Dots() string
@ -67,7 +67,7 @@ func (p ParsePagination) ToHtml() (html string) {
for page := start; page <= end; page++ {
h := ""
if p.CurrentPage == page {
h = p.Current(page, p.TotalPage)
h = p.Current(page, p.TotalPage, p.TotalRaw)
} else {
h = p.Middle(page, p.Url(p.Path, p.Query, page))
}