Skip to content

Commit

Permalink
Merge pull request #3 from qianmoQ/dev
Browse files Browse the repository at this point in the history
[Core] Fixed router
  • Loading branch information
qianmoQ authored Mar 21, 2024
2 parents 4d246bb + c073148 commit 80f40ec
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Build Vue
on: [ push ]
on:
push:
branches:
- dev

jobs:
build_vue:
runs-on: ubuntu-latest
name: Build Vue
steps:
- uses: actions/checkout@v2
- id: Build-Vue
- if: github.ref == 'refs/heads/dev'
id: Build-Vue
uses: xRealNeon/[email protected]
with:
username: 'devlive-community'
Expand Down
13 changes: 13 additions & 0 deletions src/router/default.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Router } from 'vue-router'

const createDefaultRouter = (router: Router) => {
router.addRoute({
path: '/',
name: 'home',
redirect: '/auth/signup'
})
}

export {
createDefaultRouter
}
2 changes: 2 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import { createAuthRouter } from '@/router/auth'
import { createDefaultRouter } from '@/router/default'

const routes: Array<RouteRecordRaw> = []

Expand All @@ -9,5 +10,6 @@ const router = createRouter({
})

createAuthRouter(router)
createDefaultRouter(router)

export default router
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import tailwind from 'tailwindcss'
import autoprefixer from 'autoprefixer'

export default defineConfig({
base: '/devlive-community/shadcn-ui-vue-admin',
// base: '/devlive-community/shadcn-ui-vue-admin',
css: {
postcss: {
plugins: [tailwind(), autoprefixer()]
Expand Down

0 comments on commit 80f40ec

Please sign in to comment.