<template>
  <div>
    <van-badge :content="msgDotNumber" max="99" v-if="msgDotNumber">
      <img class="icon" @click="$router.push('/inform')" :style="{'width': width}" src="/img/home/msg.png" alt="极度证券">
    </van-badge>
    <img class="icon" v-else @click="$router.push('/inform')" :style="{'width': width}" src="/img/home/msg.png" alt="极度证券">
  </div>
</template>
<script>
export default {
  props: {
    width: {
      default: '24px'
    }
  }
}
</script>
<style lang="less" scoped>
.icon {
  display: block;
  cursor: pointer;
}
</style>