# 获取当前网址
获取当前页路由的地址
import { currentURL } from 'util-snippets';
/**
* 示例:currentURL(); // 'https://medium.com/@fatosmorina'
*/
currentURL();
const currentURL = (): string => window.location.href;
获取当前页路由的地址
import { currentURL } from 'util-snippets';
/**
* 示例:currentURL(); // 'https://medium.com/@fatosmorina'
*/
currentURL();
const currentURL = (): string => window.location.href;