Browse Source

Merge branch 'lxc' into 'master'

Lxc

See merge request qqkj/mmcloud/xm/xm-ui-web!2
master
qqkj-dev-chenyc 5 years ago
parent
commit
561159cec6
  1. 2
      .eslintignore
  2. 28
      .gitignore
  3. 3
      src/router/index.js
  4. 42
      src/views/layout/components/Sidebar/SidebarItem.vue

2
.eslintignore

@ -1,7 +1,7 @@
build/*.js build/*.js
config/*.js config/*.js
src/assets src/assets
/node_modules/
node_modules/
/static/ /static/
/zTree_v3/ /zTree_v3/
/*.js/ /*.js/

28
.gitignore

@ -0,0 +1,28 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock
/bak/
.env.development
config/index.js

3
src/router/index.js

@ -49,7 +49,8 @@ export const constantRouterMap = [
component: _import('xm/core/xmProject/XmProjectMng'), component: _import('xm/core/xmProject/XmProjectMng'),
name: 'dashboard', name: 'dashboard',
meta: { title: 'dashboard', icon: 'home-page', noCache: true } meta: { title: 'dashboard', icon: 'home-page', noCache: true }
}]
}],
hidden: true
} }
] ]

42
src/views/layout/components/Sidebar/SidebarItem.vue

@ -1,22 +1,21 @@
<template> <template>
<div class="menu-wrapper"> <div class="menu-wrapper">
<!-- <template>
<template>
<router-link to="/"> <router-link to="/">
<div class="logo" :class="{'has-logo': isCollapse}"> <div class="logo" :class="{'has-logo': isCollapse}">
<img v-if="isCollapse" src="../../../../assets/image/logo1.png" alt="" /> <img v-if="isCollapse" src="../../../../assets/image/logo1.png" alt="" />
<img v-else src="../../../../assets/image/logo2.png" alt="" />
<div class="logo-text" v-else>
<img src="../../../../assets/image/logo1.png" alt="" />
<div class="systemName">唛盟云</div>
<div class="name">项目管理系统</div>
</div>
</div> </div>
</router-link> </router-link>
</template> -->
</template>
<template v-for="item in routes" v-if="!item.hidden&&item.children"> <template v-for="item in routes" v-if="!item.hidden&&item.children">
<router-link v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow&&!item.path" to="/" :key="item.children[0].name">
<el-menu-item :index="item.path+'/'+item.children[0].path" class="logo" :class="{'submenu-title-noDropdown-logo':!isNest, 'has-logo': isCollapse}">
<img v-if="isCollapse" src="../../../../assets/image/logo1.png" alt="" />
<img v-else src="../../../../assets/image/logo2.png" alt="" />
</el-menu-item>
</router-link>
<router-link v-else-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow" :to="item.path+'/'+item.children[0].path"
<router-link v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow" :to="item.path+'/'+item.children[0].path"
:key="item.children[0].name"> :key="item.children[0].name">
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon"></svg-icon> <svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon"></svg-icon>
@ -84,13 +83,34 @@ export default {
.logo { .logo {
height: 56px; height: 56px;
width: 100%; width: 100%;
padding: 0 20px;
// padding: 0 20px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
img { img {
width: 100%; width: 100%;
} }
.logo-text {
display: flex;
align-items: center;
justify-content: left;
color: #fff;
img {
width: 30%;
}
.systemName {
font-size: 14px;
font-weight: bold;
font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.name {
font-size: 12px;
font-weight: bold;
transform: scale(0.7);
margin-left: -8px;
}
}
} }
.has-logo { .has-logo {
width: 100%; width: 100%;

Loading…
Cancel
Save