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 @@