Files
Common_Platform/web/src/features/workbench/index.vue
T

21 lines
723 B
Vue

<template>
<div class="page-shell">
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
<div class="soft-stat"><n-statistic label="菜单数量" :value="authStore.menus.length" /></div>
<div class="soft-stat">
<n-statistic label="权限码数量" :value="authStore.permissions.length" />
</div>
<div class="soft-stat"><n-statistic label="当前状态" :value="currentStatus" /></div>
</div>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { useAuthStore } from '@/stores/auth'
import { statusLabel } from '@/utils/display'
const authStore = useAuthStore()
const currentStatus = computed(() => statusLabel(authStore.user?.status))
</script>