Commit aecdc1c0 authored by 小费同学阿's avatar 小费同学阿 💬

代码规范修复

parent 5bd237a7
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
['image'] // 链接、图片、视频 ['image'] // 链接、图片、视频
] ]
}, },
placeholder: '请输入内容', placeholder: '请输入文章内容',
readOnly: this.readOnly readOnly: this.readOnly
} }
} }
......
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
updateArticle(this.form).then(response => { updateArticle(this.form).then(response => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '修改成功!' message: '修改成功'
}) })
this.goBack() this.goBack()
}) })
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
addArticle(this.form).then(response => { addArticle(this.form).then(response => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '新增成功!' message: '新增成功'
}) })
this.goBack() this.goBack()
}).finally(_ => { }).finally(_ => {
......
...@@ -15,11 +15,10 @@ ...@@ -15,11 +15,10 @@
</el-form-item> </el-form-item>
<el-form-item style="margin-left: 10px;" prop="articleStatus"> <el-form-item style="margin-left: 10px;" prop="articleStatus">
<el-select v-model.trim="queryParams.articleStatus" clearable placeholder="状态"> <el-select v-model.trim="queryParams.articleStatus" clearable placeholder="状态">
<!-- <el-option label="全部" :value="null" />-->
<el-option <el-option
v-for="item in dict.type.article_status" v-for="item in articleStatusList"
:key="item.value" :key="item.value"
:label="item.label.substring(1)" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
...@@ -137,7 +136,9 @@ ...@@ -137,7 +136,9 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" min-width="60" prop="articleStatus" show-overflow-tooltip> <el-table-column label="状态" min-width="60" prop="articleStatus" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="showStatus(scope.row.articleStatus) === '• 已上架' ? 'color: #67C23A' : 'color: #F56C6C'">{{ showStatus(scope.row.articleStatus) || '-' }}</span> <span :style="showStatus(scope.row.articleStatus) === '• 已上架' ? 'color: #67C23A' : 'color: #F56C6C'">{{
showStatus(scope.row.articleStatus) || '-'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column class-name="small-padding fixed-width" label="操作" min-width="100"> <el-table-column class-name="small-padding fixed-width" label="操作" min-width="100">
...@@ -262,6 +263,21 @@ export default { ...@@ -262,6 +263,21 @@ export default {
dicts: ['article_status'], dicts: ['article_status'],
data() { data() {
return { return {
// 文章状态列表
articleStatusList: [
{
label: '全部',
value: ''
},
{
label: '已上架',
value: '0'
},
{
label: '已下架',
value: '1'
}
],
// tab激活 // tab激活
activeName: 'article', activeName: 'article',
// 排序方式下拉框字典写死 // 排序方式下拉框字典写死
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment