第一种方式:

this.$route.query.XXX(XXX代表你要取的参数名称)

 第二种方式:

this.$route.fullPath 获取地址连接

        const url = this.$route.fullPath.split("?")[1]
        const kv = url.split("&")
        const list = []
        for(var i=0;i<kv.length;i++){
          const mode = {}
          const value = kv[i].split("=")[1]
          mode.key =  value
          list.push(mode)
        }
//地址栏参数放到数组中,取数组中的位置即可


Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐