admin_add_router

This commit is contained in:
xiaomlove
2021-04-07 19:42:39 +08:00
parent e48461546f
commit be9b8634c4
7 changed files with 48 additions and 3 deletions
+3
View File
@@ -114,12 +114,15 @@ export default {
methods: {
handleSelect(key, keyPath) {
console.log(key, keyPath);
console.log("select", this)
},
handleOpen(key, keyPath) {
console.log(key, keyPath);
console.log("open", this)
},
handleClose(key, keyPath) {
console.log(key, keyPath);
console.log("close", this)
}
}
}
+3 -2
View File
@@ -1,7 +1,8 @@
import { createApp } from 'vue'
import App from './App.vue'
import installElementPlus from './plugins/element'
import router from './router'
const app = createApp(App)
const app = createApp(App).use(router)
installElementPlus(app)
app.mount('#app')
app.mount('#app')
+3
View File
@@ -0,0 +1,3 @@
<template>
<h1>Agent Allow Page</h1>
</template>
+3
View File
@@ -0,0 +1,3 @@
<template>
<h1>Home Page</h1>
</template>
+23
View File
@@ -0,0 +1,23 @@
import { createWebHistory, createRouter } from "vue-router";
import Home from "../pages/index";
import AgentAllow from "../pages/agent-allow";
const routes = [
{
path: "/",
name: "Home",
component: Home,
},
{
path: "/agent-allow",
name: "Agent-allow",
component: AgentAllow,
},
];
const router = createRouter({
history: createWebHistory(),
routes,
});
export default router;