<template>
  <img :style="data.style" :src="data.src" @click="toLink"/>
</template>
<script>
export default {
  name: 'SdLubanImage',
  props: {
    data: {
      type: Object,
      default: () => {}
    }
  },
  methods: {
    toLink() {
      if (!this.data.href) return
      window.location.href = this.data.href
    }
  }
}
</script>
<style scoped>
img {
  display: block;
}
</style>
