Skip to content

Commit d9ca9ba

Browse files
fix: 修复菜单管理回显问题
1 parent 8ce00ab commit d9ca9ba

File tree

1 file changed

+4
-2
lines changed
  • src/views/Authorization/Menu/components

1 file changed

+4
-2
lines changed

src/views/Authorization/Menu/components/Write.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { getMenuListApi } from '@/api/menu'
88
import { ElTag } from 'element-plus'
99
import AddButtonPermission from './AddButtonPermission.vue'
1010
import { BaseButton } from '@/components/Button'
11+
import { cloneDeep } from 'lodash-es'
1112
1213
const { t } = useI18n()
1314
@@ -271,8 +272,9 @@ const cacheComponent = ref('')
271272
272273
watch(
273274
() => props.currentRow,
274-
(currentRow) => {
275-
if (!currentRow) return
275+
(value) => {
276+
if (!value) return
277+
const currentRow = cloneDeep(value)
276278
cacheComponent.value = currentRow.type === 1 ? currentRow.component : ''
277279
if (currentRow.parentId === 0) {
278280
setSchema([

0 commit comments

Comments
 (0)