add categoty

This commit is contained in:
sdaduanbilei-d1581 2026-01-09 10:29:06 +08:00
parent 820be964a9
commit 87778cff11

View File

@ -8,7 +8,7 @@
<category @ok="fetchCategory" />
</div>
<div class="mt-20">
<a-table :data="list" :columns="columns" :pagination="page">
<a-table :data="list" :columns="columns" :pagination="page" @page-change="pageChange">
<template #name="{ record }">
<div class="flex flex-center flex-justify-start">
<a-image v-if="record.oss" :src="record.oss.url" width="40px"></a-image>
@ -81,9 +81,15 @@ export default {
this.$api.badge.list(this.page).then(res => {
if (res.code === 200) {
this.list = res.data.list
this.page.total = res.dta.total
}
})
},
pageChange(page) {
console.log(page);
this.page.page = page
this.fetchList()
},
fetchCategory() {
const data = {
current: 0,
@ -110,6 +116,4 @@ export default {
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>