能力云图增加返回按钮

This commit is contained in:
guoyue 2022-09-13 14:59:44 +08:00
parent 1cba78f8e1
commit 90a3aa8e37
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<template>
<div class="detail-back" @click="previousPage" :style="{ color: textColor }">
返回
</div>
</template>
<script setup>
import { reactive, ref, watch, defineProps } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const props = defineProps({
textColor: { type: String, default: '' },
})
const previousPage = () => {
window.history.go(-1)
}
</script>
<style scoped lang="less">
.detail-back {
position: absolute;
opacity: 0.7;
top: 0.5rem;
left: 100px;
font-size: 0.20rem;
cursor: pointer;
background: -webkit-linear-gradient(90deg, #99a8d0, #fff);
font-weight: 600;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>

View File

@ -7,6 +7,7 @@
-->
<template>
<div class="capability-cloud">
<capability-cloud-back></capability-cloud-back>
<div class="header">
<span class="title" @click="goHome">数字能力超市</span>
</div>
@ -29,6 +30,7 @@
import Infrastructure from '@/views/capabilityCloud/components/Infrastructure.vue'
import DataResources from '@/views/capabilityCloud/components/DataResources.vue'
import KnowledgeBase from '@/views/capabilityCloud/components/KnowledgeBase.vue'
import capabilityCloudBack from '@/views/capabilityCloud/components/capabilityCloudBack.vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const goHome = () => {