Ember Component for Bootstrap 3 Pagination & Pager components
Here's a demo, and these are the original Bootstrap Components: Pagination and Pager.
First install the addon.
ember install pagination-pager
Then use it in your app with <PaginationPager />
with the optionsin the following section.
To switch to the pager UI, set the pager
attribute to true
, see the optional section.
By default the first page is 1
, and the last is the value of count
, you can change these by setting firstPage
and lastPage
.
@count
-- The number of pages in total, required@current
-- The current page number, required@pager
-- Switches to the pager component, defaults to false
@urlTemplate
-- Url template for supporting opening pages in new windows, defaults to '#'.@urlTemplate
should be in the form of http://myurl.com/#/posts?page={current}
.@hide
-- Hide the component for any reason, defaults to false
.@autoHide
-- Hide the component if count
is <= 1
, defaults to true
.@disabled
-- Disable changing the pages, defaults to false
.@paginationNext
-- The text to display for pagination next button@paginationPrevious
-- The text to display for pagination previous button@paginationSize
-- The size of the element, default is '', available options include lg
and sm
.@countOut
-- The number of page links in the begin and end of whole range@countIn
-- The number of page links on each side of current page@pagerNext
-- The text to display for the pager next button@pagerPrevious
-- The text to display for the pager previous button@pagerFirst
-- The text to display for the pager first button (no button is shown if not specified)@pagerLast
-- The text to display for the pager last button (no button is shown if not specified)@pagerSpread
-- Pager buttons spaced out, defaults to false@change
-- Action that returns currentPage
and previousPage
, e.g.// clicking on '2' after '5'
@action
pageChanged(current, previous) {
console.log(current, previous);
// => 2, 5
}
Note: If
changed
is defined, thencurrent
isn't updated automatically, it's your job to update it.
ember test
works just fine, plus ember serve
and then visit 'http://localhost:4200/pagination-pager/' to see the dummy app.
Build by checking out the relevant branch, since the test dummy appis actually the demo app.
See the Contributing guide for details.
ember github-pages:commit --message <message describing demo release>
我想设置总页数为10页,页码条总是显示两个页码,其余省略号显示,我选择了pager-count,如下: <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="leftPage.current
/** * pagination - jQuery EasyUI * * Licensed under the GPL: * http://www.gnu.org/licenses/gpl.txt * * Copyright 2010 stworthy [ stworthy@gmail.com ] * * Dependencies: * linkbutton * *
标签属性 <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" background layout="total, sizes, prev, pager, next, jumper" :total="total" :page-size="10" :page-sizes="[
项目背景: vue项目+elementUI 直接上代码 新建一个组件components/Pagination/index.js <template> <div :class="{'hidden':hidden}" class="pagination-container"> <el-pagination :background="background" :cur
一般我们正常的属性会写在scope里,我们不想直接粗暴地把scope去掉影响全局,这个时候再写一个不带scope的style,把我们要覆盖的样式放进去,就可以了,一般设置一下active的背景颜色,以及hover时候的字体颜色。如下: <style> .el-pagination.is-background.el-pager li:not(.disabled){ background-co
描述 (Description) 分页,无序列表由基金会处理,就像许多其他界面元素一样。 下表描述了分页的功能以及描述。 Sr.No. 功能和描述 1 Basic 它是一种导航类型,可将内容划分为一系列相关页面。 2 Centered 分页列表在页面中心创建。 3 SASS参考 使用SASS变量和mixins更改组件的样式。
描述 (Description) 分页是一种将内容划分为一系列相关页面的导航。 例子 (Example) 以下示例演示了在基础中使用pagination - <!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-compatible" content = "ie = edg
类名: Imi\Util\Pagination 分页计算类 方法 构造方法 public function __construct($page, $count) $page 当前页码 $count 每页数量 getPage 字面意思 setPage 字面意思 getCount 字面意思 setCount 字面意思 getLimitOffset 获取偏移量,如 limit 20, 10 中的 20
// 自动处理分页逻辑 Model::paginate(15); Model::where('cars', 2)->paginate(15); // 使用简单模板 - 只有 "上一页" 或 "下一页" 链接 Model::where('cars', 2)->simplePaginate(15); // 手动分页 Paginator::make($items, $totalItems, $perPa
Pagination 是一个基于 jQuery 实现的一个简单的 JavaScript 分页组件,主要实现以下功能: 1. 方便在 JavaScript 中对后端分页数据进行展示 2. 自动生成分页组件,包括首页、页码、末页、页码切换、跳页 3. 可根据 "class" 或 "id" 作为指定容器,通过 "class" 可以实现多个分页组件同时生成 预览页面:https://liverwang.g
Pagination 是一个基于 jQuery 实现的一个简单的 JavaScript 分页组件,主要实现以下功能: 1. 方便在 JavaScript 中对后端分页数据进行展示 2. 自动生成分页组件,包括首页、页码、末页、页码切换、跳页 3. 可根据 "class" 或 "id" 作为指定容器,通过 "class" 可以实现多个分页组件同时生成 预览页面:https://liverwang.g