mirror of
https://github.com/certd/certd.git
synced 2026-04-22 10:57:25 +08:00
52a167c647
perf: 完善文档,完善部分types perf: 优化d.ts类型 perf: 日期增加week、month、year、quarter类型 feat: resetCrudOptions 示例 feat: tabs快捷查询组件 fix: 行编辑支持多级表头 https://github.com/fast-crud/fast-crud/issues/143 perf: antdv 增加自定义表头示例 https://github.com/fast-crud/fast-crud/issues/141 perf: 表单下方按钮支持context https://github.com/fast-crud/fast-crud/issues/142
24 lines
649 B
TypeScript
24 lines
649 B
TypeScript
import permissionDirective from "./directive/index.js";
|
|
import { registerRouterHook } from "./hook";
|
|
import util from "./util.permission";
|
|
export * from "./use-crud-permission";
|
|
export * from "./errors";
|
|
|
|
export function usePermission() {
|
|
return {
|
|
...util
|
|
};
|
|
}
|
|
|
|
export default {
|
|
install(app: any) {
|
|
// 开启权限模块
|
|
// 注册v-permission指令, 用于控制按钮权限
|
|
app.use(permissionDirective);
|
|
// 注册路由钩子
|
|
// 通过路由守卫,在登录成功后拦截路由,从后台加载权限数据
|
|
// 然后将权限数据转化为菜单和路由,添加到系统中
|
|
registerRouterHook();
|
|
}
|
|
};
|