链接渲染器样式
Rails Engine扩展了样式以匹配Twitter的 4工具包中的分页样式约定。
安装
添加到您的Gemfile:
gem 'will_paginate-bootstrap4'
用法
<%= will_paginate @clients, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %>
以下选项可用(除了will_paginate中可用的选项之外):
:list_classes = ['pagination'] # Array of classes
:aria_label = 'Page Navigation' # The aria label to use in the Nav tag
:previous_label = '«' # Previous page label
:next_label = '»' # Next page label
例如,要将导航部分放置在页面的最右边,请在您的视图中使用它:
<%= wil
评论0
最新资源