MenuItem roles camelCase-compatible
This commit is contained in:
		
					parent
					
						
							
								a161f6e368
							
						
					
				
			
			
				commit
				
					
						d45914c3f7
					
				
			
		
					 5 changed files with 30 additions and 27 deletions
				
			
		|  | @ -11,6 +11,8 @@ const MenuItem = function (options) { | |||
|   for (let key in options) { | ||||
|     if (!(key in this)) this[key] = options[key] | ||||
|   } | ||||
|   if (typeof this.role === 'string' || this.role instanceof String) | ||||
|     this.role = this.role.toLowerCase() | ||||
|   this.submenu = this.submenu || roles.getDefaultSubmenu(this.role) | ||||
|   if (this.submenu != null && this.submenu.constructor !== Menu) { | ||||
|     this.submenu = Menu.buildFromTemplate(this.submenu) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Zhuo Lu
				Zhuo Lu