Skip to content

Commit

Permalink
fix($default-theme): deep sidebar links rendenring (#1973)
Browse files Browse the repository at this point in the history
  • Loading branch information
kefranabg authored and meteorlxy committed Oct 26, 2019
1 parent 98977c9 commit 0e5519a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/@vuepress/theme-default/components/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
}
function renderLink (h, to, text, active, level) {
return h('router-link', {
const component = {
props: {
to,
activeClass: '',
Expand All @@ -64,11 +64,16 @@ function renderLink (h, to, text, active, level) {
class: {
active,
'sidebar-link': true
},
style: {
}
}
if (level > 2) {
component.style = {
'padding-left': level + 'rem'
}
}, text)
}
return h('router-link', component, text)
}
function renderChildren (h, children, path, route, maxDepth, depth = 1) {
Expand Down

0 comments on commit 0e5519a

Please sign in to comment.