diff --git a/examples/search-table-react/001-intro.md b/examples/search-table-react/001-intro.md index 1d60991..e4b3e5f 100644 --- a/examples/search-table-react/001-intro.md +++ b/examples/search-table-react/001-intro.md @@ -86,7 +86,7 @@ const Demo = () => { export default Demo ``` -## 全功能一览 +## 全功能概览 ```tsx import { sleep } from '@examples/utils' @@ -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() @@ -167,7 +180,7 @@ const Demo = () => { }, }} table={{ - columns, + columns: fixedColumns, // 显示序号栏 showRowNumber: true, // 添加操作列与配置个数、宽度