提交 b0a95601 编写于 作者: Y yiminghe

Merge branch 'develop-0.10.0' of github.com:ant-design/ant-design into develop-0.10.0

...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
--- ---
## 0.9.2 `2015-10-26`
* Tooltip 的 title 为空时不展示浮层。[9b53117](9b5311791e73270c7c16a602ac74dd59719a5f76)
* 修复 Upload 文件列表链接的 target 属性。[340a170](340a1702b6a7b065ac02d417c891e1886dfe470d)
* 修复 Datepicker 设置 defaultValue 时星期顺序错误的问题。[9ef1450](9ef14500f3abfcc7081f8dceab8187ec835e3918)
* 修复一些小的样式问题。
## 0.9.1 `2015-09-26` ## 0.9.1 `2015-09-26`
* 添加 Pagination pageSize 发生变化的回调。[#317](https://github.com/ant-design/ant-design/issues/317) * 添加 Pagination pageSize 发生变化的回调。[#317](https://github.com/ant-design/ant-design/issues/317)
......
...@@ -10,6 +10,14 @@ export default React.createClass({ ...@@ -10,6 +10,14 @@ export default React.createClass({
mouseLeaveDelay: 0.1 mouseLeaveDelay: 0.1
}; };
}, },
getInitialState() {
return {
visible: false
};
},
onVisibleChange(visible) {
this.setState({ visible });
},
render() { render() {
let transitionName = ({ let transitionName = ({
top: 'zoom-down', top: 'zoom-down',
...@@ -17,12 +25,21 @@ export default React.createClass({ ...@@ -17,12 +25,21 @@ export default React.createClass({
left: 'zoom-right', left: 'zoom-right',
right: 'zoom-left' right: 'zoom-left'
})[this.props.placement]; })[this.props.placement];
// Hide tooltip when there is no title
let visible = this.state.visible;
if (!this.props.title) {
visible = false;
}
return ( return (
this.props.title ? <Tooltip transitionName={transitionName} <Tooltip transitionName={transitionName}
overlay={this.props.title} overlay={this.props.title}
visible={visible}
onVisibleChange={this.onVisibleChange}
{...this.props}> {...this.props}>
{this.props.children} {this.props.children}
</Tooltip> : this.props.children </Tooltip>
); );
} }
}); });
...@@ -32,7 +32,7 @@ $ npm install antd@beta --save ...@@ -32,7 +32,7 @@ $ npm install antd@beta --save
我们提供了开发构建的命令行工具,可以安装到全局直接使用。 我们提供了开发构建的命令行工具,可以安装到全局直接使用。
```bash ```bash
$ npm install antd-bin -g $ npm install antd-bin@0.6.x -g
``` ```
或者安装到仓库下,使用 `package.json``scripts` 字段来配置命令: 或者安装到仓库下,使用 `package.json``scripts` 字段来配置命令:
......
{ {
"name": "antd", "name": "antd",
"version": "0.10.0-beta7", "version": "0.10.0-beta7",
"stableVersion": "0.9.1", "stableVersion": "0.9.2",
"title": "Ant Design", "title": "Ant Design",
"description": "一个 UI 设计语言", "description": "一个 UI 设计语言",
"homepage": "http://ant.design/", "homepage": "http://ant.design/",
......
...@@ -53,7 +53,7 @@ InstantClickChangeFns.push(function () { ...@@ -53,7 +53,7 @@ InstantClickChangeFns.push(function () {
InstantClickChangeFns.push(function () { InstantClickChangeFns.push(function () {
var versionsHistory = { var versionsHistory = {
'0.9.1': '09x.ant.design' '0.9.2': '09x.ant.design'
}; };
versionsHistory[antdVersion.latest] = versionsHistory[antdVersion.latest] =
versionsHistory[antdVersion.latest] || 'http://ant.design'; versionsHistory[antdVersion.latest] || 'http://ant.design';
......
...@@ -10,7 +10,7 @@ body { ...@@ -10,7 +10,7 @@ body {
} }
body { body {
font-family: "Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",SimSun,sans-serif; font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",SimSun,sans-serif;
line-height: 1.5; line-height: 1.5;
color: #777; color: #777;
font-size: 14px; font-size: 14px;
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
background-color: @tooltip-bg; background-color: @tooltip-bg;
border-radius: @border-radius-base; border-radius: @border-radius-base;
box-shadow: @overlay-shadow; box-shadow: @overlay-shadow;
min-height: 34px;
} }
// Arrows // Arrows
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// ------ Base & Require ------ // ------ Base & Require ------
@body-background : #fff; @body-background : #fff;
@font-family : "Helvetica Neue",Helvetica,"Hiragino Sans GB","STHeitiSC-Light","Microsoft YaHei","微软雅黑",Arial,sans-serif; @font-family : "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
@code-family : Consolas,Menlo,Courier,monospace; @code-family : Consolas,Menlo,Courier,monospace;
@text-color : #666; @text-color : #666;
@font-size-base : 12px; @font-size-base : 12px;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册