File size: 1,419 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | <template>
<div v-show="!isPlusActive" class="plus_limit_container">
<div class="plus_limit_content">
<el-icon class="lock-icon"><Lock /></el-icon>
<div class="plus_label">PLUS</div>
<p>此功能仅限PLUS版使用, <span class="to_active" @click="gotoPlusPage">去激活</span></p>
</div>
</div>
<slot />
</template>
<script setup>
import { computed, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import { Lock } from '@element-plus/icons-vue'
const { proxy: { $store } } = getCurrentInstance()
const router = useRouter()
const isPlusActive = computed(() => $store.isPlusActive)
const gotoPlusPage = () => {
router.push('/setting?tabKey=plus')
}
</script>
<style lang="scss" scoped>
.plus_limit_container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
.plus_limit_content {
text-align: center;
color: #fff;
.lock-icon {
font-size: 32px;
margin-bottom: 12px;
}
.plus_label {
font-size: 20px;
font-weight: bold;
color: #ffd700;
margin-bottom: 8px;
}
p {
font-size: 14px;
margin: 0;
opacity: 0.9;
.to_active {
color: #ffd700;
text-decoration: underline;
cursor: pointer;
}
}
}
}
</style>
|