错误示例:
<a-select-option value=1>
text
</a-select-option>
官方文档:
官方文档里明明写着value的类型可以是string或者number
正确示例:
<a-select-option v-for="option in selectOptions" :key="option.value">
text
</a-select-option>
问题描述:
代码里里设置value=1,结果在请求接口时传递的值是字符串"1"
解决方法:
在组件中使用变量来传递key=1