wangxy преди 10 месеца
родител
ревизия
32d6d25817
променени са 3 файла, в които са добавени 5 реда и са изтрити 8 реда
  1. 1 1
      components/custom-scroll-list/custom-scroll-list.vue
  2. 3 6
      components/scroll-list-card/scroll-list-card.vue
  3. 1 1
      pages/exam/index.vue

+ 1 - 1
components/custom-scroll-list/custom-scroll-list.vue

@@ -12,7 +12,7 @@
 		:refresher-threshold="100" refresher-background="lightgreen" @refresherrefresh="onRefresh"
 		@scrolltolower="onReachBottom" @refresherrestore="onRestore">
 		<slot :list="list"></slot>
-		<view style="width: 100%;text-align: center;font-size: 14px;color:#ccc;" v-if="isComplete">没有更多啦~</view>
+		<view style="width: 100%;text-align: center;font-size: 14px;color:#ccc;" key="a333" v-if="isComplete">没有更多啦~</view>
 	</scroll-view>
 </template>
 

+ 3 - 6
components/scroll-list-card/scroll-list-card.vue

@@ -15,8 +15,8 @@
 			<text class="card-score-box">考试时长:{{data.totalTm === null ? '':data.totalTm}}分钟</text>
 		</view>
 		<!--    button    -->
-		<template v-for="item in btns">
-			<button class="lli-btn" @click="btnClick(item)" v-if="item.show" :key="item.code"
+		<template v-for="item in btns" :key="item.status">
+			<button class="lli-btn" @click="btnClick(item)" v-if="item.show" :key="item.status"
 				:disabled="data.disabled">{{item.text}}</button>
 		</template>
 	</view>
@@ -63,7 +63,7 @@
 			show: data.value.status === 2,
 		},
 		{
-			code: 4,
+			status: 4,
 			btnType: 'kaoshi',
 			text: '已结束',
 			show: data.value.status === 4,
@@ -94,9 +94,6 @@
 		},
 	])
 
-
-
-	console.log(btns)
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
pages/exam/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<custom-scroll-list :refreshFn="getExamList" :tabList="tabData" :defaultTab="1">
 		<template #default="{list}">
-			<scroll-list-card  v-for="item in list" :data="item" :key="item.ksId"></scroll-list-card>
+			<scroll-list-card  v-for="(item,index) in list" :key="item.ksId" :data="item" ></scroll-list-card>
 		</template>
 	</custom-scroll-list>
 </template>