mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
106 lines
3.4 KiB
Vue
106 lines
3.4 KiB
Vue
<template>
|
|
<div class="put-list">
|
|
<ul v-if="list.length > 0">
|
|
<li class="put-list-index" v-for="item in list" :key="item.id">
|
|
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px;margin-top:10px">
|
|
<span v-if="!personal">{{item.aname}}</span>{{item.cusInfo}}
|
|
<span style="margin-left:28px">{{item.eventTime}}</span>
|
|
<span v-if="personal && !item.hidden" class="follow-hide" style="float:right" @click="emitHide(item.id)">
|
|
<svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏
|
|
</span>
|
|
</p>
|
|
<h6 class="put-title-info follow-home-title">{{item.info.title || item.contentInfo}}
|
|
<span class="portal-time follow-hide" style="float:right" v-if="!isDynamic && personal && !item.hidden" @click="emitHide(item.id)">
|
|
<svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏
|
|
</span>
|
|
</h6>
|
|
<div class="put-footer">
|
|
<div style="margin-top:20px;font-size: 14px;color: #666666;">{{item.info.answers}}个回答</div>
|
|
<el-button class="btn" plain @click="jumpDetail(item.info)">去回答</el-button>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div v-else class="home-no-list">
|
|
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
|
|
<p class="text">还没有提问</p>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import interactBar from "@/components/Portal/interactBar.vue";
|
|
// import author from "@/components/Portal/authorInfo.vue";
|
|
export default{
|
|
name:"PutList",
|
|
components: {
|
|
interactBar,
|
|
// timeShow,
|
|
// author
|
|
},
|
|
props:{
|
|
list:{
|
|
type:Array,
|
|
default:()=>[]
|
|
},
|
|
isDynamic:{
|
|
type:Boolean,
|
|
default:false,
|
|
},
|
|
personal:{
|
|
type:Boolean,
|
|
default:false,
|
|
}
|
|
},
|
|
data(){
|
|
return{
|
|
putList:[]
|
|
}
|
|
},
|
|
methods:{
|
|
emitHide(id) {
|
|
this.$emit('hideIndex',id)
|
|
},
|
|
jumpDetail(data) {
|
|
if(!data.id){
|
|
return;
|
|
}
|
|
this.$router.push({ path: '/qa/answer', query: { id: data.id } });
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.put-list{
|
|
.put-title-info{
|
|
margin: 0;
|
|
}
|
|
ul{
|
|
margin: 0;
|
|
}
|
|
.put-footer{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 24px;
|
|
.btn{
|
|
width: 140px;
|
|
height: 40px;
|
|
}
|
|
.el-button{
|
|
border: 1px solid #3379FB;
|
|
border-radius: 4px;
|
|
color: #3379FB;
|
|
}
|
|
}
|
|
.put-list-index{
|
|
padding: 40px 0 36px 0;
|
|
border-bottom: 1px solid rgba($color: #999999, $alpha: 0.2);
|
|
&:first-child{
|
|
padding-top: 20px;
|
|
}
|
|
}
|
|
}
|
|
|
|
</style>
|
|
|