feat: 调整了useGo方法,让菜单可以跳转到外链接
							parent
							
								
									f4346619d8
								
							
						
					
					
						commit
						45604f5703
					
				| 
						 | 
				
			
			@ -22,8 +22,12 @@ export function useGo(_router?: Router) {
 | 
			
		|||
    if (!opt) {
 | 
			
		||||
      return
 | 
			
		||||
    }
 | 
			
		||||
    if (/^(https?:|mailto:|tel:)/.test(opt as string)) {
 | 
			
		||||
      window.open(opt as string, '_blank', 'noopener=yes')
 | 
			
		||||
    } else {
 | 
			
		||||
      isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return go
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue