<template>
<view class="home" :style="{height: height + 'px'}">
<image src="" :style="{height: height + 'px', width: width + 'px'}" ></image>
</view>
</template>
<script>
export default {
data() {
return {
width: '',
height: ''
}
},
methods: {
onLoad () {
uni.getSystemInfo({
success: res => {
this.width = res.windowWidth // 获取屏幕宽度
this.height = res.windowHeight // 获取屏幕高度
}
})
}
}
}
</script>
<style scoped lang="scss">
.home {
min-height: 100%;
}
</style>
03-29
05-14