From c49ef334bcb1981d6f13eee4e80e7f54427a2869 Mon Sep 17 00:00:00 2001 From: hejianhao <15708179461@qq.com> Date: 星期一, 21 四月 2025 17:20:30 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- src/components/EvaluateTable/index.vue | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/EvaluateTable/index.vue b/src/components/EvaluateTable/index.vue index f42ee82..573acfd 100644 --- a/src/components/EvaluateTable/index.vue +++ b/src/components/EvaluateTable/index.vue @@ -149,12 +149,20 @@ }, deep: true }, - isReadonly: { + viewJson: { handler(newVal, oldVal) { - if (newVal) { - this.activeIndex = JSON.parse(this.viewJson) + console.log("viewJson changed:", newVal) + if (newVal && this.isReadonly) { + try { + const parsedData = JSON.parse(newVal) + this.activeIndex = parsedData + console.log("activeIndex updated:", this.activeIndex) + } catch (e) { + console.error("Failed to parse viewJson:", e) + } } }, + immediate: true } }, data() { -- Gitblit v1.7.1