<template>
    <div v-if="!customize">
       <a-icon :type="type"   :class="color" />
    </div>
    <div v-else> 
      <app-icon :type="type"  :class="color" :style='{fontSize:size}'></app-icon>
    </div>
</template>

<script lang="ts">
import Vue,{Component} from 'vue';
import { Icon } from 'ant-design-vue';

Vue.use(Icon)
const AppIcon = Icon.createFromIconfontCN({
  scriptUrl:'/iconfont.js'  // generated by iconfont.cn
});
export default Vue.extend({
  props: {
    type: String,
    customize:{
        type:Boolean,
        default:false
    },
    size:{
      type:String,
      default:'16px'
    },
    color:{
      type:String,
      default:' text-white'
    }
  },
  components:{
    'app-icon':AppIcon as Component
  }
});
</script>

