看别人优秀的项目架构

This commit is contained in:
Impmon 2020-01-04 23:10:15 +08:00
parent 4f563a7bfe
commit 6874369993
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ import store from './store'
import router from './router' import router from './router'
import './icons' // icon import './icons' // icon
import './permission' // permission control import './permission' // 权限控制
import './utils/error-log' // error log import './utils/error-log' // error log
import * as filters from './filters' // global filters import * as filters from './filters' // global filters
@ -24,11 +24,11 @@ import * as filters from './filters' // global filters
* you want to use MockJs for mock api * you want to use MockJs for mock api
* you can execute: mockXHR() * you can execute: mockXHR()
* *
* Currently MockJs will be used in the production environment, * Currently MockJs will be used in the production|development environment,
* please remove it before going online! ! ! * please remove it before going online! ! !
*/ */
import { mockXHR } from '../mock' import { mockXHR } from '../mock'
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'development') {
mockXHR() mockXHR()
} }

View File

@ -1,7 +1,7 @@
import router from './router' import router from './router'
import store from './store' import store from './store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // 页面顶部加载进度条
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie import { getToken } from '@/utils/auth' // get token from cookie
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'

View File

@ -10,7 +10,7 @@ import Layout from '@/layout'
import componentsRouter from './modules/components' import componentsRouter from './modules/components'
import chartsRouter from './modules/charts' import chartsRouter from './modules/charts'
import tableRouter from './modules/table' import tableRouter from './modules/table'
import nestedRouter from './modules/nested' import nestedRouter from './modules/nested' // 嵌套的
/** /**
* Note: sub-menu only appear when route children.length >= 1 * Note: sub-menu only appear when route children.length >= 1