refactor(Survey): 修复 Analysis 组件中的选项显示逻辑

- 在 AnalysisInfo 组件中,增加了对 option 数组长度的判断- 确保在 option 数组为空时,不会尝试访问第一个
This commit is contained in:
陈昱达
2025-05-16 17:15:45 +08:00
parent 720648274e
commit b6fca9f827

View File

@@ -50,7 +50,7 @@ const getTableHeadProps = (values: any[], option) => {
}
});
}
if (option && option[0].option) {
if (option && option.length > 0 && option[0].option) {
head.unshift({
label: '选项',
prop: 'option',