picNav.vue 686 Bytes
<template>
    <div class="component-picNav-tablecell" @click="gotopage(item.prefix,item.url)">
        <img :src="imgsrc" width="100%">
        <p>{{item.title}}</p>
    </div>
</template>

<script type="text/ecmascript-6">
    import {formatImg, goto}  from '../../utils/commonUtil';
    export default {
        props: {
            item: ''
        },
        data() {
            return {};
        },
        methods: {
            gotopage(type, url){
                goto.gotopage(this, type, url);
            }
        },
        computed: {
            imgsrc(){
                return formatImg.formatSRC(this.item.image, 200, 200);
            }
        }
    };
</script>