Skip to content

Commit

Permalink
chore: 优化站点 (ant-design#512)
Browse files Browse the repository at this point in the history
* fix: 优化pro-table 站点

* fix: 修复ci 问题
  • Loading branch information
WynterDing authored Jun 5, 2020
1 parent c39e485 commit bd3229b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 57 deletions.
7 changes: 7 additions & 0 deletions .umirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ export default {
},
],
],
navs: [
null,
{
title: 'GitHub',
path: 'https://github.com/ant-design/pro-table',
},
],
hash: true,
};
79 changes: 23 additions & 56 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,74 +4,41 @@ order: 10
sidebar: false
hero:
title: ProTable
desc: 🏆 Use Ant Design Table like a Pro!.
desc: 🏆 Use Ant Design Table like a Pro!
actions:
- text: 快速开始 →
link: /#usage
features:
- icon: https://gw.alipayobjects.com/os/q/cms/images/k9ziitmp/13668549-b393-42a2-97c3-a6365ba87ac2_w96_h96.png
title: 简单易用
desc: 开箱即用的 Table 组件,在antd Table 之上扩展了更多便捷易用的功能
- icon: https://gw.alipayobjects.com/os/q/cms/images/k9ziik0f/487a2685-8f68-4c34-824f-e34c171d0dfd_w96_h96.png
title: Ant Design
desc: 与 Ant Design 设计体系一脉相承,无缝对接 antd 项目,兼容 antd 3.x & 4.x
- icon: https://gw.alipayobjects.com/os/q/cms/images/k9ziip85/89434dcf-5f1d-4362-9ce0-ab8012a85924_w96_h96.png
title: 国际化
desc: 提供完备的国际化语言支持,与 Ant Design 体系打通
- icon: https://gw.alipayobjects.com/mdn/rms_05efff/afts/img/A*-3XMTrwP85wAAAAAAAAAAABkARQnAQ
title: 预设样式
desc: 样式风格与 antd 一脉相承,无需魔改,浑然天成
- icon: https://gw.alipayobjects.com/os/q/cms/images/k9ziieuq/decadf3f-b53a-4c48-83f3-a2faaccf9ff7_w96_h96.png
title: 预设行为
desc: 内置搜索、筛选、刷新等常用表格行为,并为多种类型数据展示提供了内置格式化
- icon: https://gw.alipayobjects.com/os/q/cms/images/k9zij2bh/67f75d56-0d62-47d6-a8a5-dbd0cb79a401_w96_h96.png
title: Typescript
desc: 使用 TypeScript 开发,提供完整的类型定义文件

footer: Open-source MIT Licensed | Copyright © 2017-present
---

<br/>

[![](https://img.shields.io/npm/dw/@ant-design/pro-table.svg)](https://www.npmjs.com/package/@ant-design/pro-table) [![npm package](https://img.shields.io/npm/v/@ant-design/pro-table.svg?style=flat-square?style=flat-square)](https://www.npmjs.com/package/@ant-design/pro-table) [![](https://img.shields.io/github/issues/ant-design/pro-table.svg)](https://github.com/ant-design/pro-table/issues) [![Dependencies](https://img.shields.io/david/ant-design/pro-table.svg?style=flat-square)](https://david-dm.org/ant-design/pro-table) [![DevDependencies](https://img.shields.io/david/dev/ant-design/pro-table.svg?style=flat-square)](https://david-dm.org/ant-design/pro-table?type=dev)

```tsx | inline
import React from 'react';
import GitHubButton from 'react-github-btn';

export default () => (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<div
align="center"
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
marginBottom: 16,
}}
>
<GitHubButton
href="https://github.com/ant-design/pro-table"
data-size="large"
data-show-count
aria-label="Star ant-design/pro-table on GitHub"
>
Star
</GitHubButton>
<div
style={{
margin: '0 8px',
}}
/>
<GitHubButton
href="https://github.com/ant-design/pro-table/issues"
data-color-scheme="no-preference: light; light: light; dark: light;"
data-size="large"
data-show-count="true"
aria-label="Issue ant-design/pro-table on GitHub"
>
Issue
</GitHubButton>
</div>
</div>
);
```

## Usage
## 使用

```bash
npm install @ant-design/pro-table
# or
yarn add @ant-design/pro-table
```

## Demo
## 示例

<code src="./demo/single.tsx" />
2 changes: 1 addition & 1 deletion src/component/columnSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const GroupCheckboxList: React.FC<{

const ColumnSetting = <T, U = {}>(props: ColumnSettingProps<T>) => {
const counter = Container.useContainer();
const localColumns: (ProColumns<any> & { index?: number })[] =
const localColumns: Omit<ProColumns<any> & { index?: number }, 'ellipsis'>[] =
props.columns || counter.columns || [];
const { columnsMap, setColumnsMap, setSortKeyColumns } = counter;
/**
Expand Down

0 comments on commit bd3229b

Please sign in to comment.