🐛 文章编辑按钮无法正常显示问题修复

This commit is contained in:
ronger 2022-01-04 10:06:22 +08:00
parent ea39012de1
commit adbdeecebc

View File

@ -42,28 +42,31 @@
# {{ tag.tagTitle }} # {{ tag.tagTitle }}
</el-tag> </el-tag>
</el-col> </el-col>
<el-col v-if="user" :span="12" style="text-align: right;"> <client-only>
<template v-if="user.idUser !== article.articleAuthorId"> <el-col v-if="user" :span="12" style="text-align: right;">
<el-button size="mini" v-if="isFollower(article.articleAuthorId)" @click="cancelFollowUser(article.articleAuthorId)" plain> <template v-if="user.idUser !== article.articleAuthorId">
取消关注 <el-button size="mini" v-if="isFollower(article.articleAuthorId)"
</el-button> @click="cancelFollowUser(article.articleAuthorId)" plain>
<el-button size="mini" v-else @click="followUser(article.articleAuthorId)" plain>关注</el-button> 取消关注
</template> </el-button>
<el-button size="mini" v-if="hasPermissions" @click="handleCommand('edit')" plain>编辑文章</el-button> <el-button size="mini" v-else @click="followUser(article.articleAuthorId)" plain>关注</el-button>
<template v-if="isAdmin"> </template>
<el-button size="mini" @click="handleCommand('editTag')" plain>编辑标签</el-button> <el-button size="mini" v-if="hasPermissions" @click="handleCommand('edit')" plain>编辑文章</el-button>
<el-button v-if="isPerfect" size="mini" @click="cancelPreference" plain>取消优选</el-button> <template v-if="isAdmin">
<el-button v-else size="mini" @click="setPreference" plain>设为优选</el-button> <el-button size="mini" @click="handleCommand('editTag')" plain>编辑标签</el-button>
</template> <el-button v-if="isPerfect" size="mini" @click="cancelPreference" plain>取消优选</el-button>
<template v-else-if="hasPermissions"> <el-button v-else size="mini" @click="setPreference" plain>设为优选</el-button>
<el-button size="mini" @click="handleCommand('editTag')" plain>编辑标签</el-button> </template>
</template> <template v-else-if="hasPermissions">
<el-button size="mini" @click="handleCommand('share')" plain>分享</el-button> <el-button size="mini" @click="handleCommand('editTag')" plain>编辑标签</el-button>
</el-col> </template>
<el-col v-else :span="12" style="text-align: right;"> <el-button size="mini" @click="handleCommand('share')" plain>分享</el-button>
<el-button size="mini" @click="gotoLogin" plain>关注</el-button> </el-col>
<el-button size="mini" @click="handleCommand('share')" plain>分享</el-button> <el-col v-else :span="12" style="text-align: right;">
</el-col> <el-button size="mini" @click="gotoLogin" plain>关注</el-button>
<el-button size="mini" @click="handleCommand('share')" plain>分享</el-button>
</el-col>
</client-only>
</el-col> </el-col>
<el-col v-if="isShare" style="margin-bottom: 1rem;"> <el-col v-if="isShare" style="margin-bottom: 1rem;">
<share-box :url="shareData.shareUrl"></share-box> <share-box :url="shareData.shareUrl"></share-box>