From 3b9238a3182c4c4bf0f7573cab381922138979d3 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Mon, 16 May 2022 14:45:30 +0800 Subject: [PATCH] feat: Toc min-width: 1500px; --- docs/.vuepress/theme/components/Toc.vue | 4 ---- docs/.vuepress/theme/styles/index.styl | 6 +++++- docs/.vuepress/theme/styles/palette.styl | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/.vuepress/theme/components/Toc.vue b/docs/.vuepress/theme/components/Toc.vue index 7c02b7062..8b730a816 100644 --- a/docs/.vuepress/theme/components/Toc.vue +++ b/docs/.vuepress/theme/components/Toc.vue @@ -161,8 +161,4 @@ for i in range(3, 6) .vuepress-toc-h{i} a padding-left 1rem * (i - 2) - // for vuepress-toc - @media (min-width: 1300px) - .vuepress-toc - display block diff --git a/docs/.vuepress/theme/styles/index.styl b/docs/.vuepress/theme/styles/index.styl index 73f99c6f5..254332deb 100644 --- a/docs/.vuepress/theme/styles/index.styl +++ b/docs/.vuepress/theme/styles/index.styl @@ -83,10 +83,14 @@ main.page padding-bottom 0px padding-right 0px - @media (min-width: 1300px) + @media (min-width: $vuepress-display-min-width) & padding-right $vuepress-toc-width +@media (min-width: $vuepress-display-min-width) + .vuepress-toc + display block !important + {$contentClass}:not(.custom) > *:first-child margin-top 0 diff --git a/docs/.vuepress/theme/styles/palette.styl b/docs/.vuepress/theme/styles/palette.styl index eb2970ff5..f8427845a 100644 --- a/docs/.vuepress/theme/styles/palette.styl +++ b/docs/.vuepress/theme/styles/palette.styl @@ -5,4 +5,5 @@ $navbarHeight = 9rem $navbar-sub-navbar-height = 5rem $navbar-background-color = #f7f7f7 $search-container-color = #f5f6f7 -$vuepress-toc-width = 220px \ No newline at end of file +$vuepress-toc-width = 220px +$vuepress-display-min-width = 1500px \ No newline at end of file -- GitLab