本文整理汇总了TypeScript中app/core/utils/acl.processAclItems函数的典型用法代码示例。如果您正苦于以下问题:TypeScript processAclItems函数的具体用法?TypeScript processAclItems怎么用?TypeScript processAclItems使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了processAclItems函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: switch
export const dashboardReducer = (state = initialState, action: Action): DashboardState => {
switch (action.type) {
case ActionTypes.LoadDashboardPermissions:
return {
...state,
permissions: processAclItems(action.payload),
};
}
return state;
};
示例2: switch
export const folderReducer = (state = inititalState, action: Action): FolderState => {
switch (action.type) {
case ActionTypes.LoadFolder:
return {
...state,
...action.payload,
hasChanged: false,
};
case ActionTypes.SetFolderTitle:
return {
...state,
title: action.payload,
hasChanged: action.payload.trim().length > 0,
};
case ActionTypes.LoadFolderPermissions:
return {
...state,
permissions: processAclItems(action.payload),
};
}
return state;
};
示例3: processAclItems
mapper: (state, action) => ({
...state,
permissions: processAclItems(action.payload),
}),