使用easyadmin框架
自己写了一个页面和表格,用不了框架的样式了
thinkphp6使用分页的时候使用的是默认的分页样式
看起来很不美观 使用起来也不方便
这里 给大家写了一个简单的css样式
<style>.list-page {text-align:center;padding: 15px 15px;}.mws-panel-content {background: #eee;}.pagination {margin:0 !important;padding: 10px 10px;box-shadow: 0px 1px 2px 0px #E2E2E2;background: #fff;}.pagination li{border:1px solid #e6e6e6;padding: 3px 8px;display: inline-block;}.pagination .active{background-color: #46A3FF;color: #fff;}.pagination .disabled{color: #aaa;}</style>
如果需要修改 <<和>>这个变为上一页和下一页
需要到框架中的\vendor\topthink\think-orm\src\paginator\driver\Bootstrap.php
文件下修改
/** * 上一页按钮 * @param string $text * @return string */protected function getPreviousButton(string $text = "«"): string{if ($this->currentPage() <= 1) {return $this->getDisabledTextWrapper($text);}$url = $this->url($this->currentPage() - 1);return $this->getPageLinkWrapper($url, $text);}/** * 下一页按钮 * @param string $text * @return string */protected function getNextButton(string $text = '»'): string{if (!$this->hasMore) {return $this->getDisabledTextWrapper($text);}$url = $this->url($this->currentPage() + 1);return $this->getPageLinkWrapper($url, $text);}
这是上一页和下一页的按钮
将string $text = "«"
和string $text = '»'
中的«
和»
分别修改为上一页和下一页或者自己想要的内容即可