ant design select 回显 显示value值 不回显 label

2,995 阅读1分钟
ant design select  回显 显示value值 不回显 label

在这里插入图片描述

         <a-select style="width: 345px;height:30px;" :dropdownStyle="{position: 'relative', zIndex: '10003'}"
          v-model="addPaper.publicScope">
<!--            公开范围(0:不公开,1年级学科组可见,2:全校学科组可见,3:全校可见)-->
            <a-select-option value="0">不公开</a-select-option>
            <a-select-option value="1">年级学科组可见</a-select-option>
            <a-select-option value="2">全校学科组可见</a-select-option>
            <a-select-option value="3">全校可见</a-select-option>
          </a-select>

猜测是 没有找到对应的的 ,所以 把数据库的 值 转为 string 显示成功

//试卷公开范围(0:不公开,1年级学科组可见,2:全校学科组可见,3:全校可见)
publicScope: String(this.exerciseInfo.publicScope),

完美解决

在这里插入图片描述