From d9ca9ba5e8111b7cc3758a8bba14f7fac45c9446 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Wed, 10 Jan 2024 09:54:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Authorization/Menu/components/Write.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/Authorization/Menu/components/Write.vue b/src/views/Authorization/Menu/components/Write.vue index 456073b..65ea782 100644 --- a/src/views/Authorization/Menu/components/Write.vue +++ b/src/views/Authorization/Menu/components/Write.vue @@ -8,6 +8,7 @@ import { getMenuListApi } from '@/api/menu' import { ElTag } from 'element-plus' import AddButtonPermission from './AddButtonPermission.vue' import { BaseButton } from '@/components/Button' +import { cloneDeep } from 'lodash-es' const { t } = useI18n() @@ -271,8 +272,9 @@ const cacheComponent = ref('') watch( () => props.currentRow, - (currentRow) => { - if (!currentRow) return + (value) => { + if (!value) return + const currentRow = cloneDeep(value) cacheComponent.value = currentRow.type === 1 ? currentRow.component : '' if (currentRow.parentId === 0) { setSchema([