@vuepress/theme-default 1.8.1 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/SidebarLinks.vue +4 -1
- package/index.js +1 -1
- package/package.json +5 -5
|
@@ -90,13 +90,16 @@ function resolveOpenGroupIndex (route, items) {
|
|
|
90
90
|
|
|
91
91
|
function descendantIsActive (route, item) {
|
|
92
92
|
if (item.type === 'group') {
|
|
93
|
-
|
|
93
|
+
const childIsActive = item.path && isActive(route, item.path)
|
|
94
|
+
const grandChildIsActive = item.children.some(child => {
|
|
94
95
|
if (child.type === 'group') {
|
|
95
96
|
return descendantIsActive(route, child)
|
|
96
97
|
} else {
|
|
97
98
|
return child.type === 'page' && isActive(route, child.path)
|
|
98
99
|
}
|
|
99
100
|
})
|
|
101
|
+
|
|
102
|
+
return childIsActive || grandChildIsActive
|
|
100
103
|
}
|
|
101
104
|
return false
|
|
102
105
|
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Default theme for VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"author": "Evan You",
|
|
22
22
|
"main": "index.js",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vuepress/plugin-active-header-links": "1.
|
|
25
|
-
"@vuepress/plugin-nprogress": "1.
|
|
26
|
-
"@vuepress/plugin-search": "1.
|
|
24
|
+
"@vuepress/plugin-active-header-links": "1.9.1",
|
|
25
|
+
"@vuepress/plugin-nprogress": "1.9.1",
|
|
26
|
+
"@vuepress/plugin-search": "1.9.1",
|
|
27
27
|
"docsearch.js": "^2.5.2",
|
|
28
28
|
"lodash": "^4.17.15",
|
|
29
29
|
"stylus": "^0.54.8",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"email": "chl814@foxmail.com"
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2ffd506ca0ccc2203c3786cd80b6979d95ed9431"
|
|
44
44
|
}
|