[Vuejs]-Put the values in the object and best way for get old value

1👍

try shortening your code to this (mostly es6):

   .then(({ data: {0: firstElData}, {1: secondElData }) => { 
     const { status, number, route, uri, refcli, refcarrier, porting_date, 
      portout_date, emergency_active, emergency_zipcodem memo } = firstElData
      this.number = { status, number, route, uri, refcli, refcarrier, 
      porting_date, portout_date, emergency_active, emergency_zipcodem memo }
      this.number.carrier = secondElData
      this.number.edit = null;

Although I am not 100% sure what you are asking.

Of course if all you need is to store original value then put them in a variable when they come in originalData and then you can access that later no need for a store for that.

Leave a comment