[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.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213830-64090056c9b55.png)
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.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213831-64090057643f6.png)
下为报错
![[Vue warn]: Failed to mount component: template or render function not defined. [Vue warn]: Failed to mount component: template or render function not defined.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213832-640900582361c.png)
解决办法为,在遍历一遍navList,component属性重新赋值 Main组件
[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.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213830-64090056c9b55.png)
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.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213831-64090057643f6.png)
下为报错
![[Vue warn]: Failed to mount component: template or render function not defined. [Vue warn]: Failed to mount component: template or render function not defined.](http://code.bmoook.com/wp-content/uploads/2023/03/20230308213832-640900582361c.png)
解决办法为,在遍历一遍navList,component属性重新赋值 Main组件