21 lines
660 B
JavaScript
21 lines
660 B
JavaScript
import { createApp } from "vue";
|
|
import { createRouter, createWebHashHistory } from "vue-router";
|
|
import App from "./App.vue";
|
|
import InfoList from "./views/InfoList.vue";
|
|
import InfoEdit from "./views/InfoEdit.vue";
|
|
import Scan from "./views/Scan.vue";
|
|
import WebForm from "./views/WebForm.vue";
|
|
|
|
// 路由表:信息列表 / 编辑 / 扫码 / h5 表单页
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes: [
|
|
{ path: "/", component: InfoList },
|
|
{ path: "/edit/:id?", component: InfoEdit },
|
|
{ path: "/scan", component: Scan },
|
|
{ path: "/web", component: WebForm },
|
|
],
|
|
});
|
|
|
|
createApp(App).use(router).mount("#app");
|