签名
TSsignature
function useAllowedAPIPermission(): () => AllowedAPIPermissionStore;
// APINames value: 'allowed-api-permission'主要 API
- checkIsAllowAPI(apiName)
用法
TSXcheck
import { useAllowedAPIPermission } from "@quan-erp/base-frontend";
const permission = useAllowedAPIPermission()();
const canCreate = permission.checkIsAllowAPI("my-plugin.create");注意
- UI 门禁优先用 <Protected>