Commit e032644e by xinla

--no commit message

1 parent 03fe0cd9
<template>
<transition name="fade-transform" mode="out-in">
<router-view class="page app-main" :key="key" />
<!-- <keep-alive :include="cachedViews">
<!-- <el-scrollbar class="page-scrollbar"> -->
<div class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view class="page" :key="key" />
<!-- <keep-alive :include="cachedViews">
</keep-alive> -->
</transition>
</transition>
</div>
<!-- </el-scrollbar> -->
</template>
<script>
export default {
name: 'AppMain',
computed: {
cachedViews () {
return this.$store.state.tagsView.cachedViews
},
key () {
return this.$route.path
}
}
}
export default {
name: 'AppMain',
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
},
},
}
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
// min-height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow-y: auto;
overflow-x: hidden;
// padding-top: 15px;
// background-color: #fff;
}
// ::v-deep .el-scrollbar__wrap {
// margin: 20px 0;
// padding: 0 20px;
// }
.app-main {
position: relative;
overflow-y: auto;
margin: 20px 0 0;
padding: 0 20px;
.fixed-header + .app-main {
padding-top: 50px;
&::-webkit-scrollbar-thumb {
visibility: hidden;
}
&:hover::-webkit-scrollbar-thumb {
visibility: visible;
}
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
height: calc(100vh - 84px);
}
.page {
background: #fff;
border-radius: var(--border-radius-big);
overflow: hidden;
}
.fixed-header + .app-main {
padding-top: 50px;
}
.fixed-header + .app-main {
padding-top: 84px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
height: calc(100vh - 84px);
}
.fixed-header + .app-main {
padding-top: 84px;
}
}
</style>
<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
}
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
}
}
</style>
......@@ -10,12 +10,10 @@
<div class="breadcrumb-wrap" v-show="visiableSidebarRouters">
<breadcrumb />
</div>
<div class="page-content">
<app-main />
<RightPanel v-if="showSettings">
<app-main />
<!-- <RightPanel v-if="showSettings">
<settings />
</RightPanel>
</div>
</RightPanel> -->
</div>
</div>
</div>
......@@ -96,9 +94,6 @@ export default {
background: #fff;
border-top: 1px solid #eee;
}
.page-content {
margin: 20px 20px 0;
}
&.mobile.openSidebar {
position: fixed;
......
......@@ -40,8 +40,7 @@ body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial,
sans-serif;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
overflow: hidden;
}
......@@ -119,6 +118,10 @@ li {
background: white;
}
.bgnone {
background: none !important;
}
.blod {
font-weight: bold;
}
......@@ -295,14 +298,16 @@ li {
/* Dark mode */
@media (prefers-color-scheme: dark) {
body,img,video {
body,
img,
video {
filter: invert(1) hue-rotate(180deg);
}
// 不使用暗黑模式
.no-dark {
position: relative;
&::before{
content: " ";
&::before {
content: ' ';
position: absolute;
display: block;
height: 100%;
......@@ -310,4 +315,4 @@ li {
backdrop-filter: invert(1) hue-rotate(180deg);
}
}
}
\ No newline at end of file
}
......@@ -379,6 +379,7 @@
background: var(--color);
}
// 表格
.el-table {
background-color: transparent;
&::before {
......@@ -389,7 +390,7 @@
.el-table__header-wrapper tr {
background-color: #f5f7fa;
height: 40px;
color: #1d2129;
color: var(--font-black);
border-radius: var(--border-radius-small);
}
.el-table__body-wrapper,
......
......@@ -383,7 +383,7 @@ aside {
height: 60px;
font-size: 18px;
font-weight: 500;
color: #333;
color: var(--font-black);
padding: 0 20px;
background: #fff;
border-radius: var(--border-radius-big) var(--border-radius-big) 0 0;
......@@ -398,22 +398,28 @@ aside {
margin-top: 0;
}
}
// 二级 分类标题
// 二级/卡片标题
&title-sub {
@extend .g-title;
font-size: 16px;
margin-top: var(--card-margin);
&:first-child {
margin-top: 0;
}
& + .g-card {
border-radius: 0 0 var(--border-radius-big) var(--border-radius-big);
margin-top: 0;
padding-top: 0;
}
}
// 卡片样式
&card {
margin-top: 16px;
margin-top: var(--card-margin);
border-radius: var(--border-radius-big);
background: #fff;
overflow: auto;
padding: 20px;
&:first-child {
margin-top: 0;
}
......
// css var
:root {
--color: #07c160;
--color-lighter: #90de45;
html {
--color: #07c160; // 主题色
--color-lighter: #90de45; // 浅主题色
--color-success: #07c160;
--color-warning: #faad14;
--color-danger: #eb5e12;
--border-radius: 8px;
--border-radius-small: 4px;
--border-radius-big: 16px;
--top-nav-heght: 64px;
--border-radius: 8px; // 圆角
--border-radius-small: 4px; // 小圆角
--border-radius-big: 16px; // 大圆角
--card-margin: 16px; // 卡片间距
--top-nav-heght: 64px; // 顶部导航条高度
--font-black: #1d2129; // 通用字体黑色
}
// base color
$light-blue: #90de45;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!