|
@@ -0,0 +1,194 @@
|
|
|
+<template>
|
|
|
+ <div class="layer" v-if="showPanel">
|
|
|
+ <div class="layer-content animated" :class="animateActive ? 'fadeInUpBig' : 'fadeOutDownBig'">
|
|
|
+ <div class="layer-title"> xxxx</div>
|
|
|
+ <div class="main">
|
|
|
+ <tabs>
|
|
|
+ <tab name="简介">
|
|
|
+ <IntroText />
|
|
|
+ </tab>
|
|
|
+ <tab name="相册">
|
|
|
+ <ImageGrid :data="MockImageList" @click-image="handleViewer" />
|
|
|
+ </tab>
|
|
|
+ <tab name="地图">
|
|
|
+ <div></div>
|
|
|
+ </tab>
|
|
|
+ </tabs>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <ImageViewer
|
|
|
+ :current="currentImage"
|
|
|
+ :data="MockImageList"
|
|
|
+ v-if="showViewer"
|
|
|
+ @close="showViewer = false"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+ import { Tabs, Tab } from 'vue3-tabs-component';
|
|
|
+ import { useAppStore } from '/@/store/modules/app';
|
|
|
+ import { computed, ref, watchEffect } from 'vue';
|
|
|
+ import ImageGrid from './image-grid.vue';
|
|
|
+ import IntroText from './intro-text.vue';
|
|
|
+ import ImageViewer from './image-view.vue';
|
|
|
+
|
|
|
+ import {} from 'vue';
|
|
|
+ import { unref } from 'vue';
|
|
|
+ import { onMounted } from 'vue';
|
|
|
+ const appStore = useAppStore();
|
|
|
+ (window as any).appStore = appStore;
|
|
|
+ const showPanel = computed(() => appStore.isShowIntroPanel);
|
|
|
+ const animateActive = ref(false);
|
|
|
+ const showViewer = ref(false);
|
|
|
+ const currentImage = ref(0);
|
|
|
+ watchEffect(() => {
|
|
|
+ if (unref(showPanel)) {
|
|
|
+ animateActive.value = true;
|
|
|
+ } else {
|
|
|
+ animateActive.value = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ const handleViewer = (index: number) => {
|
|
|
+ showViewer.value = true;
|
|
|
+ currentImage.value = index;
|
|
|
+ };
|
|
|
+ const MockImageList = [
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ appStore.setShowIntroPanel(true);
|
|
|
+ }, 5000);
|
|
|
+ });
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .layer {
|
|
|
+ width: 100%;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 10000;
|
|
|
+ // display: none;
|
|
|
+ .layer-content {
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 14px;
|
|
|
+ height: calc(var(--vh) * 60);
|
|
|
+ bottom: 0;
|
|
|
+ color: white;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ z-index: 0;
|
|
|
+ &::before {
|
|
|
+ content: ' ';
|
|
|
+ background: rgba(0, 0, 0, 0.9);
|
|
|
+ border-radius: 0.14rem 0.14rem 0px 0px;
|
|
|
+ filter: blur(1px);
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .layer-title {
|
|
|
+ min-height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
+ font-size: 18px;
|
|
|
+ // color: white;
|
|
|
+ }
|
|
|
+ .main {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+ .tabs-component {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .tabs-component-tabs {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ .tabs-component-tab {
|
|
|
+ padding: 15px 20px;
|
|
|
+ font-size: 16px;
|
|
|
+ > a {
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
+ }
|
|
|
+ &.is-active {
|
|
|
+ > a {
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ position: relative;
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ width: 50%;
|
|
|
+ height: 2px;
|
|
|
+ background-color: #ed5d18;
|
|
|
+ position: absolute;
|
|
|
+ bottom: -8px;
|
|
|
+ border-radius: 2px;
|
|
|
+ transform: translate(50%, 50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tabs-component-panels {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: flex-start;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ .tabs-component-panel {
|
|
|
+ flex: 1;
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
+ padding-bottom: 80px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|