<script lang="ts" setup>
/**
 * @Name: index.vue
 * @Description: 权限按钮
 * @Author: Cheney
 */
import { ButtonProps } from 'element-plus';
import { hasPermission } from '/@/utils/hasPermission';


const attrs = useAttrs() as any;

const props = defineProps<Partial<Omit<ButtonProps, ''>>>();


</script>

<template>
  <el-button v-if="attrs.show ? hasPermission(attrs.show) : true"
             v-bind="props">
    <slot></slot>
  </el-button>
</template>

<style scoped>

</style>
