ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
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
<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>