0👍
you could use a computed variable:
<template>
<input type="text" v-model="text"/>
</template>
<script>
export default {
name: 'TestComponent',
data(){
return {
text:''
}
},
computed: {
isFilled(){
return this.text.trim().length > 0
}
}
}
</script>
<style scoped>
</style>
Source:stackexchange.com