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