37 lines
662 B
Vue
Raw Normal View History

2024-03-21 16:41:28 +08:00
<template>
<el-tooltip :content="content" v-if="settingStore.showToolTip">
2024-03-23 16:01:52 +08:00
<el-icon :class="class" @click="navGo(url)">
2024-03-21 16:41:28 +08:00
<InfoFilled />
</el-icon>
</el-tooltip>
</template>
<script setup lang="ts">
import { defineProps } from 'vue';
import useSettingStore from '@/stores/modules/setting'
2024-03-23 16:01:52 +08:00
import { useRouter } from "vue-router"
const router = useRouter()
2024-03-21 16:41:28 +08:00
const settingStore = useSettingStore()
defineProps({
class: {
type: String,
default: "ml-2 mt-4"
},
content: {
type: String
2024-03-23 16:01:52 +08:00
},
url: String
2024-03-21 16:41:28 +08:00
})
2024-03-23 16:01:52 +08:00
const navGo = (url) => {
if (!url) return
2024-03-21 16:41:28 +08:00
2024-03-23 16:01:52 +08:00
router.push(url)
}
2024-03-21 16:41:28 +08:00
</script>