diff --git a/.gitignore b/.gitignore index 16d51bb2c5..f22afe06b9 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,8 @@ node_modules/ npm-debug.log nohup.out _site +_data dist lib elasticsearch-* -config/base.yaml \ No newline at end of file +config/base.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ce26fd92..bf5b4b5347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` @@ -283,6 +291,7 @@ - 移除 `animation` 属性,并在 `tabPosition="top|bottom"` 时默认启用切换动画。 - Timepicker - **重命名为 TimePicker。** + - 国际化属性 `locale` 结构发生了 [变化](https://github.com/ant-design/ant-design/issues/1270#issuecomment-201181384)。 - 新增 `value` 属性。 - 新增属性 `disabledHours` `disabledMinutes` `disabledSeconds`。[演示](http://ant.design/components/time-picker/#picker-demo-disable-options) - 移除 `hourOptions` `minuteOptions` `secondOptions`,新增 `hideDisabled` 属性用于替代。 diff --git a/components/breadcrumb/index.jsx b/components/breadcrumb/index.jsx index f9e0f8bd23..593d8f3769 100644 --- a/components/breadcrumb/index.jsx +++ b/components/breadcrumb/index.jsx @@ -52,14 +52,6 @@ const Breadcrumb = React.createClass({ if (routes && routes.length > 0) { const paths = []; crumbs = routes.map((route, i) => { - if (!route.breadcrumbName) { - return null; - } - const name = route.breadcrumbName.replace(/\:(.*)/g, (replacement, key) => { - return params[key] || replacement; - }); - - let link; let path = route.path.replace(/^\//, ''); Object.keys(params).forEach(key => { path = path.replace(`:${key}`, params[key]); @@ -68,6 +60,14 @@ const Breadcrumb = React.createClass({ paths.push(path); } + if (!route.breadcrumbName) { + return null; + } + const name = route.breadcrumbName.replace(/\:(.*)/g, (replacement, key) => { + return params[key] || replacement; + }); + + let link; if (i === routes.length - 1) { link = {name}; } else { diff --git a/components/date-picker/demo/time.md b/components/date-picker/demo/time.md index 81de2d224c..e7de19c240 100644 --- a/components/date-picker/demo/time.md +++ b/components/date-picker/demo/time.md @@ -14,6 +14,6 @@ function onChange(value) { } ReactDOM.render( - + , mountNode); ```` diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx index b6dd9fb69a..9c45da4898 100644 --- a/components/date-picker/index.jsx +++ b/components/date-picker/index.jsx @@ -114,8 +114,15 @@ function createPicker(TheCalendar, defaultFormat) { if (this.state.open) { pickerClass += ' ant-calendar-picker-open'; } + + // default width for showTime + const pickerStyle = {}; + if (this.props.showTime) { + pickerStyle.width = 180; + } + return ( - + - - - + + + - - - + + + - - A - B - C - D - + + A + B + C + D + , mountNode); diff --git a/components/form/demo/search-input.md b/components/form/demo/search-input.md index 9efbada08f..8935567d3a 100644 --- a/components/form/demo/search-input.md +++ b/components/form/demo/search-input.md @@ -16,7 +16,7 @@ const SearchInput = React.createClass({ getInitialState() { return { value: '', - focus: false + focus: false, }; }, handleInputChange(e) { @@ -48,7 +48,7 @@ const SearchInput = React.createClass({
-
diff --git a/components/form/index.md b/components/form/index.md index 7b6bebe9fb..18283267f3 100644 --- a/components/form/index.md +++ b/components/form/index.md @@ -81,7 +81,7 @@ CustomizedForm = Form.create({})(CustomizedForm); | getFieldError | 获取某个输入控件的 Error | Function(name) | | | | isFieldValidating | 判断一个输入控件是否在校验状态 | Function(name) | | | | resetFields | 重置一组输入控件的值与状态,如不传入参数,则重置所有组件 | Function([names: string[]]) | | | -| getFieldProps 详见下面描述 | | | | | +| getFieldProps | 用于和表单进行双向绑定,详见下方描述 | | | | #### this.props.form.getFieldProps(id, options) @@ -130,8 +130,9 @@ CustomizedForm = Form.create({})(CustomizedForm); #### Input.Group ```html - // 样式类名前缀,默认是 ant-input-group,通常您不需要设置。 - {children} + + + ``` diff --git a/components/popconfirm/index.md b/components/popconfirm/index.md index 9cfd85810c..5198031111 100644 --- a/components/popconfirm/index.md +++ b/components/popconfirm/index.md @@ -20,9 +20,9 @@ | 参数 | 说明 | 类型 | 默认值 | |-----------|------------------------------------------|---------------|--------| | placement | 气泡框位置,可选 `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom` | string | top | -| title | 确认框的描述 | string | 无 | +| title | 确认框的描述 | React.Element | 无 | | onConfirm | 点击确认的回调 | function | 无 | -| onCancel | 卡片内容 | function | 无 | +| onCancel | 点击取消的回调 | function | 无 | | onVisibleChange | 显示隐藏的回调 | function(visible) | 无 | | okText | 确认按钮文字 | String | 确定 | | cancelText| 取消按钮文字 | String | 取消 | diff --git a/components/popover/demo/basic.md b/components/popover/demo/basic.md index cee2bbf698..2540f89301 100644 --- a/components/popover/demo/basic.md +++ b/components/popover/demo/basic.md @@ -2,7 +2,7 @@ - order: 0 -最简单的用法。 +最简单的用法,浮层的大小由内容区域决定。 --- diff --git a/components/table/index.md b/components/table/index.md index 2a6292dbf5..7d99433577 100644 --- a/components/table/index.md +++ b/components/table/index.md @@ -54,43 +54,44 @@ const columns = [{ ### Table -| 参数 | 说明 | 类型 | 可选值 | 默认值 | -|---------------|--------------------------|-----------------|---------------------|---------| -| rowSelection | 列表项是否可选择 | Object | [配置项](#rowSelection) | null | -| pagination | 分页器 | Object | 配置项参考 [pagination](/components/pagination),设为 false 时不显示分页 | | -| size | 正常或迷你类型 | String | `default` or `small`| default | -| dataSource | 数据数组 | Array | | | -| columns | 表格列的配置描述,具体项见下表 | Array | | 无 | -| rowKey | 表格行 key 的取值 | Function(record, index):string | | record.key | -| expandedRowRender | 额外的展开行 | Function | | - | -| defaultExpandedRowKeys | 默认展开的行 | Array | | - | -| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | | | -| loading | 页面是否加载中 | Boolean | | false | -| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | Object | | `{ filterConfirm: '确定', filterReset: '重置', emptyText: '暂无数据' }` [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) | -| indentSize | 展示树形数据时,每层缩进的宽度,以 px 为单位 | Number | | 15 | -| onRowClick | 处理行点击事件 | Function(record, index) | | 无 | -| useFixedHeader | 是否固定表头 | Boolean | | false | -| bordered | 是否展示外边框和列边框 | Boolean | | false | -| showHeader | 是否显示表头 | Boolean | | true | -| footer | 表格底部自定义渲染函数 | Function(currentPageData) | | | +| 参数 | 说明 | 类型 | 默认值 | +|---------------|--------------------------|-----------------|---------| +| rowSelection | 列表项是否可选择,[配置项](#rowSelection) | Object | null | +| pagination | 分页器,配置项参考 [pagination](/components/pagination),设为 false 时不显示分页 | Object | | +| size | 正常或迷你类型,`default` or `small` | String | default | +| dataSource | 数据数组 | Array | | +| columns | 表格列的配置描述,具体项见下表 | Array | - | +| rowKey | 表格行 key 的取值 | Function(record, index):string | record.key | +| rowClassName | 表格行的类名 | Function(record, index):string | - | +| expandedRowRender | 额外的展开行 | Function | - | +| defaultExpandedRowKeys | 默认展开的行 | Array | - | +| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | | +| loading | 页面是否加载中 | Boolean | false | +| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | Object | filterConfirm: '确定'
filterReset: '重置'
emptyText: '暂无数据'
[默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) | +| indentSize | 展示树形数据时,每层缩进的宽度,以 px 为单位 | Number | 15 | +| onRowClick | 处理行点击事件 | Function(record, index) | - | +| useFixedHeader | 是否固定表头 | Boolean | false | +| bordered | 是否展示外边框和列边框 | Boolean | false | +| showHeader | 是否显示表头 | Boolean | true | +| footer | 表格底部自定义渲染函数 | Function(currentPageData) | | ### Column 列描述数据对象,是 columns 中的一项。 -| 参数 | 说明 | 类型 | 可选值 | 默认值 | +| 参数 | 说明 | 类型 | 默认值 | |------------|----------------------------|-----------------|---------------------|---------| -| title | 列头显示文字 | String or React.Element | | | -| key | React 需要的 key,建议设置 | String | | | -| dataIndex | 列数据在数据项中对应的 key | String | | | -| render | 生成复杂数据的渲染函数,参数分别为当前列的值,当前列数据,列索引,@return里面可以设置表格[行/列合并](#demo-colspan-rowspan) | Function(text, record, index) {} | | | -| filters | 表头的筛选菜单项 | Array | | | -| onFilter | 本地模式下,确定筛选的运行函数 | Function | | | -| filterMultiple | 是否多选 | Boolean | | true | -| sorter | 排序函数,本地排序使用一个函数,需要服务端排序可设为 true | Function or Boolean | | 无 | -| colSpan | 表头列合并,设置为 0 时,不渲染 | Number | | | -| width | 列宽度 | String or Number | | 无 | -| className | 列的 className | String | | 无 | +| title | 列头显示文字 | String or React.Element | | +| key | React 需要的 key,建议设置 | String | | +| dataIndex | 列数据在数据项中对应的 key | String | | +| render | 生成复杂数据的渲染函数,参数分别为当前列的值,当前列数据,列索引,@return里面可以设置表格[行/列合并](#demo-colspan-rowspan) | Function(text, record, index) {} | | +| filters | 表头的筛选菜单项 | Array | | +| onFilter | 本地模式下,确定筛选的运行函数 | Function | | +| filterMultiple | 是否多选 | Boolean | true | +| sorter | 排序函数,本地排序使用一个函数,需要服务端排序可设为 true | Function or Boolean | - | +| colSpan | 表头列合并,设置为 0 时,不渲染 | Number | | +| width | 列宽度 | String or Number | - | +| className | 列的 className | String | - | ### rowSelection diff --git a/components/time-picker/index.jsx b/components/time-picker/index.jsx index aecc2e727f..d67dee8157 100644 --- a/components/time-picker/index.jsx +++ b/components/time-picker/index.jsx @@ -86,7 +86,7 @@ const AntTimePicker = React.createClass({ } let className = classNames({ [props.className]: !!props.className, - [`${props.prefixCls}-${props.size}`]: true, + [`${props.prefixCls}-${props.size}`]: !!props.size, }); if (props.format.indexOf('ss') < 0) { props.showSecond = false; diff --git a/components/time-picker/index.md b/components/time-picker/index.md index 42014b1eb0..b22cc60c81 100644 --- a/components/time-picker/index.md +++ b/components/time-picker/index.md @@ -34,6 +34,6 @@ API | disabledMinutes | 禁止选择部分分钟选项 | function(selectedHour) | 无 | | disabledSeconds | 禁止选择部分秒选项 | function(selectedHour, selectedMinute) | 无 | | hideDisabledOptions | 隐藏禁止选择的选项 | boolean | false | -| locale | 国际化配置 | Object | [默认配置](https://github.com/ant-design/ant-design/issues/424) | +| locale | 国际化配置 | Object | [默认配置](https://github.com/ant-design/ant-design/issues/1270#issuecomment-201181384) | diff --git a/components/upload/index.jsx b/components/upload/index.jsx index 60fc2a168a..7f7487c5f0 100644 --- a/components/upload/index.jsx +++ b/components/upload/index.jsx @@ -112,16 +112,11 @@ const AntUpload = React.createClass({ onSuccess(response, file) { this.clearProgressTimer(); - // 服务器端需要返回标准 json 字符串 - // 否则视为失败 try { if (typeof response === 'string') { - JSON.parse(response); + response = JSON.parse(response); } - } catch (e) { - this.onError(new Error('No response'), response, file); - return; - } + } catch (e) {/* do nothing */} let fileList = this.state.fileList; let targetItem = getFileItem(file, fileList); // 之前已经删除 diff --git a/docs/pattern/navigation.md b/docs/pattern/navigation.md index 4367d24822..71f2250eff 100644 --- a/docs/pattern/navigation.md +++ b/docs/pattern/navigation.md @@ -31,8 +31,8 @@ 总结 - 一般适用在浏览性强、门户性质的网站,以及一些比较前台化的应用。 适用在操作性强、中后台管理性质的应用。 + 一般适用在浏览性强、门户性质的网站,以及一些比较前台化的应用。 diff --git a/docs/react/getting-started.md b/docs/react/getting-started.md index 6dec916da8..c17731410f 100644 --- a/docs/react/getting-started.md +++ b/docs/react/getting-started.md @@ -102,12 +102,13 @@ Ant Design React 支持所有的现代浏览器和 IE8+。 @@ -130,12 +131,18 @@ Ant Design React 支持所有的现代浏览器和 IE8+。 ``` +另外,由于 `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) diff --git a/docs/react/introduce.md b/docs/react/introduce.md index 4360c5f993..14561eac24 100644 --- a/docs/react/introduce.md +++ b/docs/react/introduce.md @@ -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)。 diff --git a/docs/react/upgrade-notes.md b/docs/react/upgrade-notes.md index 52ba919de1..592b5e3ad3 100644 --- a/docs/react/upgrade-notes.md +++ b/docs/react/upgrade-notes.md @@ -5,7 +5,7 @@ --- -这里只列出升级中的不兼容改动,其他改动见 [Changelog](/changelog)。 +此处着重列出升级中的不兼容变化和推荐改动。所有变动请见 [Changelog](/changelog)。 ## 0.11 => 0.12 @@ -77,6 +77,10 @@ import 'antd/style/index.less'; 如果无法理解受控组件,只须在发现在选中日期后 `Datepicker` 显示的值不变的情况后,把其 `value` 属性改为 `defaultValue` 即可。 +### TimePicker locale 结构改变 + +属性 `locale` 结构发生了 [变化](https://github.com/ant-design/ant-design/commit/fd1312803fd49586ded9af39d923457540c515cc#diff-fe4bfc98d91fc3dab8f391e3258622d4L1),需要将原有的属性改为现有的[结构](https://github.com/ant-design/ant-design/issues/1270#issuecomment-201181384)。 + ### 其他 - Alert 组件默认不展示样式,可以用 `showIcon` 属性添加图标。 diff --git a/docs/spec/introduce.md b/docs/spec/introduce.md index d324f45cd4..455db6cd35 100644 --- a/docs/spec/introduce.md +++ b/docs/spec/introduce.md @@ -29,7 +29,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)。 diff --git a/nico.js b/nico.js index 4b1358eb46..9a8fa63a4f 100644 --- a/nico.js +++ b/nico.js @@ -93,6 +93,7 @@ exports.middlewares = [ name: 'webpackDevMiddleware', filter: /\.(js|css|json)(\.map)?(\?.*)?$/, handle: function(req, res, next) { + req.path = req.path || req.url; handler = handler || webpackMiddleware(webpackCompiler, { publicPath: webpackConfig.output.publicPath, lazy: false, diff --git a/package.json b/package.json index 277b54be43..1c8ecacd5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "0.12.11", + "version": "0.12.12", "title": "Ant Design", "description": "一个 UI 设计语言", "homepage": "http://ant.design/", diff --git a/site/static/style.less b/site/static/style.less index 4479f40205..afab714618 100644 --- a/site/static/style.less +++ b/site/static/style.less @@ -59,6 +59,7 @@ a:hover { background: #2db7f5; color: #fff; } + ::-moz-selection { background: #2db7f5; color: #fff; @@ -667,6 +668,11 @@ footer ul li > a { margin-left: 0.5em; } +.api-container table { + font-family: consolas; + font-size: 13px; +} + .prev-next-nav { position: absolute; bottom: 0; diff --git a/site/templates/layout.html b/site/templates/layout.html index 1629b3cb0d..2b8a86f7cf 100644 --- a/site/templates/layout.html +++ b/site/templates/layout.html @@ -12,7 +12,7 @@ {% block styles %}{% endblock %} - + - + {% block scripts %}{% endblock %} diff --git a/style/components/cascader.less b/style/components/cascader.less index 584e1164b0..7981521e76 100644 --- a/style/components/cascader.less +++ b/style/components/cascader.less @@ -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; diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less index 0e539d613b..00ccb5f37a 100644 --- a/style/components/datepicker/Picker.less +++ b/style/components/datepicker/Picker.less @@ -38,11 +38,6 @@ outline: none; } - &-open > span:first-child { - transition: opacity 0.3s ease; - opacity: 0; - } - &-icon { position: absolute; user-select: none; diff --git a/style/components/form.less b/style/components/form.less index ce0c7c73ca..78fe4e65d1 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -204,7 +204,8 @@ form { .ant-search-btn { .btn-default; border-radius: 0 @border-radius-base - 1 @border-radius-base - 1 0; - margin-left: -30px; + margin-left: -100%; + left: -1px; position: relative; border-width: 0 0 0 1px; z-index: 2; @@ -391,6 +392,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; diff --git a/style/components/menu.less b/style/components/menu.less index 95c05cad64..08663df8b4 100644 --- a/style/components/menu.less +++ b/style/components/menu.less @@ -35,6 +35,10 @@ transition: all 0.3s ease; } + &-submenu &-sub { + cursor: initial; + } + &-item > a { display: block; color: @text-color; diff --git a/style/components/radio.less b/style/components/radio.less index d90e3aa81f..7dc3a9f686 100644 --- a/style/components/radio.less +++ b/style/components/radio.less @@ -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; } } } diff --git a/style/components/table.less b/style/components/table.less index 9369b54eb3..9a17f1a8c6 100644 --- a/style/components/table.less +++ b/style/components/table.less @@ -7,6 +7,8 @@ .@{table-prefix-cls} { font-size: @font-size-base; color: @text-color; + border-radius: @border-radius-base @border-radius-base 0 0; + overflow: hidden; &-body { transition: opacity 0.3s ease; @@ -17,15 +19,13 @@ max-width: 100%; border-collapse: separate; text-align: left; - border-radius: @border-radius-base; - overflow: hidden; } th { background: @table-head-background-color; font-weight: bold; transition: background .3s ease; - position: relative; + text-align: left; .anticon-filter { margin-left: 4px; @@ -351,6 +351,9 @@ &-column-hidden { display: none; } + th&-column-has-prev { + position: relative; + } th&-column-has-prev, td&-column-has-prev { padding-left: 24px; diff --git a/style/components/tabs.less b/style/components/tabs.less index f47ce3481d..8b9d841cbe 100644 --- a/style/components/tabs.less +++ b/style/components/tabs.less @@ -1,7 +1,5 @@ @tab-prefix-cls: ant-tabs; -@effect-duration: .3s; - .@{tab-prefix-cls} { box-sizing: border-box; position: relative; @@ -223,6 +221,7 @@ animation-play-state: paused; animation-timing-function: @ease-in-out-quint; opacity: 0; + animation-duration: 0.4s; } &-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active { @@ -240,6 +239,7 @@ .motion-common(); animation-play-state: paused; animation-timing-function: @ease-in-out-quint; + animation-duration: 0.4s; } &-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active { @@ -253,6 +253,7 @@ animation-play-state: paused; animation-timing-function: @ease-in-out-quint; opacity: 0; + animation-duration: 0.4s; } &-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active { @@ -268,6 +269,7 @@ left: 0; bottom: 0; .motion-common(); + animation-duration: 0.4s; animation-play-state: paused; animation-timing-function: @ease-in-out-quint; } diff --git a/style/core/base.less b/style/core/base.less index 8cb73a4fbd..6d9e756ee2 100644 --- a/style/core/base.less +++ b/style/core/base.less @@ -46,14 +46,19 @@ input::-ms-clear, input::-ms-reveal { display: none; } +::selection { + background: @primary-color; + color: #fff; +} + // Links -// -- TODO -- a { color: @link-color; background: transparent; text-decoration: none; outline: none; cursor: pointer; + transition: color .3s ease; &:hover { color: @link-hover-color; diff --git a/webpack.config.js b/webpack.config.js index ef21c5af4e..c1d081a166 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,6 +27,10 @@ module.exports = { module: { loaders: [{ + test: /\.jsx?$/, + exclude: /node_modules/, + loader: 'es3ify' + }, { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel', @@ -63,5 +67,5 @@ module.exports = { new webpack.NoErrorsPlugin() ], - devtool: 'source-map' + devtool: 'cheap-module-source-map' }; diff --git a/webpack.deploy.config.js b/webpack.deploy.config.js index 0118df97cc..5f281b448c 100644 --- a/webpack.deploy.config.js +++ b/webpack.deploy.config.js @@ -8,6 +8,9 @@ config.plugins = [config.plugins[0], new webpack.optimize.UglifyJsPlugin({ sourceMap: false, output: { ascii_only: true + }, + compress: { + warnings: false } })];