<template>
    <van-row type="flex" justify="center" class="home-category-list" style="padding:0.2rem 0;">
        <van-col v-for="(item,index) in navs" :key="index" span="6">

          <a :href="item.link">
            <img style="width:70%; display: block; margin:0 auto;" :src="item.img_url" />
            <div style="text-align: center; font-size:0.28rem; line-height: 2; color:#333;">{{item.alt}}</div>
          </a>

        </van-col>


    </van-row>
</template>

<script>
    export default {
        name: "nav_menu",
        props:{
            data:{
                type:Array,
                default:() => {return null;}
            }
        },
        data(){
            return {
                navs:this.data
            }
        },
        created(){

        },
        methods:{
          go(link){
            alert(link)
            //window.location.href = link
          }
        }
    }
</script>

<style scoped>
    .home-swpier .van-swipe-item{height: 2rem; background-color: #ffcd90;}
</style>
