Browse Source

lint: fix eslint error (#40629)

pull/40630/head
lijianan 2 years ago
committed by GitHub
parent
commit
9fd6159772
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      components/table/index.en-US.md
  2. 5
      components/table/index.zh-CN.md

5
components/table/index.en-US.md

@ -283,6 +283,7 @@ Properties for row selection.
```tsx ```tsx
import { Table } from 'antd'; import { Table } from 'antd';
import type { ColumnsType } from 'antd/es/table'; import type { ColumnsType } from 'antd/es/table';
import React from 'react';
interface User { interface User {
key: number; key: number;
@ -304,7 +305,7 @@ const data: User[] = [
}, },
]; ];
export default () => ( const Demo: React.FC = () => (
<> <>
<Table<User> columns={columns} dataSource={data} /> <Table<User> columns={columns} dataSource={data} />
{/* JSX style usage */} {/* JSX style usage */}
@ -313,6 +314,8 @@ export default () => (
</Table> </Table>
</> </>
); );
export default Demo;
``` ```
Here is the [CodeSandbox for TypeScript](https://codesandbox.io/s/serene-platform-0jo5t). Here is the [CodeSandbox for TypeScript](https://codesandbox.io/s/serene-platform-0jo5t).

5
components/table/index.zh-CN.md

@ -286,6 +286,7 @@ const columns = [
```tsx ```tsx
import { Table } from 'antd'; import { Table } from 'antd';
import type { ColumnsType } from 'antd/es/table'; import type { ColumnsType } from 'antd/es/table';
import React from 'react';
interface User { interface User {
key: number; key: number;
@ -307,7 +308,7 @@ const data: User[] = [
}, },
]; ];
export default () => ( const Demo: React.FC = () => (
<> <>
<Table<User> columns={columns} dataSource={data} /> <Table<User> columns={columns} dataSource={data} />
{/* 使用 JSX 风格的 API */} {/* 使用 JSX 风格的 API */}
@ -316,6 +317,8 @@ export default () => (
</Table> </Table>
</> </>
); );
export default Demo;
``` ```
TypeScript 里使用 Table 的 [CodeSandbox 实例](https://codesandbox.io/s/serene-platform-0jo5t)。 TypeScript 里使用 Table 的 [CodeSandbox 实例](https://codesandbox.io/s/serene-platform-0jo5t)。

Loading…
Cancel
Save