this.$route.query或者 this.$route.params接收router-link传的参数
有个方法就是在script标签里面写this.$router.push(‘要跳转的路径名‘),
关于导入组件,组件跳转,和组件显示
组件:(关注点:showtabbar,footer-tabbar,FooterTabbar)
app.vue
<footer-tabbar v-show="$route.meta.showtabbar"></footer-tabbar>
<script>
import FooterTabbar from ‘./components/FooterTabbar‘
export default {
name: ‘app‘,
components: {
FooterTabbar
}
}
</script>
index.js
{
path: ‘/Home‘,
name: ‘Home‘,
component: Home,
meta: { showtabbar: true }
},