mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
[build] 4.1.11
This commit is contained in:
+9
-2
@@ -2889,6 +2889,10 @@ Compiler.prototype.sidebar = function sidebar (text, level) {
|
||||
* Compile sub sidebar
|
||||
*/
|
||||
Compiler.prototype.subSidebar = function subSidebar (level) {
|
||||
if (!level) {
|
||||
this.toc = [];
|
||||
return
|
||||
}
|
||||
var currentPath = this.router.getCurrentPath();
|
||||
var ref = this;
|
||||
var cacheTree = ref.cacheTree;
|
||||
@@ -3159,9 +3163,12 @@ function renderMixin (proto) {
|
||||
var activeEl = getAndActive(this.router, '.sidebar-nav', true, true);
|
||||
if (loadSidebar && activeEl) {
|
||||
activeEl.parentNode.innerHTML += this.compiler.subSidebar(subMaxLevel);
|
||||
} else {
|
||||
// reset toc
|
||||
this.compiler.subSidebar();
|
||||
}
|
||||
// bind event
|
||||
this._bindEventOnRendered();
|
||||
this._bindEventOnRendered(activeEl);
|
||||
};
|
||||
|
||||
proto._bindEventOnRendered = function (activeEl) {
|
||||
@@ -3743,7 +3750,7 @@ initGlobalAPI();
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.1.10';
|
||||
Docsify.version = '4.1.11';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
|
||||
Reference in New Issue
Block a user