<template>
|
<div class="test-page" :style="{height: pageHeight}">
|
<p style="margin-bottom: 16px;">本页面开发测试使用</p>
|
|
<div style="width: 100%;height: 100%; border: 1px solid #cdcdcd;position: absolute;top: 0;left: 0;z-index: 1;">
|
<auto-scroll>
|
<div style="height: 300px;background-color: #0068FF;"></div>
|
<div style="height: 300px;background-color: pink;"></div>
|
<div style="height: 300px;background-color: green;"></div>
|
<div style="height: 300px;background-color: black;"></div>
|
</auto-scroll>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import AutoScroll from '@/components/AutoScroll.vue'
|
export default {
|
name:'testPage',
|
inject:['getSubPageSize'],
|
components:{AutoScroll},
|
computed:{
|
pageHeight(){
|
let res = null;
|
try{
|
res = this.getSubPageSize().height + 'px'
|
}catch(e){
|
res = 'auto'
|
}
|
return res;
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.test-page{
|
position: relative;
|
}
|
</style>
|