Commit 59a87c8e authored by 倪嘉华 's avatar 倪嘉华

Merge branch 'hotfix/bug02' into 'master'

增加评论是否上下线

See merge request alpha/sun!8
parents bf7a4353 e6ef6685
......@@ -219,6 +219,13 @@
</el-table-column>
<el-table-column align="center" label="是否下线">
<template slot-scope="scope">
<el-tag :type="scope.row.is_online | isOnlineFilter">{{ scope.row.is_online=== 1 ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="评论内容">
<template slot-scope="scope">
<span >{{ scope.row.content }}</span>
......@@ -311,6 +318,15 @@
default: false
}
},
filters: {
isOnlineFilter(status) {
const statusMap = {
1: 'success',
0: 'info',
}
return statusMap[status]
},
},
data() {
const validateRequire = (rule, value, callback) => {
if (value === '') {
......@@ -340,7 +356,6 @@
rules: {
posting_time: [{validator: validateRequire, trigger: 'blur'}],
},
ReplyTypeOptions: [
{'key': '1', 'display_name': '帖主的评论'},
{'key': '2', 'display_name': '评论帖子'},
......
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