Vuejs when the value of the v-model variable of checkbox is true, checkbox is displayed as checked, but cannot get the value

<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

Apr.11,2021

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

Menu