[build] 4.1.11

This commit is contained in:
qingwei.li 2017-06-02 22:18:36 +08:00
commit ac28040bd7
No known key found for this signature in database
GPG key ID: B6DDC2F7AE80B2F4
4 changed files with 13 additions and 6 deletions

View file

@ -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