From db2ef44617d69b2ddc1d7200e4ecb173eeba2859 Mon Sep 17 00:00:00 2001 From: zhangpc Date: Thu, 14 Jan 2016 09:26:20 +0800 Subject: [PATCH 1/7] remove href attributes of tag --- CHANGELOG.md | 1 + components/tag/demo/basic.md | 2 +- components/tag/index.jsx | 2 +- components/tag/index.md | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0798b10025..86a0f4c1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - 修复 TimePicker 受控模式点选即关闭面板的问题。[#818](https://github.com/ant-design/ant-design/issues/818) - 修复一个两栏的 TimePicker 点击右边空白处无法关闭面板的问题。[#826](https://github.com/ant-design/ant-design/issues/826) - 修复 Table `pagination.onChange` 指定无效的问题。[#824](https://github.com/ant-design/ant-design/issues/824) +- 移除 Tag `href` 属性。[#862](https://github.com/ant-design/ant-design/issues/862) ## 0.11.2 `2015-01-03` diff --git a/components/tag/demo/basic.md b/components/tag/demo/basic.md index aec4cb6067..cd1a87cb90 100644 --- a/components/tag/demo/basic.md +++ b/components/tag/demo/basic.md @@ -17,6 +17,6 @@ ReactDOM.render(
标签一 标签二 标签三 - 标签四(链接) + 标签四(链接)
, mountNode); ```` diff --git a/components/tag/index.jsx b/components/tag/index.jsx index f88e8b3f91..f7d2dfc4ba 100644 --- a/components/tag/index.jsx +++ b/components/tag/index.jsx @@ -45,7 +45,7 @@ class AntTag extends React.Component { transitionName={this.props.prefixCls + '-zoom'} onEnd={this.animationEnd.bind(this)}>
- + {close}
diff --git a/components/tag/index.md b/components/tag/index.md index eaf307d7e8..062bb0b12c 100644 --- a/components/tag/index.md +++ b/components/tag/index.md @@ -17,7 +17,6 @@ | 参数 | 说明 | 类型 | 可选值 | 默认值 | |----------------|--------------------------------|------------|---------|--------| -| href | 链接的地址,会传给 a 标签 | string | | false | | closable | 标签是否可以关闭 | boolean | | false | | onClose | 组合时根据此项判定checked | function | | 无 | | color | 标签的色彩 | string | blue green yellow red | 无 | From efcc8c5cb259ab844b649280687d1621a7e3bf58 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Jan 2016 15:55:42 +0800 Subject: [PATCH 2/7] fix popover API table --- components/popover/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/popover/index.md b/components/popover/index.md index 7018cd1358..c64b6532ad 100644 --- a/components/popover/index.md +++ b/components/popover/index.md @@ -20,7 +20,7 @@ | 参数 | 说明 | 类型 | 默认值 | |-----------|------------------------------------------|---------------|--------| | trigger | 触发行为,可选 `hover/focus/click` | string | hover | -| placement | 气泡框位置,可选 `top/left/right/bottom/topLeft/topRight/bottomLeft/bottomRight/leftTop/leftBottom/rightTop/rightBottom` | string | top | +| placement | 气泡框位置,可选 `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom` | string | top | | title | 卡片标题 | React.Element | 无 | | overlay | 卡片内容 | React.Element | 无 | | prefixCls | 浮层的类名 | string | ant-popover | From e924c57296da68c38dc019b58e8ef172b785f2b6 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 14 Jan 2016 19:23:25 +0800 Subject: [PATCH 3/7] fix scripts Conflicts: package.json --- scripts/prenpm.js | 2 +- scripts/publish.sh | 2 +- webpack.antd.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/prenpm.js b/scripts/prenpm.js index a9882a228a..3bca6f91f6 100644 --- a/scripts/prenpm.js +++ b/scripts/prenpm.js @@ -13,7 +13,7 @@ fs.writeFileSync( "module.exports = " + JSON.stringify(require('../package.json')) + ";", 'utf-8' ); -var antdCss = path.join(cwd, 'dist/index.css'); +var antdCss = path.join(cwd, 'dist/antd.css'); fs.createReadStream(antdCss) .pipe(fs.createWriteStream(path.join(cwd, 'lib/index.css'))); console.log('prenpm done'); diff --git a/scripts/publish.sh b/scripts/publish.sh index 9545576efe..f7544f8bda 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,6 +1,6 @@ npm run babel rm -rf dist -webpack +webpack --config webpack.antd.config.js node scripts/prenpm.js npm publish $1 $2 rm -rf lib diff --git a/webpack.antd.config.js b/webpack.antd.config.js index 877ab9d096..cbc66bb90a 100644 --- a/webpack.antd.config.js +++ b/webpack.antd.config.js @@ -1,6 +1,6 @@ var config = require('./webpack.config'); config.entry = { - 'antd': ['./index.js'] + 'antd': ['./index.js', './style/index.less'] }; config.externals = { 'react': { From 229b0de3c6d22b9a2b1ccbbd51c90321b74a3b65 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Jan 2016 21:15:25 +0800 Subject: [PATCH 4/7] upgrade rc-upload to 1.8.0, close #677 --- components/upload/index.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/upload/index.md b/components/upload/index.md index bcbbcbf73e..6fba743b8f 100644 --- a/components/upload/index.md +++ b/components/upload/index.md @@ -23,6 +23,7 @@ | name | 可选参数, 上传的文件 | String | file | | action | 必选参数, 上传的地址 | String | 无 | | data | 可选参数, 上传所需参数 | Object | 无 | +| headers | 可选参数, 设置上传的请求头部,IE10 以上有效 | Object | 无 | | showUploadList | 可选参数, 是否展示 uploadList, 默认开启 | Boolean | true | | multiple | 可选参数, 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。 | Boolean | false | | accept | 可选参数, 接受上传的文件类型, 详见 input accept Attribute | String | 无 | diff --git a/package.json b/package.json index eca5ef7729..edfbee4fc7 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "rc-tree": "~0.26.1", "rc-tree-select": "~0.3.3", "rc-trigger": "~1.0.6", - "rc-upload": "~1.7.0", + "rc-upload": "~1.8.0", "rc-util": "~3.0.1", "react-slick": "~0.9.1", "semver": "~5.1.0", From 71c84a2a44d49aed5ca9e84c99322d6f2762a579 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Jan 2016 21:34:55 +0800 Subject: [PATCH 5/7] Style: fix upload picture long filename bug --- style/components/upload.less | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/style/components/upload.less b/style/components/upload.less index abd3dc1836..f435efe77e 100644 --- a/style/components/upload.less +++ b/style/components/upload.less @@ -158,9 +158,9 @@ &-picture &-item-thumbnail { width: 48px; height: 48px; - display: inline-block; - overflow: hidden; - vertical-align: middle; + position: absolute; + top: 8px; + left: 8px; } &-picture &-item-thumbnail img { @@ -182,6 +182,11 @@ margin: 0 0 0 8px; line-height: 42px; transition: all 0.3s ease; + padding-left: 48px; + padding-right: 8px; + max-width: 100%; + display: inline-block; + box-sizing: border-box; } &-picture &-item-uploading &-item-name { From 1514d28dc45b853a1db5656ba528a330ede2a2ad Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Jan 2016 21:42:02 +0800 Subject: [PATCH 6/7] update tree select doc --- components/tree-select/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/tree-select/index.md b/components/tree-select/index.md index c6c940ce86..ccb576b230 100644 --- a/components/tree-select/index.md +++ b/components/tree-select/index.md @@ -1,14 +1,16 @@ # TreeSelect - category: Components -- chinese: 树选择控件 +- chinese: 树选择 - type: 表单 --- +树型选择控件。 + ## 何时使用 -当需要从树控件中灵活地筛选数据时 +类似 Select 的选择控件,可选择的数据结构是一个树形结构时,可以使用 TreeSelect,例如公司层级、学科系统、分类目录等等。 ## API From dab82feb78d461f8123742891a4a7d509e3c4dad Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Jan 2016 21:44:35 +0800 Subject: [PATCH 7/7] auto eslint fix in scripts --- components/alert/index.jsx | 28 ++++++++++++++-------------- components/input/index.jsx | 16 ++++++++-------- components/menu/index.jsx | 20 ++++++++++---------- components/notification/index.jsx | 28 ++++++++++++++-------------- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/components/alert/index.jsx b/components/alert/index.jsx index a5cf1fa569..91c0f8ad23 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -44,20 +44,20 @@ export default React.createClass({ let iconType = ''; switch (type) { - case 'success': - iconType = 'check-circle'; - break; - case 'info': - iconType = 'info-circle'; - break; - case 'error': - iconType = 'exclamation-circle'; - break; - case 'warn': - iconType = 'exclamation-circle'; - break; - default: - iconType = 'default'; + case 'success': + iconType = 'check-circle'; + break; + case 'info': + iconType = 'info-circle'; + break; + case 'error': + iconType = 'exclamation-circle'; + break; + case 'warn': + iconType = 'exclamation-circle'; + break; + default: + iconType = 'default'; } // use outline icon in alert with description diff --git a/components/input/index.jsx b/components/input/index.jsx index 1d5c4d8bde..9bb54870bd 100644 --- a/components/input/index.jsx +++ b/components/input/index.jsx @@ -72,9 +72,9 @@ class Input extends React.Component { } switch (props.size) { - case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break; - case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break; - default: + case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break; + case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break; + default: } let placeholder = props.placeholder; if (placeholder && ieGT9()) { @@ -84,14 +84,14 @@ class Input extends React.Component { props.value = fixControlledValue(props.value); } switch (props.type) { - case 'textarea': - return ( + case 'textarea': + return (