vue 刘海屏兼容组件


/* 无返回按钮的标头 */
<template>
  <div v-if="GLOBAL.evnType === GLOBAL.ENV_TYPES.APP_IOS || GLOBAL.evnType === GLOBAL.ENV_TYPES.APP_ANDROID" class='stateBox' :class="{'ios-head':(GLOBAL.evnType === GLOBAL.ENV_TYPES.APP_IOS)}"></div>
</template>
<script>
// 用于兼容 某些安卓机的 顶部安全区写法不支持 
export default {
  name: 'stateBox'
}
</script>
<style lang="stylus" scoped>
    .stateBox
      width 100%
      height 0.2rem
    .ios-head
      height constant(safe-area-inset-top)
      height env(safe-area-inset-top)
</style>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM