From b764b6e32c835985ab3052960363987c73dba1ea Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 30 May 2017 06:34:16 +0800 Subject: [PATCH] fix: lint --- packages/docsify-server-renderer/index.js | 1 - src/core/render/index.js | 2 +- src/core/router/history/base.js | 2 +- src/core/router/history/hash.js | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/docsify-server-renderer/index.js b/packages/docsify-server-renderer/index.js index 6921854a..0b667b6f 100644 --- a/packages/docsify-server-renderer/index.js +++ b/packages/docsify-server-renderer/index.js @@ -130,7 +130,6 @@ export default class Renderer { } const fileName = basename(filePath) - const parentPath = cwd(filePath, '../..') await this._loadFile(cwd(filePath, '../..', fileName)) } diff --git a/src/core/render/index.js b/src/core/render/index.js index 6958bbec..4b5d2a10 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -143,7 +143,7 @@ export function renderMixin (proto) { dom.toggleClass(el, 'add', 'has-mask') if (!isAbsolutePath(m[1])) { - path = getPath(vm.router.getBasePath(), m[1]) + path = getPath(this.router.getBasePath(), m[1]) } el.style.backgroundImage = `url(${path})` el.style.backgroundSize = 'cover' diff --git a/src/core/router/history/base.js b/src/core/router/history/base.js index cb24826a..ca914a3b 100644 --- a/src/core/router/history/base.js +++ b/src/core/router/history/base.js @@ -18,7 +18,7 @@ export class History { this.config = config } - getBasePath() { + getBasePath () { return this.config.basePath } diff --git a/src/core/router/history/hash.js b/src/core/router/history/hash.js index 696b5530..5dce5a7a 100644 --- a/src/core/router/history/hash.js +++ b/src/core/router/history/hash.js @@ -20,7 +20,7 @@ export class HashHistory extends History { this.mode = 'hash' } - getBasePath() { + getBasePath () { const path = window.location.pathname || '' const base = this.config.basePath