文章样式的更改

This commit is contained in:
夕阳微笑1 2025-01-06 12:22:14 +08:00
parent 06980e15f1
commit 40f08c6c79

View File

@ -30,8 +30,6 @@
</div> </div>
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%"> <el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
<el-table-column type="index" label="序号" width="100"/> <el-table-column type="index" label="序号" width="100"/>
<el-table-column prop="moduleName" label="模块名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="labelName" label="标签名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip></el-table-column> <el-table-column prop="title" label="标题" show-overflow-tooltip></el-table-column>
<el-table-column prop="articletype" label="文章类型" :formatter="typeFormatter" show-overflow-tooltip></el-table-column> <el-table-column prop="articletype" label="文章类型" :formatter="typeFormatter" show-overflow-tooltip></el-table-column>
<el-table-column label="置顶" show-overflow-tooltip> <el-table-column label="置顶" show-overflow-tooltip>
@ -40,6 +38,8 @@
<el-tag type="error" v-else></el-tag> <el-tag type="error" v-else></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="moduleName" label="模块名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="labelName" label="标签名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="htmlPath" label="链接" min-width="80"> <el-table-column prop="htmlPath" label="链接" min-width="80">
<template #default="scope"> <template #default="scope">
<el-button size="mini" style="border-radius: 10px;" @click="copyLink(scope.row)">复制</el-button> <el-button size="mini" style="border-radius: 10px;" @click="copyLink(scope.row)">复制</el-button>
@ -115,7 +115,13 @@ const getTableData = async() => {
state.tableData.loading = true; state.tableData.loading = true;
let res = await artApi.getArticleList(state.tableData.param); let res = await artApi.getArticleList(state.tableData.param);
if(res?.success){ if(res?.success){
state.tableData.data = res.data.records; state.tableData.data = res.data.records.map((item:any) => {
return{
...item,
moduleName:item.moduleName || '未设置',
labelName:item.labelName || '未设置',
}
});
state.tableData.total = res.data.total; state.tableData.total = res.data.total;
}else{ }else{
ElMessage.error('文章列表获取失败!'); ElMessage.error('文章列表获取失败!');