[add
This commit is contained in:
parent
03c5d4da2a
commit
b3493b5e27
@ -5,10 +5,10 @@
|
||||
<div class="flex flex-center flex-justify-start">
|
||||
<edit @ok="fetchList"/>
|
||||
</div>
|
||||
<a-table class="mt-20" :columns="columns" :data="list" >
|
||||
<a-table class="mt-20" :columns="columns" :data="list" :pagination="page" @pageChange="change">
|
||||
<template #name="{record}">
|
||||
<div class="flex flex-center flex-justify-start">
|
||||
<a-image width="60" height="60" :src="record.oss.url" :alt="record.id"/>
|
||||
<a-image v-if="record.oss" width="60" height="60" :src="record.oss.url" :alt="record.id"/>
|
||||
<div class="ml-10">{{record.name}}</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -40,6 +40,7 @@ export default {
|
||||
page:{
|
||||
current:1,
|
||||
pageSize:10,
|
||||
total:0
|
||||
},
|
||||
columns :[
|
||||
{
|
||||
@ -69,11 +70,16 @@ export default {
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
change(page){
|
||||
this.page.current = page
|
||||
this.fetchList()
|
||||
},
|
||||
fetchList() {
|
||||
const data ={...this.page}
|
||||
this.$api.flower.list(data).then(res => {
|
||||
if (res.code === 200){
|
||||
this.list = res.data.list
|
||||
this.page.total = res.data.total
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user