增加返回上一级按钮

This commit is contained in:
lmj
2022-10-22 14:59:03 +08:00
parent d13ff1a227
commit 1f234de802
2 changed files with 17 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
<div style="padding-top:10px;"> <div style="padding-top:10px;">
<p class="ach-title">{{self?'我':'TA'}}的成就</p> <p class="ach-title">{{self?'我':'TA'}}的成就</p>
<ul class="ach-ul"> <ul class="ach-ul">
<li class="ach-box" v-for="ach in medalList" :key="ach.id"> <li class="ach-box" v-for="ach in medalList" :key="ach.id" @click="jumach(ach)">
<!-- <img src="/images/medal.png" alt=""> --> <!-- <img src="/images/medal.png" alt=""> -->
<medal-img style="width:52px;height:58px" :item="ach"></medal-img> <medal-img style="width:52px;height:58px" :item="ach"></medal-img>
<p>{{ach.medalName}}</p> <p>{{ach.medalName}}</p>
@@ -91,6 +91,9 @@
} }
}, },
methods:{ methods:{
jumach(ach){
//console.log(ach,'lmj')
},
toHome(ava) { toHome(ava) {
this.$router.push({path:this.$xpage.getHomePath(ava.aid)}) this.$router.push({path:this.$xpage.getHomePath(ava.aid)})
}, },

View File

@@ -1,7 +1,8 @@
<template> <template>
<!--评论组件--> <!--评论组件-->
<div class="leaving-message"> <div class="leaving-message">
<div> <el-button @click="backto()" class="backbut" icon="el-icon-arrow-left" type="text">返回主页</el-button>
<div style="margin-top:20px">
<el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="textarea" maxlength="200" show-word-limit></el-input> <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="textarea" maxlength="200" show-word-limit></el-input>
<el-button class="lea-btn" type="primary" @click="add()">发布</el-button> <el-button class="lea-btn" type="primary" @click="add()">发布</el-button>
</div> </div>
@@ -15,7 +16,7 @@
<!-- <img src="/images/Avatarman.png"/> --> <!-- <img src="/images/Avatarman.png"/> -->
</div> </div>
<div class="li-text"> <div class="li-text">
<p class="portal-title-tow">{{item.authorInfo.name}} <span class="portal-summary-text">个性签名{{item.authorInfo.sign}}</span></p> <p class="portal-title-tow">{{item.authorInfo.name}} <span class="portal-summary-text">{{item.authorInfo.sign}}</span></p>
<p>{{item.content}}</p> <p>{{item.content}}</p>
</div> </div>
<div class="li-right"> <div class="li-right">
@@ -34,7 +35,7 @@
<div class="lev-li"> <div class="lev-li">
<div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div> <div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
<div class="li-text"> <div class="li-text">
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名1{{rep.authorInfo.sign}}</span></p> <p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">1{{rep.authorInfo.sign}}</span></p>
<p>{{rep.content}}</p> <p>{{rep.content}}</p>
</div> </div>
<div class="li-right"> <div class="li-right">
@@ -106,6 +107,9 @@
}, },
methods: { methods: {
backto(){
this.$router.go(-1);
},
delReplySon(item,index) { //子级的删除手动删掉,调用保存接口 delReplySon(item,index) { //子级的删除手动删掉,调用保存接口
item.replysList.splice(index,1); item.replysList.splice(index,1);
let replysData = { let replysData = {
@@ -244,12 +248,17 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.backbut{
position: absolute;
top: 10px;
left: 10px;
}
.leaving-message{ .leaving-message{
flex: 1; flex: 1;
// width: 100%;
background: #FFFFFF; background: #FFFFFF;
border-radius: 4px; border-radius: 4px;
padding: 48px 48px; padding: 48px 48px;
position: relative;
.lea-btn { .lea-btn {
float: right; float: right;
margin-top: 26px; margin-top: 26px;