2022-01-01 16:14:33 +08:00
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
2020-10-06 17:03:32 +08:00
|
|
|
|
|
|
|
|
const importModule = (filePath) => {
|
2022-01-01 16:14:33 +08:00
|
|
|
return () => import(`example/${filePath}`)
|
2020-10-06 17:03:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const routes = [{
|
|
|
|
|
path: '/',
|
2022-01-01 16:14:33 +08:00
|
|
|
component: importModule('views/ExampleAffix')
|
2020-10-06 17:03:32 +08:00
|
|
|
}]
|
|
|
|
|
|
2022-01-01 16:14:33 +08:00
|
|
|
export default createRouter({
|
2020-10-06 17:03:32 +08:00
|
|
|
routes,
|
2022-01-01 16:14:33 +08:00
|
|
|
history: createWebHistory()
|
2020-10-06 17:03:32 +08:00
|
|
|
})
|