From a693cf7fbd5865fcdea6f915c4d047ce722e819e Mon Sep 17 00:00:00 2001
From: zhaofang <752743406@qq.com>
Date: Thu, 3 Nov 2022 10:38:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/user/Mynotes.vue | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue
index cbae8ce1..ed9ee57b 100644
--- a/src/views/user/Mynotes.vue
+++ b/src/views/user/Mynotes.vue
@@ -69,7 +69,15 @@
{{ item.sysUpdateTime }}
-
{{ item.content }}
+
{{item.content}}
+
+
+
+ {{displayAll(item)}}
+
+ {{item.isAll?'收起':'全文展开'}}
+
+
@@ -266,6 +274,15 @@ export default {
});
},
methods: {
+ displayAll(item) {
+ if (!item.isAll && item.content && item.content.length > 180) {
+ return item.content.slice(0, 150) + "...";
+ }
+ return item.content;
+ },
+ changeIsAll(item) {
+ item.isAll = !item.isAll;
+ },
// 笔记图片放大
showBigImg(path){
this.currentImagePath = path;
@@ -535,6 +552,9 @@ export default {
apiNote.query(data).then(res=>{
if(res.status == 200) {
res.result.list.forEach((item,index)=>{
+ if(item.type == 2 && item.contentType !== 3) {
+ item.isAll = false;
+ }
if(item.contentType == 3) {
item.content = item.content.split(',');
}