import { Privilege } from './Privilege'; import Authenticity from "./Authenticity"; declare const securityModule: { namespaced: boolean; state: () => Authenticity; getters: { /** * 获得权限对象 * @param state */ getAuthenticity: (state: Authenticity) => Authenticity; /** * 获得用户所有权限树 * @param state */ getPrivileges: (state: Authenticity) => Privilege[]; /** * 判断是否有指定权限 * @param state */ hasPrivilege: (state: Authenticity) => (code: string) => boolean; /** * 根据编码查询此权限的子权限 * @param state */ getPrivilegeByCode: (state: Authenticity) => (code: string) => Privilege | null; }; mutations: { /** * 同步设置权限树 * @param state * @param privileges */ changePrivileges: (state: Authenticity, privileges: Privilege[]) => void; /** * 修改用户信息 * @param state * @param auth */ changeAuthenticity: (state: Authenticity, auth: Authenticity) => void; }; actions: {}; modules: {}; }; export default securityModule;