var tmpl=`
<div v-if="isshow" style="z-index:10000;position:fixed;bottom:0px;width:100%;border-top:1px solid #eee;background:white;height:0.98rem; ">
  <el-button-group style="width:100%">
    <el-row type="flex" justify="space-around">
      <gsb-xbutton  v-for="item in btns" :class="colorState[item.code]"  @click="menuclick(item.code)"  style="border:none;background:transparent;" :text="item.text"><i v-if="item.icon" :class="item.icon"></i><img v-else :src="item.src" style="width:30%"/></gsb-xbutton>
    </el-row>
  </el-button-group>
</div>
`
module.exports=
`{
   template:'${tmpl}',
   props:['type',"ikey","menuitems"],
   data:function(){
     var me=self;
     var tmp={};
     tmp[this.ikey]={activeColor:true};
     return {
       btns:this.menuitems?this.menuitems:[
         {"code":"iwant","text":"我要","icon":"el-icon-star-off"},
         {"code":"my","text":"我的","icon":"el-icon-star-off"},
       ],
      colorState:tmp,
      isshow:true,
     };
   },
   mounted(){
     console.log("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",this.btns,this);
     this.menuitems.forEach((d)=>{
        console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxx");
        console.log(d);
     });
   },
   methods:{
     showmenu(){
       this.isshow=true;
     },
     hidemenu(){
       this.isshow=false;
     },
     menuclick:function(code){
       for(var k in this.colorState){
          this.colorState[k]={activeColor:false};
       }
       this.colorState[code]={activeColor:true};
       this.$emit("menuclick",code);
     },
     trigger:function(code){
       for(var k in this.colorState){
          this.colorState[k]={activeColor:false};
       }
       this.colorState[code]={activeColor:true};
       this.$emit("menuclick",code);
     },
   },
   vname:"gsb-h5menu"
}`
