Commit 81473989 authored by esatakpunar's avatar esatakpunar

router links updated

parent e2a560d8
......@@ -9,7 +9,7 @@ export default {
Customers,
},
data: () => ({
activeLink: "/products",
activeLink: "/",
links: ["Profile"],
routes: [
{ id: 1, name: "products", link: "/products" },
......@@ -24,6 +24,9 @@ export default {
this.activeLink = route.link;
this.$router.push(route.link).catch(() => {});
},
refresh() {
location.reload();
},
},
};
</script>
......@@ -81,7 +84,9 @@ export default {
<v-list-item link color="grey lighten-4">
<v-list-item-content>
<v-list-item-title> Refresh </v-list-item-title>
<v-list-item-title @click="refresh()">
Refresh
</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
......
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import Products from "../modules/products";
import Customers from "../modules/customers";
Vue.use(VueRouter)
Vue.use(VueRouter);
const routes = [
{
path: '/',
name: 'home',
component: HomeView
path: "/",
name: "home",
component: HomeView,
},
{
path: '/products',
name: 'products',
path: "/products",
name: "products",
component: Products,
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
// component: () => import(/* webpackChunkName: "about" */ '../modules/products')
},
]
{
path: "/customers",
name: "customers",
component: Customers,
},
];
const router = new VueRouter({
mode: 'history',
mode: "history",
base: process.env.BASE_URL,
routes
})
routes,
});
export default router
export default router;
......@@ -2,8 +2,7 @@
<v-container grid-list-md>
<v-layout column wrap align-center fill-height>
<v-flex md12>
<img alt="Vue logo" src="../assets/logo.png">
<img alt="Vue logo" src="../assets/logo.png" />
</v-flex>
</v-layout>
</v-container>
......@@ -13,8 +12,7 @@
// @ is an alias to /src
export default {
name: 'HomeView',
components: {
}
}
name: "HomeView",
components: {},
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment