Skip to content

Commit 4c58c52

Browse files
committed
cr grid & icon & upload
1 parent 927a0a6 commit 4c58c52

File tree

11 files changed

+34
-37
lines changed

11 files changed

+34
-37
lines changed

components/grid/Col.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ColSize = PropTypes.shape({
1111
pull: stringOrNumber,
1212
}).loose;
1313

14-
const objectOrNumber = PropTypes.oneOfType([PropTypes.number, ColSize]);
14+
const objectOrNumber = PropTypes.oneOfType([PropTypes.string, PropTypes.number, ColSize]);
1515

1616
export const ColProps = {
1717
span: stringOrNumber,

components/grid/__tests__/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ describe('Grid', () => {
2121
return (
2222
<Row gutter={20}>
2323
<div>
24-
<Col span="12" />
24+
<Col span={12} />
2525
</div>
26-
<Col span="12" />
26+
<Col span={12} />
2727
</Row>
2828
);
2929
},

components/icon/__tests__/__snapshots__/index.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ exports[`Icon should support pass svg paths as children 1`] = `
5757
</svg></i>
5858
`;
5959

60-
exports[`Icon should support svg react component 1`] = `
60+
exports[`Icon should support svg vue component 1`] = `
6161
<i class="my-home-icon anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
6262
<title>Cool Home</title>
6363
<path d="'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'"></path>

components/icon/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('Icon', () => {
169169
});
170170
});
171171

172-
it('should support svg react component', () => {
172+
it('should support svg vue component', () => {
173173
const SvgComponent = {
174174
render() {
175175
return (

components/icon/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| style | Style properties of icon, like `fontSize` and `color` | CSSProperties | - |
77
| theme | Theme of the ant design icon | 'filled' \| 'outlined' \| 'twoTone' | 'outlined' |
88
| spin | Rotate icon with animation | boolean | false |
9-
| rotate | Rotate degrees (added in 1.40.0, not working in IE9) | number | - |
9+
| rotate | Rotate degrees (added in 1.4.0, not working in IE9) | number | - |
1010
| component | The component used for the root node. This will override the **`type`** property. | ComponentType<CustomIconComponentProps\> | - |
1111
| twoToneColor | Only support the two-tone icon. Specific the primary color. | string (hex color) | - |
1212

components/icon/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ function renderIcon(h, locale, context) {
6868
const innerSvgProps = {
6969
attrs: {
7070
...svgBaseProps,
71-
style: svgStyle,
7271
viewBox,
7372
},
7473
class: svgClassString,
74+
style: svgStyle,
7575
};
7676
if (!viewBox) {
7777
delete innerSvgProps.attrs.viewBox;
@@ -90,6 +90,7 @@ function renderIcon(h, locale, context) {
9090
...svgBaseProps,
9191
},
9292
class: svgClassString,
93+
style: svgStyle,
9394
};
9495
innerNode = (
9596
<svg {...innerSvgProps} viewBox={viewBox}>

components/icon/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| style | 设置图标的样式,例如 `fontSize``color` | CSSProperties | - |
88
| theme | 图标主题风格。可选实心、描线、双色等主题风格,适用于官方图标 | 'filled' \| 'outlined' \| 'twoTone' | 'outlined' |
99
| spin | 是否有旋转动画 | boolean | false |
10-
| rotate | 图标旋转角度(1.40.0 后新增,IE9 无效) | number | - |
10+
| rotate | 图标旋转角度(1.4.0 后新增,IE9 无效) | number | - |
1111
| component | 控制如何渲染图标,通常是一个渲染根标签为 `<svg>``Vue` 组件,**会使 `type` 属性失效** | ComponentType<CustomIconComponentProps\> | - |
1212
| twoToneColor | 仅适用双色图标。设置双色图标的主要颜色 | string (十六进制颜色) | - |
1313

components/upload/Upload.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default {
140140
this.$emit('reject', fileList);
141141
},
142142
handleRemove(file) {
143-
const { remove } = getOptionProps(this);
143+
const { remove } = this;
144144
const { status } = file;
145145
file.status = 'removed'; // eslint-disable-line
146146

components/upload/index.en-US.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## API
22

3-
> You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki) about how to implement server side upload interface.
4-
53
| Property | Description | Type | Default |
64
| -------- | ----------- | ---- | ------- |
75
| accept | File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string | - |
@@ -49,7 +47,7 @@ When uploading state change, it returns:
4947

5048
```js
5149
{
52-
uid: 'uid', // unique identifiernegative is recommendto prevent interference with internal generated id
50+
uid: 'uid', // unique identifier, negative is recommend, to prevent interference with internal generated id
5351
name: 'xx.png' // file name
5452
status: 'done', // options:uploading, done, error, removed
5553
response: '{"status": "success"}', // response from server

components/upload/index.zh-CN.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## API
22

3-
> 服务端上传接口实现可以参考 [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki)
4-
53
| 参数 | 说明 | 类型 | 默认值 |
64
| --- | --- | --- | --- |
75
| accept | 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string ||

0 commit comments

Comments
 (0)