add layouts

This commit is contained in:
AceDataCloud committed 2021-08-28 01:46:04 +08:00
1 parent b74faa3997
commit 8135b02e1e
9 files changed
+133 -5

No files matched your search

-16
View File
@@ -1,16 +0,0 @@
<template>
<div>Hello World</div>
</template>
<script lang="ts">
export default {
components: {},
data() {
return {};
},
computed: {},
methods: {}
};
</script>
<style lang="scss"></style>
+61
View File
@@ -0,0 +1,61 @@
<template>
<el-container id="header" class="header">
<el-aside width="200px">
<img src="@/assets/images/logo.png" class="logo" />
</el-aside>
<el-main>
<el-row>
<el-col>
<el-menu :default-active="active" class="el-menu-demo" mode="horizontal" @select="onSelect">
<el-menu-item index="home" v-t="'menu.home'" v-if="false"></el-menu-item>
<el-menu-item index="editor" v-t="'menu.editor'"></el-menu-item>
</el-menu>
</el-col>
</el-row>
</el-main>
</el-container>
</template>
<script>
export default {
name: 'TopHeader',
data() {
return {};
},
computed: {
active() {
return this.$route.name;
}
},
methods: {
onSelect(val) {
this.$router.push({
name: val
});
}
}
};
</script>
<style lang="scss">
.header {
height: 60px;
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 999;
width: 100%;
height: 60px;
background: #fff;
border-bottom: 1px solid #e8e8e8;
.logo {
width: 130px;
margin-left: 30px;
margin-top: 15px;
}
.el-main {
padding: 0;
}
}
</style>
+3
View File
@@ -0,0 +1,3 @@
import TopHeader from '@/components/common/TopHeader.vue';
export { TopHeader };