Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 51 additions & 45 deletions assets/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.@{prefixClass} {
font-size: 12px;
font-family: 'Arial';
user-select: none;

&:after {
content: " ";
Expand All @@ -14,7 +15,7 @@
visibility: hidden;
}

.@{prefixClass}-item {
&-item {
cursor: pointer;
border-radius: 6px;
min-width: 28px;
Expand All @@ -40,17 +41,23 @@
}
}

&.active {
&-active {
background-color: #2db7f5;
border: none;

a {
color: #fff;
}

&:hover {
a {
color: #fff;
}
}
}
}

.jump-prev, .jump-next {
&-jump-prev, &-jump-next {
&:after {
content: "•••";
display: block;
Expand All @@ -68,26 +75,26 @@

}

.jump-prev {
&-jump-prev {
&:hover {
&:after {
content: "«";
}
}
}

.jump-next {
&-jump-next {
&:hover {
&:after {
content: "»";
}
}
}

.prev, .jump-prev, .jump-next {
&-prev, &-jump-prev, &-jump-next {
margin-right: 8px;
}
.prev, .next, .jump-prev, .jump-next {
&-prev, &-next, &-jump-prev, &-jump-next {
cursor: pointer;
color: #666;
font-size: 10px;
Expand All @@ -100,30 +107,30 @@
text-align: center;
}

.prev, .next {
&-prev, &-next {
border: 1px solid #d9d9d9;

a {
color: #666;
}
}

&.disabled {
cursor: not-allowed;
a {
color: #ccc;
}
&-disabled {
cursor: not-allowed;
a {
color: #ccc;
}
}

.options {
&-options {
float: left;
margin-left: 15px;
.size-changer {
&-size-changer {
float: left;
width: 70px;
}

.quick-jumper {
&-quick-jumper {
float: left;
margin-left: 16px;
height: 28px;
Expand All @@ -146,42 +153,41 @@
}
}
}
}

&-simple {
.@{prefixClass}-prev, .@{prefixClass}-next {
border: none;
height: 24px;
line-height: 24px;
margin: 0;
font-size: 18px;
}

.@{prefixClass}.simple {
.prev, .next {
border: none;
height: 24px;
line-height: 24px;
margin: 0;
font-size: 18px;
}

.simple-pager {
float: left;
margin-right: 8px;
.@{prefixClass}-simple-pager {
float: left;
margin-right: 8px;

.slash {
margin: 0 10px;
}
.@{prefixClass}-slash {
margin: 0 10px;
}

input {
margin: 0 8px;
box-sizing: border-box;
background-color: #fff;
border-radius: 6px;
border: 1px solid #d9d9d9;
outline: none;
padding: 5px 8px;
width: 30px;
min-height: 20px;
input {
margin: 0 8px;
box-sizing: border-box;
background-color: #fff;
border-radius: 6px;
border: 1px solid #d9d9d9;
outline: none;
padding: 5px 8px;
width: 30px;
min-height: 20px;


&:hover {
border-color: #2db7f5;
&:hover {
border-color: #2db7f5;
}
}
}

}
}
}
11 changes: 6 additions & 5 deletions src/Options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ class Options extends React.Component {
}
render() {
let props = this.props;
var prefixCls = `${props.rootPrefixCls}-options`;
let changeSize = props.changeSize;
let quickGo = props.quickGo;

let changeSelect = null;
let goInput = null;

if (changeSize) {

let changerClass = props.sizeChangerClass;
changeSelect = (
<Select prefixCls={changerClass ? 'ant-select' : 'rc-select' }showSearch={false} className="size-changer" defaultValue="10" onChange={this._changeSize}>
<Select prefixCls={props.selectPrefixCls} showSearch={false}
className={`${prefixCls}-size-changer`}
defaultValue="10" onChange={this._changeSize}>
<Option value="10">10 条/页</Option>
<Option value="20">20 条/页</Option>
<Option value="30">30 条/页</Option>
Expand All @@ -32,7 +33,7 @@ class Options extends React.Component {

if (quickGo) {
goInput = (
<div className="quick-jumper">
<div className={`${prefixCls}-quick-jumper`}>
跳至
<input type="text" value={props.current} onChange={this._quickGo} />
Expand All @@ -41,7 +42,7 @@ class Options extends React.Component {
}

return (
<div className="options">
<div className={`${prefixCls}-options`}>
{changeSelect}
{goInput}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/Pager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ let React = require('react');
class Pager extends React.Component {
render() {
let props = this.props;
let prefixCls = 'rc-pagination-item';
let prefixCls = `${props.rootPrefixCls}-item`;
let cls = `${prefixCls} ${prefixCls}-${props.page}`;

if (props.active) {
cls = `${cls} active`;
cls = `${cls} ${prefixCls}-active`;
}
return (
<li className={cls} onClick={props.onClick}>
Expand Down
Loading