| | |
| | | :page="pagination" |
| | | :isShowPagination="true" |
| | | :row-class-name="rowClassName" |
| | | @pagination="handleSizeChange" |
| | | @pagination="handlePagination" |
| | | > |
| | | <template #status="{ row }"> |
| | | <el-tag type="success" size="small">{{ row.status }}</el-tag> |
| | |
| | | fetchListData(); |
| | | } |
| | | |
| | | // 分页大小改变 |
| | | const handleSizeChange = (size) => { |
| | | pagination.size = size; |
| | | pagination.current = 1; |
| | | fetchListData(); |
| | | } |
| | | |
| | | // 当前页改变 |
| | | const handleCurrentChange = (current) => { |
| | | pagination.current = current; |
| | | // 分页改变 |
| | | const handlePagination = ({ page, limit }) => { |
| | | pagination.current = page; |
| | | pagination.size = limit; |
| | | fetchListData(); |
| | | } |
| | | |