隐藏原生导航栏,控制自定义导航栏高度自适应

index.vue

<template>
    <view>
        <view :style="'padding-top:'+ aaa +'px;height:'+bbb+'px;'">
    </view>      
</template>

index.js

export default {
    data() {  
        return {
           aaa:'',
          bbb:'',
        }
    },
    onLoad() {
        const menu = uni.getMenuButtonBoundingClientRect()
    this.aaa=menu.top;
    this.bbb=menu.height;
    }
}