|
@@ -15,6 +15,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted } from 'vue'
|
|
|
+import { get } from 'lodash-es'
|
|
|
|
|
|
const form = inject('form')
|
|
|
const menuList = inject('menuList')
|
|
@@ -46,7 +47,9 @@ onMounted(() => {
|
|
|
const dealMenu = (list, route_names = []) => {
|
|
|
const result = []
|
|
|
for (const i of list) {
|
|
|
- const { name, config = [], children = [], route_name } = i
|
|
|
+ const { name, children = [], route_name } = i
|
|
|
+ let config = get(i, 'config', [])
|
|
|
+ if (config === null) config = []
|
|
|
const thisRouteNameArr = [...route_names, route_name]
|
|
|
const obj = { name, code: thisRouteNameArr.join('.') }
|
|
|
if (route_name === 'home') obj.disabled = true
|