<template>
  <section class="AiIcon">
    <view v-if="!singleColor" class="ai-icon" :class="icon" :style="{width:size+'px',height:size+'px'}"/>
    <view v-else class="iconfont" :style="{ fontSize: size + 'rpx', color: color }">{{ icon }}</view>
  </section>
</template>

<script>
export default {
  name: "AiIcon",
  props: {
    icon: String,
    singleColor: {
      type: Boolean,
      default: false
    },
    color: {
      type: String
    },
    size: {type: String, default: "32"}
  }
}
</script>

<style lang="scss" scoped>
@import "./ai-icon.css";
</style>
