vue弹出层,弹出层带着父组件参数网络请求

父组件,点击循环中的图片,响应事件:

         
//…… //……
    // 单击每个图片,弹出每个订单的详情
    clickEach: function(value) {
      let that = this;

      that.orderDetailLayer = true;
      that.dialogOption = {
        wxId: value,
        title: "订单",
        text: "订单详情",
        cancelButtonText: "取消",
        confirmButtonText: "确认"
      };
    },


    // 接收子组件回调的值,关闭子组件
    childRe: function(value) {
      let that = this;
      // 关闭子组件
      that.orderDetailLayer = false;
    },

在子组件中,并没有在mounted()发起网络请求,因为这时候传递的参数还获取不到:


 

你可能感兴趣的:(vue)