El-checkbox in element ui cannot be clicked after writing a ternary expression.

The

project is made up of vue with element ui components. Now why can"t I click on it after I write a ternary expression in el-checkbox? The code is as follows:

<el-checkbox v-model="total_bet.checked == 1 ? true : false"></el-checkbox>
data(){
      return {
      total_bet:{}
      }
}

total_bet.checked returns 1 or 0 from the backend.

Mar.18,2021

< el-checkbox VMI model = "total_bet" > Total maximum < / el-checkbox >
methods: {
a () {
total_bet.checked = total_bet.checked = = 1? True: false;
}
just write it this way

Menu