var tmpl=`
<div class="navitems">
    <el-menu
    :default-active="navKey"
    class="el-menu-demo"
    mode="horizontal"
    @select="navRoute"
    background-color="#1e1e28"
    text-color="#b5b5b5"
    active-text-color="#ffd04b">
    <template v-for="(item,key) in navarr">
        <el-menu-item v-if="!item.obj" :index="item.name">{{item.name}}</el-menu-item>
        <el-submenu v-if="item.obj" :index="item.name">
            <template slot="title">{{item.name}}</template>
            <el-menu-item v-for="(list,index) in item.obj" :index="list">{{list}}</el-menu-item>
        </el-submenu>
    </template>
    </el-menu>
</div>

`
module.exports=
`{
   template:'${tmpl}',
   model:{

   },
   props:[],
   data:function(){
     return {
         navKey:null,
         navarr:[
             {
                 name:'专利检索',
                 obj:['智能检索','高级检索']
             },{
                 name:'区域专利监控'
             },{
                 name:'企业决策'
             }
         ]
     };
   },
   mounted:function(){

   },
   watch:{

   },
   created:function(){

   },
   methods:{
       navRoute(key, keyPath) {
           this.$emit("navroute",key);
           console.log(key, keyPath);
       }
   },
   vname:"gsb-nav"
}`