Checkbox cannot restrict check status

< div VFF = "act in List" >

<div id="check"><input type="checkbox" ref="cpBox" v-on:change="count(act)" ></div>

< / div >

/ / js
var cpChk = self.$refs.cpBox / / get the dom entry of checkbox,
for (let k = 0; k < cpChk.length; kPP) {
if (SCP [k] .projectId = = pj.projectId) {

    cpChk[k].checked =false 
    //: , checkbox, .
}

}
checked=false is not valid, the user clicks. It is OK to use disabled, but the demand is not correct. Ask the boss for advice.

Jul.15,2021

disabled is what you do. Why is the demand wrong? if you don't give way, will you disable it


because vue is a data-driven attempt. What you get is the = "var cpChk = self.$refs.cpBox / / get the dom item of checkbox on dom,

.
data(){
    return {
        // 
    }

}

change the data in data to trigger an attempt to update.

Menu