elementui pager, el-pagination does not display the problem

I encountered a very fucking problem when typing code today. I encapsulated the pager into a shared component. One component displays the pager, and the other component does not display the pager. I wonder if it is so evil, this is a normal component

This component does not display

Then I try to print out the parameters passed to the paginator,

Sure enough, I found the fucked up place, this is the normal display data

This is the data not displayed

The results of total and pageSize are null, so the pager does not display. After investigation, it is found that the two data of the interface returned by the backend are null. After fine-tuning, it returns to normal

In short, the data that the pager depends on cannot be null, and if it is null, the entire pager will not be displayed

Guess you like

Origin blog.csdn.net/qq_68155756/article/details/129425868