0👍
Inside template
, this
is completely option. You can use computed
properties and other state variables/methods using one of the following ways:
<template>
<div>
<span v-if="something === 'foo'"> Computed property called dynamically </span>
</div>
</template>
or
<template>
<div>
<span v-if="this.something === 'foo'"> Computed property called dynamically </span>
</div>
</template>
- [Vuejs]-Unexpected token, expected "," Eslint Typescript with Vue
- [Vuejs]-Passing HTML or Components to the Vue Plugin
Source:stackexchange.com