How to get the current URL ?

189 阅读1分钟
const currentURL = () => window.location.href

// 事例
currentURL() // 'https://google.com'