<template>
     <nav class="channel_nav_box">
        <a class="channel_nav_head" :href="`/${pinyin}/index.html`" title="title">{{ name }}</a>
        <div class="channel_nav_a_box clearfix">
            <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-for="item in nav">{{ item.alias }}</NuxtLink>
        </div>
    </nav>
</template>

<script setup>
//1.设置组件数据 start---------------------------------------->
//子导航
const props = defineProps({
    name:String,
    nav:Array,
    pinyin:String
});

//获取当前url路径
const route = useRoute();
//获得当前的完整路径
const fullPath = route.path;
const segments = fullPath.split('/'); 
const targetRoute = segments[1]; 
//1.设置组件数据 end---------------------------------------->

</script>

<style lang="less" scoped>
.channel_nav_box {
    display:flex; 
    width: 1200px;
    margin: 0 auto;
    background: url(http://img.bjzxtw.org.cn/master/www/snscw/5.png) no-repeat bottom;
    background-size:100% auto;   
    margin-top: 40px;
    .channel_nav_head {
        width: 122px;
        text-align: center;
        height: 60px;
        line-height: 60px; 
        color: #fff;
        margin: 0px 70px 0px 31px;
        box-sizing:border-box;
        margin-top:auto;
        font-size:20px;
        font-weight:bold;
    }
    .channel_nav_a_box{
        flex:1;
        padding:12px 0px;
    }
      
    .channel_nav_a {
        float: left;
        height: 26px;
        line-height: 26px;
        color: #255590;
        font-size: 20px;
        margin: 5px 19px;
        font-weight: bold;
    }
}
</style>