mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
2022年5月29日从svn移到git
This commit is contained in:
120
src/components/Case/collectList.vue
Normal file
120
src/components/Case/collectList.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<div style="">
|
||||
<div class="article-list" v-for="(item,idx) in items" :key="idx">
|
||||
<div class="article-info">
|
||||
<div class="article-info-title">
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" style="padding-left: 5px;">{{item.cases.title}}</router-link>
|
||||
<div class="article-info-date">
|
||||
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-info-summary">
|
||||
{{item.cases.summary}}
|
||||
</div>
|
||||
<div class="article-info-tools">
|
||||
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
|
||||
<span>发布时间:{{ item.cases.sysCreateTime | timeFilter }}</span>
|
||||
<span>收藏时间:{{ item.time | timeFilter }}</span>
|
||||
<interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import authorInfo from '@/components/Portal/authorInfo.vue';
|
||||
import interactBar from '@/components/Portal/interactBar.vue'
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
props: {
|
||||
items: { //name,
|
||||
type: Array,
|
||||
default:()=>[]
|
||||
}
|
||||
},
|
||||
filters:{
|
||||
timeFilter(item){
|
||||
return item.split(' ')[0]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
delItem(item){
|
||||
this.$confirm('您确定要取消收藏所选案例吗?', '删除提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('confirm',item)
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
components:{
|
||||
interactBar,
|
||||
authorInfo
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.article-status1{
|
||||
padding: 3px;
|
||||
border: 1px dotted #1EA0FA;
|
||||
color:#1EA0FA;
|
||||
}
|
||||
.article-status2{
|
||||
padding: 3px;
|
||||
border: 1px dotted #00aa00;
|
||||
color:#00aa00;
|
||||
}
|
||||
.article-status3{
|
||||
padding: 3px;
|
||||
border: 1px dotted #ff0000;
|
||||
color:#ff0000;
|
||||
}
|
||||
.article-list {
|
||||
margin: 5px 0;
|
||||
border: 1px solid #dddddd;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.article-info {
|
||||
.article-info-title {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
.article-info-date {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
float: right;
|
||||
font-weight: 200;
|
||||
color: #999999;
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.article-info-summary {
|
||||
height: 65px;
|
||||
color: #999999;
|
||||
}
|
||||
.article-info-tools {
|
||||
color: #999999;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
>span{
|
||||
font-size: 13px;
|
||||
margin-top: -2px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
>span:last-of-type{
|
||||
margin-top: -4px;
|
||||
margin-right:auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user