mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
update doc
This commit is contained in:
parent
7574962af6
commit
a2a8523da1
@ -54,11 +54,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
a {
|
|
||||||
color: #4078c0;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
@ -70,9 +65,12 @@ export default {
|
|||||||
.examples-container {
|
.examples-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #f8f8f8;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
name: 'demo-block',
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
component() {
|
component() {
|
||||||
return this.$route.path.split('/').pop();
|
return this.$route.path.split('/').pop();
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import docConfig from '../doc.config.js';
|
import docConfig from '../doc.config';
|
||||||
import MobileNav from './mobile-nav';
|
import MobileNav from './mobile-nav';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -2,13 +2,12 @@ import Vue from 'vue';
|
|||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './ExamplesApp';
|
import App from './ExamplesApp';
|
||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import Vant, { Lazyload } from 'packages/index';
|
import Vant, { Lazyload } from 'packages';
|
||||||
import ZanDoc from 'zan-doc';
|
import ZanDoc from 'zan-doc';
|
||||||
|
import DemoList from './components/demo-list';
|
||||||
import 'packages/vant-css/src/index.css';
|
import 'packages/vant-css/src/index.css';
|
||||||
import 'zan-doc/src/helper/touch-simulator';
|
import 'zan-doc/src/helper/touch-simulator';
|
||||||
|
|
||||||
import DemoList from './components/demo-list.vue';
|
|
||||||
|
|
||||||
Vue.use(Vant);
|
Vue.use(Vant);
|
||||||
Vue.use(ZanDoc);
|
Vue.use(ZanDoc);
|
||||||
Vue.use(Lazyload, {
|
Vue.use(Lazyload, {
|
||||||
@ -31,7 +30,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (container) {
|
if (container) {
|
||||||
document.querySelector('.examples-container').scrollTop = 0;
|
document.querySelector('.examples-container').scrollTop = 0;
|
||||||
}
|
}
|
||||||
next()
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
new Vue({ // eslint-disable-line
|
new Vue({ // eslint-disable-line
|
||||||
|
@ -4,7 +4,6 @@ import App from './ExamplesDocsApp';
|
|||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import ZanDoc from 'zan-doc';
|
import ZanDoc from 'zan-doc';
|
||||||
import DemoBlock from './components/demo-block';
|
import DemoBlock from './components/demo-block';
|
||||||
import 'packages/vant-css/src/reset.css';
|
|
||||||
|
|
||||||
const isMobile = (function() {
|
const isMobile = (function() {
|
||||||
var platform = navigator.userAgent.toLowerCase();
|
var platform = navigator.userAgent.toLowerCase();
|
||||||
@ -14,7 +13,7 @@ const isMobile = (function() {
|
|||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
Vue.use(ZanDoc);
|
Vue.use(ZanDoc);
|
||||||
Vue.component('demo-block', DemoBlock);
|
Vue.component(DemoBlock.name, DemoBlock);
|
||||||
|
|
||||||
const routesConfig = routes();
|
const routesConfig = routes();
|
||||||
routesConfig.push({
|
routesConfig.push({
|
||||||
@ -41,7 +40,7 @@ router.afterEach(() => {
|
|||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
new Vue({ // eslint-disable-line
|
new Vue({ // eslint-disable-line
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
|
@ -47,10 +47,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const VALID_TYPES = ['text', 'number', 'email', 'url', 'tel', 'date', 'time', 'datetime', 'password', 'textarea'];
|
|
||||||
import Cell from '../cell';
|
import Cell from '../cell';
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
|
|
||||||
|
const VALID_TYPES = ['text', 'number', 'email', 'url', 'tel', 'date', 'time', 'datetime', 'password', 'textarea'];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'van-field',
|
name: 'van-field',
|
||||||
|
|
||||||
@ -63,15 +64,14 @@ export default {
|
|||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text',
|
default: 'text',
|
||||||
validator(value) {
|
validator: value => VALID_TYPES.indexOf(value) > -1
|
||||||
return VALID_TYPES.indexOf(value) > -1;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
placeholder: String,
|
|
||||||
value: {},
|
value: {},
|
||||||
|
icon: String,
|
||||||
label: String,
|
label: String,
|
||||||
disabled: Boolean,
|
placeholder: String,
|
||||||
error: Boolean,
|
error: Boolean,
|
||||||
|
disabled: Boolean,
|
||||||
readonly: Boolean,
|
readonly: Boolean,
|
||||||
required: Boolean,
|
required: Boolean,
|
||||||
maxlength: [String, Number],
|
maxlength: [String, Number],
|
||||||
@ -82,7 +82,6 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
icon: String,
|
|
||||||
onIconClick: {
|
onIconClick: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user