refactor(knowledge): 优化知识详情页面的状态显示逻辑

-将状态列的 render 函数替换为直接使用 statusLabel 字段- 简化了代码结构,提高了渲染性能
This commit is contained in:
陈昱达
2025-05-14 17:17:27 +08:00
parent 6a321263e6
commit a5882cda4a

View File

@@ -662,13 +662,13 @@ export default {
}, },
{ {
key: '状态', key: '状态',
prop: 'displayStatus', prop: 'statusLabel'
render: (h, params) => { // render: (h, params) => {
let label = this.displayStatus.find(item => { // let label = this.displayStatus.find(item => {
return item.value === params.row.displayStatus // return item.value === params.row.displayStatus
}).label // }).label
return h('div', label ? label : 'N/A') // return h('div', label ? label : 'N/A')
} // }
}, },
{ {
key: '召回次数', key: '召回次数',