Skip to content

Commit a89df67

Browse files
authored
feat: hide unfinished components (#212)
1 parent 7303b8a commit a89df67

File tree

1 file changed

+3
-2
lines changed
  • packages/devui-vue/docs/.vitepress/devui-theme/components

1 file changed

+3
-2
lines changed

packages/devui-vue/docs/.vitepress/devui-theme/components/SideBarLink.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const SideBarLink = (props) => {
4545
class: { 'sidebar-link-item': true, active },
4646
href: link
4747
}, [
48-
status && h('span', {
48+
(status && import.meta.env.DEV) && h('span', {
4949
class: 'sidebar-link-status',
5050
style: `background-color: ${dotColor}`
5151
}),
@@ -71,7 +71,8 @@ function resolveLink(base, path) {
7171
function createChildren(active, children, headers, depth = 1) {
7272
if (children && children.length > 0) {
7373
return h('ul', { class: 'sidebar-links' }, children.map((c) => {
74-
return h(SideBarLink, { item: c, depth });
74+
const showSidebarItem = import.meta.env.DEV || (import.meta.env.PROD && c.status === '100%');
75+
return showSidebarItem && h(SideBarLink, { item: c, depth });
7576
}));
7677
}
7778
return active && headers

0 commit comments

Comments
 (0)