element:

  1. The dialog box retrieves the current number of columns in the table and changes the table as well

  2. The original code

    nav: function(val,title) {
    			this.dataForm=val
    			this.dialogVisible = true
    			this.dialogTitle = title
    		},
    Copy the code
  3. The modified

    nav: function(val,title) { this.dataForm=JSON.parse(JSON.stringify(val)) this.dialogVisible = true this.dialogTitle = title }, // Val is an Object type. If you assign a value directly, it becomes a shallow copy, which copies the address of the table. If you change the value in the form, the data in the table also changesCopy the code