From 948120e224b56bfbd8e618ff780c567354f62267 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Fri, 4 Dec 2015 14:19:06 +0800 Subject: [PATCH 1/3] update simple pagination style --- components/pagination/index.jsx | 34 ++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/components/pagination/index.jsx b/components/pagination/index.jsx index 015de3bb89..122425a1f2 100644 --- a/components/pagination/index.jsx +++ b/components/pagination/index.jsx @@ -1,16 +1,47 @@ import React from 'react'; import Pagination from 'rc-pagination'; -import Select from 'rc-select'; +import Select from '../select'; import zhCN from './locale/zh_CN'; const prefixCls = 'ant-pagination'; +const MiniSelect = React.createClass({ + render() { + return ; } -}); +} MiniSelect.Option = Select.Option; @@ -19,13 +21,7 @@ class AntPagination extends React.Component { if (this.props.simple) { // hijiking simple pagination - let newProps = {}; - for (let key in this.props) { - if (this.props.hasOwnProperty(key)) { - newProps[key] = this.props[key]; - } - } - + let newProps = assign({}, this.props); delete newProps.simple; className += ' mini'; From 36e234de97a2ce97c9187cb4c9e2f8734212f751 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 5 Dec 2015 13:34:55 +0800 Subject: [PATCH 3/3] update small examples --- components/pagination/demo/mini.md | 8 +++++--- components/pagination/index.jsx | 28 ++++++---------------------- style/components/select.less | 2 +- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/components/pagination/demo/mini.md b/components/pagination/demo/mini.md index 8b1b693a06..a0a9d1befb 100644 --- a/components/pagination/demo/mini.md +++ b/components/pagination/demo/mini.md @@ -9,7 +9,9 @@ ````jsx import { Pagination } from 'antd'; -ReactDOM.render( - , - document.getElementById('components-pagination-demo-mini')); +ReactDOM.render(
+ +
+ +
, document.getElementById('components-pagination-demo-mini')); ```` diff --git a/components/pagination/index.jsx b/components/pagination/index.jsx index 1f9681fd24..048184ed63 100644 --- a/components/pagination/index.jsx +++ b/components/pagination/index.jsx @@ -1,12 +1,8 @@ -import assign from 'object-assign'; - import React from 'react'; import Pagination from 'rc-pagination'; import Select from '../select'; import zhCN from './locale/zh_CN'; -const prefixCls = 'ant-pagination'; - class MiniSelect extends React.Component { render() { return