<template>
  <div class="object-cover" @click="clickSelf">
    <svg aria-hidden="true" :height="size" :width="size" :fill="color">
      <use :xlink:href="'#' + name"></use>
    </svg>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  emits: ["click"],
  props: {
    size: {
      type: String,
      default: "14px",
    },
    color: {
      type: String,
      default: "#ffffff",
    },
    name: {
      type: String,
      default: "icon-anquanzhongxin89",
    },
  },
  methods: {
    clickSelf() {
      this.$emit("click");
    },
  },
});
</script>
