|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="robot">
|
|
|
+ <div class="robot" v-if="canShow">
|
|
|
<t-tooltip content="试试点我提问~" theme="light">
|
|
|
<img
|
|
|
class="robot-img"
|
|
@@ -18,8 +18,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="Robot">
|
|
|
-import { ref } from 'vue';
|
|
|
-const visible = ref(true);
|
|
|
+import { ref, computed } from 'vue';
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
+const visible = ref(false);
|
|
|
+const route = useRoute();
|
|
|
+const BlackNames = ['Login'];
|
|
|
+const canShow = computed(() => {
|
|
|
+ return !BlackNames.includes(route.name);
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|