<template>
    <!-- 全局iconfont图标 -->
    <text class="iconfont" :class="`icon-${icon}`" :style="getIconStyle"></text>
</template>
<script setup>
import { computed } from 'vue'
const ps = defineProps({
    icon: {
        type: String,
        default: ''
    },
    color: {
        type: String,
        default: '#4E5969'
    },
    size: {
        type: [Number, String],
        default: 32
    }
})
const getIconStyle = computed(() => {
    return {
        color: ps.color,
        fontSize: ps.size + 'rpx'
    }
})
</script>
<style lang="scss" scoped>
.iconfont {
    position: relative;
    bottom: -1.5rpx;
}
</style>
