forked from wangrongding/frontend-park
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.vue
56 lines (50 loc) · 1.08 KB
/
layout.vue
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
<script setup lang="ts">
// @ts-ignore
import Menu from '@/layout/Menu.tsx'
const route = useRoute()
onMounted(() => {
// 禁止右键菜单
// document.oncontextmenu = () => false
// // oncopy事件禁用复制;
// document.oncopy = () => false
// // oncut事件禁用剪切
// document.oncut = () => false
// // onselectstart事件禁用网页上选取的内容
// document.onselectstart = () => false
})
</script>
<template>
<div class="page-container">
<el-container>
<el-header><Menu /></el-header>
<el-main>
<div id="content" class="content">
<router-view :key="route.path" />
</div>
</el-main>
</el-container>
</div>
</template>
<style scoped lang="scss">
.page-container {
user-select: none;
display: flex;
flex-direction: column;
// height: 100vh;
.el-header {
padding: 0;
height: 58px;
}
.el-main {
flex: 1;
padding: 0;
.content {
overflow: auto;
height: calc(100vh - 58px);
width: 100%;
position: relative;
background: #e8f1ff;
}
}
}
</style>