fix:修复我的问卷操作列点击报错问题

This commit is contained in:
du.meimei
2025-05-17 21:07:02 +08:00
parent 789412ae6a
commit da36f3ffab

View File

@@ -503,15 +503,32 @@ export default defineComponent({
for (const key in columnsObj) { for (const key in columnsObj) {
if (Object.prototype.hasOwnProperty.call(columnsObj, key)) { if (Object.prototype.hasOwnProperty.call(columnsObj, key)) {
const item = columnsObj[key]; const item = columnsObj[key];
console.log(item);
let column = null
// 创建新的列定义对象 // 创建新的列定义对象
const column = { 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, title: item.title,
key: key, key: key,
dataIndex: key, dataIndex: key,
sorter: true, sorter: true,
width: 200 width: 200,
slots: {
customRender: key
},
}; };
}
// 为特定列添加自定义渲染 // 为特定列添加自定义渲染
// if (key === 'project_name') { // if (key === 'project_name') {