<template>
  <view>
    <Admin v-if="checkPermission(['admin'])"></Admin>
    <Base v-else />
  </view>
</template>

<script setup>
import checkPermission from '@/utils/permission'
import Base from './base.vue'
import Admin from './admin.vue'
import { useUserStore } from '@/store/modules/user'
import { ref, computed } from 'vue'
const userStore = useUserStore()

const rules = computed(() => {
  return userStore.roles
})
</script>
