From ffd046fc0a9681d525fed10ca7e9af81ea883427 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 4 Jun 2026 13:48:17 +0800 Subject: [PATCH] fix(diy-group): add error catch for deep clone diyData MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免当diyData格式异常时导致页面崩溃,捕获序列化报错并打印日志 --- components-diy/diy-group.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components-diy/diy-group.vue b/components-diy/diy-group.vue index df2552e..2dfcce5 100644 --- a/components-diy/diy-group.vue +++ b/components-diy/diy-group.vue @@ -295,7 +295,11 @@ export default { }; }, created() { - this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData)); + try { + this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData)); + } catch (e) { + console.error(e); + } }, computed: { topNavColor() {