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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea206b-1ba3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea206b-1ba3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?