refactor(ProjectManage): 为指定列添加排序功能
- 在 TableList.vue 文件中,为 'project_name'、'status_txt'、'updated_at' 和 'created_at' 列添加了排序功能- 通过在列配置中添加 sorter 属性来实现排序
This commit is contained in:
@@ -523,12 +523,14 @@ export default defineComponent({
|
|||||||
title: item.title,
|
title: item.title,
|
||||||
key: key,
|
key: key,
|
||||||
dataIndex: key,
|
dataIndex: key,
|
||||||
sorter: true,
|
|
||||||
width: 200,
|
width: 200,
|
||||||
slots: {
|
slots: {
|
||||||
customRender: key
|
customRender: key
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
if (['project_name','status_txt','updated_at','created_at'].includes(key)){
|
||||||
|
column.sorter = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为特定列添加自定义渲染
|
// 为特定列添加自定义渲染
|
||||||
|
|||||||
Reference in New Issue
Block a user