matchCj.vue 2.03 KB
<template>
  <el-card class="mt20 mb20" v-for="(n,index) in cjList">
    <div class="leftboderTT">{{ language == 0 ? n.title : n.en_title }}</div>
    <div v-for="(m,jndex) in n.list">
      <h3 class="text-center">{{ m.title }}</h3>
      <div class="tablebody">
        <table class="table table-striped">
          <thead>
          <tr class="bg-lineg">
            <td class="text-center" style="width: 120px;">{{ language == 0 ? '名次' : 'RANK' }}</td>
            <td class="text-center">{{ language == 0 ? '组合' : 'COUPLE' }}</td>
            <td class="text-center w15">{{ language == 0 ? '国家' : 'COUNTRY' }}</td>
            <td class="text-center w15">START #</td>
            <td class="text-center w15" v-if="index>0">BASE</td>
            <td class="text-center w15" v-if="index>0">POINTS</td>
          </tr>
          </thead>
          <tbody>
          <tr v-for="(l,kndex) in m.rows">
            <td class="text-center">{{ l.RANK }}</td>
            <td class="text-center">{{ l.COUPLE }}</td>
            <td class="text-center">{{ l.COUNTRY }}</td>
            <td class="text-primary text-center">{{ l.START }}</td>
            <td class="text-center" v-if="index>0">{{ l.BASE }}</td>
            <td v-if="index>0" class="text-primary text-center">{{ l.POINTS }}</td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
  </el-card>
</template>

<script setup>
import {cjList} from '@/assets/js/data'
import {useStorage} from "@vueuse/core/index";
const language = useStorage('language', 0)
</script>

<style scoped lang="scss">
.leftboderTT {
  margin: 0 0 20px;
  color: var(--el-color-primary);
  font-size: 20px;
}

h3 {
  background: #F5F0FF;
  margin: 0;
  padding: 10px 0;
  color: var(--el-color-primary);
  font-size: 18px;
}

.table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;

  td, th {
    padding: 8px;
    font-size: 14px;
  }
}

:deep(.table-striped > tbody > tr:nth-of-type(odd)) {
  background: #F6F9FE;
}

.w15 {
  width: 15%;
}
</style>