feat: Allow base64, external, and relative logo values (#642)

Fix #577
This commit is contained in:
John Hildenbiddle
2018-10-23 00:27:36 -07:00
committed by cinwell.li
parent 94bc415534
commit 0a0802aded

View File

@@ -232,7 +232,13 @@ export function initRender(vm) {
}
if (config.logo) {
config.logo = getPath(vm.router.getBasePath(), config.logo)
const isBase64 = /^data:image/.test(config.logo)
const isExternal = /(?:http[s]?:)?\/\//.test(config.logo)
const isRelative = /^\./.test(config.logo)
if (!isBase64 && !isExternal && !isRelative) {
config.logo = getPath(vm.router.getBasePath(), config.logo)
}
}
html += tpl.main(config)