Open whqgo opened 2 weeks ago
const columns = useRef<any>([ { key: 'sort', dataIndex: 'key', editable: false, width: 30, }, { title: '序号', key: 'serial', dataIndex: 'serial', // editable: false, width: '60px', // render: (_: any, __: any, index: number) => index + 1, // 使用 index + 1 作为序号值 }, { title: '字段名称', dataIndex: 'lable', width: '30%', }, { title: '是否显示', dataIndex: 'visible', valueType: 'checkbox', width: '30%', renderFormItem: (_: any, itemRecord: any) => { // 自定义复选框的渲染 return <Checkbox onChange={(e) => { console.log(itemRecord, "===record==="); // record setDataSource((dataSource: any) => { let _dataSource = cloneDeep(dataSource) let recordfind = _dataSource.find((f: any) => f.id === itemRecord.record.id) recordfind.visible = false console.log(_dataSource, "===_dataSource===="); return _dataSource }) }} checked={itemRecord.record.visible}>{itemRecord.record.visible}</Checkbox> } }, { title: '操作', valueType: 'option', width: 250, render: () => { return null; }, }, ])
我修改了 数据 但是页面并没有更新
我修改了 数据 但是页面并没有更新