演示提交

This commit is contained in:
熊丽君
2022-02-16 08:54:56 +08:00
parent d6684a154b
commit 43023de455
33 changed files with 2417 additions and 1633 deletions

View File

@ -1,8 +1,12 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
class="no-redirect"
>{{ item.meta.title }}</span
>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
@ -12,42 +16,44 @@
<script setup>
const route = useRoute();
const router = useRouter();
const levelList = ref([])
const levelList = ref([]);
function getBreadcrumb() {
// only show routes with meta.title
let matched = route.matched.filter(item => item.meta && item.meta.title);
const first = matched[0]
let matched = route.matched.filter((item) => item.meta && item.meta.title);
const first = matched[0];
// 判断是否为首页
if (!isDashboard(first)) {
matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched)
matched = [{ path: "/admin", meta: { title: "首页" } }].concat(matched);
}
levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
levelList.value = matched.filter(
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
);
}
function isDashboard(route) {
const name = route && route.name
const name = route && route.name;
if (!name) {
return false
return false;
}
return name.trim() === 'Index'
return name.trim() === "Index";
}
function handleLink(item) {
const { redirect, path } = item
const { redirect, path } = item;
if (redirect) {
router.push(redirect)
return
router.push(redirect);
return;
}
router.push(path)
router.push(path);
}
watchEffect(() => {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
if (route.path.startsWith("/redirect/")) {
return;
}
getBreadcrumb()
})
getBreadcrumb();
});
getBreadcrumb();
</script>

View File

@ -1,35 +1,35 @@
<template>
<div class="webFooter">
<div class="wrap">
<el-row>
<el-col :span="4">
<div class="tit">解决方案</div>
<p><a href="">大型企业服务</a></p>
<p><a href="">科研院所服务</a></p>
<p><a href="">政府区域服务</a></p>
</el-col>
<el-col :span="4">
<div class="tit">创新服务</div>
<p><a href="">科技快报</a></p>
<p><a href="">海外人才推荐</a></p>
</el-col>
<el-col :span="8">
<div class="tit">联系我们</div>
<p><a href="">客服电话400-666-8888</a></p>
<p><a href="">邮箱zhongkeyun@163.cn</a></p>
<p><a href="">地址安徽省合肥市科大讯飞大楼</a></p>
</el-col>
<el-col :span="4" style="text-align: center;">
<div class="webFooter">
<div class="wrap">
<el-row>
<el-col :span="4">
<div class="tit">解决方案</div>
<p><a href="">大型企业服务</a></p>
<p><a href="">科研院所服务</a></p>
<p><a href="">政府区域服务</a></p>
</el-col>
<el-col :span="4">
<div class="tit">创新服务</div>
<p><a href="">科技快报</a></p>
<p><a href="">海外人才推荐</a></p>
</el-col>
<el-col :span="8">
<div class="tit">联系我们</div>
<p><a href="">客服电话400-666-8888</a></p>
<p><a href="">邮箱zhongkeyun@163.cn</a></p>
<p><a href="">地址安徽省合肥市科大讯飞大楼</a></p>
</el-col>
<!-- <el-col :span="4" style="text-align: center;">
<div class="tit">二维码</div>
<p><img class="qrcode" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F01%2F39%2F53%2F71573cc4a35de96.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643849770&t=80c12feeca42dad377bbdde1d6e78f33" alt=""></p>
</el-col>
<el-col :span="4" style="text-align: center;">
<div class="tit">二维码</div>
<p><img class="qrcode" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F01%2F39%2F53%2F71573cc4a35de96.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643849770&t=80c12feeca42dad377bbdde1d6e78f33" alt=""></p>
</el-col>
</el-row>
</div>
</el-col> -->
</el-row>
</div>
</div>
</template>
<script setup lang="ts">
@ -38,26 +38,26 @@ import { onMounted, reactive, watch } from "vue";
<style lang="scss" scoped>
.webFooter {
background: #DEE9FF;
background: #dee9ff;
}
.wrap {
width: 1000px;
margin: 0 auto;
padding: 100px 0;
font-size: 14px;
width: 1000px;
margin: 0 auto;
padding: 100px 0;
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
.tit {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
.tit {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
}
.qrcode {
width: 88px;
height: 88px;
}
}
.qrcode {
width: 88px;
height: 88px;
}
}
</style>