fix:修复我的问卷操作列点击报错问题
This commit is contained in:
@@ -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'){
|
||||||
title: item.title,
|
column = {
|
||||||
key: key,
|
title: '问卷标签',
|
||||||
dataIndex: key,
|
key: 'tag[0].title',
|
||||||
sorter: true,
|
dataIndex: 'tag[0].title',
|
||||||
width: 200
|
// 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') {
|
// if (key === 'project_name') {
|
||||||
|
|||||||
Reference in New Issue
Block a user