Просмотр исходного кода

feat(components/messageList): 一键阅读按钮

wangpx 1 год назад
Родитель
Сommit
5cc3581a0a
1 измененных файлов с 14 добавлено и 1 удалено
  1. 14 1
      components/ygoa/messageList.vue

+ 14 - 1
components/ygoa/messageList.vue

@@ -6,6 +6,7 @@
 					<uni-section :title="title" type="line" titleFontSize="1.3rem">
 						<template v-slot:right>
 							<uni-badge :text="unReadNum" style="margin-left: -10px;" v-if="unReadNum!==undefined&&unReadNum>0"></uni-badge>
+							<button @click.stop="clickReadButton" class="read_button" v-if="unReadNum!==undefined">一键阅读</button>
 						</template>
 					</uni-section>
 				</template>
@@ -89,7 +90,9 @@ onMounted(() => {
 		segmentValues.value = Object.values(props.segments)
 	}
 })
-
+function clickReadButton() {
+	console.log('clickReadButton');
+}
 const paging = ref(null)
 // 加载完成 更新数据
 function complete(list, total, pageNo) {
@@ -187,6 +190,16 @@ function isInTimeRange(inputDate) {
 	max-width: 100%;
 }
 .msg_list_content {
+	.read_button {
+		position: absolute;
+		top: 12px;
+		right: 10px;
+		height: 28px;
+		line-height: 28px;
+		font-size: 14px;
+		background-color: #007aff;
+		color: #fff;
+	}
 	.message_container {
 		border-left: #7b7b7b .4rem solid;