[BUG] <Anchor> Anchor组件如果初始用display: none隐藏,后面用户点击时再展示出来,会导致左边的灰色滑轨不展示
DaiQiangReal opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Which Component
Anchor
Semi Version
latest
Current Behavior
Anchor组件如果初始用display: none隐藏,后面用户点击时再展示出来,会导致左边的灰色滑轨不展示
Expected Behavior
显示
Steps To Reproduce
No response
ReproducibleCode
import React from 'react';
import { Anchor, Button } from '@douyinfe/semi-ui';
() => {
const [show, setShow] = useState(false);
return (
<>
<Button onClick={() => setShow(true)}>Click</Button>
<Anchor style={show ? {} : { display: 'none' }}>
<Anchor.Link href="#基本示例" title="基本示例" />
<Anchor.Link href="#组件" title="组件" />
<Anchor.Link href="#设计语言" title="设计语言" />
<Anchor.Link href="#物料平台" title="物料平台" />
<Anchor.Link href="#主题商店" title="主题商店" />
</Anchor>
</>
);
};
Environment
- OS:
- browser:
Anything else?
Oncall 5353561