<template>
  <div class="admin-conatiner">
    <Header title="管理员信息"/>
    <ul>
      <li v-for="(item,index) in list" :key="index" @click="goDetail(item)">
        <span>{{item.name}}</span>
        <img v-if="item.name==='丁大大'" src="/images/applets/edit.png" alt />
        <img v-if="item.name!=='丁大大'" src="/images/applets/detail.png" alt />
      </li>
    </ul>
    <my-tabbar active="2"></my-tabbar>
  </div>
</template>

<script>
import Header from '@/components/Header/index.vue'
export default {
  components:{Header},
  data() {
    return {
        list:[
            {name:"丁大大"},
            {name:"丁尔尔1"},
            {name:"丁二二2"},
            {name:"丁三三3"},
        ]
    };
  },
  mounted(){

  },
  methods:{
      goDetail(item){
          if(item.name==='丁大大'){
              // 修改页面
              this.$router.push({path:'/adminInfo',query:{id:item.name,disabled:false}})
          }else{
              // 详情页面
              this.$router.push({path:'/adminInfo',query:{id:item.name,disabled:true}})
          }
      }
  }
};
</script>

<style lang="scss" scoped>
.admin-conatiner {
  width: 100%;
  height: 100vh;
  padding: 16px;
  box-sizing: border-box;
  ul {
    list-style: none;
    margin-top: 44px;
  }
  li {
    display: flex;
    justify-content: space-between;
    background: #f8f8f8;
    border-radius: 33px;
    font-size: 16px;
    padding: 12px;
    color: #333333;
    margin-top: 20px;
    img {
        width: 24px;
        height: 24px;
    }
  }
}
</style>