compute.vue 5.28 KB
<template>
  <div class="slac-box" id="slacBox">
    <div class="top-nav">
      <div v-for="(item, index) in navList" :key="index" class="nav-item">
        <h2
          :class="[selNavIndex === index ? 'item-context-sel' : 'item-context']"
          @click="selNavIndex = index"
        >
          {{ item }}
        </h2>
      </div>
    </div>
    <EnergyDensityCalculator v-if="selNavIndex == 0"></EnergyDensityCalculator>
    <TheoreticalDataCalculator
      v-if="selNavIndex == 1"
    ></TheoreticalDataCalculator>
  </div>
  <SideBar></SideBar>
</template>

<script setup>
import EnergyDensityCalculator from "~/components/EnergyDensityCalculator.vue";
import TheoreticalDataCalculator from "~/components/TheoreticalDataCalculator.vue";
const navList = ["Energy Density Calculator", "Theoretical Data Calculator"];
const selNavIndex = ref(0);

useHead({
  title: `${navList[selNavIndex.value]} - Canrd`,
  meta: [
    {
      hid: "description",
      name: "description",
      content: `Guangdong Canrd New Energy Technology Co., Ltd., which is the abbreviation of "helping you succeed in your scientific research", is the world's most comprehensive material supply platform in the field of energy storage research; it specifically provides button batteries, lithium-ion batteries, supercapacitors, lithium-sulfur batteries, fuel cells, lithium-air batteries and sodium-ion batteries. Research materials and related equipment, technical services, battery material performance evaluation, etc.; provide you and your team with professional, comprehensive, one-stop energy storage research services.`,
    },
    {
      hid: "keywords",
      name: "keywords",
      content: `Canrd, Canrd official website, Canrd mall, Canrd lithium sheet, Canrd electrolyte, Canrd battery shell`,
    },
    {
      hid: "og:title",
      property: "og:title",
      content: `${navList[selNavIndex.value]} - Canrd`,
    },
    {
      hid: "og:description",
      property: "og:description",
      content: `Guangdong Canrd New Energy Technology Co., Ltd., which is the abbreviation of "helping you succeed in your scientific research", is the world's most comprehensive material supply platform in the field of energy storage research; it specifically provides button batteries, lithium-ion batteries, supercapacitors, lithium-sulfur batteries, fuel cells, lithium-air batteries and sodium-ion batteries. Research materials and related equipment, technical services, battery material performance evaluation, etc.; provide you and your team with professional, comprehensive, one-stop energy storage research services.`,
    },
  ],
});

watch(
  () => selNavIndex.value,
  (newValue) => {
    useHead({
      title: `${navList[selNavIndex.value]} - Canrd`,
      meta: [
        {
          hid: "description",
          name: "description",
          content: `Guangdong Canrd New Energy Technology Co., Ltd., which is the abbreviation of "helping you succeed in your scientific research", is the world's most comprehensive material supply platform in the field of energy storage research; it specifically provides button batteries, lithium-ion batteries, supercapacitors, lithium-sulfur batteries, fuel cells, lithium-air batteries and sodium-ion batteries. Research materials and related equipment, technical services, battery material performance evaluation, etc.; provide you and your team with professional, comprehensive, one-stop energy storage research services.`,
        },
        {
          hid: "keywords",
          name: "keywords",
          content: `Canrd, Canrd official website, Canrd mall, Canrd lithium sheet, Canrd electrolyte, Canrd battery shell`,
        },
        {
          hid: "og:title",
          property: "og:title",
          content: `${navList[selNavIndex.value]} - Canrd`,
        },
        {
          hid: "og:description",
          property: "og:description",
          content: `Guangdong Canrd New Energy Technology Co., Ltd., which is the abbreviation of "helping you succeed in your scientific research", is the world's most comprehensive material supply platform in the field of energy storage research; it specifically provides button batteries, lithium-ion batteries, supercapacitors, lithium-sulfur batteries, fuel cells, lithium-air batteries and sodium-ion batteries. Research materials and related equipment, technical services, battery material performance evaluation, etc.; provide you and your team with professional, comprehensive, one-stop energy storage research services.`,
        },
      ],
    });
  }
);
</script>

<style scoped>
.top-nav {
  height: 72px;
  background-color: #ffffff;
  margin-top: 10px;
  border-radius: 5px;
  display: flex;
  align-items: flex-end;
}

.nav-item {
  display: flex;
  justify-content: center;
  height: 35px;
  padding: 0px 45px;
  font-size: 17px;
  color: #222222;
  font-weight: 600;
  /* border: 2px solid transparent #4f9fdd; */
}

.nav-item:last-child {
  padding: 0px 0px;
}

.item-context {
  border-bottom: 2px solid transparent;
  color: #646464;
}

.item-context-sel {
  border-bottom: 3px solid #4f9fdd;
}

.item-context:hover {
  cursor: pointer;
}

.item-context-sel:hover {
  cursor: pointer;
}

@media screen and (min-width: 0px) {
  .slac-box {
    margin-bottom: 10px;
    /* min-width: 1258.67px; */
    margin: 0 auto;
    min-width: 1200px;
    max-width: 1200px;
  }
}
</style>