/
app.vue
68 lines (68 loc) · 1.47 KB
/
app.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
57
58
59
60
61
62
63
64
65
66
67
68
<template>
<view class="page">
<CommonPage titleText="底部栏系列" :showDisplayLayout="false" :showOption="false">
<template v-slot:content>
<scroller class="scrollContentView" style="backgroundcolor: #ffffff">
<view class="bottomLayout">
<text class="textView">底部栏(absolute + bottom: 0)</text>
</view>
<view class="contentLayout"></view>
<view class="bottomLayoutflexGrow">
<text class="textView">底部栏(flexGrow: 1)</text>
</view>
</scroller>
</template>
</CommonPage>
</view>
</template>
<script>
import CommonPage from "../component/CommonPage.vue";
export default {
pageConfig: {
canScroll: false,
},
components: {
CommonPage,
},
data() {
return {};
},
methods: {
},
};
</script>
<style lang="less" scoped>
.page {
width: 100%;
height: 100%;
background-color: #ffffff;
}
.scrollContentView {
width: 100%;
.textView {
font-size: 18;
color: #000000;
}
.bottomLayout {
position: absolute; // 关键点
bottom: 0; // 关键点
width: 100%;
height: 60;
justify-content: center;
align-items: center;
background-color: #15d0b4;
}
.bottomLayoutflexGrow {
width: 100%;
height: 60;
justify-content: center;
align-items: center;
background-color: #4a90e2;
margin-bottom: 60; // 关键点
}
.contentLayout {
width: 100%;
flex-grow: 1; // 关键点
}
}
</style>