From 6e6ceaf7153555e1d2ee218e8ed5c1552625f37e Mon Sep 17 00:00:00 2001 From: MICD Date: Thu, 14 Oct 2021 15:36:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devui-theme/components/NavBar.vue | 4 ++ .../devui-theme/components/NavBarTitle.vue | 1 + .../devui-theme/components/NavSearch.vue | 39 +++++++++++++++++++ .../devui-theme/components/SideBarLinks.vue | 9 +++++ 4 files changed, 53 insertions(+) create mode 100644 docs/.vitepress/devui-theme/components/NavSearch.vue diff --git a/docs/.vitepress/devui-theme/components/NavBar.vue b/docs/.vitepress/devui-theme/components/NavBar.vue index 2f32a367..c11ad6fd 100644 --- a/docs/.vitepress/devui-theme/components/NavBar.vue +++ b/docs/.vitepress/devui-theme/components/NavBar.vue @@ -5,11 +5,13 @@ import { Switch as DSwitch } from '@devui/switch' import NavBarTitle from './NavBarTitle.vue' import NavLinks from './NavLinks.vue' import ToggleSideBarButton from './ToggleSideBarButton.vue' +import NavSearch from './NavSearch.vue' const theme = new Theme("light"); const darkMode = ref(false); const switchText = ref("浅色"); +const searchText = ref('') watch( () => darkMode.value, @@ -28,6 +30,8 @@ defineEmits(['toggle']) + +
diff --git a/docs/.vitepress/devui-theme/components/NavBarTitle.vue b/docs/.vitepress/devui-theme/components/NavBarTitle.vue index 4c54558a..7b1405f3 100644 --- a/docs/.vitepress/devui-theme/components/NavBarTitle.vue +++ b/docs/.vitepress/devui-theme/components/NavBarTitle.vue @@ -26,6 +26,7 @@ const { site, theme, localePath } = useData() font-size: 1.3rem; font-weight: 600; color: $devui-text; + margin-right: 40px; } .nav-bar-title:hover { diff --git a/docs/.vitepress/devui-theme/components/NavSearch.vue b/docs/.vitepress/devui-theme/components/NavSearch.vue new file mode 100644 index 00000000..4b2ca1e5 --- /dev/null +++ b/docs/.vitepress/devui-theme/components/NavSearch.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/docs/.vitepress/devui-theme/components/SideBarLinks.vue b/docs/.vitepress/devui-theme/components/SideBarLinks.vue index 768013e3..49b73176 100644 --- a/docs/.vitepress/devui-theme/components/SideBarLinks.vue +++ b/docs/.vitepress/devui-theme/components/SideBarLinks.vue @@ -1,8 +1,17 @@