<template>
  <div class="container-top">
    <img v-if="showText !== '查研观向'" src="~@/assets/cygx/go_icon.png" @click="router.back()" />
    <span>{{ showText }}</span>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();
const props = defineProps({
  showText: {
    type: String,
    required: true,
    default: false,
  },
});
</script>

<style lang="scss" scoped>
.container-top {
  position: relative;
  align-items: center;
  text-align: center;
  margin-bottom: 15px;
  img {
    position: absolute;
    top: 50%;
    left: 60px;
    width: 40px;
    transform: translate(-50%, -50%);
  }
}
</style>
