[Vue warn]: Failed to mount component: template or render function not defined.

 

[Vue warn]: Failed to mount component: template or render function not defined.

[Vue warn]: Failed to mount component: template or render function not defined.

 

 getAccessNav 函数,只是处理了权限菜单,如果权限为admin,allNav值不变
但是list中的compone属性改变了,

下图,第一个列表是allNav,第二个是navList,注意区别,beforeCreate是null

[Vue warn]: Failed to mount component: template or render function not defined.

下为报错

 

[Vue warn]: Failed to mount component: template or render function not defined.

 

解决办法为,在遍历一遍navList,component属性重新赋值 Main组件

 

 

上一篇:Python中出现name 'raw_input' is not defined


下一篇:SSM报错“No bean named 'cacheManager' is defined”