iview/components/icon/icon.vue
梁灏 7fa943eb39 init
init
2016-09-09 14:29:19 +08:00

27 lines
No EOL
622 B
Vue

<template>
<i :class="classes" :style="styles"></i>
</template>
<script>
const prefixCls = 'ivu-icon';
export default {
props: {
type: String,
size: [Number, String]
},
computed: {
classes () {
return `${prefixCls} ${prefixCls}-${this.type}`
},
styles () {
if (!!this.size) {
return {
'font-size': `${this.size}px`
}
} else {
return {}
}
}
}
}
</script>