The problem is this, I have a switch done with label and input checkbox and it has a default value that comes from the date of my Vue instance.
var app = new Vue({
el: '#app',
data: {
slcModalidad: 0,
chkPosNet: true,
},
<label for="chkAllowPosNet" class="label-chk-allow">
<input type="checkbox" id="chkAllowPosNet" name="chkAllowPosNet" v-model="chkPosNet">
<div class="allow-text"></div>
<div class="allow-toggle"></div>
</label>
But I need the default value of the chkPosNet variable to go through a condition to determine whether it is true or false, which in my example would be if slcModality was greater than 2. What would be the best way to do this?
I thought about leaving chkPosNet as null and creating a method to do the check, but I was confused if I did the methods, computed, mounted .... or if I can do a v-if for the v-model.