diff --git a/src/components/SearchMenu/SearchFooter.vue b/src/components/SearchMenu/SearchFooter.vue new file mode 100644 index 00000000..80031de6 --- /dev/null +++ b/src/components/SearchMenu/SearchFooter.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/components/SearchMenu/SearchModal.vue b/src/components/SearchMenu/SearchModal.vue new file mode 100644 index 00000000..562762af --- /dev/null +++ b/src/components/SearchMenu/SearchModal.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/components/SearchMenu/SearchResult.vue b/src/components/SearchMenu/SearchResult.vue new file mode 100644 index 00000000..aa4cea6b --- /dev/null +++ b/src/components/SearchMenu/SearchResult.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/components/SearchMenu/index.vue b/src/components/SearchMenu/index.vue new file mode 100644 index 00000000..b9c4ee4c --- /dev/null +++ b/src/components/SearchMenu/index.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/config/layouts.ts b/src/config/layouts.ts index ac5ab6ea..8d95cdfa 100644 --- a/src/config/layouts.ts +++ b/src/config/layouts.ts @@ -18,6 +18,8 @@ export interface LayoutSettings { showThemeSwitch: boolean /** 是否显示全屏按钮 */ showScreenfull: boolean + /** 是否显示搜索按钮 */ + showSearchMenu: boolean /** 是否缓存标签栏 */ cacheTagsView: boolean /** 是否显示灰色模式 */ @@ -35,6 +37,7 @@ export const layoutSettings: LayoutSettings = getConfigLayout() ?? { showNotify: true, showThemeSwitch: true, showScreenfull: true, + showSearchMenu: true, cacheTagsView: false, showGreyMode: false, showColorWeakness: false diff --git a/src/icons/svg/keyboard-down.svg b/src/icons/svg/keyboard-down.svg new file mode 100644 index 00000000..de625438 --- /dev/null +++ b/src/icons/svg/keyboard-down.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/keyboard-enter.svg b/src/icons/svg/keyboard-enter.svg new file mode 100644 index 00000000..819b87ef --- /dev/null +++ b/src/icons/svg/keyboard-enter.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/keyboard-esc.svg b/src/icons/svg/keyboard-esc.svg new file mode 100644 index 00000000..33256bf7 --- /dev/null +++ b/src/icons/svg/keyboard-esc.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/keyboard-up.svg b/src/icons/svg/keyboard-up.svg new file mode 100644 index 00000000..e84519a2 --- /dev/null +++ b/src/icons/svg/keyboard-up.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/search.svg b/src/icons/svg/search.svg new file mode 100644 index 00000000..691a5f12 --- /dev/null +++ b/src/icons/svg/search.svg @@ -0,0 +1 @@ + diff --git a/src/layouts/components/NavigationBar/index.vue b/src/layouts/components/NavigationBar/index.vue index e5d96cf9..024b26c1 100644 --- a/src/layouts/components/NavigationBar/index.vue +++ b/src/layouts/components/NavigationBar/index.vue @@ -9,9 +9,10 @@ import { UserFilled } from "@element-plus/icons-vue" import Hamburger from "../Hamburger/index.vue" import Breadcrumb from "../Breadcrumb/index.vue" import Sidebar from "../Sidebar/index.vue" +import Notify from "@/components/Notify/index.vue" import ThemeSwitch from "@/components/ThemeSwitch/index.vue" import Screenfull from "@/components/Screenfull/index.vue" -import Notify from "@/components/Notify/index.vue" +import SearchMenu from "@/components/SearchMenu/index.vue" import { DeviceEnum } from "@/constants/app-key" const router = useRouter() @@ -20,7 +21,7 @@ const settingsStore = useSettingsStore() const userStore = useUserStore() const { sidebar, device } = storeToRefs(appStore) -const { layoutMode, showNotify, showThemeSwitch, showScreenfull } = storeToRefs(settingsStore) +const { layoutMode, showNotify, showThemeSwitch, showScreenfull, showSearchMenu } = storeToRefs(settingsStore) const isTop = computed(() => layoutMode.value === "top") const isMobile = computed(() => device.value === DeviceEnum.Mobile) @@ -43,6 +44,7 @@ const logout = () => {
+ diff --git a/src/layouts/components/Settings/index.vue b/src/layouts/components/Settings/index.vue index 03bf7100..5f2fb9c8 100644 --- a/src/layouts/components/Settings/index.vue +++ b/src/layouts/components/Settings/index.vue @@ -17,6 +17,7 @@ const { showNotify, showThemeSwitch, showScreenfull, + showSearchMenu, cacheTagsView, showGreyMode, showColorWeakness @@ -30,6 +31,7 @@ const switchSettings = { 显示消息通知: showNotify, 显示切换主题按钮: showThemeSwitch, 显示全屏按钮: showScreenfull, + 显示搜索按钮: showSearchMenu, 是否缓存标签栏: cacheTagsView, 显示灰色模式: showGreyMode, 显示色弱模式: showColorWeakness