简体   繁体   English

如何使 Livewire 分页响应?

[英]How to make Livewire Pagination responsive?

how to make livewire pagination responsive?如何使 livewire 分页响应? when using Boostrap, its only need to add flex-wrap on class pagination to make it responsive.使用 Boostrap 时,只需在 class 分页上添加flex-wrap即可使其响应。

Component:零件:

class Index extends Component
{
    use WithPagination;

    protected $paginationTheme = 'bootstrap';

    public function render()
    {
        return view('livewire.data-list.index', [
            'dataList' => DataList::whereStatus(1)->orderBy('id', 'desc')->paginate(15),
        ]);
    }
}

Blade:刀:

<div>
    {{ $dataList->onEachSide(1)->links() }}
</div>
  1. First you have to publish your vendor file to resources/view directory so that you can modify it by the following command line php artisan vendor:publish --tag=laravel-pagination首先,您必须将供应商文件发布到资源/视图目录,以便您可以通过以下命令行修改它php artisan vendor:publish --tag=laravel-pagination
  2. Than in resources file you can edit pagination files and design according to your need.与资源文件相比,您可以根据需要编辑分页文件和设计。 You can customize according to your design您可以根据您的设计进行定制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM