update doc

This commit is contained in:
陈嘉涵 2017-08-31 10:38:05 +08:00
parent 7574962af6
commit a2a8523da1
6 changed files with 18 additions and 21 deletions

View File

@ -54,11 +54,6 @@ export default {
</script>
<style>
a {
color: #4078c0;
text-decoration: none;
}
body {
-webkit-font-smoothing: antialiased;
}
@ -70,9 +65,12 @@ export default {
.examples-container {
height: 100%;
overflow: auto;
background: #f8f8f8;
position: relative;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
width: 0;
}
}
.footer {

View File

@ -6,6 +6,8 @@
<script>
export default {
name: 'demo-block',
computed: {
component() {
return this.$route.path.split('/').pop();

View File

@ -13,7 +13,7 @@
</template>
<script>
import docConfig from '../doc.config.js';
import docConfig from '../doc.config';
import MobileNav from './mobile-nav';
export default {

View File

@ -2,13 +2,12 @@ import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './ExamplesApp';
import routes from './router.config';
import Vant, { Lazyload } from 'packages/index';
import Vant, { Lazyload } from 'packages';
import ZanDoc from 'zan-doc';
import DemoList from './components/demo-list';
import 'packages/vant-css/src/index.css';
import 'zan-doc/src/helper/touch-simulator';
import DemoList from './components/demo-list.vue';
Vue.use(Vant);
Vue.use(ZanDoc);
Vue.use(Lazyload, {
@ -31,7 +30,7 @@ router.beforeEach((to, from, next) => {
if (container) {
document.querySelector('.examples-container').scrollTop = 0;
}
next()
next();
});
new Vue({ // eslint-disable-line

View File

@ -4,7 +4,6 @@ import App from './ExamplesDocsApp';
import routes from './router.config';
import ZanDoc from 'zan-doc';
import DemoBlock from './components/demo-block';
import 'packages/vant-css/src/reset.css';
const isMobile = (function() {
var platform = navigator.userAgent.toLowerCase();
@ -14,7 +13,7 @@ const isMobile = (function() {
Vue.use(VueRouter);
Vue.use(ZanDoc);
Vue.component('demo-block', DemoBlock);
Vue.component(DemoBlock.name, DemoBlock);
const routesConfig = routes();
routesConfig.push({
@ -41,7 +40,7 @@ router.afterEach(() => {
if (!isMobile) {
window.scrollTo(0, 0);
}
})
});
new Vue({ // eslint-disable-line
render: h => h(App),

View File

@ -47,10 +47,11 @@
</template>
<script>
const VALID_TYPES = ['text', 'number', 'email', 'url', 'tel', 'date', 'time', 'datetime', 'password', 'textarea'];
import Cell from '../cell';
import Icon from '../icon';
const VALID_TYPES = ['text', 'number', 'email', 'url', 'tel', 'date', 'time', 'datetime', 'password', 'textarea'];
export default {
name: 'van-field',
@ -63,15 +64,14 @@ export default {
type: {
type: String,
default: 'text',
validator(value) {
return VALID_TYPES.indexOf(value) > -1;
}
validator: value => VALID_TYPES.indexOf(value) > -1
},
placeholder: String,
value: {},
icon: String,
label: String,
disabled: Boolean,
placeholder: String,
error: Boolean,
disabled: Boolean,
readonly: Boolean,
required: Boolean,
maxlength: [String, Number],
@ -82,7 +82,6 @@ export default {
type: Boolean,
default: false
},
icon: String,
onIconClick: {
type: Function,
default: () => {}