diff --git a/CHANGELOG.md b/CHANGELOG.md
index 010a7ce0c2..f83fb62596 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,21 @@
---
+## 0.12.17
+
+- 修复 FormItem 校验时表单项高度跳动的问题。[#1557](https://github.com/ant-design/ant-design/issues/1557)
+- 修复一个 Table 圆角样式的小问题。
+
+## 0.12.16
+
+- 修复 Collapse 在 safari 中切换动画异常的问题。[#1494](https://github.com/ant-design/ant-design/issues/1494)
+- 修复 Table 的 selectedRowKeys 在初次渲染时失效的问题。[#1501](https://github.com/ant-design/ant-design/issues/1501)
+- Table 现在点击选择框时将不再触发 `onRowClick`。[#1470](https://github.com/ant-design/ant-design/issues/1470)
+- 修复一个 Calender 服务端渲染时提示 `Option is not defined` 的问题。[#1521](https://github.com/ant-design/ant-design/issues/1521)
+- 修复 Menu 动态切换模式时的一些细节问题。
+- 优化了 export 导出图标。
+- 修复 Form 的一些样式细节。
+
## 0.12.15
- 升级 rc-collapse 修复一个性能问题。
diff --git a/components/button/button.jsx b/components/button/button.jsx
index 053dd6fbe7..193f9050cc 100644
--- a/components/button/button.jsx
+++ b/components/button/button.jsx
@@ -83,7 +83,7 @@ export default class Button extends React.Component {
Button.propTypes = {
type: React.PropTypes.oneOf(['primary', 'ghost', 'dashed']),
shape: React.PropTypes.oneOf(['circle', 'circle-outline']),
- size: React.PropTypes.oneOf(['large', 'small']),
+ size: React.PropTypes.oneOf(['large', 'default', 'small']),
htmlType: React.PropTypes.oneOf(['submit', 'button', 'reset']),
onClick: React.PropTypes.func,
loading: React.PropTypes.bool,
diff --git a/components/calendar/Header.jsx b/components/calendar/Header.jsx
index ae67307108..696a98b49a 100644
--- a/components/calendar/Header.jsx
+++ b/components/calendar/Header.jsx
@@ -2,6 +2,7 @@ import React, { PropTypes, Component } from 'react';
import { PREFIX_CLS } from './Constants';
import Select from '../select';
import { Group, Button } from '../radio';
+const Option = Select.Option;
function noop() {}
diff --git a/components/common/openAnimation.js b/components/common/openAnimation.js
index 80d857a055..84e2b75fff 100644
--- a/components/common/openAnimation.js
+++ b/components/common/openAnimation.js
@@ -9,6 +9,7 @@ function animate(node, show, transitionName, done) {
function complete() {
if (!ok) {
ok = true;
+ node.style.display = '';
done();
}
}
diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx
index dc5480b30a..e1af709d21 100644
--- a/components/form/FormItem.jsx
+++ b/components/form/FormItem.jsx
@@ -40,16 +40,16 @@ class FormItem extends React.Component {
const props = this.props;
const prefixCls = props.prefixCls;
const help = this.getHelpMsg();
- return (
-
- { help }
+ return help ? (
+
+ {help}
- );
+ ) : null;
}
renderExtra() {
const { prefixCls, extra } = this.props;
- return
{extra}
;
+ return
{extra};
}
getValidateStatus() {
diff --git a/components/menu/demo/switch-mode.md b/components/menu/demo/switch-mode.md
new file mode 100644
index 0000000000..75170f34e1
--- /dev/null
+++ b/components/menu/demo/switch-mode.md
@@ -0,0 +1,65 @@
+# 切换
+
+- order: 5
+
+展示动态切换模式。
+
+---
+
+````jsx
+import { Menu, Icon, Switch } from 'antd';
+const SubMenu = Menu.SubMenu;
+const MenuItemGroup = Menu.ItemGroup;
+
+const Sider = React.createClass({
+ getInitialState() {
+ return {
+ mode: 'inline',
+ };
+ },
+ changeMode(value) {
+ this.setState({
+ mode: value ? 'vertical' : 'inline',
+ });
+ },
+ render() {
+ return (
+
+
+
+
+
+
+ );
+ }
+});
+ReactDOM.render(
, mountNode);
+````
diff --git a/components/menu/index.jsx b/components/menu/index.jsx
index 341810ca51..118edef81e 100644
--- a/components/menu/index.jsx
+++ b/components/menu/index.jsx
@@ -21,6 +21,12 @@ const AntMenu = React.createClass({
openKeys: []
};
},
+ componentWillReceiveProps(nextProps) {
+ if (this.props.mode === 'inline' &&
+ nextProps.mode !== 'inline') {
+ this.switchModeFromInline = true;
+ }
+ },
handleClick(e) {
this.setState({
openKeys: []
@@ -47,7 +53,14 @@ const AntMenu = React.createClass({
openAnimation = 'slide-up';
break;
case 'vertical':
- openAnimation = 'zoom-big';
+ // When mode switch from inline
+ // submenu should hide without animation
+ if (this.switchModeFromInline) {
+ openAnimation = '';
+ this.switchModeFromInline = false;
+ } else {
+ openAnimation = 'zoom-big';
+ }
break;
case 'inline':
openAnimation = animation;
diff --git a/components/menu/index.md b/components/menu/index.md
index ab108f256a..2d3ac5441c 100644
--- a/components/menu/index.md
+++ b/components/menu/index.md
@@ -31,7 +31,7 @@
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| theme | 主题颜色 | enum: `light` `dark` | 'light' |
-| mode | 菜单类型 | enum: `vertical` `horizontal` `inline` | vertical |
+| mode | 菜单类型,现在支持垂直、水平、和内嵌模式三种 | enum: `vertical` `horizontal` `inline` | vertical |
| selectedKeys | 当前选中的菜单项 key 数组 | | |
| defaultSelectedKeys | 初始选中的菜单项 key 数组 | | |
| openKeys | 当前展开的菜单项 key 数组 | | |
diff --git a/docs/pattern/navigation.md b/docs/pattern/navigation.md
index 71f2250eff..43fea1ffc2 100644
--- a/docs/pattern/navigation.md
+++ b/docs/pattern/navigation.md
@@ -38,7 +38,7 @@
我们将常见的导航模式分为:侧栏导航和顶部导航,两者各有优缺点,设计者可以根据各自的业务需求进行选择。
-前端实现代码可以参考 [常用布局](/docs/spec/layout#layout-demo-top)。
+前端实现代码可以参考 [常用布局](/docs/spec/layout/#layout-demo-top)。
## 侧栏导航
diff --git a/package.json b/package.json
index 9224247153..f80be918e6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "antd",
- "version": "0.12.15",
+ "version": "0.12.17",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",
@@ -58,7 +58,7 @@
"rc-slider": "~3.3.0",
"rc-steps": "~1.4.1",
"rc-switch": "~1.3.2",
- "rc-table": "~3.11.1",
+ "rc-table": "~3.11.4",
"rc-tabs": "~5.8.0",
"rc-time-picker": "~1.1.0",
"rc-tooltip": "~3.3.1",
diff --git a/style/components/form.less b/style/components/form.less
index 9943c88341..080179528a 100644
--- a/style/components/form.less
+++ b/style/components/form.less
@@ -77,7 +77,7 @@ input[type="checkbox"] {
}
&.@{css-prefix}form-item-with-help {
- margin-bottom: @form-item-margin-bottom - @font-size-base * @line-height-base;
+ margin-bottom: @form-item-margin-bottom - @font-size-base * @line-height-base - 3;
}
> label {
@@ -367,7 +367,7 @@ form {
}
// ant-timepicker
- .@{timepicker-prefix-cls}-picker-icon:after {
+ .@{timepicker-prefix-cls}-icon:after {
color: @warning-color;
}
diff --git a/style/components/menu.less b/style/components/menu.less
index 2f334fbc0b..4faa00a32b 100644
--- a/style/components/menu.less
+++ b/style/components/menu.less
@@ -87,6 +87,13 @@
}
}
+ &-vertical &-sub {
+ border-right: 0;
+ .@{menu-prefix-cls}-item {
+ border-right: 0;
+ }
+ }
+
&-inline {
.@{menu-prefix-cls}-selected,
.@{menu-prefix-cls}-item-selected {
diff --git a/style/components/table.less b/style/components/table.less
index d750a1d2c2..382171e974 100644
--- a/style/components/table.less
+++ b/style/components/table.less
@@ -19,6 +19,8 @@
max-width: 100%;
border-collapse: separate;
text-align: left;
+ border-radius: @border-radius-base;
+ overflow: hidden;
}
th {
@@ -71,6 +73,10 @@
}
}
+ &.@{table-prefix-cls}-bordered tfoot tr {
+ top: 0;
+ }
+
tr.@{table-prefix-cls}-row-selected {
background: #fafafa;
}