页面传值:vue实现参数跳转到下一个页面,input绑定登录页面传过来的数据

https://blog.csdn.net/anshengsuiyeu/article/details/81872572
当前页面

<input type="text" class="phone" placeholder="座位号" v-model="loginForm.seat">
	methods:{
		this.$router.push({
            path: '/main',
            query: {
              seat: this.loginForm.seat
            }
    	 })
	}

下一个页面

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

input绑定登录页面传过来的数据

<input id="number" type="number" v-model="seat">

localStorage传值
https://blog.csdn.net/weixin_38498554/article/details/78899384

猜你喜欢

转载自blog.csdn.net/fengtingYan/article/details/88287155