1👍
✅
Try to return null
when the condition is not satisfied, an attribute bound to null
will not be rendered :
<div :class="{someCondition? 'my-class':null" >
</div>
if the condition is false the rendered element will be
<div >
</div>
Source:stackexchange.com