日常报错、[Vue warn]: Invalid prop: type check failed for prop "multiple". Expected Boolean, got String.
VUE报错如下:[Vue warn]: Invalid prop: type check failed for prop “multiple”. Expected Boolean, got String.意思是期望的数据类型是boolean 类型,却被我定义成了字符串、仔细看了下multiple这个组件属性、log.js?4244:23 [HMR] Waiting for update s...
·
VUE报错如下:
[Vue warn]: Invalid prop: type check failed for prop “multiple”. Expected Boolean, got String.
意思是期望的数据类型是boolean 类型,却被我定义成了字符串、
仔细看了下multiple这个组件属性、
log.js?4244:23 [HMR] Waiting for update signal from WDS...
backend.js:10619 vue-devtools Detected Vue v2.5.16
vue.esm.js?efeb:591 [Vue warn]: Invalid prop: type check failed for prop "multiple". Expected Boolean, got String.
found in
---> <VCascader> at src\components\cascader\Cascader.vue
<VForm>
<MyBrandForm> at src\pages\item\MyBrandForm.vue
<VCard>
<VDialog>
<VCard>
<MyBrand> at src\pages\item\MyBrand.vue
<VContent>
<VApp>
<App> at src\pages\Layout.vue
<App> at src\App.vue
<Root>
原来是这样的、确实被定义成了字符串、
修改,把multiple后面的都去掉后、不再报错、其默认是true
并且、v-model 绑定的数据和multiple 要求的数据类型要一致、
v-model 绑定的是categories 是一个数组、那么 multiple 就是多个,其值是true ,刷新页面F12如下:
更多推荐
所有评论(0)