How elegant is the unchanged value of Filter when vue uses element ui forms to submit data?

the data of the form is large and the structure is complex, so when submitting, you want to submit only the modified data

try watch but only get all the changed values

related codes

watch: {

transportAddData: {
  handler(newVal, oldVal) {
    console.log("transportEditData changed");
    console.log("newVal==",newVal);
    console.log("oldVal==",oldVal);
  },
  deep: true
}

}

how does the elegant Filter unchanged value when vue uses element ui forms to submit data?

Apr.07,2021

because you are not clear about your data structure
you can try to use lodash.js to achieve your purpose
lodash encapsulates many functions that operate on arrays and objects, which is very convenient
http://www.css88.com/doc/lodash/

.
Menu