show.vue
1 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
<template>
<LayoutApp title="邀新返佣" :show-back="false">
<div class="body" ref="body">
<Banner></Banner>
<List></List>
</div>
<Footer class="footer"></Footer>
</LayoutApp>
</template>
<script>
import Layout from '../components/layout/layout-app';
import Footer from './components/footer';
import Banner from './components/banner';
import List from './components/list';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('gain');
export default {
provide() {
return {
getBody: this.getBodyElem
};
},
mounted() {
this.fetchResource();
},
methods: {
...mapActions(['fetchResource']),
getBodyElem(found) {
return found && found(this.$refs.body);
}
},
components: {
LayoutApp: Layout,
Footer,
Banner,
List
}
};
</script>
<style lang="scss" scoped>
.footer {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
}
.body {
height: 100%;
overflow-y: auto;
}
</style>