What should be done after receiving the value data passed by vue father and son?

// 
<h4>{{ orderInfo.OrderItems[0].GoodsName }}</h4>

// 
  props: {
    list: {
      type: Object,
      required: true,
      default: () => ({
        OrderTrackInfo: [],
        OrderInfo: {},
        OrderItems: [],
      }),
    },
  },

  computed: {
    orderInfo() {
      return this.list.OrderInfo || {};
    },

    logisticsList() {
      return this.list.OrderTrackInfo;
    },

    orderItems() {
      // 0, 
      return this.list.OrderInfo.OrderItems[0] || {};
    },
  },

will still report undefined errors,
clipboard.png

clipboard.png

Apr.13,2022

it should be so. The data is misdefined


,list:

orderItems() {
  console.log(this.list) // list
  // return this.list.OrderInfo.OrderItems[0] || {};
},

then process the relevant data.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b386dc-2b88e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b386dc-2b88e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?