🎨 文章管理功能优化

This commit is contained in:
ronger 2021-06-28 10:53:32 +08:00
parent 64d2a748e4
commit 9d02325a19

View File

@ -24,14 +24,14 @@
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
label="#" label="#"
width="40" width="60"
prop="idArticle"> prop="idArticle">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="标题" label="标题"
prop="articleTitle"> prop="articleTitle">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showArticleDetail(scope.row.articlePermalink)">{{ scope.row.articleTitle }}</el-button> <el-button type="text" @click="openLink(scope.row.articlePermalink)">{{ scope.row.articleTitle }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -50,8 +50,10 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="作者" label="作者"
width="100" width="100">
prop="articleAuthorName"> <template slot-scope="scope">
<el-button type="text" @click="openLink('/user/' + scope.row.articleAuthor.userAccount)">{{ scope.row.articleAuthorName }}</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="最后更新时间" label="最后更新时间"
@ -198,8 +200,8 @@ export default {
closeTagsDialog() { closeTagsDialog() {
this.$set(this, 'dialogVisible', false); this.$set(this, 'dialogVisible', false);
}, },
showArticleDetail(articlePermalink) { openLink(link) {
window.open(articlePermalink); window.open(link);
} }
}, },
mounted() { mounted() {