-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bc8269
commit cd46b5c
Showing
10 changed files
with
61 additions
and
168 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<div id="nav"> | ||
<router-link to="/">Home</router-link> | | ||
<router-link to="/login">Login</router-link> | | ||
</div> | ||
<router-view /> | ||
</template> | ||
|
||
<script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<template> | ||
<router-link to="/login">Login</router-link> | ||
<h1>Welcome!</h1> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,33 @@ | ||
import { createApp } from 'vue' | ||
import ElementPlus from 'element-plus'; | ||
import 'element-plus/lib/theme-chalk/index.css'; | ||
import App from './admin/App.vue' | ||
import Customers from './admin/Customers.vue' | ||
import { createApp, h } from 'vue' | ||
import { createRouter, createWebHashHistory } from 'vue-router' | ||
// import App from './admin/App.vue' | ||
// import Customers from './admin/Customers.vue' | ||
import Login from './Login.vue' | ||
import App from './App.vue' | ||
import Landing from './Landing.vue' | ||
import * as VueRouter from 'vue-router' | ||
|
||
const About = { template: '<div>Provided by the Nuts community for demo purposes.</div>' } | ||
|
||
const routes = [ | ||
{ path: '/', component: Landing }, | ||
{ path: '/about', component: About }, | ||
{ path: '/login', component: Login }, | ||
{ path: '/admin', | ||
component: App, | ||
children: [ | ||
{ | ||
path: 'customers', | ||
component: Customers | ||
} | ||
] | ||
} | ||
// { path: '/admin', | ||
// component: App, | ||
// children: [ | ||
// { | ||
// path: 'customers', | ||
// component: Customers | ||
// } | ||
// ] | ||
// } | ||
] | ||
|
||
const router = VueRouter.createRouter({ | ||
const router = createRouter({ | ||
// We are using the hash history for simplicity here. | ||
history: VueRouter.createWebHashHistory(), | ||
history: createWebHashHistory(), | ||
routes // short for `routes: routes` | ||
}) | ||
|
||
const app = createApp({}) | ||
app.use(ElementPlus) | ||
// const app = createApp({}) | ||
const app = createApp(App) | ||
|
||
app.use(router) | ||
app.mount('#app') |
Oops, something went wrong.