vue3 Invalid prop: type check failed for prop "value". Expected Array | Object | String | Number, got Boolean with value false.
时间: 2023-10-18 10:26:34 浏览: 198
解决vue props传Array/Object类型值,子组件报错的情况
5星 · 资源好评率100%
这个错误是由于传递给Vue组件的属性"value"的类型不符合预期所导致的。根据报错信息,Vue期望"value"的类型可以是数组、对象、字符串或数字,而实际传递的是布尔值false。根据引用和的解释,这个错误可能是因为在使用uni-data-select下拉组件时,将属性"value"初始化为了布尔值false,而不是预期的数组、对象、字符串或数字类型。解决这个问题的方法是将"value"属性初始化为合适的类型,如数组、对象、字符串或数字。这样就可以避免类型检查失败的错误。<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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [[Vue warn]: Invalid prop: type check failed for prop “value“. Expected String, Number, got Array](https://blog.csdn.net/qq_50276105/article/details/131736500)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文