fix(render): custom cover background image
This commit is contained in:
parent
d67d25fed4
commit
8f9bf29ee5
1 changed files with 3 additions and 1 deletions
|
|
@ -104,10 +104,12 @@ export function renderMixin (proto) {
|
|||
let path = m[1]
|
||||
|
||||
dom.toggleClass(el, 'add', 'has-mask')
|
||||
if (isAbsolutePath(m[1])) {
|
||||
if (!isAbsolutePath(m[1])) {
|
||||
path = getPath(getBasePath(this.config.basePath), m[1])
|
||||
}
|
||||
el.style.backgroundImage = `url(${path})`
|
||||
el.style.backgroundSize = 'cover'
|
||||
el.style.backgroundPosition = 'center center'
|
||||
}
|
||||
html = html.replace(m[0], '')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue