 <template>
  <div class="item-notice-wrapper" :style="{'margin-top': marginTop}">
    <div class="content" @click="clickNoticeItem">
      <img :style="{'margin-top': imgMarginTop}" src="../../images/notice.png">
      <span class="gg">公告</span>
      <span :style="{'margin-top': imgMarginTop}" class="vtc-line"></span>
      <span class="content">{{content}}</span>
      <img :style="{'margin-top': imgMarginTop}" src="../../images/notice-arr-right.png">
    </div>
  </div>
</template>

<script>
export default {
  props: {
    content: {
      type: String,
      default: ''
    },
    clientType: {
      type: String | Number,
      default: 0
    }
  },
  methods: {
    clickNoticeItem() {
      this.$emit('clickNoticeItem')
    }
  },
  data() {
    return {
      marginTop: '0px',
      imgMarginTop: '0px'
    }
  },
  watch: {
    clientType(newVal) {
      if(newVal == 1) {

      } else if(newVal == 2){
        this.marginTop = '10px';
        this.imgMarginTop = '-3px'
      } else if(newVal == 3){
        this.marginTop = '-2px';
      }
    }
  },
};
</script>

<style lang="less" scoped>
.item-notice-wrapper {
  .content {
    display: flex;
    flex-direction: row;
    height: 32px;
    line-height: 32px;
    padding: 0 15px;
    text-align: left;
    align-items: center;
    background: #FEFAF5;
    img {
      width: 12px;
      height: 12px;
      line-height: 32px;
    }
    span {
      font-size: 13px;
      text-align: left;
      &.gg {
        // width: 30px;
        padding: 1px 5px 0;
        font-size: 13px;
        font-weight: 700;
        color: #835800;
      }
      &.vtc-line {
        margin-top: 0px;
        width: 1px;
        height: 15px;
        background: #835800;
      }
      &.content {
        display: block;
        flex: 1;
        padding-top: 1px;
        // padding-left: 5px !important;
        padding: 0 10px 0 5px;
        height: 32px;
        line-height: 32px;
        text-align: left;
        font-size: 13px;
        font-weight: 700;
        color: #E6A23C;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

  }
}
</style>

