vue---[Vue warn] prop “defaultActive“. Expected String with value “1“, got Number with value 1.

问题描述:

vue+element项目报错,vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". Expected String with value "1", got Number with value 1.如下图

vue---[Vue warn] prop “defaultActive“. Expected String with value “1“, got Number with value 1.

 解决方法:

产生上述报错原因是由于<el-menu> 标签default-active绑定的值为Number,绑定类型错误,应修改为String类型;修改方法为default-active绑定的值使用toString()方法转换为字符串即可。

vue---[Vue warn] prop “defaultActive“. Expected String with value “1“, got Number with value 1.

 

上一篇:2021最新版kali-2021-4a 更新源


下一篇:Error executing Maven. 2 problems were encountered while building the effect