mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix docs style
This commit is contained in:
parent
65884d9f3f
commit
7adf2aedd1
@ -1,9 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container clearfix">
|
<div class="app">
|
||||||
<side-nav :data="navConfig['zh-CN']" base="/component"></side-nav>
|
<div class="page-header">
|
||||||
<div class="page-content">
|
</div>
|
||||||
<router-view></router-view>
|
<div class="page-container clearfix">
|
||||||
<footer-nav></footer-nav>
|
<side-nav :data="navConfig['zh-CN']" base="/component"></side-nav>
|
||||||
|
<div class="page-content">
|
||||||
|
<router-view></router-view>
|
||||||
|
<footer-nav></footer-nav>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,6 +22,7 @@ body {
|
|||||||
font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
|
font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@ -65,12 +66,32 @@ ul, ol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
height: 60px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-container {
|
||||||
|
margin: 40px 15px;
|
||||||
|
background-color: #fff;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 10000px;
|
||||||
|
top: 0;
|
||||||
|
left: 220px;
|
||||||
|
background-color: #E5E5E5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: auto;
|
|
||||||
margin-left: 220px;
|
margin-left: 220px;
|
||||||
padding: 0 20px;
|
padding: 0 40px;
|
||||||
border-left: 1px solid #E5E5E5;
|
|
||||||
|
|
||||||
section {
|
section {
|
||||||
> h2 {
|
> h2 {
|
||||||
|
@ -1,31 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="demo-block" :class="blockClass">
|
||||||
class="demo-block"
|
|
||||||
:class="blockClass">
|
|
||||||
<slot name="examples"></slot>
|
<slot name="examples"></slot>
|
||||||
<slot name="highlight">
|
<slot name="highlight"></slot>
|
||||||
</slot>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
|
||||||
description: String
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
blockClass() {
|
blockClass() {
|
||||||
return `demo-${this.$route.path.split('/').pop()}`;
|
return `demo-${this.$route.path.split('/').pop()}`;
|
||||||
},
|
|
||||||
|
|
||||||
codeAreaHeight() {
|
|
||||||
return Math.max(this.$el.getElementsByClassName('examples')[0].clientHeight, this.$el.getElementsByClassName('highlight')[0].clientHeight);
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
// this.$el.getElementsByClassName('highlight')[0].style.height = `${this.codeAreaHeight + 1}px`;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -44,10 +29,12 @@ export default {
|
|||||||
width: 320px;
|
width: 320px;
|
||||||
float: right;
|
float: right;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 74px 0 0;
|
padding: 10px 0 0;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
border: 1px solid #E5E5E5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
@ -66,7 +53,7 @@ export default {
|
|||||||
max-height: none;
|
max-height: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #f8f8f8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: none;
|
content: none;
|
||||||
|
@ -7,7 +7,7 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
mobileUrl() {
|
mobileUrl() {
|
||||||
return '/examples.html#' + location.pathname;
|
return '/examples.html#' + location.pathname.slice(4);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
float: left;
|
float: left;
|
||||||
background-color: #fff;
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.zan-button {
|
.zan-button {
|
||||||
margin-left: 15px;
|
margin: 15px 0 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,16 +46,6 @@ router.beforeEach((route, redirect, next) => {
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
router.afterEach((route) => {
|
|
||||||
if (route.path !== '/') {
|
|
||||||
const sideNavBox = document.querySelector('.side-nav');
|
|
||||||
const pageContentBox = document.querySelector('.page-content');
|
|
||||||
if (pageContentBox) {
|
|
||||||
pageContentBox.style.height = Math.max(sideNavBox && sideNavBox.clientHeight, pageContentBox && pageContentBox.clientHeight) + 'px';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
new Vue({ // eslint-disable-line
|
new Vue({ // eslint-disable-line
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
router
|
router
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
@b steps {
|
@b steps {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
@m 4 {
|
@m 4 {
|
||||||
.zan-step {
|
.zan-step {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user