Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit 98b5242

Browse files
committed
feat(material): material basic measurement
1 parent f34c483 commit 98b5242

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

src/layout/Material.vue

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
<el-container class="layout__material">
33
<!-- Dynamic aside rendering area -->
44

5-
<el-container>
5+
<el-container class="layout__material__placeholder">
66
<el-header>
77
<el-button
88
class="logout"
99
type="text"
1010
@click="onLogout"
1111
>Logout</el-button>
1212
</el-header>
13-
<router-view/>
14-
<el-footer>footer</el-footer>
13+
<router-view class="layout__material__placeholder-main"/>
14+
<el-footer class="layout__material__footer">
15+
Copyright &copy; {{currentYear}}
16+
</el-footer>
1517
</el-container>
1618
</el-container>
1719
</template>
@@ -21,14 +23,36 @@ export default {
2123
data () {
2224
return {}
2325
},
26+
2427
methods: {
2528
onLogout () {
2629
this.$store.dispatch('login/userLogout')
2730
.then(() => this.$router.replace('/login'))
2831
}
32+
},
33+
34+
computed: {
35+
currentYear () {
36+
return new Date().getFullYear()
37+
}
2938
}
3039
}
3140
</script>
3241

3342
<style lang='scss' scoped>
43+
.layout__material {
44+
&__placeholder {
45+
display: flex;
46+
flex-direction: column;
47+
min-height: 100vh;
48+
49+
&-main {
50+
flex: 1;
51+
}
52+
}
53+
54+
&__footer {
55+
line-height: 60px;
56+
}
57+
}
3458
</style>

src/pages/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="home">
3-
<router-link to="/login">login page</router-link>
3+
This is home page.
44
</div>
55
</template>
66

0 commit comments

Comments
 (0)