0
点赞
收藏
分享

微信扫一扫

React工作63:ant design 锚点

何以至千里 2023-02-12 阅读 97

import { Anchor } from 'antd';

const { Link } = Anchor;

const onChange = link => {
console.log('Anchor:OnChange', link);
};

ReactDOM.render(
<Anchor affix={false} onChange={onChange}>
<Link href="#components-anchor-demo-basic" title="Basic demo" />
<Link href="#components-anchor-demo-static" title="Static demo" />
<Link href="#API" title="API">
<Link href="#Anchor-Props" title="Anchor Props" />
<Link href="#Link-Props" title="Link Props" />
</Link>
</Anchor>,
mountNode,
);

举报

相关推荐

0 条评论