表格根据列的数量动态固定列

uat_us
caiyiling 2024-04-26 14:38:49 +08:00
parent e744cbda51
commit 806010c6d4
1 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,7 @@
<el-table-column <el-table-column
:label="$t('trials:adReview:table:view')" :label="$t('trials:adReview:table:view')"
width="200" width="200"
:fixed="judgeQuestion.length > 4 ? 'right' : false" :fixed="isFixed ? 'right' : false"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看R1详情 --> <!-- 查看R1详情 -->
@ -196,7 +196,8 @@ export default {
imageUrl: '', imageUrl: '',
fileList: [], fileList: [],
visitTaskArmList: [], visitTaskArmList: [],
judgeQuestion: [] judgeQuestion: [],
isFixed: false
} }
}, },
mounted() { mounted() {
@ -220,6 +221,7 @@ export default {
}) })
} }
this.judgeQuestion = judgeQS this.judgeQuestion = judgeQS
this.isFixed = this.judgeQuestion.length > 0 && this.judgeQuestion[0].judgeQuestionList.length > 4
this.adInfo = JudgeInfo this.adInfo = JudgeInfo
this.adForm.judgeResultTaskId = JudgeInfo.JudgeResultTaskId this.adForm.judgeResultTaskId = JudgeInfo.JudgeResultTaskId