Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation items 存在 ts 类型错误 #35

Closed
zFitness opened this issue Oct 26, 2021 · 0 comments
Closed

Navigation items 存在 ts 类型错误 #35

zFitness opened this issue Oct 26, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@zFitness
Copy link

Which Component 出现bug的组件

  • Navigation

semi-ui version

  • latest

Expected result 期望的结果是什么

Actual result 实际的结果是什么

  • 类型 "{ itemKey: string; text: string; icon: JSX.Element; }" 中缺少属性 "items",但类型 "NavItemPropsWithItems" 中需要该属性。ts(2

Steps to reproduce 复现步骤

Reproducible code 复现代码

<Nav
                        style={{ maxWidth: 220, height: '100%' }}
                        defaultSelectedKeys={['Home']}
                        items={[
                            { itemKey: 'Home', text: '首页', icon: <IconHome size="large" /> },
                            { itemKey: 'Histogram', text: '基础数据', icon: <IconHistogram size="large" /> },
                            { itemKey: 'Live', text: '测试功能', icon: <IconLive size="large" /> },
                            { itemKey: 'Setting', text: '设置', icon: <IconSetting size="large" /> },
                        ]}
                        footer={{
                            collapseButton: true,
                        }}
                    />

Additional information 补充说明

  • 遇到这个bug的业务场景、上下文、或者你的需求场景
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants