<template>
        <a-icon v-if="!customize" :type="type"  :style='{fontSize:size,lineHeight:size,color:color}' />
        <app-icon v-else  :type="type"  class="color" :style='{fontSize:size,lineHeight:size,color:color}'></app-icon>
</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:'14px'
    },
    color:{
      type:String,
      default:'#ffffff'
    }
  },
  components:{
    'app-icon':AppIcon as Component
  }
});
</script>

