mutations.ts 753 字节
Newer Older
KK's avatar
KK committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/**
 * 设置统一资源数据
 * 
 * @param state 
 * @param resourceArray
 */
export const setResourceData = (state: any, resourceArray:Array<any>) => {
    if(resourceArray && resourceArray.length === 0){
        return;
    }
    state.resourceData = resourceArray;
}

/**
 * 设置菜单数据
 * 
 * @param state 
 * @param resourceArray
 */
export const setMenuData = (state: any, menuArray:Array<any>) => {
    if(menuArray && menuArray.length === 0){
        return;
    }
    state.menuData = menuArray;
}

/**
 * 设置是否开启权限认证
 * 
 * @param state 
 * @param resourceArray
 */
export const setEnablePermissionValid = (state: any, enablepermissionvalid:boolean) => {
    state.enablePermissionValid = enablepermissionvalid;
}