0๐
โ
I think your options are either to pass the function through data
:
export default {
data () {
return {
isEmpty: isEmpty,
example: "Some text",
}
}
}
or to make a computed property:
<span v-if="!exampleTextEmpty">{{example}}</span>
// ...
export default {
data () {
return { example: "Some text" }
},
computed: {
exampleTextEmpty() {
return isEmpty(this.example);
}
}
}
Source:stackexchange.com