问题:( 男:0 女:1)
后端传回数据0,选中框应该显示男而不是0
出现问题的写法:
< a-select v-model=“test.sex” placeholder=“请选择性别” notFoundContent=“数据为空” style=“width:100%”>
< a-select-option value=“0”>男< /a-select-option>
< a-select-option value=“1”>女< /a-select-option>
< /a-select>
应该在value前加 :
正确写法:
< a-select v-model=“test.sex” placeholder=“请选择性别” notFoundContent=“数据为空” style=“width:100%”>
< a-select-option :value=“0”>男< /a-select-option>
< a-select-option :value=“1”>女< /a-select-option>
< /a-select>
结果: