app-rawitem-image.vue 988 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<template>
    <div class='app-rawitem-image'>
        <img :style="cssStyle" v-if="imgUrl" :src="imgUrl" />
        <i :style="cssStyle" v-else :class="imageClass ? imageClass : ''"></i>
    </div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
@Component({})
export default class AppRawItemImage extends Vue {
    
    /**
     * 样式
     *
     * @type {string}
     * @memberof AppRawItemImage
     */
    @Prop() public cssStyle: any;

20 21 22 23 24 25 26 27
    /**
     * 样式表
     *
     * @type {string}
     * @memberof AppRawItemImage
     */
     @Prop() public cssClass: any;

28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    /**
     * 图片地址
     *
     * @type {string}
     * @memberof AppRawItemImage
     */
    @Prop() public imgUrl?:string;

    /**
     * 图标
     *
     * @type {string}
     * @memberof AppRawItemImage
     */
    @Prop() public imageClass?:string;
    
}
</script>
<style lang = "less">
@import './app-rawitem-image.less';
</style>