<template>
  <div class="Visit3">
    <div class="conten">
      <div class="box5">
        <ul>
          <li class="titleon" v-for="(item,index) in topData" :key="index" :class="{titleoff:index===topInd}" @mouseenter='topInd=index'>
            {{item}}&nbsp;&nbsp;&nbsp;
          </li>
        </ul>
      </div>
      <div class="box1">
        <div v-for="i in 7" :key="i">
          <img :src="require(`@/assets/images/Floor/${i}.jpg`)" alt="" v-show="i===topInd+1"/>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Visit3",
  components: {},
  data() {
    //这里存放数据
    return {
      topData:['B1','F1','F2','F3','F4','F5','F6'],
      topInd:0
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang='less' scoped>
.conten {
  width: 100%;
  background-color: black;
  height: 570px;
  .box5 {
    cursor: pointer;
    width: 1200px;
    padding: 15px 0 25px 0;
    height: 62px;
    margin: auto;
    li {
      color: #fff;
      float: left;
      width: 185px;
      text-align: right;
      font-size: 20px;
      font-weight: bold;
      &:nth-of-type(1){
        width: 62px;
      }
    }
    .titleon {
      background: url('../../assets/images/Floor/m-22.jpg')
        no-repeat right;
      line-height: 62px;
    }
    .titleoff{
      background: url('../../assets/images/Floor/m-23.jpg')
        no-repeat right;
    }
  }
  .box1{
    margin: 50px auto 0px;
    width: 1200px;
    font-size: 18px;
    line-height: 26px;
  }
}
</style>