Home

Issue: 2176

Using filter in style cased an error

[issue link]

using filter ‘relativePath’ is ok, but an error is cased in style

code:

<a class="activity-img" :href="activityItem.href_url|relativePath"
	:style="{'background-image':'url('+activityItem.image_src|relativePath+')'}" >
    <div class="activity-title-default">
	<div class="activity-title">{{ activityItem.title }}</div>
	<div class="activity-bg"></div>
    </div>
</a>

error:

vue.runtime.esm.js:430 [Vue warn]: Property or method "relativePath" is not defined on the instance  
 but referenced during render. Make sure to declare reactive data properties in the data option.
This bug report is available on Nuxt.js community (#c1922)