Come straight to the point.

The Table component is used in conjunction with the Form component

When a Table row is viewed or edited, values are assigned to the corresponding fields in the Form. At this point, assigning only form. data=row will cause problems – when you call the resetFields method and then view and edit it, the assignment will fail.This is because row is Objet, and we form. data=row simply assigns the pointer to row to Objet. When reset, row is reset to its original value. Even if you click on it again, the optimized ele will not refresh the contents of the row.

The solution

To make a copy of the row, for example: this.form. data = {… The row}. Note: This is also a shallow copy. If the row property contains an object, changing it will change form.data.

Object.assign(targetObj,source) //for loop over attributes //for ofCopy the code

The Echart icon does not display data

Echart generates canvas. In the actual project, the modified level z-index cannot be covered by div. The specific reason needs to be found out. There is a middle ground here.Just set the height of the parent element to be the same, andoverflow:hidden;Can.

Table User-defined index

<el-table-column type="index" :index="indexMethod"> ---------- // method indexMethod(index) {return index * 2; }Copy the code

To be continued, thank you for your time