Skip to content

Commit 738c39a

Browse files
committed
rename to camel case
1 parent d9871e1 commit 738c39a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ window.$docsify = {
8888
};
8989
```
9090

91-
## nav_el
91+
## navEl
9292

9393
- Type: `String`
9494
- Default: `null`

src/core/render/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export function renderMixin(proto) {
295295

296296
proto._renderNav = function(text) {
297297
text &&
298-
this._renderTo(this.config.nav_el || 'nav', this.compiler.compile(text));
298+
this._renderTo(this.config.navEl || 'nav', this.compiler.compile(text));
299299
if (this.config.loadNavbar) {
300300
getAndActive(this.router, 'nav');
301301
}
@@ -401,10 +401,9 @@ export function initRender(vm) {
401401
window.__current_docsify_compiler__ = vm.compiler;
402402
}
403403

404-
const id = config.el || '#app';
405-
const navEl = dom.find(config.nav_el || 'nav') || dom.create('nav');
404+
const el = dom.find(config.el || '#app');
405+
const navEl = dom.find(config.navEl || 'nav') || dom.create('nav');
406406

407-
const el = dom.find(id);
408407
let html = '';
409408
let navAppendToTarget = dom.body;
410409

@@ -445,7 +444,7 @@ export function initRender(vm) {
445444
}
446445

447446
// Add nav
448-
if (config.loadNavbar && !config.nav_el) {
447+
if (config.loadNavbar && !config.navEl) {
449448
dom.before(navAppendToTarget, navEl);
450449
}
451450

0 commit comments

Comments
 (0)