|
@@ -3,7 +3,9 @@
|
|
|
<div class="content">
|
|
|
<sub-header />
|
|
|
<div class="left">
|
|
|
- <n-tabs type="line" pane-class="tab-content">
|
|
|
+ <!-- {{ exhibitionList }} -->
|
|
|
+
|
|
|
+ <n-tabs type="line" pane-class="tab-content" v-model:value="currentTab">
|
|
|
<template #prefix>
|
|
|
<span class="meta-title">
|
|
|
<img src="@/assets/subtitle_2.png" />
|
|
@@ -11,71 +13,76 @@
|
|
|
</template>
|
|
|
<n-tab-pane name="all" tab="全部展览">
|
|
|
<n-grid :x-gap="XGap" :y-gap="YGap" :cols="1" class="tab-grid">
|
|
|
- <template v-for="(_, index) in 16">
|
|
|
+ <template v-for="item in exhibitionList">
|
|
|
<n-gi>
|
|
|
+ <!-- {{ item }} -->
|
|
|
<exhibition-box
|
|
|
- :id="index + 1"
|
|
|
- title="第一部分——高举新旗帜"
|
|
|
- cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
|
|
|
- content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
|
|
|
- location="2号楼 1号厅"
|
|
|
- type="常设展览"
|
|
|
+ :id="item.id"
|
|
|
+ :title="item.name"
|
|
|
+ :cover="domain + item.thumb"
|
|
|
+ :content="item.richText"
|
|
|
+ :location="item.address"
|
|
|
+ :type="item.type"
|
|
|
isHasVR
|
|
|
/>
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
+ <empty :show="exhibitionList.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="normal" tab="常设展览">
|
|
|
+ <n-tab-pane name="long" tab="常设展览">
|
|
|
<n-grid :x-gap="XGap" :y-gap="YGap" :cols="1" class="tab-grid">
|
|
|
- <template v-for="(_, index) in 16">
|
|
|
+ <template v-for="item in exhibitionList">
|
|
|
<n-gi>
|
|
|
<exhibition-box
|
|
|
- :id="index + 1"
|
|
|
- title="卡片"
|
|
|
- cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
|
|
|
- content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
|
|
|
- location="2号楼 2号厅"
|
|
|
- type="常设展览"
|
|
|
- isHasVR
|
|
|
+ :id="item.id"
|
|
|
+ :title="item.name"
|
|
|
+ :cover="domain + item.thumb"
|
|
|
+ :content="item.richText"
|
|
|
+ :location="item.address"
|
|
|
+ :type="item.type"
|
|
|
+ :isHasVR="item.link.length > 0"
|
|
|
/>
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
+ <empty :show="exhibitionList.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="special" tab="专题展览">
|
|
|
+ <n-tab-pane name="topic" tab="专题展览">
|
|
|
<n-grid :x-gap="XGap" :y-gap="YGap" :cols="1" class="tab-grid">
|
|
|
- <template v-for="(_, index) in 16">
|
|
|
+ <template v-for="item in exhibitionList">
|
|
|
<n-gi>
|
|
|
<exhibition-box
|
|
|
- :id="index + 1"
|
|
|
- title="卡片"
|
|
|
- cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
|
|
|
- content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
|
|
|
- location="2号楼 1号厅"
|
|
|
- type="常设展览"
|
|
|
- isHasVR
|
|
|
+ :id="item.id"
|
|
|
+ :title="item.name"
|
|
|
+ :cover="domain + item.thumb"
|
|
|
+ :content="item.richText"
|
|
|
+ :location="item.address"
|
|
|
+ :type="item.type"
|
|
|
+ :isHasVR="item.link.length > 0"
|
|
|
/>
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
+ <empty :show="exhibitionList.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
<n-tab-pane name="temp" tab="临时展览">
|
|
|
<n-grid :y-gap="YGap" :cols="1" class="tab-grid">
|
|
|
- <template v-for="(_, index) in 16">
|
|
|
+ <template v-for="item in exhibitionList">
|
|
|
<n-gi>
|
|
|
<exhibition-box
|
|
|
- :id="index + 1"
|
|
|
- title="这是一段标题这是一段标题"
|
|
|
- cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
|
|
|
- content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
|
|
|
- location="2号楼 2号厅"
|
|
|
- type="常设展览"
|
|
|
- isHasVR
|
|
|
+ :id="item.id"
|
|
|
+ :title="item.name"
|
|
|
+ :cover="domain + item.thumb"
|
|
|
+ :content="item.richText"
|
|
|
+ :location="item.address"
|
|
|
+ :type="item.type"
|
|
|
+ :isHasVR="item.link.length > 0"
|
|
|
/>
|
|
|
</n-gi>
|
|
|
</template>
|
|
|
</n-grid>
|
|
|
+ <empty :show="exhibitionList.length === 0" :height="500" />
|
|
|
</n-tab-pane>
|
|
|
</n-tabs>
|
|
|
</div>
|
|
@@ -85,18 +92,34 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted } from "vue";
|
|
|
-import { useFullscreen } from "@vueuse/core";
|
|
|
+import { computed, watch } from "vue";
|
|
|
import subHeader from "../components/subHeader";
|
|
|
import sideMenu from "../components/sideMenu";
|
|
|
import exhibitionBox from "../components/exhibitionBox";
|
|
|
-import { useInfoStore } from "../store/info";
|
|
|
+import { useExhibitionStore } from "../store/exhibition";
|
|
|
+import empty from "../components/empty.vue";
|
|
|
+
|
|
|
+const exhibitionStore = useExhibitionStore();
|
|
|
+const domain = ref(import.meta.env.VITE_DOMAIN_URL);
|
|
|
+const exhibitionList = computed(() => exhibitionStore.lists);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const XGap = ref(50);
|
|
|
const YGap = ref(50);
|
|
|
-const { isFullscreen, enter, exit, toggle } = useFullscreen();
|
|
|
|
|
|
-onMounted(() => {});
|
|
|
+const currentTab = ref("all");
|
|
|
+
|
|
|
+watch(
|
|
|
+ currentTab,
|
|
|
+ (val) => {
|
|
|
+ console.log("val", val);
|
|
|
+ exhibitionStore.getExhibitionList(1, val);
|
|
|
+ },
|
|
|
+ {
|
|
|
+ immediate: true,
|
|
|
+ }
|
|
|
+);
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|