<input type="checkbox" v-model="menus" value="ccc" >AAA
when the variable value of v-model menus = = true, checkbox appears as selected, but cannot get the value of checkbox selected state
<input type="checkbox" v-model="menus" value="ccc" >AAA
when the variable value of v-model menus = = true, checkbox appears as selected, but cannot get the value of checkbox selected state
I took a look at your editing of the question, and I guess what you want to ask is why the menus= "true" and seleted= [] defined in data show different processing results during v-model binding time, and the array can get all the values.
this is determined by the implementation of v-model. may solve your doubts
does not take it from event.target?
this.menus is the value, isn't it? What do you mean it's worth?
ev.target.checked
Previous: Error occurred in vue packaging
Next: How to hide or lose focus on the drop-down list of el-select through js or vue.js?
there is a group of radio or checkbox option boxes, as follows: <ul> <li class="item" v-for="item in attrList"> <input :type="radio" :id="getId()" name=&q...