admin-vue3/src/directives/index.ts

14 lines
351 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import type { App } from 'vue'
import { hasRole } from './permission/hasRole'
import { hasPermi } from './permission/hasPermi'
/**
* 导出指令v-xxx
* @methods hasRole 用户权限,用法: v-hasRole
* @methods hasPermi 按钮权限,用法: v-hasPermi
*/
export const setupAuth = (app: App<Element>) => {
hasRole(app)
hasPermi(app)
}