<template>
  <div class="main">
    <div class="content">
      <sub-header />
      <div class="left">
        <n-tabs type="line" pane-class="tab-content">
          <template #prefix>
            <span class="meta-title">
              <img src="/img/subtitle_1.png" />
            </span>
          </template>
          <n-tab-pane name="展览" tab="展览">
            <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
              <template v-for="(_, index) in 16">
                <n-gi>
                  <infoBox
                    :id="index + 1"
                    :title="`湘鄂赣省工农银行洋银叁角纸币-${index + 1}`"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="活动" tab="活动">
            <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
              <template v-for="(_, index) in 16">
                <n-gi>
                  <infoBox
                    :id="index + 1"
                    title="卡片"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="新闻" tab="新闻">
            <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
              <template v-for="item in 16">
                <n-gi>
                  <infoBox
                    title="卡片"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="通知" tab="通知">
            <n-grid :y-gap="YGap" :cols="1" class="tab-grid">
              <template v-for="(_, index) in 16">
                <n-gi>
                  <notice-box
                    :id="`${index + 2}_notice`"
                    title="这是一段标题这是一段标题"
                    content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
        </n-tabs>
      </div>
      <side-menu />
    </div>
  </div>
</template>

<script setup>
import { onMounted } from "vue";
import { useFullscreen } from "@vueuse/core";
import infoBox from "../components/infoBox";
import subHeader from "../components/subHeader";
import sideMenu from "../components/sideMenu";
import noticeBox from "../components/noticeBox";
import { useInfoStore } from "../store/info";

const XGap = ref(50);
const YGap = ref(50);
const { isFullscreen, enter, exit, toggle } = useFullscreen();
const InfoStore = useInfoStore();

onMounted(() => {
  InfoStore.getData();
});
</script>

<style lang="scss" scoped></style>
