Open xuoutput opened 1 month ago
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
{/* 这里如果把 table 嵌入 ProForm.Group 会导致新增一行 Table record 时, 滚动条会到滚到最左边 */} <ProForm.Group> <ComputeTable /> </ProForm.Group> {/* 拿出来就好了 */} {/* <ComputeTable /> */}
不滚动
https://codesandbox.io/p/sandbox/modal-biao-dan-forked-y4jsdd
import { EditableProTable, ProForm } from "@ant-design/pro-components"; import { nanoid } from "nanoid"; export default function ComputeTable() { return ( <EditableProTable bordered name="computeTable" scroll={{ x: 1600, y: 800, }} rowKey="id" columns={[ { title: "规格0", fixed: "left", width: 180, key: "columns_0", valueType: "digit", }, ...[1, 2, 3, 4, 7, 9, 5, 6, 8, 10, 11, 12].map((item) => { return { title: `规格${item}`, width: 180, key: `columns_${item}`, valueType: "digit", }; }), ]} recordCreatorProps={{ newRecordType: "dataSource", record: () => ({ id: nanoid() }), position: "bottom", creatorButtonText: "新增", }} editable={{ type: "multiple", actionRender: (row, config, defaultDom) => { return [defaultDom.delete]; }, }} pagination={false} /> ); }
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
📷 复现步骤
🏞 期望结果
不滚动
💻 复现代码
https://codesandbox.io/p/sandbox/modal-biao-dan-forked-y4jsdd
© 版本信息
🚑 其他信息