<template>
  <div id="app">
    <x-cell v-for="(menu, index) in menus" :key="index" >
      <x-cell-item v-for="(item, ix) in menu.items" :key="ix" v-if="item.isShow" :title="item.text" is-link @item-click="handleClick(item)">
        <span  slot='after-title'>测试</span>
        <chaos-icon slot="icon" :icon="item.icon" class='left-icon'></chaos-icon>
      </x-cell-item>
    </x-cell>

    <mu-cell>
      <mu-cell-item  title="我的团队"  show-child icon arrow  btn-text="保存" :is-btn="isBtn" @do-click-btn="doClickBtn">
        <chaos-icon slot='icon' icon='m-sys-tuanduichengyuan' style="color: #4dd0e1;"></chaos-icon>
        <div slot="child" class="fullWidth" id="teamScroller">
          <div id="myTeam"></div>
          <chaos-icon  class="orgEnter zuzhigongcheng-icon-box" icon="m-sys-zuzhigoucheng" style="margin-right:12px"></chaos-icon>
        </div>
      </mu-cell-item>
    </mu-cell>
  </div>
</template>
<script>
  import { XCell, XCellItem } from 'muse-ui/xcell';
  import { Cell, CellItem } from 'muse-ui/cell';
  import {ChaosIcon} from 'muse-ui/chaos-icon';
  export default {
    data(){
      return {
        isBtn: true,
        menus:
        [
          {
            show:true,
            items:[
              {
                text:'添加企业人员',
                name:'setting__addColleague',
                icon:'m-sys-zhanghushezhi',
                moduleName:'BSAddColleague',
                action:'addColleague',
                isShow: true,
              },
              {
                text:'邀请同事加入',
                name:'setting__inviteColleague',
                icon:'m-sys-zhanghushezhi',
                moduleName:'BSAddColleague',
                action:'inviteColleague',
                isShow: true,
              }
            ]
          },
          {
            show:true,
            items:
            [
              {
                text:'上级与团队设置',
                name:'setting__BSTeamSetting',
                icon:'m-sys-zhanghushezhi',
                isShow: true,
                hasTitle:true,
                moduleName:'BSTeamSetting',
                action:'open',
              },
              {
                text:'账号设置',
                name:'setting__account',
                url:'html/setting/setting.html',
                icon:'m-sys-zhanghushezhi',
                isShow: true,
              },
            ]
          },
          {
            show:true,
            items:[{
              text:'新手入门',
              name:'setting__newUserGuide',
              icon:'upaas-icon-wentifankui',
              isShow: true,
              moduleName:'BSMore',
              action:'newUserGuide',
            },{
              text:'关于tita',
              name:'setting__aboutTita',
              icon:'upaas-icon-aboutiTalent',
              isShow: true,
              moduleName:'BSMore',
              action:'aboutTita',
            }]
            },
            {
              show:true,
              items:[{
                text:'推荐给朋友',
                name:'setting__shareToFriends',
                icon:'upaas-icon-wentifankui',
                moduleName:'BSMore',
                action:'shareToFriends',
                isShow: true,
              }]
            }
          ],
      };
    },
    methods:{
      handleClick(i){
        var menu = this.menus[i];
        console.log(menu.value);
        this.bottomNav = menu.value;
      },
      handleChange(){},
      doClickBtn(){
        console.log("doClickBtn");
      }
    },
    components:{
      'x-cell':XCell,
      'x-cell-item':XCellItem,
      'mu-cell':Cell,
      'mu-cell-item':CellItem,
      'chaos-icon':ChaosIcon
    }
  }

</script>
<style lang="less">
  #app .vux-label{
    display:inline-block;
  }
</style>
