feat(renderer): allow disable router.base with prefix:false

This commit is contained in:
Pooya Parsa 2017-09-05 21:16:06 +04:30
parent 0326c2cd54
commit 888b141a27

View File

@ -183,7 +183,7 @@ export default class Renderer extends Tapable {
} }
const handler = m.handler || m const handler = m.handler || m
const path = (this.options.router.base + (m.path ? m.path : '')).replace(/\/\//g, '/') const path = (((m.prefix !== false) ? this.options.router.base : '') + (m.path ? m.path : '')).replace(/\/\//g, '/')
// Inject $src and $m to final handler // Inject $src and $m to final handler
if (src) handler.$src = src if (src) handler.$src = src