From c0556bc92cc23bcf63cdfcfac7d9da126ca2745b Mon Sep 17 00:00:00 2001 From: significative <163999932+significative@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/professionalListProfile/index.vue | 83 ++++++++++++++------- 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/src/views/professionalListProfile/index.vue b/src/views/professionalListProfile/index.vue index af044f0..522e719 100644 --- a/src/views/professionalListProfile/index.vue +++ b/src/views/professionalListProfile/index.vue @@ -3,21 +3,61 @@ import { ref } from 'vue'; const paginationData = ref({ pageNo: 1, - pageSize: 7, - total: 7 + pageSize: 8, + total: 8 }) function paginationChange(currentPage: number, pageSize: number) { } // 临时的,有接口后使用接口数据 -const isPraise = ref(true) -const isStar = ref(true) -function handlePraise() { - isPraise.value = !isPraise.value +const dataList = ref([ + { + id: '1', + isPraise: false, + isStar: false + }, + { + id: '2', + isPraise: false, + isStar: false + }, + { + id: '3', + isPraise: false, + isStar: false + }, + { + id: '4', + isPraise: false, + isStar: false + }, + { + id: '5', + isPraise: false, + isStar: false + }, + { + id: '6', + isPraise: false, + isStar: false + }, + { + id: '7', + isPraise: false, + isStar: false + }, + { + id: '8', + isPraise: false, + isStar: false + }, +]) +function handlePraise(item:any) { + item.isPraise = !item.isPraise } -function handleStar() { - isStar.value = !isStar.value +function handleStar(item:any) { + item.isStar = !item.isStar } @@ -30,15 +70,7 @@ function handleStar() {