input框接收一个传过来的值,编辑以后获取

https://www.sunzhongwei.com/how-to-get-input-value-in-vuejs
使用ref



this.result = this.$refs.input.value

input框接收一个传过来的值,编辑以后获取_第1张图片
这里的seat是怎么来的?
input框接收一个传过来的值,编辑以后获取_第2张图片

this.getParams()

getParams() {
      // 取到路由带过来的参数
      this.seat = this.$route.query.seat
      console.log(this.seat)
    },

是在登录页面表单提交传过来的

this.$router.push({
      path: '/main',
      query: {
        seat: this.loginForm.seat,
        tel: this.loginForm.tel
      }
})

你可能感兴趣的:(vue)