diff --git a/packages/vant-cli/site/common/style/var.less b/packages/vant-cli/site/common/style/var.less index ac642ce4c..666ad324f 100644 --- a/packages/vant-cli/site/common/style/var.less +++ b/packages/vant-cli/site/common/style/var.less @@ -13,13 +13,13 @@ @van-doc-code-color: #58727e; @van-doc-code-background-color: #f1f4f8; @van-doc-code-font-family: 'Source Code Pro', 'Monaco', 'Inconsolata', monospace; -@van-doc-padding: 30px; +@van-doc-padding: 24px; @van-doc-row-max-width: 1680px; @van-doc-nav-width: 220px; -@van-doc-border-radius: 12px; +@van-doc-border-radius: 20px; // header -@van-doc-header-top-height: 60px; +@van-doc-header-top-height: 64px; @van-doc-header-bottom-height: 50px; // simulator diff --git a/packages/vant-cli/site/desktop/components/Content.vue b/packages/vant-cli/site/desktop/components/Content.vue index 4b8ef484f..e962f81e6 100644 --- a/packages/vant-cli/site/desktop/components/Content.vue +++ b/packages/vant-cli/site/desktop/components/Content.vue @@ -203,7 +203,7 @@ export default { } section { - padding: 30px; + padding: 24px; overflow: hidden; } diff --git a/packages/vant-cli/site/desktop/components/Nav.vue b/packages/vant-cli/site/desktop/components/Nav.vue index 1e3039e6d..f54bd4809 100644 --- a/packages/vant-cli/site/desktop/components/Nav.vue +++ b/packages/vant-cli/site/desktop/components/Nav.vue @@ -38,7 +38,7 @@ export default { data() { return { - top: 60, + top: 64, bottom: 0, }; }, @@ -64,7 +64,7 @@ export default { methods: { onScroll() { const { pageYOffset: offset } = window; - this.top = Math.max(0, 60 - offset); + this.top = Math.max(0, 64 - offset); }, }, }; @@ -75,13 +75,11 @@ export default { .van-doc-nav { position: fixed; - top: 60px; - bottom: 0; left: 0; z-index: 1; min-width: @van-doc-nav-width; max-width: @van-doc-nav-width; - padding: 24px 0 72px; + padding: @van-doc-padding 0; overflow-y: scroll; background-color: #fff; box-shadow: 0 8px 12px #ebedf0; @@ -108,6 +106,7 @@ export default { &__group { margin-bottom: 16px; + padding-left: 6px; } &__title { @@ -134,6 +133,8 @@ export default { } &.active { + background-color: fade(@van-doc-green, 8); + border-radius: 8px; -webkit-font-smoothing: auto; } diff --git a/packages/vant-cli/site/desktop/components/SearchInput.vue b/packages/vant-cli/site/desktop/components/SearchInput.vue index 103f74adc..a0107e90e 100644 --- a/packages/vant-cli/site/desktop/components/SearchInput.vue +++ b/packages/vant-cli/site/desktop/components/SearchInput.vue @@ -43,8 +43,8 @@ export default { @import '../../common/style/var'; .van-doc-search { - width: 200px; - height: 60px; + width: 400px; + height: @van-doc-header-top-height; margin-left: 140px; color: #fff; font-size: 14px; diff --git a/packages/vant-cli/site/desktop/components/Simulator.vue b/packages/vant-cli/site/desktop/components/Simulator.vue index 5c0f0b9fc..8eac8bb06 100644 --- a/packages/vant-cli/site/desktop/components/Simulator.vue +++ b/packages/vant-cli/site/desktop/components/Simulator.vue @@ -57,7 +57,7 @@ export default { overflow: hidden; background: #fafafa; border-radius: @van-doc-border-radius; - box-shadow: #ebedf0 0 4px 12px; + box-shadow: 0 8px 12px #ebedf0; @media (max-width: 1100px) { right: auto;