I have using vuesax [ https://github.com/lusaxweb/vuesax ] for tabs. In vs-tabs i have multiple router-view. I want call show different vue template file for respected tabs of router-view.
Here is app.vue code.
<template>
<div id="app">
<div class="">
<h3 style="color: #0DB26B;">
home <mark class="red">New</mark> Design
</h3>
<vs-tabs :color="colorx" alignment="fixed" >
<vs-tab label="Home" >
<router-link
tag="button" class="btn btn-link" to="/home">Home
</router-link>
<div class="con-tab-ejemplo">
<router-view></router-view>
</div>
</vs-tab>
<vs-tab label="Add Invoice" >
<router-link
tag="button" class="btn btn-link" to="/card">Card
</router-link>
<div class="con-tab-ejemplo">
<router-view></router-view>
</div>
</vs-tab>
<vs-tab label="Profile">
<div class="con-tab-ejemplo">
<router-view></router-view>
</div>
</vs-tab>
</vs-tabs>
</div>
</div>
</template>
Here is my router code [index.js]:
import Vue from 'vue'
import Router from 'vue-router';
import Home from '@/components/Home';
import Card from '@/components/Card';
Vue.use(Router);
let router = new Router({
routes: [
{
path: '/home',
name:"Home",
component: Home,
},
{
path: '/card',
name:"Card",
component: Card,
},
]
});
export default router;
My issue:
1.) same vue template is shown in all vs-tabs router-view? 2.) How to set router-link for vs-tabs?
Here is my screen shots:
Any help much appreciated pls..
