This commit is contained in:
liangping 2023-06-21 12:35:13 +08:00
parent 0384c9aba4
commit c6e53ac6df

View File

@ -52,16 +52,17 @@ function loadChannel(channel: string, port: string) {
} }
function pageload(pageNum: number) { function pageload(pageNum: number) {
page.value.setPage(pageNum)
if (direction.value === 'In') { if (direction.value === 'In') {
fetchSendingTxs(channel_id.value, port_id.value) fetchSendingTxs(channel_id.value, port_id.value, pageNum)
} else { } else {
fetchSendingTxs(channel_id.value, port_id.value) fetchSendingTxs(channel_id.value, port_id.value, pageNum)
} }
} }
function fetchSendingTxs(channel: string, port: string) { function fetchSendingTxs(channel: string, port: string, pageNum = 0) {
page.value.setPage(pageNum)
loading.value = true loading.value = true
direction.value = 'Out' direction.value = 'Out'
channel_id.value = channel channel_id.value = channel
@ -72,7 +73,8 @@ function fetchSendingTxs(channel: string, port: string) {
}) })
.finally(() => loading.value = false) .finally(() => loading.value = false)
} }
function fetchRecevingTxs(channel: string, port: string) { function fetchRecevingTxs(channel: string, port: string, pageNum = 0) {
page.value.setPage(pageNum)
loading.value = true loading.value = true
direction.value = 'In' direction.value = 'In'
channel_id.value = channel channel_id.value = channel