mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 14:37:57 +08:00
给 /src/types/ 路径增加 # alias
This commit is contained in:
@@ -6,7 +6,7 @@ import eventBus from '@/utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useRouteStore from '@/store/modules/route'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
import type { Menu, Route } from '@/types/global'
|
||||
import type { Menu, Route } from '#/global'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// import SidebarItem from './index.vue'
|
||||
import { resolveRoutePath } from '@/utils'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import type { Menu } from '@/types/global'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import MultilevelMenuExample from './modules/multilevel.menu.example'
|
||||
|
||||
import type { Menu } from '@/types/global'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
const menu: Menu.recordMainRaw[] = [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Menu } from '@/types/global'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
const menus: Menu.recordRaw = {
|
||||
meta: {
|
||||
|
||||
@@ -11,7 +11,7 @@ import MockExample from './modules/mock.example'
|
||||
import JsxExample from './modules/jsx.example'
|
||||
import ExternalLinkExample from './modules/external.link.example'
|
||||
import EcologyExample from './modules/ecology.example'
|
||||
import type { Route } from '@/types/global'
|
||||
import type { Route } from '#/global'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
// 固定路由(默认路由)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 该文件为系统默认配置,请勿修改!!!
|
||||
|
||||
import type { RecursiveRequired, Settings } from '@/types/global'
|
||||
import type { RecursiveRequired, Settings } from '#/global'
|
||||
|
||||
const globalSettingsDefault: RecursiveRequired<Settings.all> = {
|
||||
app: {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { Settings } from '@/types/global'
|
||||
import type { Settings } from '#/global'
|
||||
|
||||
const globalSettings: Settings.all = {
|
||||
app: {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { cloneDeep } from 'lodash-es'
|
||||
import useSettingsStore from './settings'
|
||||
import useUserStore from './user'
|
||||
import useRouteStore from './route'
|
||||
import type { Menu } from '@/types/global'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
import { resolveRoutePath } from '@/utils'
|
||||
import api from '@/api'
|
||||
|
||||
@@ -5,7 +5,7 @@ import useUserStore from './user'
|
||||
import api from '@/api'
|
||||
import { resolveRoutePath } from '@/utils'
|
||||
import { systemRoutes } from '@/router/routes'
|
||||
import type { Route } from '@/types/global'
|
||||
import type { Route } from '#/global'
|
||||
|
||||
function hasPermission(permissions: string[], route: Route.recordMainRaw | RouteRecordRaw) {
|
||||
let isAuth = false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defaultsDeep } from 'lodash-es'
|
||||
import type { RouteMeta } from 'vue-router'
|
||||
import type { RecursiveRequired, Settings } from '@/types/global'
|
||||
import type { RecursiveRequired, Settings } from '#/global'
|
||||
import settings from '@/settings'
|
||||
import settingsDefault from '@/settings.default'
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
"#/*": [
|
||||
"src/types/*"
|
||||
]
|
||||
},
|
||||
"types": [
|
||||
|
||||
@@ -52,6 +52,7 @@ export default ({ mode, command }) => {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'#': path.resolve(__dirname, 'src/types'),
|
||||
},
|
||||
},
|
||||
css: {
|
||||
|
||||
Reference in New Issue
Block a user