1. Problem
The error message on the browser side is: Invalid attribute: The type check of the attribute "data" failed. It should be an array, but an object is sent from the backend
Use the :data in the <el-table> attribute to bind, because tableData is of array type (Array), and the object type is transmitted from the backend, which is caused by data conversion during data binding
Binding in the method in <script> in vue
2. Solution
After printing response.data.data, we know that the response.data.data returned by the background is an object, and the table needs an array, which means that the array should not be traversed, and the object can be pushed directly in the empty array. ie tableData.push(response.data.data);