<template>
  <div>
    <div>
      <img src="../assets/images/instruction.png" alt="" class="intruduction">
    </div>
    <div class="leader-containner1">
      <div class="leader-show">
        <img src="../assets/images/leader-show.png" alt="" style="margin-top: -6px;">
        <div class="all-leader">
          <!-- 添加四个选择按钮 -->
          <button v-for="(item, index) in buttonList" :key="index" :class="{ active: activeButton === index }"
            @click="changeData(index)">
            {{ item }}
          </button>
          <div class="leader-data">
            <!-- 显示不同的数据信息 -->
            <div v-if="activeButton === 0">
              <!-- 全部种类的数据信息 -->
              全部种类的数据信息
            </div>
            <div v-if="activeButton === 1">
              <!-- 新闻媒体的数据信息 -->
				新闻媒体的数据信息
              <el-avatar shape="square" :size="50" :src="squareUrl" />
            </div>
            <div v-if="activeButton === 2">
              <!-- 自媒体的数据信息 -->
              自媒体的数据信息
            </div>
            <div v-if="activeButton === 3">
              <!-- 政府官号的数据信息 -->
              中国海警
            </div>
          </div>
        </div>
      </div>

      <!-- 时间节点图 -->
      <div class="leader-radio">
        <!-- 标题 -->
        <div>
          <img src="../assets/images/peiluoxi.png" alt="" style="margin-left: 125px;">
        </div>
        <div>

        </div>
        <div class="leader-time">

        </div>
      </div>
<!-- 领袖分析 -->
      <div class="leader-ansys">
        <div><img src="../assets/images/leader-ansys.png" alt="" style="margin-top: -6px;"></div>
      </div>
    </div>
    <div class="leader-containner2">
      <div class="event-hot">
        <img src="../assets/images/evenhot.png" alt="" style="margin-top: -6px;">
      </div>
      <div class="leader-post">

      </div>

      <div class="words">
        <img src="../assets/images/words.png" alt="" style="width: 100%;height: 308px;margin-top: -6px;">
        </div>

    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';

// 定义按钮列表
const buttonList = ['全部', '新闻媒体', '自媒体', '政府官号'];
// 定义当前激活的按钮索引
const activeButton = ref(0);

// 切换数据信息的方法
const changeData = (index) => {
  activeButton.value = index;
};


</script>

<style scoped>
.intruduction {
  width: 100%;
  margin-top: 0px;
  border-radius: 2px;
}

.leader-containner1 {
  display: flex;
  flex-direction: row;
}
.leader-containner2{
  display: flex;
  flex-direction: row;
}
.leader-show {
  width: 352px;
  height: 540px;
  background-color: #04142166;
  border-style: solid;
  border-width: 0px;
  border-image: linear-gradient(to bottom, #3AA1F8, #3AA1F833) 1;
  border-radius: 2px;
  /* 添加内阴影 */
  box-shadow: 0px 0px 18px 0px #0A2E55 inset;
  /* 添加背景模糊 */
  backdrop-filter: blur(4px);
  /* 为了兼容 Safari 浏览器 */
  -webkit-backdrop-filter: blur(4px);
}

.all-leader {
  width: 305px;
  height: 450px;
  margin-left: 24px;
  font-size: 0;
  /* 解决 inline-block 元素间的间隙问题 */
}

.all-leader button {
  height: 24px;
  margin-left: 0px;
  font-family: OPPOSans;
  font-weight: 300;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0%;
  text-align: center;
  cursor: pointer;
  background-color: #04142166;
  color: #E1F4FF;
  border: 1px solid #1C588F;
  border-radius: 0;
  /* 确保默认没有圆角 */
  display: inline-block;
  /* 让按钮横向排列 */
  vertical-align: middle;
  /* 垂直居中对齐 */
}

/* 第一个按钮添加左圆角 */
.all-leader button:first-child {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

/* 最后一个按钮添加右圆角 */
.all-leader button:nth-child(4) {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* 激活按钮样式 */
.all-leader button.active {
  background-color: #236291;
}


.leader-radio {
  width: 800px;
  height: 540px;
  margin-left: 10px;
  background-color: #04142166;
  border-style: solid;
  border-width: 0px;
  border-image: linear-gradient(to bottom, #3AA1F8, #3AA1F833) 1;
  border-radius: 2px;
  /* 添加内阴影 */
  box-shadow: 0px 0px 18px 0px #0A2E55 inset;
  /* 添加背景模糊 */
  backdrop-filter: blur(4px);
  /* 为了兼容 Safari 浏览器 */
  -webkit-backdrop-filter: blur(4px);

}


.leader-ansys {
  width: 372px;
  height: 542px;
  margin-left: 10px;
  border-radius: 2px;
  background-color: #04142166;
  border-style: solid;
  border-width: 0px;
  border-image: linear-gradient(to bottom, #3AA1F8, #3AA1F833) 1;
  border-radius: 2px;
  /* 添加内阴影 */
  box-shadow: 0px 0px 18px 0px #0A2E55 inset;
  /* 添加背景模糊 */
  backdrop-filter: blur(4px);
  /* 为了兼容 Safari 浏览器 */
  -webkit-backdrop-filter: blur(4px);
}
.event-hot{
width: 352px;
height:296px;
margin-top: 10px;
border-radius: 2px;
background-color: #04142166;
  border-style: solid;
  border-width: 0px;
  border-image: linear-gradient(to bottom, #3AA1F8, #3AA1F833) 1;
  border-radius: 2px;
  /* 添加内阴影 */
  box-shadow: 0px 0px 18px 0px #0A2E55 inset;
  /* 添加背景模糊 */
  backdrop-filter: blur(4px);
  /* 为了兼容 Safari 浏览器 */
  -webkit-backdrop-filter: blur(4px);
}
.leader-post{
  width: 800px;
height: 296px;
margin-top: 10px;
margin-left: 10px;
border-radius: 2px;
background-color: #04142166;
  border-style: solid;
  border-width: 0px;
  border-image: linear-gradient(to bottom, #3AA1F8, #3AA1F833) 1;
  border-radius: 2px;
  /* 添加内阴影 */
  box-shadow: 0px 0px 18px 0px #0A2E55 inset;
  /* 添加背景模糊 */
  backdrop-filter: blur(4px);
  /* 为了兼容 Safari 浏览器 */
  -webkit-backdrop-filter: blur(4px);
}
.words{
  width: 372px;
  height: 296px;
  margin-top: 10px;
  margin-left: 10px;
}
</style>
