【fix ESLint】src/components/page

This commit is contained in:
danshihao
2023-03-03 16:51:52 +08:00
parent d5cbb3e5b8
commit 5039535b53
4 changed files with 10 additions and 16 deletions
@@ -128,11 +128,7 @@ export default {
handleScroll () {
if (this.autoHideHeader) {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
if (scrollTop > 100) {
this.headerBarFixed = true
} else {
this.headerBarFixed = false
}
this.headerBarFixed = scrollTop > 100
} else {
this.headerBarFixed = false
}
@@ -74,7 +74,7 @@
</a-layout-content>
<!-- layout footer -->
<a-layout-footer style="padding: 0px">
<a-layout-footer style="padding: 0">
<global-footer/>
</a-layout-footer>
</a-layout>
@@ -166,7 +166,7 @@ export default {
},
findMenuBykey (menus, key) {
for (const i of menus) {
if (i.path == key) {
if (i.path === key) {
this.activeMenu = { ...i }
} else if (i.children && i.children.length > 0) {
this.findMenuBykey(i.children, key)
@@ -529,7 +529,7 @@ export default {
// 内容区
.layout-content {
margin: 24px 24px 0px;
margin: 24px 24px 0;
height: 64px;
padding: 0 12px 0 0;
}
@@ -635,7 +635,7 @@ export default {
.ant-dropdown-menu-item > .anticon:first-child,
.ant-dropdown-menu-item > a > .anticon:first-child,
.ant-dropdown-menu-submenu-title > .anticon:first-child
.ant-dropdown-menu-submenu-title > .anticon:first-child,
.ant-dropdown-menu-submenu-title > a > .anticon:first-child {
min-width: 12px;
margin-right: 8px;
+4 -6
View File
@@ -3,7 +3,7 @@
<div class="page-header-index-wide">
<a-breadcrumb class="breadcrumb">
<a-breadcrumb-item v-for="(item, index) in breadList" :key="index">
<router-link v-if="item.name != name" :to="{ path: item.path }">
<router-link v-if="item.name !== name" :to="{ path: item.path }">
{{ item.meta.title }}
</router-link>
<span v-else>{{ item.meta.title }}</span>
@@ -13,7 +13,7 @@
<div class="detail">
<div class="main" v-if="!$route.meta.hiddenHeaderContent">
<div class="row">
<img v-if="logo" :src="logo" class="logo"/>
<img v-if="logo" :src="logo" class="logo" alt="logo"/>
<h1 v-if="title" class="title">{{ title }}</h1>
<div class="action">
<slot name="action"></slot>
@@ -41,12 +41,12 @@
</template>
<script>
import Breadcrumb from '@/components/tools/Breadcrumb'
// import Breadcrumb from '@/components/tools/Breadcrumb'
export default {
name: 'PageHeader',
components: {
's-breadcrumb': Breadcrumb
// 's-breadcrumb': Breadcrumb
},
props: {
title: {
@@ -143,9 +143,7 @@ export default {
font-size: 20px;
font-weight: 500;
font-size: 20px;
line-height: 28px;
font-weight: 500;
color: rgba(0,0,0,.85);
margin-bottom: 16px;
flex: auto;
+1 -1
View File
@@ -122,6 +122,6 @@ export default {
margin-top: 48px;
}
.page-header[data-v-6740ec88] {
margin: 0px 24px 0;
margin: 0 24px 0;
}
</style>