瀏覽代碼

添加返回

bd 3 年之前
父節點
當前提交
0c096b5702
共有 2 個文件被更改,包括 34 次插入0 次删除
  1. 二進制
      src/assets/cygx/go_icon.png
  2. 34 0
      src/views/htgj/topbar.vue

二進制
src/assets/cygx/go_icon.png


+ 34 - 0
src/views/htgj/topbar.vue

@@ -0,0 +1,34 @@
+<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>