[Vuejs]-Laravel blade variable not rendered in inline-style attribute in IE

2👍

Apparently IE causes problems with templating style attributes – see this closed issue:

https://github.com/yyx990803/vue/issues/651

It’s recommended to use v-style instead:

http://vuejs.org/api/directives.html#v-style

Something like this:

<div class="image-tile">
    <div class="preview" v-style="background-image: 'url(' + tent.files[fileId].path + '/thumb/' + tent.files[fileId].name + ')'>
</div>
<div class="info">
    @{{tent.files[fileId].name}}<br/>
    @{{tent.files[fileId].width}} x @{{tent.files[fileId].height}}<br/>
    @{{(tent.files[fileId].size / 1024).toFixed(2)}}KB
</div>

Leave a comment