<template>
<view>
<commonheader ref="commonheader" class="common" commonTitle="智能作文"></commonheader>
</view>
</template>
<script>
import commonheader from "@/components/common-header/common-header.vue"
export default {
data() {
return {
commonHeaderHeight:200
}
},
components: {
commonheader
},
onLoad:function(){
this.$nextTick(function(){
//获取其他组件也是这个道理
let query = uni.createSelectorQuery().select('.common');
query.boundingClientRect(function(data) {
this.commonHeaderHeight = data.height*2
}).exec()
})
}
}
</script>
网友评论