diff --git a/src/main.js b/src/main.js index ef07f389..5ee1a9a1 100644 --- a/src/main.js +++ b/src/main.js @@ -14,7 +14,7 @@ import store from './store' import router from './router' import './icons' // icon -import './permission' // permission control +import './permission' // 权限控制 import './utils/error-log' // error log 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 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! ! ! */ import { mockXHR } from '../mock' -if (process.env.NODE_ENV === 'production') { +if (process.env.NODE_ENV === 'development') { mockXHR() } diff --git a/src/permission.js b/src/permission.js index 750aeab6..75d03dce 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,7 +1,7 @@ import router from './router' import store from './store' import { Message } from 'element-ui' -import NProgress from 'nprogress' // progress bar +import NProgress from 'nprogress' // 页面顶部加载进度条 import 'nprogress/nprogress.css' // progress bar style import { getToken } from '@/utils/auth' // get token from cookie import getPageTitle from '@/utils/get-page-title' diff --git a/src/router/index.js b/src/router/index.js index fbe8ad25..d1818e4d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,7 +10,7 @@ import Layout from '@/layout' import componentsRouter from './modules/components' import chartsRouter from './modules/charts' 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