Logo white

other / mew-iview

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • mew-iview
  • src
  • components
  • icon
  • icon.vue
  • Modify the directory structure ...
    4b05d84e
    Modify the directory structure
    梁灏 authored
    2016-10-28 10:09:07 +0800  
    Browse Code »
icon.vue 622 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<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>