mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
mobile page
This commit is contained in:
parent
5d19114571
commit
aea610555f
@ -3,7 +3,7 @@ import VueRouter from 'vue-router';
|
||||
import App from './ExamplesApp';
|
||||
import navConfig from './nav.config.js';
|
||||
import routes from './router.config';
|
||||
import ZanUI from '../src/index';
|
||||
import ZanUI from 'src/index';
|
||||
|
||||
import 'packages/zanui-css/src/index.css';
|
||||
|
||||
|
@ -26,7 +26,6 @@ Vue.use(ZanUI.Lazyload, {
|
||||
lazyComponent: true
|
||||
});
|
||||
|
||||
|
||||
let routesConfig = routes(navConfig);
|
||||
routesConfig.push({
|
||||
path: '/',
|
||||
@ -44,9 +43,9 @@ router.beforeEach((route, redirect, next) => {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
const pathname = process.env.NODE_ENV === 'production' ? '/vue/' : '/';
|
||||
const pathname = process.env.NODE_ENV === 'production' ? '/vue/examples' : '/examples.html';
|
||||
if (isMobile()) {
|
||||
window.location.replace(pathname + 'examples.html#/');
|
||||
window.location.replace(pathname);
|
||||
return;
|
||||
}
|
||||
document.title = route.meta.title || document.title;
|
||||
|
Loading…
x
Reference in New Issue
Block a user