diff --git a/.env.localhost b/.env.localhost
index b919d0f..1104cf0 100644
--- a/.env.localhost
+++ b/.env.localhost
@@ -2,7 +2,7 @@
VITE_PUBLIC_PATH = '/'
# 是否启用MOCK
-VITE_APP_USE_MOCK = false
+VITE_APP_USE_MOCK = true
# proxy
VITE_PROXY = [["/api-local","http://127.0.0.1:8002/api"],["/api-mock","http://127.0.0.1:8003"]]
diff --git a/mock/system/router.js b/mock/system/router.js
index 9b99b23..ab34519 100644
--- a/mock/system/router.js
+++ b/mock/system/router.js
@@ -3,6 +3,7 @@ const asyncRoutes = [
path: '/system',
component: 'Layout',
redirect: '/system/menu',
+ pid: 0,
title: 'System',
meta: {
title: '系统管理'
diff --git a/src/components/Search/index.vue b/src/components/Search/index.vue
index 965342d..3746bbc 100644
--- a/src/components/Search/index.vue
+++ b/src/components/Search/index.vue
@@ -8,7 +8,7 @@
-
+
@@ -48,15 +48,11 @@ export default {
const len = ref(props.info.length - 1)
const itemRefs = ref([])
const showButton = ref(!!(showItemNum.value < len.value))
- /* 获取传递的props */
- const data = reactive({
- info: toRaw(props.info)
- })
const form = ref({})
/* 初始化搜索表单信息 */
function initForm() {
- data.info.forEach((item) => {
- if (item.key) form.value[item.key] = ''
+ Object.keys(form.value).forEach((key) => {
+ form.value[key] = null
})
itemRefs.value.forEach((item) => {
item.clearValue()
diff --git a/src/layout/components/Menu/index.vue b/src/layout/components/Menu/index.vue
index aaa1812..762e385 100644
--- a/src/layout/components/Menu/index.vue
+++ b/src/layout/components/Menu/index.vue
@@ -1,7 +1,6 @@
{
if (route.title && !route.isHidden) {
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index fe3acda..c51e996 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -82,7 +82,7 @@ function dataArrayToRoutes(routes) {
tmp.name = tmp.title
tmp.meta = {
...tmp.meta,
- title: tmp.title
+ title: tmp.meta.title || tmp.title
}
res.push(tmp)
})
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index 6a79288..61a55c8 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -1,8 +1,8 @@
-
-
+
diff --git a/src/views/system/menu/info.js b/src/views/system/menu/info.js
index 94939bf..f4f8ec5 100644
--- a/src/views/system/menu/info.js
+++ b/src/views/system/menu/info.js
@@ -1,9 +1,12 @@
const data = [
{
label: '菜单名称',
- key: 'title',
+ type: 'area',
+ key: 'name',
+ refIndex: 0,
props: {
- placeholder: '请输入菜单名称'
+ placeholder: '请输入菜单名称',
+ options: [{ label: 1, value: 1, children: [{ label: '1-1', value: '1-1' }] }]
}
}
]