import { AuthCheckFn as GlobalPermsCheckFn } from '../../yc-config-provider/src/type';
import { PropType, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
export type PermsCheckFn = GlobalPermsCheckFn;
/**
* YcPerms - 操作权限控制组件
*
* @description
* 根据操作权限判断是否渲染子组件。
*
* 权限检查函数来源(优先级从高到低):
* 1. props.hasPerms - 直接传入的函数
* 2. YcConfigProvider.hasPerms - 全局配置的函数
* 3. 默认函数 - 始终返回 true
*
* @example
* ```vue
*
*
* 新增用户
*
*
*
*
* 新增用户
*
* ```
*/
declare const _default: DefineComponent<{
/** 权限值 */
value: {
type: PropType;
default: () => never[];
};
/**
* 权限检查函数
* @description 如果不传,将使用 YcConfigProvider 中配置的 hasPerms 函数
*/
hasPerms: {
type: PropType;
default: undefined;
};
}, () => any, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
/** 权限值 */
value: {
type: PropType;
default: () => never[];
};
/**
* 权限检查函数
* @description 如果不传,将使用 YcConfigProvider 中配置的 hasPerms 函数
*/
hasPerms: {
type: PropType;
default: undefined;
};
}>>, {
value: string | string[];
hasPerms: GlobalPermsCheckFn;
}, {}>;
export default _default;