修复分页切换不生效:添加@current-change和@size-change事件触发loadData

main
haoliang 1 week ago
parent dfc18fabb5
commit b5bff2a815

@ -82,6 +82,8 @@
background background
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
style="margin-top:16px" style="margin-top:16px"
@current-change="loadData"
@size-change="handleSizeChange"
/> />
<!-- 新增/编辑弹窗 --> <!-- 新增/编辑弹窗 -->
@ -213,6 +215,12 @@ function resetQuery() {
loadData() loadData()
} }
/** 每页条数变化时重置到第1页并重新加载 */
function handleSizeChange() {
page.page = 1
loadData()
}
function handleAdd() { function handleAdd() {
editingId.value = null editingId.value = null
Object.assign(form, { name: '', deviceCode: '', workshopId: undefined, collectAddressId: undefined, brandId: undefined, brandName: '', ipAddress: '', workerId: undefined }) Object.assign(form, { name: '', deviceCode: '', workshopId: undefined, collectAddressId: undefined, brandId: undefined, brandName: '', ipAddress: '', workerId: undefined })

Loading…
Cancel
Save