vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". Expected String with value "0", got Number with value 0.

vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". Expected String with value "0", got Number with value 0.

 

问题解决:active:"0", 0加上双引号即可.


 <el-menu :default-active="navBar.active"
          mode="horizontal"
          @select="handleSelect"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
 >
 
data() {
return { navBar:{ active:0, } } },

 
 

 

posted @ 2021-01-16 22:03  芳香四溢713051  阅读(2198)  评论(0编辑  收藏  举报