Merge pull request '修复' (#128) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/128
This commit is contained in:
luyuan 2020-11-12 15:32:53 +08:00
commit 146b59fcbc
2 changed files with 17 additions and 4 deletions

View File

@ -42,6 +42,7 @@
:date="i.created_at" :date="i.created_at"
:memberid="i.memberid" :memberid="i.memberid"
:replyid="i.commentid" :replyid="i.commentid"
:info="i"
@replying="replytow" @replying="replytow"
@reload="refresh" @reload="refresh"
></ReviewItemtwo> ></ReviewItemtwo>

View File

@ -5,8 +5,7 @@
<div class="name myname" v-if="parseInt(memberid)==myid">{{username}}</div> <div class="name myname" v-if="parseInt(memberid)==myid">{{username}}</div>
<div class="name" v-else>{{username}}</div> <div class="name" v-else>{{username}}</div>
</div> </div>
<div class="cont"> <div class="cont" v-html="inhtml()">
{{content}}
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="date">{{date}}</div> <div class="date">{{date}}</div>
@ -72,7 +71,9 @@
margin-left: 67px; margin-left: 67px;
font-size: 11px; font-size: 11px;
line-height: 1.2; line-height: 1.2;
::v-deep(span){
color: #2581D0;
}
} }
.bottom{ .bottom{
display: flex; display: flex;
@ -109,6 +110,9 @@ import { defineComponent, ref } from 'vue';
export default defineComponent({ export default defineComponent({
props: { props: {
info:{
type: Object
},
photo: { photo: {
type: String type: String
}, },
@ -149,12 +153,20 @@ export default defineComponent({
} }
console.log(res) console.log(res)
}
function inhtml(){
if(prop.info){
return prop.content + (prop.info.replyid != 0 ? '//<span>' + prop.info.with + '</span>' + prop.info.replyContent : '')
}
// {{content}}{{info.replyid != 0 ? '//' + info.with + info.replyContent : ''}}
} }
return { return {
reply, reply,
myid, myid,
del, del,
lan lan,
inhtml
} }
} }
}) })