在vue-cli项目中,有时候会使用到
this.$router.push("/home")
但是如果后面需要带个纯参数,用下面这种字符串拼接的方法显然是不行的,
this.$router.push("/home/"+this.order_id)
需要使用下面的这种才能跳转成功
this.$router.push(`/home/${this.order_id}`)
在vue-cli项目中,有时候会使用到
this.$router.push("/home")
但是如果后面需要带个纯参数,用下面这种字符串拼接的方法显然是不行的,
this.$router.push("/home/"+this.order_id)
需要使用下面的这种才能跳转成功
this.$router.push(`/home/${this.order_id}`)