Invalid prop: type check failed for prop "value". Expected String, Number, got Boolean with value false.
时间: 2023-08-26 12:18:43 浏览: 215
这个错误是因为在属性校验过程中,期望的类型是字符串或数字,但实际传入的是布尔类型,且值为false。根据错误提示,可以看出该错误是由于某个属性的类型错误导致的。具体地,可能是在change事件中将一个本来是字符串类型的属性relateuserCount赋值为数组类型,而prop只支持字符串或数字类型的值,不支持数组类型。另外,如果在select组件中使用了v-for循环生成el-option,则需要为每个el-option指定唯一的key值,不能使用index,否则会出现问题。如果想要保留搜索结果,可以在多选且可搜索时,为select组件添加reserve-keyword属性,这样在选中一个选项后可以保留当前的搜索关键词。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [[VUE]报错: Invalid prop: type check failed for prop “value“. Expected String, Number, got Array ...](https://blog.csdn.net/Loery1314/article/details/126597040)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Invalid prop: type check failed for prop “value”. Expected String, Number, got Array](https://blog.csdn.net/gaoyu007/article/details/118898535)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文