mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
去掉不再使用的组件
This commit is contained in:
@@ -1,217 +0,0 @@
|
||||
<template>
|
||||
<div class="interact-bar">
|
||||
<div class="interact-bar-left">
|
||||
<img :src="data[fieldsList.avater]" />
|
||||
<span style="width: 170px;display:inline-block;vertical-align: middle;" class="one-line-ellipsis">{{ data[fieldsList.author] }}</span>
|
||||
</div>
|
||||
<div class="interact-bar-btns" :style="{'justify-content':showAlign}">
|
||||
<div v-if="answers" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="回答" placement="left">
|
||||
<svg-icon icon-class="comment"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span>{{ data[fieldsList.answers] }}</span>
|
||||
</div>
|
||||
<div v-if="comments" @click="jumpRouter()" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="评论" placement="left">
|
||||
<svg-icon icon-class="comment"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span>{{ data[fieldsList.comments] }}</span>
|
||||
</div>
|
||||
<div v-if="shares" @click="addShare()" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="分享" placement="top">
|
||||
<svg-icon icon-class="share"></svg-icon>
|
||||
</el-tooltip>
|
||||
{{ data[fieldsList.shares] }}
|
||||
</div>
|
||||
|
||||
<div v-if="favorites" @click="addCollect()" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="收藏" placement="top">
|
||||
<svg-icon icon-class="collection"></svg-icon>
|
||||
</el-tooltip>
|
||||
{{ data[fieldsList.favorites] }}
|
||||
</div>
|
||||
|
||||
<div v-if="praises" @click="addPraise()" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="点赞" placement="top">
|
||||
<svg-icon icon-class="like"></svg-icon>
|
||||
</el-tooltip>
|
||||
{{ data[fieldsList.praises] }}
|
||||
</div>
|
||||
|
||||
<div v-if="views" style="cursor: default;" class="interact-bar-btn">
|
||||
<el-tooltip effect="light" content="浏览量" placement="top">
|
||||
<svg-icon icon-class="views"></svg-icon>
|
||||
</el-tooltip>
|
||||
{{ data[fieldsList.views] }}
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="分享" :visible.sync="shareShow" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
|
||||
<div style="height: 200px;padding-right: 30px;">
|
||||
|
||||
<el-form label-width="100px">
|
||||
<el-form-item label="工号或姓名">
|
||||
<el-input v-model="shareInfo.code" placeholder="您要分享的人的工号或姓名">
|
||||
<el-button slot="append" icon="el-icon-search">搜索</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="shareShow= false">取 消</el-button>
|
||||
<el-button type="primary" >提交分享</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
data:{
|
||||
type:Object,
|
||||
default(){
|
||||
return {
|
||||
avater:'/temp/index/female.jpg',
|
||||
author:'李玉冰(BOEU/教育技术中心)',
|
||||
answers:23,
|
||||
favorites:23,
|
||||
comments:18,
|
||||
shares:16,
|
||||
praises:68,
|
||||
views:12,
|
||||
}
|
||||
}
|
||||
},
|
||||
align:{
|
||||
type:String,
|
||||
default:'right'
|
||||
},
|
||||
answers:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
comments:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
favorites:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
shares:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
praises:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
views:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
fieldsList: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {
|
||||
avater: 'avater',
|
||||
author: 'author',
|
||||
answers:'answers',
|
||||
comments: 'comments',
|
||||
shares: 'shares',
|
||||
favorites: 'favorites',
|
||||
praises: 'praises',
|
||||
views: 'views'
|
||||
};
|
||||
}
|
||||
},
|
||||
iconFilter: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:'article'
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
shareShow:false,
|
||||
shareInfo:{
|
||||
code:''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
showAlign(){
|
||||
if(this.align=='left'){
|
||||
return 'flex-start';
|
||||
}else if(this.align=='right'){
|
||||
return 'flex-end';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
addShare(){
|
||||
//分享
|
||||
this.shareShow=true;
|
||||
},
|
||||
addPraise(){
|
||||
//需要判断是否已点赞,已点赞的不再加
|
||||
this.$message({message:'点赞成功',type:'success'})
|
||||
},
|
||||
addCollect(){
|
||||
//需要判断是否已点赞,已点赞的不再加
|
||||
this.$message({message:'已加入收藏',type:'success'});
|
||||
},
|
||||
jumpRouter(){
|
||||
if(this.type=='article'){
|
||||
this.$router.push({path:'/article/detail'})
|
||||
}
|
||||
if(this.type=='case'){
|
||||
this.$router.push({path:'/case/detail'})
|
||||
}
|
||||
if(this.type=='course'){
|
||||
this.$router.push({path:'/course/detail'})
|
||||
}
|
||||
if(this.type=='qa'){
|
||||
this.$router.push({path:'/qa/answer'})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.interact-bar{
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.interact-bar-left{
|
||||
font-size: 13px;
|
||||
color: #999999;
|
||||
img {
|
||||
margin-right: 10px;
|
||||
width: 30px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.interact-bar-btns {
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.interact-bar-btn {
|
||||
margin: 0 0 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -423,7 +423,6 @@
|
||||
import apiCoursePortal from '@/api/modules/coursePortal.js';
|
||||
import interactBar from '@/components/Portal/interactBar.vue';
|
||||
import ad from '@/components/Portal/adFloat.vue';
|
||||
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import InterestCollection from '@/components/Portal/interestCollection.vue'
|
||||
@@ -453,7 +452,6 @@
|
||||
articleImage,
|
||||
portalFloatTools,
|
||||
authorInfo,
|
||||
interactRowBar,
|
||||
interactBar,
|
||||
courseImage,
|
||||
InterestCollection,
|
||||
|
||||
Reference in New Issue
Block a user