<template>
	<!-- 图标icon组件 -->
	<text class='iconfont pv-icon' :class="name" @click="iconClick"
		:style="[{color: color, fontSize: fontSize}, customStyle]"></text>
</template>

<script>
	export default {
		name: "pv-icon",
		props: {
			name: String,
			customStyle: Object, // 自定义样式
			color: {
				type: String,
				default: '#152129'
			},
			fontSize: {
				type: String,
				default: '24rpx'
			}
		},
		data() {
			return {

			}
		},
		methods: {
			iconClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pv-icon {
		line-height: inherit;
		position: relative;
		top: 0rpx;
		left: 0;
	}
</style>
