fix title bug
This commit is contained in:
parent
3d54f9d001
commit
bb76a1e446
2 changed files with 4 additions and 1 deletions
|
|
@ -24,6 +24,7 @@
|
||||||
"generator"
|
"generator"
|
||||||
],
|
],
|
||||||
"author": "qingwei-li <cinwell.li@gmail.com> (https://github.com/QingWei-Li)",
|
"author": "qingwei-li <cinwell.li@gmail.com> (https://github.com/QingWei-Li)",
|
||||||
|
"homepage": "https://QingWei-Li.github.io/docsify",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^3.10.2",
|
"eslint": "^3.10.2",
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,10 @@ class Docsify {
|
||||||
constructor (opts) {
|
constructor (opts) {
|
||||||
Docsify.installed = true
|
Docsify.installed = true
|
||||||
|
|
||||||
this.replace = true
|
|
||||||
this.opts = Object.assign({}, opts, DEFAULT_OPTS)
|
this.opts = Object.assign({}, opts, DEFAULT_OPTS)
|
||||||
|
this.opts.title = (this.opts.title ? this.opts.sep : '') + this.opts.title
|
||||||
|
|
||||||
|
this.replace = true
|
||||||
this.dom = document.querySelector(this.opts.el)
|
this.dom = document.querySelector(this.opts.el)
|
||||||
if (!this.dom) {
|
if (!this.dom) {
|
||||||
this.dom = document.body
|
this.dom = document.body
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue