[Vuejs]-Vue js evaluating a variable when passed to a component

0👍

You could try this:

<media :class="'t-borderleft-' + FetchCompanyName()" class="u-media-top u-padding Media--secondary t-borderbottom" title="School Name">
    {{organisation}}
</media>

You should also remove the v-bind:class="class" inside your component.

You could also try to make FetchCompanyName a computed property

Leave a comment