Merge branch 'master' into feature

* master:
  fix: extra space
  docs(table): generic type arguments in jsx elements demo
  revert webpackbar
This commit is contained in:
afc163 2018-11-09 18:56:01 +08:00
commit 713b363a9b
4 changed files with 19 additions and 4 deletions

View File

@ -176,7 +176,7 @@ Properties for row selection.
## Using in TypeScript
```jsx
```tsx
import { Table } from 'antd';
import { ColumnProps } from 'antd/lib/table';
@ -206,6 +206,13 @@ class NameColumn extends Table.Column<IUser> {}
<UserTable dataSource={data}>
<NameColumn key="name" title="Name" dataIndex="name" />
</UserTable>
// after TypeScript 2.9 can write like this
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#generic-type-arguments-in-jsx-elements
<Table<IUser> columns={columns} dataSource={data} />
<Table<IUser> dataSource={data}>
<Table.Column<IUser> key="name" title="Name" dataIndex="name" />
</Table>
```
## Note

View File

@ -181,7 +181,7 @@ const columns = [{
## 在 TypeScript 中使用
```jsx
```tsx
import { Table } from 'antd';
import { ColumnProps } from 'antd/lib/table';
@ -210,6 +210,14 @@ class NameColumn extends Table.Column<IUser> {}
<UserTable dataSource={data}>
<NameColumn key="name" title="Name" dataIndex="name" />
</UserTable>
// TypeScript 2.9 之后也可以这样写
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#generic-type-arguments-in-jsx-elements
<Table<IUser> columns={columns} dataSource={data} />
<Table<IUser> dataSource={data}>
<Table.Column<IUser> key="name" title="Name" dataIndex="name" />
</Table>
```
## 注意

View File

@ -174,7 +174,7 @@
"typescript": "~3.1.1",
"unified": "^7.0.0",
"values.js": "^1.0.3",
"webpackbar": "^3.0.3",
"webpackbar": "^2.6.3",
"xhr-mock": "^2.4.1",
"xhr2": "^0.1.4"
},

View File

@ -33,7 +33,7 @@ function usePrettyWebpackBar(config) {
// use brand new progress bar.
config.plugins.push(
new WebpackBar({
name: '📦 Site',
name: '📦 Ant Design Site',
minimal: false,
})
);