Invalid prop: type check failed for prop "value". Expected String, Number, got Function
时间: 2023-10-18 12:31:17 浏览: 107
这个错误的意思是,在某个组件中,有一个属性名为"value"的prop,的类型检查失败。期望的类型是字符串或者数字,但实际传了一个函数类型的值。这种情况一般出现在uni-app小程序中应用到uni-data-select组件时。根据引用的解释,可能是因为在该事件中,将relateuserCount属性赋值给了"value",而该属性本身是字符串类型,而prop只支持字符串或者数字类型的值,不支持数组类型。因此导致了这个错误的发生。要解决这个问题,需要确保传给"value"的值是字符串或者数字类型的[2]。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *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 ]
阅读全文