Commit 0a1f15e3 authored by chenqikuai's avatar chenqikuai

feat: 根据得到的刘海高度,设置navbar

parent 819982f6
......@@ -25,6 +25,7 @@ import router from "./router";
import { useRoute } from "vue-router";
import Bridge from '@/utils/jsBridge2'
import { chatAuthCheck } from "./utils/authCheck";
import { notchHeight } from "./store/AppStore";
export default defineComponent({
......@@ -32,7 +33,8 @@ export default defineComponent({
onBeforeMount(() => {
new Bridge().getNotchHeight(null, (height: any) => {
console.log(height, ' show notch height')
height = Number(height)
notchHeight.value = height;
})
})
......
......@@ -47,6 +47,7 @@
</div>
</template>
<script lang="ts">
import { notchHeight } from "@/store/AppStore";
import { defineComponent } from "vue";
import Icon from "../common/Icon.vue";
export default defineComponent({
......@@ -93,7 +94,7 @@ export default defineComponent({
return true
},
heightOfNotch() { // 刘海屏的刘海高度 单位px
return 0;
return notchHeight.value;
}
}
});
......
import { ref } from '@vue/runtime-dom'
export const notchHeight = ref(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment