File size: 835 Bytes
81d8726 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <template>
<el-tooltip
:disabled="isPlusActive"
placement="top"
>
<template #content>
<div class="plus_support_tip">
此功能需要激活Plus后使用,
<el-button
size="small"
type="primary"
link
@click="gotoPlusPage"
>
去激活
</el-button>
</div>
</template>
<slot />
</el-tooltip>
</template>
<script setup>
import { computed, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
const { proxy: { $store } } = getCurrentInstance()
const router = useRouter()
const isPlusActive = computed(() => $store.isPlusActive)
const gotoPlusPage = () => {
router.push('/setting?tabKey=plus')
}
</script>
<style lang="scss">
.plus_support_tip {
display: flex;
align-items: center;
}
</style>
|