[Doc] deploy to github pages

This commit is contained in:
陈嘉涵
2018-05-28 18:49:41 +08:00
parent 155930192b
commit 0cde378373
6 changed files with 10 additions and 11 deletions

View File

@@ -11,9 +11,8 @@ import docConfig from './doc.config';
export default {
data() {
const path = location.pathname === '/' ? 'examples.html' : '/zanui/vant/examples';
return {
simulators: [`${path}${location.hash}`],
simulators: [`mobile.html${location.hash}`],
demoURL: ''
};
},

View File

@@ -11,13 +11,12 @@ Vue.use(VueRouter).use(VantDoc);
const router = new VueRouter({
mode: 'hash',
base: '/zanui/vant/',
routes: routes()
});
router.beforeEach((route, redirect, next) => {
if (isMobile) {
location.replace(location.pathname === '/' ? 'examples.html' : '/zanui/vant/examples' + location.hash);
location.replace('mobile.html' + location.hash);
}
progress.start();
document.title = route.meta.title || document.title;

View File

@@ -10,7 +10,6 @@ import './components/nprogress.css';
const router = new VueRouter({
mode: 'hash',
base: '/zanui/vant/examples',
routes: routes(true)
});