FullWidthLayout.vue
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
<div :class="isNewWindowOpenPage ? 'full_wrap_layout' : ''">
<!-- <v-breadcrumb>
<slot name="breadcrumb"></slot>
</v-breadcrumb> -->
<div class="main-wrap full-width">
<slot name="main"></slot>
</div>
</div>
</template>
<script>
// import vBreadcrumb from 'components/Breadcrumb.vue'
export default {
data () {
return {
isNewWindowOpenPage: false
}
},
components: {
// vBreadcrumb
},
created() {
// 新窗口打开页面 菜单栏直接进入地图页面不隐藏菜单
let hiddenMenu = JSON.parse(localStorage.getItem('hiddenMenu'))
let locationHash = window.location.hash
let flag = true
hiddenMenu.map(val => {
if (locationHash.indexOf(val) > -1 && window.location.hash.indexOf('?') > -1) flag = false
})
if (!flag) this.isNewWindowOpenPage = true
}
};
</script>
<style lang="scss">
h1,
h2,
h3,
h4,
h5 {
margin: 0px;
}
.main-wrap.full-width {
position: fixed;
width: calc(100% - 200px);
height: calc(100% - 60px);
top: 60px;
left: 200px;
background: #fff;
padding: 0;
}
.ibox {
background-color: #fff;
border-top: 2px solid #e7eaec;
padding: 10px;
margin-bottom: 20px;
.ibox-title {
padding-bottom: 10px;
}
.ibox-content {
padding: 20px 20px 0px;
margin: 0px -10px;
border-top: 1px solid #e7eaec;
}
.count {
font-size: 20px;
}
}
.full_wrap_layout {
.full-width {
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
}
</style>