uni-app分类列表的高度实现
分类列表的高度实现
<template>
<view class="sort" :style="'height: '+heightSort+'px;'">
<view class="left" :style="'height: '+heightSort+'px;'">
11111111111
</view>
<view class="content" :style="'height: '+heightSort+'px;'">
222222222222
</view>
</view>
</template>
<script>
export default{
data(){
return{
heightSort:0
}
},
onLoad() {
uni.getSystemInfo({
success: (res) => {
this.heightSort = res.windowHeight
}
})
}
}
</script>
<style lang="scss">
.sort{
display: flex;
height: 200rpx;
background: #ddd;
.left{width: 25%;height: 150rpx;background: #f8f8f8;}
.content{width: 75%;height: 180rpx;}
}
</style>效果:
本文作者: Jasmine
本文链接: https://www.jianbaizhan.com/article/657
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!