<template>
  <img @click="search" :style="{'width': width}" class="icon" src="/img/icon/search.png" alt="极度证券">
</template>
<script>
export default {
  props: {
    width: {
      default: '24px'
    },
    clickSign: {
      default: ''
    }
  },
  methods: {
    search() {
      if (this.clickSign) {
        this.$emit(this.clickSign)
        return
      }
      this.$router.push('/search')
    }
  }
}
</script>
<style lang="less" scoped>
.icon {
  display: block;
  cursor: pointer;
}
</style>