Skip to content

Commit

Permalink
fix: 修复菜单管理回显问题
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jan 10, 2024
1 parent 8ce00ab commit d9ca9ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/Authorization/Menu/components/Write.vue
Expand Up @@ -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()
Expand Down Expand Up @@ -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([
Expand Down

0 comments on commit d9ca9ba

Please sign in to comment.