Solve Cannot read property 'key' of undefined

Table of contents

question

When querying certain condition items through paging in the on-site environment, the paging interface is successfully obtained but the data is not rendered, and the page seems to be stuck:
an error is reported.Cannot read property 'key' of undefined

Insert image description here

Solve 1

Some people say that it is useless 使用的el-pagination在格式化代码的时候layout属性的参数会多加空格.
to refer to the document ↓↓↓ after modification, and an error will still be reported.

Insert image description here

Solution 2

Some people said that 发现是返回了重复的列表id了
they haven’t come here yet and remember to modify it according to the document ↓↓↓. The backend said that it was a problem caused by data duplication.

Insert image description here

finally


To be on the safe side, the back-end adjusts the data el-tableand adds row-keyattributes to the component (actually, that is 解决2). It is necessary to add a unique identifier to each row of data.

Guess you like

Origin blog.csdn.net/m0_53562074/article/details/132896419