Skip to content

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Feb 1, 2019
1 parent 01fbff8 commit fff5557
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
8 changes: 1 addition & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion src/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
top: 0;
}


}


Expand Down Expand Up @@ -135,9 +135,11 @@
}
}
}

.el-menu-item>span{
margin-left:-10px;
}

.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: BoBo
* @Date: 2018-12-21 14:33:55
* @Description: 工具函数
* @Description: 工具函数 (深拷贝, 新建一个guid, 时间转换函数)
*/


Expand Down
12 changes: 0 additions & 12 deletions src/views/layout/components/SidebarItem.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<template>
<div class="menu-wrapper">
<!--
<router-link
to="/dashboard"
>
<el-menu-item index="/dashboard">
<svg-icon
icon-class="dashboard"
/> Dashboard
</el-menu-item>
</router-link> -->


<template v-for="item in routes">
<router-link
v-if="!item.hidden&&item.noDropdown&&item.children.length>0&&item.noDropdown!==null"
Expand Down

0 comments on commit fff5557

Please sign in to comment.