...
|
...
|
@@ -3,10 +3,12 @@ |
|
|
<div class="action-wrap">
|
|
|
<div class="action-list">
|
|
|
<div class="action-item" v-for="(i, index) in list" :key="index" v-show="!i.hide" @click="onClick(i.fnName)">
|
|
|
<p class="icon">
|
|
|
<span class="iconfont" :class="i.icon"></span>
|
|
|
</p>
|
|
|
<p class="name">{{i.name}}</p>
|
|
|
<a :href="i.href || 'javascript:;'">
|
|
|
<p class="icon">
|
|
|
<span class="iconfont" :class="i.icon"></span>
|
|
|
</p>
|
|
|
<p class="name">{{i.name}}</p>
|
|
|
</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cancel" @click="hide">取消</div>
|
...
|
...
|
@@ -38,6 +40,10 @@ export default { |
|
|
fnName: 'actionrReport'
|
|
|
},
|
|
|
{
|
|
|
icon: 'icon-edit',
|
|
|
name: '编辑'
|
|
|
},
|
|
|
{
|
|
|
icon: 'icon-delete',
|
|
|
name: '删除',
|
|
|
fnName: 'actionDelete'
|
...
|
...
|
@@ -49,11 +55,15 @@ export default { |
|
|
...articleStore.mapActions(['reportArticle', 'deleteArticle']),
|
|
|
...userStore.mapActions(['followUser']),
|
|
|
show(params, uid, index) {
|
|
|
this.index = index;
|
|
|
this.index = index || 0;
|
|
|
params = params || {};
|
|
|
|
|
|
const isAuthor = params.isAuthor !== 'Y';
|
|
|
|
|
|
this.list[0].hide = params.hasAttention !== 'Y';
|
|
|
this.list[2].hide = +params.authorUid !== uid || params.authorType !== 1;
|
|
|
this.list[2].href = `?openby:yohobuy={"action":"go.editPost","params":{"articleId":"${params.articleId}"}}`;
|
|
|
this.list[2].hide = isAuthor;
|
|
|
this.list[3].hide = isAuthor;
|
|
|
this.list = [...this.list];
|
|
|
|
|
|
this._params = params;
|
...
|
...
|
|