一个简单的报错 ,可以用于
代码: <el-tree :data="menus" :props="defaultProps" @node-click="handleNodeClick" :expand-on-click-node="false" show-checkbox = "true" :default-expanded-keys="expandedKey" node-key="catId" > Invalid prop: type check failed for prop "showCheckbox". Expected Boolean, got String. 解决方法1.网上搜了一下解决方法 就是直接把这个后面的 = "true" 去掉,亲测有用 <el-tree :data="menus" :props="defaultProps" @node-click="handleNodeClick" :expand-on-click-node="false" show-checkbox :default-expanded-keys="expandedKey" node-key="catId" > 解决方法2.后面发现在前面加一个:绑定一下就行了 :show-checkbox = "true", 注 : 等价于 v-bind: 是一个单向绑定函数,用于绑定数据和元素属性 <el-tree :data="menus" :props="defaultProps" @node-click="handleNodeClick" :expand-on-click-node="false" :show-checkbox = "true" :default-expanded-keys="expandedKey" node-key="catId" >相关文章
- 10-11Invalid prop: type check failed for prop "dataSource". Expected Array, got Object
- 10-11Invalid prop: type check failed for prop “data“. Expected Array, got Object found in
- 10-11[Vue warn]: Invalid prop: type check failed for prop "data". Expected.....警告问题
- 10-11type check failed for prop “columns“. Expected Object, got Array
- 10-11Invalid prop: type check failed for prop "name". Expected String with value "17"
- 10-11[Vue warn]: Invalid prop: type check failed for prop “src“. Expected String, Object, got Module
- 10-11警告Invalid prop: type check failed for prop “goodsitem“. Expected Array, got Object at
- 10-11[Vue warn]: Invalid prop: type check failed for prop "data". Expected.....警告问题
- 10-11EasyGBS控制台报错Invalid prop: type check failed for prop “linkinfor“. Expected Object, got String
- 10-11[Vue warn]: Invalid prop: type check failed for prop “image“. Expected String, got Null.