x-render icon indicating copy to clipboard operation
x-render copied to clipboard

有很多个Collapse,渲染起来很卡

Open LittleZhaoLearnsFromTheFront opened this issue 1 year ago • 1 comments

关于Collapse的源代码为 <Collapse className='fr-obj-collapse' style={style} bordered={bordered} ghost={ghost} activeKey={[activeKey]} expandIcon={renderExpandIcon} onChange={() => setActiveKey(activeKey ? '' : 'single')} > <Panel key='single' header={collapseHeader} forceRender={true}> {children} </Panel> </Collapse>

其中forceRender={true} 将所有Collapse中的内容一起渲染,如果Collapse多了渲染起来就会很卡

可能还是要提供一个 demo,我这边试了每一个 collapse 30 input、然后 list 长度 10,还是直出的

lhbxs avatar Nov 13 '23 07:11 lhbxs