mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[Doc] deploy to github pages
This commit is contained in:
@@ -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: ''
|
||||
};
|
||||
},
|
||||
|
@@ -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;
|
||||
|
@@ -10,7 +10,6 @@ import './components/nprogress.css';
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'hash',
|
||||
base: '/zanui/vant/examples',
|
||||
routes: routes(true)
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user