From e788bf849589fb4a6b8b676e3cf7db658a140b62 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 27 Oct 2015 12:26:30 +0800 Subject: [PATCH 01/16] deps: upgrade React Components --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6964c20180..e31de1eaa6 100644 --- a/package.json +++ b/package.json @@ -37,14 +37,14 @@ "gregorian-calendar": "~3.0.0", "gregorian-calendar-format": "~3.0.1", "object-assign": "~4.0.1", - "rc-animate": "2.0.x", + "rc-animate": "~2.0.0", "rc-calendar": "4.0.0-alpha6", "rc-checkbox": "~1.1.1", - "rc-collapse": "~1.3.0", + "rc-collapse": "~1.4.0", "rc-dialog": "~5.1.0", "rc-dropdown": "~1.4.0", "rc-form-validation": "~2.4.7", - "rc-input-number": "~2.1.2", + "rc-input-number": "~2.3.0", "rc-menu": "~4.6.2", "rc-notification": "~1.1.0", "rc-pagination": "~1.1.0", @@ -53,7 +53,7 @@ "rc-radio": "~2.0.0", "rc-select": "~5.0.0", "rc-slider": "~1.5.0", - "rc-steps": "~1.3.2", + "rc-steps": "~1.4.0", "rc-switch": "~1.2.0", "rc-table": "~3.2.0", "rc-tabs": "~5.4.3", From 602c2d1f9d53c944140593ffc45a74f9b70b1faf Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 27 Oct 2015 16:26:56 +0800 Subject: [PATCH 02/16] support border radius in ie8 via css3pie --- components/button/button.jsx | 6 ++++++ components/button/index.md | 14 ++++++++++++++ site/templates/layout.html | 3 +++ style/mixins/button.less | 3 +++ 4 files changed, 26 insertions(+) diff --git a/components/button/button.jsx b/components/button/button.jsx index 352cfa9f56..99a9788668 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -1,5 +1,6 @@ import React from 'react'; import rcUtil from 'rc-util'; +import { findDOMNode } from 'react-dom'; const rxTwoCNChar = /^[\u4e00-\u9fa5]{2,2}$/; const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar); @@ -24,6 +25,11 @@ function insertSpace(child) { } export default class Button extends React.Component { + componentDidMount() { + if (window && window.PIE) { + window.PIE.attach(findDOMNode(this)); + } + } render() { const props = this.props; const {type, shape, size, onClick, className, htmlType, children, ...others} = props; diff --git a/components/button/index.md b/components/button/index.md index 44163c0143..8c56ba45f7 100644 --- a/components/button/index.md +++ b/components/button/index.md @@ -29,3 +29,17 @@ loading | 设置按钮载入状态,存在为 `true`,不存在为 `false`, onClick | `click` 事件的 handler | Function | `function() {}` - `` 最终会被渲染为 ``,并且除了上表中的属性,其它属性都会直接传到 `` + + +### IE8 border radius support + +Ant Design 视觉上采用渐进降级的方案,在 IE8 下圆角按钮将降级为直角。 +如果强烈需要圆角按钮,我们提供了 [css3pie](http://css3pie.com/) 的兼容方案。 + +使用时只需在 html 头部加入以下代码即可。 + +```html + +``` diff --git a/site/templates/layout.html b/site/templates/layout.html index c07f346e5b..98f98678e1 100644 --- a/site/templates/layout.html +++ b/site/templates/layout.html @@ -15,6 +15,9 @@ +