diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index 1d88426960..c5dedbfc0f 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -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 {} + +// 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 + columns={columns} dataSource={data} /> + dataSource={data}> + key="name" title="Name" dataIndex="name" /> + ``` ## Note diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index 53caa51740..eb49c390d2 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -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 {} + +// TypeScript 2.9 之后也可以这样写 +// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#generic-type-arguments-in-jsx-elements + columns={columns} dataSource={data} /> + dataSource={data}> + key="name" title="Name" dataIndex="name" /> + + ``` ## 注意 diff --git a/package.json b/package.json index 5426abe94e..8bef783a4b 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/site/bisheng.config.js b/site/bisheng.config.js index c258385a21..24e7ad015d 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -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, }) );