vue获取地址栏参数方法 前端晋级攻城狮 2019-04-28 2,173 阅读1分钟 export function getUrlKey(name){ return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null }