diff --git a/docs/src/examples.js b/docs/src/examples.js index ed1702c74..235095133 100644 --- a/docs/src/examples.js +++ b/docs/src/examples.js @@ -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'; diff --git a/docs/src/index.js b/docs/src/index.js index 8c3e05658..c51f8e662 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -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;