- Vue-Router4.0 报“Cannot read prop
- vue中爆错Error in render: "TypeErro
- 微信小程序报错: Cannot read property
- Vue components Cannot read prop
- EasyUI datagrid cannot read prop
- VUE TypeError: Cannot read prop
- 2018-06-27 React Native ES6 作用域问
- VUX报Cannot read property 'length
- vue报错TypeError: Cannot read prop
- 路由引入方式或报错range,解决Cannot read pro
注意:这个名字一定要叫routes不能为其他名称,否则报错
// 这个名字一定要叫routes不能为其他名称,否则报错
const routes = [
{
path: "/",
name: 'home',
component: Home,
}
]
// 2.初始化创建VueRouter实例
const router = createRouter({
history: createWebHistory(),
routes
})
网友评论