prop: type check failed for prop “autoExpandParent“. Expected Boolean, got String with value “true“
程序员文章站
2022-04-13 11:44:05
...
解决错误:prop: type check failed for prop “autoExpandParent”. Expected Boolean, got String with value “true”
项目场景:
<el-tree class="filter-tree" :data="dataOrgization" :props="defaultProps" default-expand-all auto-expand-parent :filter-node-method="filterNode" ref="tree"></el-tree>
属性 | 值 | 表示 |
---|---|---|
default-expand-all | bool,默认false | 是否展开所有节点 |
auto-expand-parent | bool,默认false | 展开子节点的时候是否自动展开父节点 |
问题描述:
原因分析:
根据控制台报的错误,分析为:autoExpandParent属性对应的是bool值,结果我给的是字符串。
解决方案:
怎么改,我相信大家都知道了吧
推荐阅读
-
[VUE ERROR] Invalid prop: type check failed for prop "list". Expected Array, got Undefined
-
[Vue warn]: Invalid prop: type check failed for prop “value“. Expected String with value “1“ 解决办法
-
[Vue warn]: Invalid prop: type check failed for prop “value“. Expected String, Number, got Undefined
-
prop: type check failed for prop “autoExpandParent“. Expected Boolean, got String with value “true“
-
[Vue warn]: Invalid prop: type check failed for prop "value". Expected Number, got String.
-
[VUE ERROR] Invalid prop: type check failed for prop "list". Expected Array, got Undefined