1***@qq.com
1***@qq.com
  • 发布:2022-05-15 18:23
  • 更新:2022-05-15 18:23
  • 阅读:364

nvue页面在ios基座调试css不生效

分类:nvue
<template>  
    <div>  
        <tabbar index="0"></tabbar>  
        <div class="header">  
            <div :style="'height:'+50+'px'"></div>  
            <div class="header-top">  
                <div style="color: #fff;">555</div>  
            </div>  
        </div>  
    </div>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                statusBarHeight:0,//状态栏高度  
                keyword: '宝马S1000RR',  
                lineBg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAOCAYAAABdC15GAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFxSURBVHgBzZNRTsJAEIb/WTW+lpiY+FZPIDew3ABP4GJ8hxsI9zBpOYHeQDwBPQI+mRiRvpLojtPdYhCorQqF/6GdbGd2vvwzBXZcNAt4oj1ANeUoAT5iqkUjbEFLHNmhD1YPEvpZ3ghkGlVDCkc94/BmHMq998I5ONiY1ZBfpKAyuOtgAc5yOEDmYEWNh32BHF91sGHZHmwW4azciN9aQwnz3SJEgOmte+R2tdLprTYoa50mvuomlLpD4Y3oQZnov6D2RzCqI93bWOHaEmAGqQUyRBlZR1WfarcD/EJ2z8DtzDGvsMCwpm8XOCfDUsVOCYhiqRxI/CTQo4UOvjzO7Pow18vfywneuUHHUUxLn55lLw5JFpZ8bEUcY8oXdOLWiHLTxvoGpLqoUmy6dBT15o/ox3znpoycAmxUsiJTbs1cmxeVKp+0zmFIS7bGWiVghC7Vwse8jFKAX9eljh4ggKLLv7uaQvG9/F59Oo2SouxPu7OTCxN/s8wAAAAASUVORK5CYII=",  
                navList: [{  
                    name: '推荐',  
                    badge: {  
                        isDot: true  
                    }  
                },  
                {  
                    name: '关注'  
                },{  
                    name: '赛事',  
                }, {  
                    name: '视频'  
                }, {  
                    name: '改装'  
                }, {  
                    name: '装备'  
                }, {  
                    name: '技巧'  
                }, {  
                    name: '摩旅'  
                }],  
                //滑块的高度(单位px)  
                swiperHeight: 0,  
                //左右滑动轮播配置  
                swiperConfig: {  
                    indicatorDots: false,  
                    autoplay: false,  
                    interval: 2000,  
                    duration: 500,  
                    swiperCur: 0  
                },  
                bannerList: [  
                    '/static/images/banner1.png',  
                    '/static/images/banner2.png'  
                ],  
                //推荐话题  
                huatiList:[  
                    {id:1,name:'最美女骑'},  
                    {id:2,name:'今天你骑了吗'},  
                    {id:3,name:'517'},  
                    {id:4,name:'跑山乐趣'},  
                    {id:5,name:'解禁摩'},  
                ]  
            }  
        },  
        onReady() {  
            //打包在手机上才能使用到plus  
            //this.statusBarHeight = plus.navigator.getStatusbarHeight();//状态栏高度  

        },  
        onLoad() {  

        },  
        // 触底触发  
        onReachBottom() {  

        },  
        // 下拉刷新  
        onPullDownRefresh(){  

        },  
        methods:{  
            //手动点击  
            navClick(item) {  
                console.log('item', item);  
                this.swiperConfig.swiperCur = item.index;  
                //动态设置swiper的高度,使用nextTick延时设置  
                this.$nextTick(() => {  
                    this.setSwiperHeight();  
                });  
            },  
            //切换  
            swiperChange(e) {  
                console.log("swiper >>", e)  
                this.swiperConfig.swiperCur = e.target.current;  
                //动态设置swiper的高度,使用nextTick延时设置  
                this.$nextTick(() => {  
                    this.setSwiperHeight();  
                });  
            },  
            //动态设置swiper的高度  
            setSwiperHeight() {  
              let element = "#content-wrap" + this.swiperConfig.swiperCur;  
              let query = uni.createSelectorQuery().in(this);  
              query.select(element).boundingClientRect();  
              query.exec((res) => {  
                //console.log('a'+res);  
                if (res && res[0]) {  
                  this.swiperHeight = res[0].height;  
                }  
              });  
            },  

        }  
    }  
</script>   

<style src="@/pages/home/index/index.css" scoped></style>  
2022-05-15 18:23 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复