From 5686578b754a8b1222b1b432194698554531112f Mon Sep 17 00:00:00 2001 From: zhangtao <1176193409@qq.com> Date: Tue, 5 Jul 2022 17:10:10 +0800 Subject: [PATCH] init --- .env.localhost | 2 +- mock/system/router.js | 1 + src/components/Search/index.vue | 10 +++------- src/layout/components/Menu/index.vue | 2 +- src/store/modules/permission.js | 2 +- src/views/system/menu/index.vue | 6 +++--- src/views/system/menu/info.js | 7 +++++-- 7 files changed, 15 insertions(+), 15 deletions(-) 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 @@