You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
|
|
// 还有 createWebHashHistory 和 createMemoryHistory
|
|
|
|
|
|
|
|
export const routes = [
|
|
|
|
{ path: '/', redirect: '/test' },
|
|
|
|
{
|
|
|
|
path: '/network-config',
|
|
|
|
name: 'network-config',
|
|
|
|
meta: { title: '网络参数配置' },
|
|
|
|
component: () => import('@/views/network-config.vue'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/function-config',
|
|
|
|
name: 'function-config',
|
|
|
|
meta: { title: '功能参数配置' },
|
|
|
|
component: () => import('@/views/function-config.vue'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/device-create',
|
|
|
|
name: 'device-create',
|
|
|
|
meta: { title: '设备添加' },
|
|
|
|
component: () => import('@/views/device-create.vue'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/devices',
|
|
|
|
name: 'devices',
|
|
|
|
meta: { title: '设备管理' },
|
|
|
|
component: () => import('@/views/device-list.vue'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/test',
|
|
|
|
name: 'test',
|
|
|
|
meta: { title: '测试' },
|
|
|
|
component: () => import('@/views/test.vue'),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(),
|
|
|
|
routes,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|