2.7.2
Mac / Google Chrome 73.0.3683.103 (Official Build) (64-bit)
2.5.13
https://jsfiddle.net/anatoly314/d6sgpncj/6/
Use the following code to create checkbox:
<el-checkbox true-label=1 false-label=0 v-model="checkboxValue"></el-checkbox>
If checkboxValue is set to 1, checkbox not initiated as checked. When I click first time on checkbox, checkboxValue changed to 0 and on second click it changes value to 1 and checkbox now checked
Checkbox need to be initiated as checked if v-model value bind to checkbox is set to 1 and true-label/false-label are 1/0 accordingly
checkbox being initiated unchecked
you should change the code like this, add v-bind or : before the true-label
<el-checkbox :true-label=1 :false-label=0 v-model="checkboxValue">{{checked}}</el-checkbox>
Thank you very much, my mistake.
Most helpful comment
you should change the code like this, add
v-bindor:before thetrue-label