<template>
<view class="order">
<view class="order-top" :style="{height:searchBarHeight+'rpx',marginTop:searchBarTop+'rpx'}">
这是点单页面
</view>
</view>
</template>
<script setup lang="ts">
import { ref,onBeforeMount } from 'vue'
const searchBarHeight = ref(0)
const searchBarTop = ref(0)
onBeforeMount(()=>{
const menuBtnInfo = uni.getMenuButtonBoundingClientRect()
console.log("menuBtnInfo",menuBtnInfo);
searchBarHeight.value = menuBtnInfo.height * 2
searchBarTop.value = menuBtnInfo.top * 2
})
</script>
<style lang="scss" scoped>
.order-top{
display: flex;
align-items: center;
}
</style>