-
-
Notifications
You must be signed in to change notification settings - Fork 53.5k
Closed
Description
What problem does this feature solve?
在Anchor的高亮处理时,需要根据条件判断是否固定显示某一个高亮,如果不满足条件则继续使用默认的高亮。
What does the proposed API look like?
getCurrentAnchor?: (link: string) => string;
用法例如下面:
<Anchor
affix={false}
onClick={handleClick}
getCurrentAnchor={link => {
if (activeTab && activeTab.tabType === TabType.tab) {
return `#mid_${activeTab?.entityType}_${activeTab?.tabId}`;
}
return link;
}}
getContainer={() => document.querySelector(".content") as HTMLDivElement}
>
Metadata
Metadata
Assignees
Labels
No labels