fix: 修复菜单管理回显问题
This commit is contained in:
parent
8ce00ab247
commit
d9ca9ba5e8
|
@ -8,6 +8,7 @@ import { getMenuListApi } from '@/api/menu'
|
||||||
import { ElTag } from 'element-plus'
|
import { ElTag } from 'element-plus'
|
||||||
import AddButtonPermission from './AddButtonPermission.vue'
|
import AddButtonPermission from './AddButtonPermission.vue'
|
||||||
import { BaseButton } from '@/components/Button'
|
import { BaseButton } from '@/components/Button'
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
@ -271,8 +272,9 @@ const cacheComponent = ref('')
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.currentRow,
|
() => props.currentRow,
|
||||||
(currentRow) => {
|
(value) => {
|
||||||
if (!currentRow) return
|
if (!value) return
|
||||||
|
const currentRow = cloneDeep(value)
|
||||||
cacheComponent.value = currentRow.type === 1 ? currentRow.component : ''
|
cacheComponent.value = currentRow.type === 1 ? currentRow.component : ''
|
||||||
if (currentRow.parentId === 0) {
|
if (currentRow.parentId === 0) {
|
||||||
setSchema([
|
setSchema([
|
||||||
|
|
Loading…
Reference in New Issue