mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 19:06:46 +08:00
提交
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<view v-if="comm.replyList && comm.replyList.length>0" class="comment-replys">
|
||||
<view v-for="(reply,replyIdx) in comm.replyList" :key="replyIdx" class="comment">
|
||||
<view v-for="(reply,replyIdx) in comm.replyList" :key="replyIdx" class="comment" v-if="comm.showAll || replyIdx<2">
|
||||
<view class="comment-top">
|
||||
<view style="display: flex;">
|
||||
<author v-if="reply" :showInfo="true" :data="reply"></author>
|
||||
@@ -78,6 +78,9 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="comm.replyList.length>2" class="view-all-com" @click="loadReplyMore(comm)">
|
||||
{{comm.showAll ? '收起':`查看全部${comm.replyList.length}条评论 >`}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -220,6 +223,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadReplyMore(item){
|
||||
item.showAll=!item.showAll;
|
||||
},
|
||||
loadData(append){ //加载数据
|
||||
let params={
|
||||
pageIndex:this.pageIndex,
|
||||
@@ -239,6 +245,7 @@
|
||||
let ids=[];
|
||||
let allList=[];
|
||||
res.result.list.forEach(item=>{
|
||||
item.showAll = false;
|
||||
item.avatar='';
|
||||
item.orgInfo='';
|
||||
item.sex = null;
|
||||
@@ -584,6 +591,20 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-all-com{
|
||||
// width: 304upx;
|
||||
display: inline-block;
|
||||
height: 52upx;
|
||||
line-height: 40upx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 26upx;
|
||||
box-sizing: border-box;
|
||||
padding: 4upx 40upx 4upx 40upx;
|
||||
font-size: 24upx;
|
||||
color: #666666;
|
||||
margin-left: 100upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.comment{
|
||||
padding-top: 20upx;
|
||||
.comment-top{
|
||||
|
||||
Reference in New Issue
Block a user