<template>
  <view class="notice" :style="{height,display,position,background}"></view>
</template>

<script>
export default {
  props: {
    display: String,
    heightBar: Number,
    position: String,
    background: {
      type: String
    }
  },
  model: {
    prop: "heightBar",
    event: "input"
  },
  computed: {
    heightNumber() {
      return this.heightBar || uni.getSystemInfoSync().statusBarHeight
    },
    height() {
      return this.heightNumber + "px"
    }
  },
  data() {
    return {}
  },
  watch: {
    heightBar(val) {
      this.height = val
    },
    heightNumber(val) {
      this.$emit('input', val)
    }
  }
}
</script>

<style>
.notice {
  z-index: 999;
  width: 100%;
}
</style>
