Skip to content

Commit

Permalink
Merge branch 'main' into release/gh-page
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing committed Sep 5, 2023
2 parents 7ba7ab9 + d29d030 commit 94f581d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 16 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# Changelog


## v1.3.0

[compare changes](https://github.com/yisibell/vue3-admin-starter/compare/v1.2.0...v1.3.0)

### 🚀 Enhancements

- Update env types ([d9139c8](https://github.com/yisibell/vue3-admin-starter/commit/d9139c8))

### ❤️ Contributors

- Wenqing <wenqing@kerrylan.com>

## v1.2.0

[compare changes](https://github.com/yisibell/vue3-admin-starter/compare/v1.1.0...v1.2.0)

### 🚀 Enhancements

- Upgrade 404 page match rule ([fff3b81](https://github.com/yisibell/vue3-admin-starter/commit/fff3b81))

### ❤️ Contributors

- Wenqing <wenqing@kerrylan.com>

## v1.1.0

[compare changes](https://github.com/yisibell/vue3-admin-starter/compare/v0.0.3...v1.1.0)

### 🚀 Enhancements

- Support hide language picker and others ([73b2994](https://github.com/yisibell/vue3-admin-starter/commit/73b2994))
- V1 ([47becfd](https://github.com/yisibell/vue3-admin-starter/commit/47becfd))

### 🏡 Chore

- Code perf ([ba50c3f](https://github.com/yisibell/vue3-admin-starter/commit/ba50c3f))

### ❤️ Contributors

- Wenqing <wenqing@kerrylan.com>

## v0.0.3

[compare changes](https://github.com/yisibell/vue3-admin-starter/compare/v0.0.2...v0.0.3)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue3-admin-starter",
"version": "0.0.3",
"version": "1.3.0",
"description": "A vue admin template powered by vite + typescript + vue3 + vue-router + pinia + element-plus + axios.",
"author": {
"name": "elenh",
Expand Down
2 changes: 2 additions & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svg4vue/client" />

interface ImportMetaEnv {
readonly VITE_APP_BASE_API: string
readonly VITE_APP_PROXY_TARGET: string
// 更多环境变量...
}

Expand Down
5 changes: 0 additions & 5 deletions src/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export const initPermissionGuard = (router: Router) => {
// start progress bar
tricklingProgress.start()

if (!inWhiteList(to.path) && !router.hasRoute(to.name || '')) {
next('/404')
return
}

const UserStore = useUserStore()
const PermissionStore = usePermissionStore()

Expand Down
6 changes: 6 additions & 0 deletions src/router/staticRoutes/hiddenRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,11 @@ export const hiddenRoutes: IRouteRecord[] = [
hidden: true
},
component: () => import('@/views/app/404.vue')
},
// 捕获 404 页面
{
path: '/:pathMatch(.*)*',
redirect: '/404',
meta: { hidden: true }
}
]
11 changes: 1 addition & 10 deletions src/router/staticRoutes/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { IRouteRecord } from '@/router/interfaces/core'
import LayoutDefault from '@/layouts/default/index.vue'

import { hiddenRoutes } from './hiddenRoutes'
import { labRoutes } from './labRoutes'

import defaultSettings from '@/settings'

export const constantRoutes: IRouteRecord[] = (
Expand All @@ -30,14 +28,7 @@ export const constantRoutes: IRouteRecord[] = (
] as IRouteRecord[]
).concat(labRoutes, hiddenRoutes)

export const latestRoutes: IRouteRecord[] = [
// 捕获 404 页面
// {
// path: '/:pathMatch(.*)*',
// redirect: '/404',
// meta: { hidden: true }
// }
]
export const latestRoutes: IRouteRecord[] = []

export const getFullRoutes = (routes: IRouteRecord[], concatDynamicRoutes: boolean = true) => {
if (concatDynamicRoutes) {
Expand Down

0 comments on commit 94f581d

Please sign in to comment.