heritage-hub/src/views/commonpage.vue

90 lines
2.4 KiB
Vue
Raw Normal View History

2024-01-31 09:04:35 +00:00
<template>
2024-01-31 10:48:53 +00:00
<div style="min-height:100vh"
class="100vw">
<div style="height:80px;background:#000;"
class="color-white row items-center">
2024-01-31 11:07:21 +00:00
<div class="col-4 row items-center justify-center"><img src="../assets/images/icon-title.png"
2024-01-31 10:57:01 +00:00
style="width:40px;height:40px" /><span class="fl-ml-sm">延庆博物馆</span></div>
2024-01-31 10:48:53 +00:00
2024-01-31 10:57:01 +00:00
<div class="col-6 row justify-around items-center">
2024-01-31 10:48:53 +00:00
2024-02-01 01:29:53 +00:00
<div class="cursor header-title"
@click="handkeLink('/home/navigation')">首页</div>
<div class="cursor header-title"
@click="handkeLink('')">导航</div>
<div class="cursor header-title"
@click="handkeLink('')">展览</div>
<div class="cursor header-title"
@click="handkeLink('')">典藏</div>
<div class="cursor header-title"
@click="handkeLink('')">资讯</div>
<div class="cursor header-title"
@click="handkeLink('')">文创</div>
<div class="cursor header-title"
@click="handkeLink('')">数字文脉</div>
<div class="cursor header-title"
@click="handkeLink('/about/statutes')">关于</div>
2024-01-31 10:48:53 +00:00
</div>
2024-01-31 09:04:35 +00:00
</div>
2024-02-01 01:29:53 +00:00
<div class="fl-page-width">
2024-01-31 09:04:35 +00:00
<router-view></router-view>
</div>
2024-01-31 10:48:53 +00:00
<div style="height:187px;background:#000;"
2024-01-31 12:11:02 +00:00
class="row justify-center color-white">
2024-01-31 10:48:53 +00:00
<div class="col-6 row justify-around fl-mt-lg">
<div class="cursor">首页</div>
<div class="cursor">导航</div>
<div class="cursor">展览</div>
<div class="cursor">典藏</div>
<div class="cursor">资讯</div>
<div class="cursor">文创</div>
<div class="cursor">数字文脉</div>
<div class="cursor">关于</div>
</div>
2024-01-31 09:04:35 +00:00
</div>
</div>
</template>
2024-01-31 10:48:53 +00:00
<script setup>
2024-02-01 01:29:53 +00:00
import {
ref,
reactive,
onBeforeMount,
getCurrentInstance,
watch,
nextTick,
} from "vue";
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const state = reactive({
activePage: '',
});
onBeforeMount(() => {
const currentPath = route.path;
state.activePage = currentPath;
})
const handkeLink = (url) => {
if (url) {
router.push(url)
state.activePage = url;
} else {
router.push('/home/staytuned')
}
}
2024-01-31 10:48:53 +00:00
</script>
2024-01-31 09:04:35 +00:00
<style scoped>
2024-01-31 10:48:53 +00:00
.header-title {
2024-01-31 12:11:02 +00:00
padding: 4px 18px;
2024-01-31 10:48:53 +00:00
border-radius: 25px;
}
.header-title:hover {
background: #3d8873;
}
2024-01-31 09:04:35 +00:00
</style>