diff --git a/src/layout/header/components/index.ts b/src/layout/header/components/index.ts new file mode 100644 index 000000000..e9cc94f79 --- /dev/null +++ b/src/layout/header/components/index.ts @@ -0,0 +1,3 @@ +import SearchModal from './search/index.vue'; + +export { SearchModal }; diff --git a/src/layout/header/components/search/components/SearchFooter.vue b/src/layout/header/components/search/components/SearchFooter.vue new file mode 100644 index 000000000..27a2727ea --- /dev/null +++ b/src/layout/header/components/search/components/SearchFooter.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/layout/header/components/search/components/SearchResult.vue b/src/layout/header/components/search/components/SearchResult.vue new file mode 100644 index 000000000..722a6d059 --- /dev/null +++ b/src/layout/header/components/search/components/SearchResult.vue @@ -0,0 +1,58 @@ + + + + diff --git a/src/layout/header/components/search/index.vue b/src/layout/header/components/search/index.vue new file mode 100644 index 000000000..639258e2e --- /dev/null +++ b/src/layout/header/components/search/index.vue @@ -0,0 +1,150 @@ + + + + diff --git a/src/layout/header/index.vue b/src/layout/header/index.vue index bf45073cb..6f6e3eac0 100644 --- a/src/layout/header/index.vue +++ b/src/layout/header/index.vue @@ -51,6 +51,7 @@ + @@ -79,6 +80,7 @@ GithubOutlined, LockOutlined, } from '@ant-design/icons-vue'; + import { SearchModal } from './components'; import { useUserStore } from '@/store/modules/user'; import { useLockscreenStore } from '@/store/modules/lockscreen'; @@ -96,6 +98,7 @@ const router = useRouter(); const route = useRoute(); const userInfo = computed(() => userStore.userInfo); + const searchVisible = ref(false); const menus = computed(() => { console.log('route', route, userStore.menus); if (route.meta?.namePath) { @@ -204,6 +207,9 @@ { icon: SearchOutlined, tips: '搜索', + eventObject: { + click: () => (searchVisible.value = true), + }, }, { icon: GithubOutlined,