From fff5557dcbdfc2c2fd707ea6c4fc246880a16c41 Mon Sep 17 00:00:00 2001 From: BoBoooooo <17746714@qq.com> Date: Fri, 1 Feb 2019 17:01:34 +0800 Subject: [PATCH] some fix --- src/main.js | 8 +------- src/styles/layout.scss | 4 +++- src/utils/fetch.js | 4 ++-- src/utils/index.js | 2 +- src/views/layout/components/SidebarItem.vue | 12 ------------ 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/main.js b/src/main.js index d4c773d..26fe1e3 100644 --- a/src/main.js +++ b/src/main.js @@ -11,26 +11,20 @@ /* eslint-disable no-new */ import Vue from 'vue' import ElementUI from 'element-ui' -import axios from 'axios' import 'element-ui/lib/theme-chalk/index.css' import App from './App.vue' import fetch from './utils/fetch' - import router from './router' import store from './store' import '@/icons/index' // icon import '@/permission' // 权限import axios from 'axios'; import '@/styles/index.scss' // global css -import { - asyncRouterMap, -} from '@/router/index' import CrudTable from '@/components/CrudTable'; Vue.use(ElementUI) Vue.component('crud-table', CrudTable) // 注册全局增删改查table组件 Vue.config.productionTip = false -Vue.prototype.axios = fetch // 全局基于拦截器配置后的ajax , 拦截器在 utils/fetch -console.log(asyncRouterMap) +Vue.prototype.axios = fetch // 全局基于拦截器配置后的ajax 拦截器在 utils/fetch new Vue({ el: '#app', router, diff --git a/src/styles/layout.scss b/src/styles/layout.scss index 5af11c4..037442e 100644 --- a/src/styles/layout.scss +++ b/src/styles/layout.scss @@ -45,7 +45,7 @@ top: 0; } - + } @@ -135,9 +135,11 @@ } } } + .el-menu-item>span{ margin-left:-10px; } + .el-menu--collapse { .el-submenu { &>.el-submenu__title { diff --git a/src/utils/fetch.js b/src/utils/fetch.js index a791ad1..0c95d52 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -2,8 +2,8 @@ * @Author: BoBo * @Date: 2018-12-25 18:33:50 * @Description: - * 全局axios配置 - * 配有req以及res两个拦截器 + * 全局axios配置,已在main.js,项目中通过 this.axios() 形式即可调用 + * 该文件配有req以及res两个拦截器 */ import axios from 'axios' import { diff --git a/src/utils/index.js b/src/utils/index.js index 41cf8e9..01413b9 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,7 +1,7 @@ /* * @Author: BoBo * @Date: 2018-12-21 14:33:55 - * @Description: 工具函数 + * @Description: 工具函数 (深拷贝, 新建一个guid, 时间转换函数) */ diff --git a/src/views/layout/components/SidebarItem.vue b/src/views/layout/components/SidebarItem.vue index 255834f..5a64dbb 100644 --- a/src/views/layout/components/SidebarItem.vue +++ b/src/views/layout/components/SidebarItem.vue @@ -1,17 +1,5 @@