From da36f3ffabff7e7c1a06950c4fe0c6c7203dfbbd Mon Sep 17 00:00:00 2001 From: "du.meimei" Date: Sat, 17 May 2025 21:07:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E6=93=8D=E4=BD=9C=E5=88=97=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManage/fragment/TableList.vue | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/views/ProjectManage/fragment/TableList.vue b/src/views/ProjectManage/fragment/TableList.vue index 4f31e5b7..bb77194a 100644 --- a/src/views/ProjectManage/fragment/TableList.vue +++ b/src/views/ProjectManage/fragment/TableList.vue @@ -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') {