Skip to content

Commit 422ffbd

Browse files
committed
use css hide navbar center
1 parent 0a9f8cf commit 422ffbd

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

docs/.vuepress/components/HomePage.vue

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
</template>
241241

242242
<script setup lang="ts">
243-
import { ref, onMounted, onUnmounted } from "vue";
243+
import { ref } from "vue";
244244
import { useRouter } from "vue-router";
245245
import HopeHomePage from "vuepress-theme-hope/components/HomePage.js";
246246
import HeroSection from "./CustomHero.vue";
@@ -254,14 +254,6 @@ const router = useRouter();
254254
const starter = frontmatter.value.starter || [];
255255
const projects = frontmatter.value.projects || [];
256256
257-
onMounted(() => {
258-
document.getElementsByClassName("navbar-center")[0].style.display = "none";
259-
});
260-
261-
onUnmounted(() => {
262-
document.getElementsByClassName("navbar-center")[0].style.display = "";
263-
});
264-
265257
const downloadTableColumns = [
266258
{
267259
title: "语言",

docs/.vuepress/components/PlatformSwitch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const onChange = (platform) => {
7676
if (nextPlatformDocRouters.indexOf(nextPathPath) > -1) {
7777
router.push(nextPathPath)
7878
} else {
79-
router.push('/docs/sdk/'+platform+'/overview.html')
79+
router.push('/docs/sdk/'+platform+'/document_index.html')
8080
}
8181
}
8282

docs/.vuepress/styles/index.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
}
1111
}
1212

13+
.no-sidebar {
14+
.navbar-center {
15+
display: none !important;
16+
}
17+
}
1318

1419
div[class*=language-] {
1520
padding-top: 2px;

0 commit comments

Comments
 (0)