Skip to content

Commit

Permalink
docs: 文档优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Jul 9, 2024
1 parent f178a48 commit b1df0e0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions examples/search-table-react/001-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Demo = () => {
export default Demo
```

## 全功能一览
## 全功能概览

```tsx
import { sleep } from '@examples/utils'
Expand All @@ -109,6 +109,19 @@ const items = [
{ key: '3', label: '待审核' },
]

// 创建固定列
const fixedColumns = columns.map((col, index) => {
const newCol = { ...col }

if (index === 0) {
newCol.fixed = 'left'
} else if (index === columns.length - 1) {
newCol.fixed = 'right'
}

return newCol
})

// 模拟删除接口
const postDeleteBill = (_id: string) => sleep()

Expand Down Expand Up @@ -167,7 +180,7 @@ const Demo = () => {
},
}}
table={{
columns,
columns: fixedColumns,
// 显示序号栏
showRowNumber: true,
// 添加操作列与配置个数、宽度
Expand Down

0 comments on commit b1df0e0

Please sign in to comment.