add categoty
This commit is contained in:
parent
820be964a9
commit
87778cff11
@ -8,7 +8,7 @@
|
|||||||
<category @ok="fetchCategory" />
|
<category @ok="fetchCategory" />
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-20">
|
<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 }">
|
<template #name="{ record }">
|
||||||
<div class="flex flex-center flex-justify-start">
|
<div class="flex flex-center flex-justify-start">
|
||||||
<a-image v-if="record.oss" :src="record.oss.url" width="40px"></a-image>
|
<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 => {
|
this.$api.badge.list(this.page).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
|
this.page.total = res.dta.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
pageChange(page) {
|
||||||
|
console.log(page);
|
||||||
|
this.page.page = page
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
fetchCategory() {
|
fetchCategory() {
|
||||||
const data = {
|
const data = {
|
||||||
current: 0,
|
current: 0,
|
||||||
@ -110,6 +116,4 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue
Block a user