浏览代码

docs: support open in new tab in sidebar of component docsite, #220

pointhalo 4 年之前
父节点
当前提交
d33decd8bf
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/components/side-nav.js

+ 1 - 0
src/components/side-nav.js

@@ -34,6 +34,7 @@ const SideNav = ({ location = null, type = null, itemsArr, edges, style, hasBann
                     text: node.frontmatter.title,
                     icon: <Icon svg={<IconNode />} size={'extra-large'} /> || '',
                     order: node.frontmatter.order || 0,
+                    link: `/${node.fields.slug}`,
                     category: navData[categoryIndex].text || navData[categoryIndex].textUs,
                 });
                 navData[categoryIndex].items.sort((a, b) => a.order - b.order);