diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 57d1525a6d..a74eb2de2f 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -73,7 +73,8 @@ export default React.createClass({ if (showTime) { timePicker = (); } diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx index 9c45da4898..94129aa347 100644 --- a/components/date-picker/index.jsx +++ b/components/date-picker/index.jsx @@ -60,7 +60,8 @@ function createPicker(TheCalendar, defaultFormat) { const timePicker = this.props.showTime ? () : null; diff --git a/components/date-picker/locale/en_US.js b/components/date-picker/locale/en_US.js index aff512e58b..b4644aff65 100644 --- a/components/date-picker/locale/en_US.js +++ b/components/date-picker/locale/en_US.js @@ -1,14 +1,16 @@ import objectAssign from 'object-assign'; import GregorianCalendarLocale from 'gregorian-calendar/lib/locale/en_US'; import CalendarLocale from 'rc-calendar/lib/locale/en_US'; +import TimePickerLocale from '../../time-picker/locale/en_US'; // 统一合并为完整的 Locale let locale = objectAssign({}, GregorianCalendarLocale); locale.lang = objectAssign({ placeholder: 'Select date', - timePlaceholder: 'Select time', }, CalendarLocale); +locale.timePickerLocale = objectAssign({}, TimePickerLocale); + // All settings at: // https://github.com/ant-design/ant-design/issues/424 diff --git a/components/date-picker/locale/zh_CN.js b/components/date-picker/locale/zh_CN.js index b6a9177c70..e63eaf457c 100644 --- a/components/date-picker/locale/zh_CN.js +++ b/components/date-picker/locale/zh_CN.js @@ -1,14 +1,16 @@ import objectAssign from 'object-assign'; import GregorianCalendarLocale from 'gregorian-calendar/lib/locale/zh_CN'; import CalendarLocale from 'rc-calendar/lib/locale/zh_CN'; +import TimePickerLocale from '../../time-picker/locale/zh_CN'; // 统一合并为完整的 Locale let locale = objectAssign({}, GregorianCalendarLocale); locale.lang = objectAssign({ placeholder: '请选择日期', - timePlaceholder: '请选择时间', }, CalendarLocale); +locale.timePickerLocale = objectAssign({}, TimePickerLocale); + // should add whitespace between char in Button locale.lang.ok = '确 定'; diff --git a/components/menu/demo/horizontal.md b/components/menu/demo/horizontal.md index fa94808108..98c427ffe7 100644 --- a/components/menu/demo/horizontal.md +++ b/components/menu/demo/horizontal.md @@ -27,7 +27,6 @@ const App = React.createClass({ return ( 导航一 diff --git a/components/menu/demo/theme.md b/components/menu/demo/theme.md index ee09aab4d7..3fc7bd08e0 100644 --- a/components/menu/demo/theme.md +++ b/components/menu/demo/theme.md @@ -66,4 +66,3 @@ const Sider = React.createClass({ }); ReactDOM.render(, mountNode); ```` - diff --git a/components/slider/demo/icon-slider.md b/components/slider/demo/icon-slider.md index f740f8232f..de4ece9d85 100644 --- a/components/slider/demo/icon-slider.md +++ b/components/slider/demo/icon-slider.md @@ -14,7 +14,6 @@ const IconSlider = React.createClass({ const max = this.props.max; const min = this.props.min; const mid = ((max - min) / 2).toFixed(5); - return { preIconClass: this.props.value >= mid ? '' : 'anticon-highlight', nextIconClass: this.props.value >= mid ? 'anticon-highlight' : '', @@ -35,15 +34,15 @@ const IconSlider = React.createClass({ return (
- +
); } }); ReactDOM.render( - + , mountNode); ```` @@ -63,10 +62,11 @@ ReactDOM.render( color: #ccc; } -.iconWrapper .anticon-lock { +.iconWrapper .anticon:first-child { left: 0; } -.iconWrapper .anticon-unlock{ + +.iconWrapper .anticon:last-child { right: 0; } diff --git a/components/slider/demo/tip-formatter.md b/components/slider/demo/tip-formatter.md index 9b3fbbbe11..0a35359c04 100644 --- a/components/slider/demo/tip-formatter.md +++ b/components/slider/demo/tip-formatter.md @@ -1,4 +1,4 @@ -# 格式化 `Tooltip` 内容 +# 自定义提示 - order: 5 diff --git a/components/table/index.jsx b/components/table/index.jsx index 5810373593..27354d60ae 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -37,7 +37,6 @@ let AntTable = React.createClass({ sortColumn: '', sortOrder: '', sorter: null, - radioIndex: null, pagination: this.hasPagination() ? objectAssign({ size: this.props.size, @@ -210,7 +209,6 @@ let AntTable = React.createClass({ let key = this.getRecordKey(record, rowIndex); selectedRowKeys = [key]; this.setState({ - radioIndex: key, selectionDirty: true, }); this.setSelectedRowKeys(selectedRowKeys); @@ -293,12 +291,6 @@ let AntTable = React.createClass({ })); }, - onRadioChange(ev) { - this.setState({ - radioIndex: ev.target.value - }); - }, - renderSelectionRadio(value, record, index) { let rowIndex = this.getRecordKey(record, index); // 从 1 开始 let props = {}; @@ -307,9 +299,9 @@ let AntTable = React.createClass({ } let checked; if (this.state.selectionDirty) { - checked = this.state.radioIndex === rowIndex; + checked = this.state.selectedRowKeys.indexOf(rowIndex) >= 0; } else { - checked = (this.state.radioIndex === rowIndex || + checked = (this.state.selectedRowKeys.indexOf(rowIndex) >= 0 || this.getDefaultSelection().indexOf(rowIndex) >= 0); } return ( diff --git a/package.json b/package.json index 4ecd683faf..875c617b33 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "autoprefixer": "^6.3.3", "babel-cli": "^6.2.0", "babel-core": "^6.2.1", + "babel-eslint": "^6.0.2", "babel-jest": "^6.0.1", "babel-loader": "^6.2.0", "babel-plugin-add-module-exports": "^0.1.1", diff --git a/scripts/deploy.js b/scripts/deploy.js index 848a3c5e56..f1fb905974 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -9,5 +9,5 @@ ghPages.publish(path.join(process.cwd(), '_site'), { if (err) { throw err; } - console.log('Site has been published to http://ant.design'); + console.log('Site has been published to http://ant.design 🎉'); }); diff --git a/style/components/menu.less b/style/components/menu.less index a7bd37f99a..9c1abdd067 100644 --- a/style/components/menu.less +++ b/style/components/menu.less @@ -121,6 +121,10 @@ &.@{menu-prefix-cls}-submenu-disabled { color: #999 !important; cursor: not-allowed; + > a { + color: #999 !important; + pointer-events: none; + } } } @@ -302,16 +306,18 @@ &-dark&-horizontal > &-item, &-dark&-horizontal > &-submenu { - border-bottom: 0; - top: 0; + border-color: #404040; } &-dark&-horizontal > &-item-active, &-dark&-horizontal > &-item-selected, &-dark&-horizontal > &-submenu:hover, &-dark&-horizontal > &-submenu &-submenu-title:hover { - color: #fff; - transform: translateZ(0); + &, + & > a { + color: #fff; + transform: translateZ(0); + } } &-dark &-item > a { @@ -341,6 +347,7 @@ } &-dark &-item-active, + &-dark &-submenu-active, &-dark &-submenu-title:hover { background-color: transparent; color: @primary-color; diff --git a/style/components/select.less b/style/components/select.less index 4157f32a92..bf06d92740 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -407,14 +407,6 @@ overflow: hidden; transition: background 0.3s ease; - &:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } - &:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - } &:hover, &-active { background-color: tint(@primary-color, 90%); diff --git a/style/components/table.less b/style/components/table.less index 9a17f1a8c6..d750a1d2c2 100644 --- a/style/components/table.less +++ b/style/components/table.less @@ -133,6 +133,7 @@ table { border: 1px solid @border-color-split; padding: 0 8px; + border-radius: @border-radius-base; } th {