Commit 03fe0cd9 by xinla

菜单缩进和表格样式

1 parent 879d233c
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
<div v-if="!item.hidden"> <div v-if="!item.hidden">
<app-link v-if="isLeafMeu(item)" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> <app-link v-if="isLeafMeu(item)" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item v-if="onlyOneChild.meta" :index="resolvePath(onlyOneChild.path)"> <el-menu-item v-if="onlyOneChild.meta" :index="resolvePath(onlyOneChild.path)">
{{ onlyOneChild.meta.title }} <div class="menu-title" :style="{ padding: `0px ${15 * level}px` }">{{ onlyOneChild.meta.title }}</div>
</el-menu-item> </el-menu-item>
</app-link> </app-link>
<el-submenu v-else :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else :index="resolvePath(item.path)" popper-append-to-body>
<span slot="title" v-if="item.meta">{{ item.meta.title }}</span> <div slot="title" class="menu-title" :style="{ padding: `0px ${20 * level}px` }" v-if="item.meta">
{{ item.meta.title }}
</div>
<sidebar-item <sidebar-item
v-for="child in item.children" v-for="child in item.children"
:key="child.path" :key="child.path"
:is-nest="true" :is-nest="true"
:level="~~level + 1"
:item="child" :item="child"
:base-path="resolvePath(child.path)" :base-path="resolvePath(child.path)"
class="nest-menu" /> class="nest-menu" />
...@@ -36,6 +39,10 @@ export default { ...@@ -36,6 +39,10 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
level: {
type: String | Number,
default: 1,
},
isNest: { isNest: {
type: Boolean, type: Boolean,
default: false, default: false,
......
...@@ -11,9 +11,11 @@ ...@@ -11,9 +11,11 @@
v-for="(route, index) in sidebarRouters" v-for="(route, index) in sidebarRouters"
:key="route.path + index" :key="route.path + index"
:item="route" :item="route"
level="1"
:base-path="route.path" /> :base-path="route.path" />
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
<div class="card"> <div class="card">
<div class="">{{ lwConfig.SYSTEM_NAME }}</div> <div class="">{{ lwConfig.SYSTEM_NAME }}</div>
<div class="info mt10 mb5">版本:全功能最新版</div> <div class="info mt10 mb5">版本:全功能最新版</div>
...@@ -111,6 +113,7 @@ export default { ...@@ -111,6 +113,7 @@ export default {
// 菜单,目录 // 菜单,目录
.el-menu-item, .el-menu-item,
.el-submenu > .el-submenu__title { .el-submenu > .el-submenu__title {
padding: 0 !important;
margin: 4px auto; margin: 4px auto;
font-weight: 500; font-weight: 500;
height: 40px; height: 40px;
......
...@@ -123,58 +123,58 @@ ...@@ -123,58 +123,58 @@
} }
.app-main.page { .app-main.page {
.el-table { // .el-table {
background-color: transparent; // background-color: transparent;
&::before { // &::before {
content: none; // content: none;
} // }
.el-table__header-wrapper th, // .el-table__header-wrapper th,
.el-table__fixed-header-wrapper th, // .el-table__fixed-header-wrapper th,
.el-table__header-wrapper tr { // .el-table__header-wrapper tr {
background-color: transparent !important; // background-color: transparent !important;
height: 40px; // height: 40px;
} // }
.el-table__body-wrapper, // .el-table__body-wrapper,
.el-table__fixed-body-wrapper { // .el-table__fixed-body-wrapper {
tr { // tr {
box-shadow: 0px 0px 5px 0px rgba(195, 195, 195, 0.35); // box-shadow: 0px 0px 5px 0px rgba(195, 195, 195, 0.35);
height: 50px; // height: 50px;
} // }
} // }
// th.is-leaf, // // th.is-leaf,
// td { // // td {
// border-bottom: 0; // // border-bottom: 0;
// // }
// tr td {
// &:first-child {
// border-radius: 4px 0 0 4px;
// border-left: 1px solid #ddd;
// }
// &:last-child {
// border-radius: 0 4px 4px 0;
// border-right: 1px solid #ddd;
// }
// }
// .el-table__body {
// border-spacing: 0 10px;
// }
// .el-table__fixed,
// .el-table__fixed-right {
// &::before {
// content: none;
// }
// }
// .el-table__fixed .el-table__fixed-body-wrapper {
// tr td:last-child {
// border-right: inherit;
// }
// }
// .el-table__fixed-right .el-table__fixed-body-wrapper {
// tr td:first-child {
// border-left: inherit;
// }
// }
// } // }
tr td {
&:first-child {
border-radius: 4px 0 0 4px;
border-left: 1px solid #ddd;
}
&:last-child {
border-radius: 0 4px 4px 0;
border-right: 1px solid #ddd;
}
}
.el-table__body {
border-spacing: 0 10px;
}
.el-table__fixed,
.el-table__fixed-right {
&::before {
content: none;
}
}
.el-table__fixed .el-table__fixed-body-wrapper {
tr td:last-child {
border-right: inherit;
}
}
.el-table__fixed-right .el-table__fixed-body-wrapper {
tr td:first-child {
border-left: inherit;
}
}
}
} }
.el-form-item { .el-form-item {
...@@ -378,4 +378,65 @@ ...@@ -378,4 +378,65 @@
transform: translateX(-50%); transform: translateX(-50%);
background: var(--color); background: var(--color);
} }
.el-table {
background-color: transparent;
&::before {
content: none;
}
.el-table__header-wrapper th,
.el-table__fixed-header-wrapper th,
.el-table__header-wrapper tr {
background-color: #f5f7fa;
height: 40px;
color: #1d2129;
border-radius: var(--border-radius-small);
}
.el-table__body-wrapper,
.el-table__fixed-body-wrapper {
tr {
// box-shadow: 0px 0px 5px 0px rgba(195, 195, 195, 0.35);
height: 50px;
}
}
.el-table__body {
border-collapse: collapse;
}
// th.is-leaf,
// td {
// border-bottom: 0;
// }
&.el-table--small .el-table__row .el-table__cell {
border-bottom: 1px solid #dfe6ec;
border-top: 1px solid #dfe6ec;
padding: 15px 0;
}
th.el-table__cell.is-leaf {
border-bottom: 0;
}
tr:hover td {
&:first-child {
border-radius: var(--border-radius-big) 0 0 var(--border-radius-big);
}
&:last-child {
border-radius: 0 var(--border-radius-big) var(--border-radius-big) 0;
}
}
.el-table__fixed,
.el-table__fixed-right {
&::before {
content: none;
}
}
.el-table__fixed .el-table__fixed-body-wrapper {
tr td:last-child {
border-right: inherit;
}
}
.el-table__fixed-right .el-table__fixed-body-wrapper {
tr td:first-child {
border-left: inherit;
}
}
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!