vuejs set a radio button checked if statement is true

前端 未结 4 1141
情话喂你
情话喂你 2020-12-08 13:22

I am trying to make a radio button checked using vuejs v-for only if my if-statement is true. Is there a way to use vuejs\' v-if/v-else for this type of problem?

in

4条回答
  •  抹茶落季
    2020-12-08 14:18

    You could bind the checked attribute like this:

    Simple example: https://jsfiddle.net/b4k6tpj9/

提交回复
热议问题