# 跳转页面

页面跳转到其他页面

使用
import { redirect } from 'util-snippets'

/**
 * 示例:redirect('https://github.com/czero1995/util-snippets');
 */

redirect(url)
代码
const redirect = (url: string, asLink: boolean = true) =>
  asLink ? (window.location.href = url) : window.location.replace(url);