Vue路由query傳參

1.不要進行過深的嵌套this

let  id = 'uyu'
this.$router.push({
          path: '/mrp_detail',
          query: {
            re_order_id: id,
            option: 'edit'
          }
        })  // 再被創新後不會被重置

let  obj = {id: 'uyu'}
this.$router.push({
          path: '/mrp_detail',
          query: {
            obj obj,
            option: 'edit'
          }
        })  // 再被創新後被重置沒法獲取
相關文章
相關標籤/搜索