fix:修复我的问卷操作列点击报错问题
This commit is contained in:
@@ -503,15 +503,32 @@ export default defineComponent({
|
||||
for (const key in columnsObj) {
|
||||
if (Object.prototype.hasOwnProperty.call(columnsObj, key)) {
|
||||
const item = columnsObj[key];
|
||||
|
||||
console.log(item);
|
||||
let column = null
|
||||
// 创建新的列定义对象
|
||||
const column = {
|
||||
title: item.title,
|
||||
key: key,
|
||||
dataIndex: key,
|
||||
sorter: true,
|
||||
width: 200
|
||||
};
|
||||
if (key === 'tag'){
|
||||
column = {
|
||||
title: '问卷标签',
|
||||
key: 'tag[0].title',
|
||||
dataIndex: 'tag[0].title',
|
||||
// align: "center",
|
||||
slots: {
|
||||
customRender: 'tag'
|
||||
},
|
||||
width: 120
|
||||
}
|
||||
}else{
|
||||
column = {
|
||||
title: item.title,
|
||||
key: key,
|
||||
dataIndex: key,
|
||||
sorter: true,
|
||||
width: 200,
|
||||
slots: {
|
||||
customRender: key
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// 为特定列添加自定义渲染
|
||||
// if (key === 'project_name') {
|
||||
|
||||
Reference in New Issue
Block a user