1.Vue运行,出现warning(Emitted value instead of an instance of Error)
用Element UI的一些元素做分v-for时:如<el-input v-for="">,会报上面的错,给绑定一个key值就可以正常使用了
==》
<el-input v-for="item in itemList" :key="item.key">2.router里的path
根路由:’/’,
一级路由:’/goos’
二级路由:’goodsList’
只有根路径 才会加上“/”,其二级,三级..都不需要加上“/”
const router = new VueRouter({ routes: [ { path: '/user/:id', component: User, children: [ { // 当 /user/:id/profile 匹配成功, // UserProfile 会被渲染在 User 的 <router-view> 中 path: 'profile', component: UserProfile }, { // 当 /user/:id/posts 匹配成功 // UserPosts 会被渲染在 User 的 <router-view> 中 path: 'posts', component: UserPosts } ] } ] })3.路由传值的两种方法
在html标签里:
<router-link :to="{ name: 'releaseInfo', params: { releaseName: scope.row.name }}"></router-link>在方法里:
this.$router.push({ path: 'editproject', name: 'editproject', params: { tr: this.productList[this.trIndex], //Pass the tr data to next router editPageType: 'Release' } })4.登录页面:https://www.cnblogs.com/web-record/p/9876916.html