# ui-bar-height 导航栏高度组

版本:v2.3.11

导航栏高度组件用于获取和设置导航栏的高度,适用于各种平台。

# 基本使用

<template>
  <div class="bar-height-demo">
    <ui-bar-height ref="barHeightRef" />
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
const barHeightRef = ref(null);

onMounted(() => {
  console.log('导航栏高', barHeightRef.value.height);
});
</script>

# Props

参数 类型 默认值 说明
fixed Boolean true 是否固定导航

# Methods

方法名 说明 参数 返回值
getHeight 获取导航栏高 - Number 导航栏高

在线演示

扫码或点击链接在手机上查看完整演示

https://shadow-ui3-demo.nooko.cn/#/pages/base/bar-height/bar-height