add: добавлен роутер
This commit is contained in:
parent
ae0db073a2
commit
bc5992552a
846
front/package-lock.json
generated
846
front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,13 +10,16 @@
|
||||
"gen-api": "swagger-typescript-api -r -o ./src/core/api/ --modular -p "
|
||||
},
|
||||
"dependencies": {
|
||||
"ant-design-vue": "^4.2.6",
|
||||
"vue": "^3.5.12",
|
||||
"vue-router": "^4.5.0",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.1.4",
|
||||
"swagger-typescript-api": "^13.0.23",
|
||||
"typescript": "~5.6.2",
|
||||
"unplugin-vue-components": "^0.27.5",
|
||||
"vite": "^5.4.10",
|
||||
"vue-tsc": "^2.1.8"
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import Header from './components/main/Header.vue';
|
||||
<template>
|
||||
<Header />
|
||||
<main>
|
||||
test
|
||||
<RouterView />
|
||||
</main>
|
||||
</template>
|
||||
|
||||
|
11
front/src/components/pages/Home.vue
Normal file
11
front/src/components/pages/Home.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
test!
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -2,9 +2,11 @@ import { createApp } from 'vue'
|
||||
import './style.css'
|
||||
import App from './App.vue'
|
||||
import { key, store } from './store'
|
||||
import router from './router'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(store, key)
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
|
11
front/src/router.ts
Normal file
11
front/src/router.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('./components/pages/Home.vue'),
|
||||
}
|
||||
],
|
||||
})
|
Loading…
Reference in New Issue
Block a user