Merge master

This commit is contained in:
afc163 2016-03-22 19:31:55 +08:00
commit fb6c6abbc7
19 changed files with 153 additions and 22 deletions

View File

@ -4,6 +4,14 @@
---
## 0.12.12
`2016-03-18`
- [设计资源](http://ant.design/docs/resource/download)文件更新。
- 修复 Popover 和 Popconfirm 箭头消失的问题。
- 修复一个 Table 切换分页长度时的页码溢出的问题。
## 0.12.11
`2016-03-16`

View File

@ -12,8 +12,13 @@ import { Modal, Button } from 'antd';
function info() {
Modal.info({
title: '这是一条通知信息',
content: '一些附加信息一些附加信息一些附加信息',
onOk() {}
content: (
<div>
<p>一些附加信息一些附加信息一些附加信息</p>
<p>一些附加信息一些附加信息一些附加信息</p>
</div>
),
onOk() {},
});
}

View File

@ -31,7 +31,7 @@
| okText | 确认按钮文字 | String | 确定 |
| cancelText | 取消按钮文字 | String | 取消 |
| maskClosable | 点击蒙层是否允许关闭 | Boolean | true |
| align | 浮层自定义位置 | Object, [dom-align](https://github.com/yiminghe/dom-align) | 距离顶部 100px |
| align | 浮层自定义位置 | Object, [dom-align](https://github.com/yiminghe/dom-align) | 距离顶部 100px |
### Modal.xxx()
@ -47,6 +47,7 @@
| 参数 | 说明 | 类型 | 默认值 |
|------------|----------------|------------------|--------------|
| title | 标题 | React.Element or String | 无 |
| content | 内容 | React.Element or String | 无 |
| onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
| onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
| width | 宽度 | String or Number | 416 |

View File

@ -31,8 +31,8 @@
</tr>
<tr>
<th>总结</th>
<td>一般适用在浏览性强、门户性质的网站,以及一些比较前台化的应用。</td>
<td>适用在操作性强、中后台管理性质的应用。</td>
<td>一般适用在浏览性强、门户性质的网站,以及一些比较前台化的应用。</td>
</tr>
</Table>

View File

@ -101,12 +101,13 @@ Ant Design React 支持所有的现代浏览器和 IE8+。
<style>
.code-line-highlight {
box-shadow: 0px 184px 0px rgba(255, 207, 0, 0.16);
box-shadow: 0px 184px 0px rgba(255, 207, 0, 0.1);
height: 42px;
margin-top: -42px;
position: relative;
z-index: 1;
width: 80%;
pointer-events: none;
}
</style>
@ -129,12 +130,18 @@ Ant Design React 支持所有的现代浏览器和 IE8+。
</html>
```
另外,由于 `babel@6.x` 对 IE8 的支持不佳,你可能会遇到类似 [#28](https://github.com/ant-tool/atool-build/issues/28) 和 [#858](https://github.com/ant-design/ant-design/issues/858) 的 default 报错的问题。
[antd-init](http://github.com/ant-design/antd-init) 脚手架已经解决了这个问题,你也可以参照这个 [webpack 配置](https://github.com/ant-design/antd-init/blob/f5fb9479ca973fade51fd6754e50f8b3fafbb1df/boilerplate/webpack.config.js#L4-L8)。
> 更多 IE8 下使用 React 的相关问题可以参考https://github.com/xcatliu/react-ie8
## 自行构建
如果想自己维护工作流,我们推荐使用 [webpack](http://webpack.github.io/) 进行构建和调试。理论上你可以利用 React 生态圈中的 [各种脚手架](https://github.com/enaqx/awesome-react#boilerplates) 进行开发,如果遇到问题可参考我们所使用的 [webpack 配置](https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js) 进行 [定制](http://ant-tool.github.io/webpack-config.htm)。
目前社区也有很多基于 antd 定制的 [脚手架](https://github.com/ant-design/ant-design/issues/129),欢迎进行试用和贡献。
### 改变主色系
- [配置代码示例](https://github.com/ant-design/antd-init/tree/master/examples/customize-antd-theme)

View File

@ -86,4 +86,4 @@ import 'antd/lib/index.css'; // or 'antd/style/index.less'
## 如何贡献
在任何形式的参与前,请先阅读 [贡献者文档](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md)。有任何建议或意见您可以 [Pull Request](https://github.com/ant-design/ant-design/pulls),给我们 [报告 Bug](http://dwz.cn/2AF9ao) 或 [提问](https://github.com/ant-design/ant-design/issues)。
在任何形式的参与前,请先阅读 [贡献者文档](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md)。有任何建议或意见您可以 [Pull Request](https://github.com/ant-design/ant-design/pulls),给我们 [报告 Bug](http://dwz.cn/2AF9ao) 或 [提问](https://github.com/ant-design/ant-design/issues)。

View File

@ -8,17 +8,17 @@
这里提供 Ant Design 相关设计资源和设计工具的下载,更多设计资源正在整理和完善中。
<div class="resource-cards">
<a target="_blank" href="https://github.com/ant-design/ant-design/files/69428/Ant_Design_Components.rplib.zip" class="resource-card">
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/resource/AntD_Component_v1.3.rplib" class="resource-card">
<img src="https://os.alipayobjects.com/rmsportal/cnmjGfbBWUZPFiO.png">
<span class="resource-card-content">
<span class="resource-card-title">Axure Components</span>
<span class="resource-card-title">Axure Components v1.3</span>
<span class="resource-card-description">一套强大的 Ant Design 的 Axure 部件库</span>
</span>
</a>
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/resource/AntD_Box_v1.2.rp" class="resource-card">
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/resource/AntD_Box_v1.3.rp" class="resource-card">
<img src="https://os.alipayobjects.com/rmsportal/UuYRXxndGMKdaiE.png">
<span class="resource-card-content">
<span class="resource-card-title">Axure Box</span>
<span class="resource-card-title">Axure Box v1.3</span>
<span class="resource-card-description">强大的 Ant Design 组件拼装方式</span>
</span>
</a>
@ -29,7 +29,7 @@
<span class="resource-card-description">一套页面逻辑原型库,帮你梳理页面逻辑</span>
</span>
</a>
<a target="_blank" href="https://github.com/ant-design/ant-design/files/57840/iconfont.zip" class="resource-card">
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/resource/iconfont-0.12.11.zip" class="resource-card">
<img src="https://os.alipayobjects.com/rmsportal/UEpOFKUQTZaUfnW.png">
<span class="resource-card-content">
<span class="resource-card-title">Web Font</span>

View File

@ -28,7 +28,8 @@ Ant Design 是一个致力于提升『用户』和『设计者』使用体验的
- [Ant Design of React](/docs/react/introduce)(官方实现)
- [vue-antd](https://github.com/okoala/vue-antd)
- [antd-ember](https://github.com/idcos/antd-ember)
## 如何贡献
我们欢迎任何形式的贡献,有任何建议或意见您可以进行 [Pull Request](https://github.com/ant-design/ant-design/pulls),或者给我们[提问](https://github.com/ant-design/ant-design/issues)。
我们欢迎任何形式的贡献,有任何建议或意见您可以进行 [Pull Request](https://github.com/ant-design/ant-design/pulls),或者给我们 [提问](https://github.com/ant-design/ant-design/issues)。

View File

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "0.12.11",
"version": "0.12.12",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",

View File

@ -59,6 +59,7 @@ a:hover {
background: #2db7f5;
color: #fff;
}
::-moz-selection {
background: #2db7f5;
color: #fff;

View File

@ -12,7 +12,7 @@
<link rel="icon" href="https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png" type="image/x-icon">
<link rel="shortcut icon" href="https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png" type="image/x-icon">
{% block styles %}{% endblock %}
<link rel="stylesheet" href="{{static_url('../dist/demo.css')}}?20160114">
<link rel="stylesheet" href="{{static_url('../dist/demo.css')}}">
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js,jquery/1.11.3/jquery.min.js,bluebird/3.1.1/bluebird.min.js"></script>
<script>
(function() {
@ -44,7 +44,7 @@
latest: '{{config.package.version}}'
};
</script>
<script src="{{static_url('../dist/demo.js')}}?20160114"></script>
<script src="{{static_url('../dist/demo.js')}}"></script>
{% block scripts %}{% endblock %}
</head>
<body {% block bodyAttribute %}{% endblock %}>

View File

@ -65,14 +65,12 @@
}
&-menus {
font-size: 12px;
overflow: hidden;
background: #fff;
position: absolute;
border: 1px solid @border-color-base;
border-radius: @border-radius-base;
box-shadow: @box-shadow-base;
white-space: nowrap;
height: 180px;
&-empty,
&-hidden {
display: none;

View File

@ -21,6 +21,7 @@
margin-left: 37px;
font-size: @font-size-base;
color: @text-color;
margin-top: 8px;
}
.anticon {

View File

@ -391,6 +391,10 @@ form {
}
}
.@{select-prefix-cls}-combobox .@{select-prefix-cls}-search__field:focus {
box-shadow: none;
}
// ant-datepicker
.@{calendar-prefix-cls}-picker-icon:after {
color: @error-color;

View File

@ -29,7 +29,6 @@
}
&-item,
&-submenu,
&-submenu-title {
cursor: pointer;
transition: all 0.3s ease;

View File

@ -1,7 +1,7 @@
@radio-group-prefix-cls: ant-radio-group;
@radio-prefix-cls: ant-radio;
@radio-inner-prefix-cls: ~"@{radio-prefix-cls}-inner";
@radio-duration: .3s;
@radio-duration: .2s;
.@{radio-group-prefix-cls} {
display: inline-block;
@ -38,7 +38,8 @@
content: ' ';
background-color: @primary-color;
opacity: 0;
transition: transform @radio-duration @ease-in-out-circ, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
transform: scale(0);
transition: all @radio-duration @ease-in-out-circ;
}
position: relative;
@ -52,7 +53,7 @@
border-radius: 14px;
border-color: @border-color-base;
background-color: #fff;
transition: border-color @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
transition: all @radio-duration @ease-in-out-circ;
}
&-input {
@ -74,7 +75,7 @@
&:after {
transform: scale(1);
opacity: 1;
transition: transform @radio-duration @ease-out-back, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
transition: all @radio-duration @ease-in-out-circ;
}
}
}

View File

@ -46,6 +46,14 @@ input::-ms-clear, input::-ms-reveal {
display: none;
}
::selection {
background: @primary-color;
}
::-moz-selection {
background: @primary-color;
}
// Links
// -- TODO --
a {
@ -54,6 +62,7 @@ a {
text-decoration: none;
outline: none;
cursor: pointer;
transition: color .3s ease;
&:hover {
color: @link-hover-color;

71
webpack.config.js Normal file
View File

@ -0,0 +1,71 @@
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require('path');
var pkg = require('./package');
var autoprefixer = require('autoprefixer');
var entry = {};
entry['demo'] = ['./scripts/demo.js', 'webpack-hot-middleware/client'];
module.exports = {
entry: entry,
cache: true,
resolve: {
extensions: ['', '.js', '.jsx'],
unsafeCache: true
},
noParse: /_site|node_modules/,
output: {
path: path.join(process.cwd(), 'dist'),
publicPath: '/dist/',
filename: '[name].js'
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'es3ify'
}, {
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
cacheDirectory: true,
presets: ['es2015', 'react', 'stage-0', 'react-hmre'],
plugins: ['add-module-exports']
}
}, {
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader'
}, {
test: /\.less$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract(
'css?sourceMap&-minimize!' + 'postcss-loader!' + 'less?sourceMap'
)
}, {
test: /\.css$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract(
'css?sourceMap&-minimize!' + 'postcss-loader'
)
}]
},
postcss: [autoprefixer],
plugins: [
new ExtractTextPlugin('[name].css'),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
devtool: 'cheap-module-source-map'
};

25
webpack.deploy.config.js Normal file
View File

@ -0,0 +1,25 @@
var webpack = require('webpack');
var config = require('./webpack.config');
delete config.devtool;
config.entry.demo = [config.entry.demo[0]];
config.plugins = [config.plugins[0], new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
output: {
ascii_only: true
},
compress: {
warnings: false
}
})];
config.module.loaders.forEach(function(loader) {
if (loader.loader === 'babel') {
// remove preset hmre
loader.query.presets = loader.query.presets.slice(0, 3);
}
return loader;
});
module.exports = config;