edit
This commit is contained in:
		| @ -75,7 +75,10 @@ | ||||
|             <td>{{ item.keyCode }}</td> | ||||
|             <td>{{ item.link }}</td> | ||||
|             <td nzAlign="center" nzWidth="100px"> | ||||
|               <i nz-icon [nzType]="item.iconType"></i> | ||||
|               <ng-container [ngSwitch]="item.iconType"> | ||||
|                 <i *ngSwitchCase="'icon'" nz-icon [nzType]="item.value"></i> | ||||
|                 <i *ngSwitchCase="'iconfont'" [class]="item.value"></i> | ||||
|               </ng-container> | ||||
|             </td> | ||||
|             <td nzAlign="right" nzWidth="100px">{{ item.sorted }}</td> | ||||
|             <td nzAlign="center" nzWidth="250px"> | ||||
|  | ||||
| @ -131,7 +131,7 @@ export class MenuModalComponent implements OnInit { | ||||
|     const params = { | ||||
|       ...this.sf.value, | ||||
|       ...this.params, | ||||
|       i18n: '', | ||||
|       i18n: null, | ||||
|       // i18n: this.sf.value.keyCode, | ||||
|       menuType: 0, | ||||
|       reuse: 0, | ||||
|  | ||||
| @ -20,11 +20,11 @@ export class MenuManagerService extends BaseService { | ||||
|   // 获取菜单下按钮权限列表 | ||||
|   $api_get_functions_by_id = `/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId`; | ||||
|   // 获取所有按钮信息 | ||||
|   $api_get_functions= `/api/mdc/cuc/buttonInfo/getButtonInfoList`; | ||||
|   $api_get_functions = `/api/mdc/cuc/buttonInfo/getButtonInfoList`; | ||||
|   // 保存菜单按钮关联 | ||||
|   $api_save_menu_function= `/api/mdc/cuc/functionButton/saveFunctionButton`; | ||||
|   $api_save_menu_function = `/api/mdc/cuc/functionButton/saveFunctionButton`; | ||||
|   // 删除菜单按钮关联表 | ||||
|   $api_delete_menu_function= `/api/mdc/cuc/functionButton/deletebatch`; | ||||
|   $api_delete_menu_function = `/api/mdc/cuc/functionButton/deletebatch`; | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
| @ -112,7 +112,7 @@ export class MenuManagerService extends BaseService { | ||||
|             level: node.level! + 1, | ||||
|             expand: false, | ||||
|             parent: node, | ||||
|             iconType: this.formatIcon(node.children[i].icon) | ||||
|             ...this.formatIcon(node.children[i].icon) | ||||
|           }); | ||||
|         } | ||||
|       } | ||||
| @ -128,13 +128,17 @@ export class MenuManagerService extends BaseService { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   private formatIcon(icon: any) { | ||||
|   private formatIcon(icon: any): { iconType: string; value: string } { | ||||
|     let value = icon; | ||||
|     let type = 'icon'; | ||||
|     // compatible `anticon anticon-user` | ||||
|     if (~icon.indexOf(`anticon-`)) { | ||||
|       value = value.split('-').slice(1).join('-'); | ||||
|     } | ||||
|     return value; | ||||
|     if (~icon.indexOf(`iconfont`)) { | ||||
|       type = 'iconfont'; | ||||
|     } | ||||
|     return { iconType: type, value }; | ||||
|   } | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user