UNPKG

dtd

Version:

根据数梦工场视觉规范打造的组件库,感谢react-components和ant design

1 lines 1.68 kB
import _extends from"babel-runtime/helpers/extends";import _classCallCheck from"babel-runtime/helpers/classCallCheck";import _createClass from"babel-runtime/helpers/createClass";import _possibleConstructorReturn from"babel-runtime/helpers/possibleConstructorReturn";import _inherits from"babel-runtime/helpers/inherits";var __rest=this&&this.__rest||function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&(r[a[o]]=e[a[o]])}return r};import*as React from"react";import RcPagination from"./rc-pagination";import defaultLocals from"../locale-provider/default";import classNames from"classnames";import LocaleReceiver from"../locale-provider/LocaleReceiver";import Select from"../select";import MiniSelect from"./MiniSelect";var Pagination=function(e){function t(){_classCallCheck(this,t);var e=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.renderPagination=function(t){var r=e.props,a=r.className,o=r.size,i=__rest(r,["className","size"]),n="small"===o;return React.createElement(RcPagination,_extends({},i,{className:classNames(a,{mini:n}),selectComponentClass:n?MiniSelect:Select,locale:t}))},e}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){return React.createElement(LocaleReceiver,{componentName:"Pagination",defaultLocale:defaultLocals.Pagination},this.renderPagination)}}]),t}(React.Component);export default Pagination;Pagination.defaultProps={prefixCls:"dt-pagination",selectPrefixCls:"dt-select"};