优化调整
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
{{ briefTopName }}
|
||||
</span>
|
||||
</el-link>
|
||||
<span style="text-align: left;display: flex;flex-direction:row;justify-content: flex-start;font-size: 20px;color: rgb(107 114 128);">
|
||||
<span v-if="projectTitle" style="text-align: left;display: flex;flex-direction:row;justify-content: flex-start;font-size: 20px;color: rgb(107 114 128);">
|
||||
{{projectTitle}}
|
||||
</span>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@
|
||||
</span>
|
||||
<el-rate v-model="average" style="display: flex;justify-content: flex-start" disabled show-score text-color="#ff9900"
|
||||
score-template="{value}"></el-rate>
|
||||
<span style="font-size: 12px;color: #59A3A4;display: flex;justify-content: flex-start">
|
||||
<span v-if="commentNum" style="font-size: 12px;color: #59A3A4;display: flex;justify-content: flex-start">
|
||||
{{ commentNum }} 个评分
|
||||
</span>
|
||||
</div>
|
||||
@@ -218,10 +218,10 @@
|
||||
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between;margin-left: 10px;margin-top: 5px">
|
||||
<span style="font-size: 14px;color: #9ca3af">{{item.commentTime}}</span>
|
||||
<span v-if="item.commentTime" style="font-size: 14px;color: #9ca3af">{{item.commentTime}}</span>
|
||||
<div style="display: flex;align-items: center">
|
||||
<span style="margin-right: 5px;font-size: 14px; color: rgb(156, 163, 175);">{{ formatNumber(item.likeNum) }}</span>
|
||||
<el-link @click="addLike(item.commentId)" icon="el-icon-star-off" :underline="false">点赞</el-link>
|
||||
<span v-if="item.likeNum" style="margin-right: 5px;font-size: 14px; color: rgb(156, 163, 175);">{{ formatNumber(item.likeNum) }}</span>
|
||||
<el-link v-if="item.commentId" @click="addLike(item.commentId)" icon="el-icon-star-off" :underline="false">点赞</el-link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -252,15 +252,15 @@
|
||||
</div>
|
||||
<div style="margin-left: 10px;margin-top: 5px">
|
||||
<el-card style="border: none;text-align:left;">
|
||||
<span>{{item.content}}</span>
|
||||
<span v-if="item.content">{{item.content}}</span>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between;margin-left: 10px;margin-top: 5px">
|
||||
<span style="font-size: 14px;color: #9ca3af">{{item.commentTime}}</span>
|
||||
<span v-if="item.commentTime" style="font-size: 14px;color: #9ca3af">{{item.commentTime}}</span>
|
||||
<div style="display: flex;align-items: center">
|
||||
<span style="margin-right: 5px;font-size: 14px; color: rgb(156, 163, 175);">{{ formatNumber(item.likeNum) }}</span>
|
||||
<el-link @click.once="addLike(item.commentId)" icon="el-icon-star-off" :underline="false">点赞</el-link>
|
||||
<span v-if="item.likeNum" style="margin-right: 5px;font-size: 14px; color: rgb(156, 163, 175);">{{ formatNumber(item.likeNum) }}</span>
|
||||
<el-link v-if="item.commentId" @click.once="addLike(item.commentId)" icon="el-icon-star-off" :underline="false">点赞</el-link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -392,22 +392,32 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
toUserPage() {
|
||||
this.$router.push({
|
||||
path: '/UserInfoPage',
|
||||
query: {
|
||||
name: this.username,
|
||||
refresh: true
|
||||
}
|
||||
})
|
||||
if(this.username){
|
||||
this.$router.push({
|
||||
path: '/UserInfoPage',
|
||||
query: {
|
||||
name: this.username,
|
||||
refresh: true
|
||||
}
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
toUserPage2(username) {
|
||||
this.$router.push({
|
||||
path: '/UserInfoPage',
|
||||
query: {
|
||||
name: username,
|
||||
refresh: true
|
||||
}
|
||||
})
|
||||
if(username){
|
||||
this.$router.push({
|
||||
path: '/UserInfoPage',
|
||||
query: {
|
||||
name: username,
|
||||
refresh: true
|
||||
}
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
toComment(id){
|
||||
document.querySelector(id).scrollIntoView(true)
|
||||
@@ -447,9 +457,12 @@ export default {
|
||||
that.username=res.data.project.username;
|
||||
that.fileAddress=res.data.project.fileAddress;
|
||||
// that.userUri=res.data.project.userUri;
|
||||
that.getDetailByGitHub();
|
||||
// that.getGithub();
|
||||
that.changeAvatarByLocal();
|
||||
if(res.data){
|
||||
that.getDetailByGitHub();
|
||||
// that.getGithub();
|
||||
that.changeAvatarByLocal();
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
reload() {
|
||||
@@ -698,9 +711,6 @@ export default {
|
||||
// 请求的地址
|
||||
url: '/github/'+this.projectName,
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
|
||||
}
|
||||
}).then((res)=>{
|
||||
if(res.data){
|
||||
that.github.starNum=res.data.stargazers_count;
|
||||
|
Reference in New Issue
Block a user