Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 修复CustomLib中显示自定义组件的列表时无法滚动的问题
Browse files Browse the repository at this point in the history
Grothendieck42 committed Sep 20, 2024
1 parent acbea3c commit e8d359d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/editor/src/layout/components/Menu/CustomLib.tsx
Original file line number Diff line number Diff line change
@@ -85,17 +85,19 @@ function CustomLib(_: any, ref: any) {

return (
<Spin spinning={loading}>
<Flex wrap="wrap" gap={5} justify="space-between" style={{ marginTop: 10 }}>
{list.map((item) => {
return (
<div style={{ width: '45%' }} key={item.id}>
<div className={styles.menuItemLib} onClick={() => handleClick(item)}>
{item.name}
<div style={{ overflow: 'auto', height: 'calc(100vh - 200px)' }}>
<Flex wrap="wrap" gap={5} justify="space-between" style={{ marginTop: 10 }}>
{list.map((item) => {
return (
<div style={{ width: '45%' }} key={item.id}>
<div className={styles.menuItemLib} onClick={() => handleClick(item)}>
{item.name}
</div>
</div>
</div>
);
})}
</Flex>
);
})}
</Flex>
</div>
</Spin>
);
}

0 comments on commit e8d359d

Please sign in to comment.