diff --git a/docs/src/App.vue b/docs/src/App.vue index e66db3d0..e9d86d6d 100644 --- a/docs/src/App.vue +++ b/docs/src/App.vue @@ -35,10 +35,15 @@ export default { }, simulator() { + let prefix = ''; const { path } = this.$route.meta; + if (location.hostname === '0.0.0.0' || location.hostname === 'localhost') { + prefix = 'https://youzan.github.io'; + } + if (!UNSHARED.includes(path)) { - return `/vant/mobile.html?hide_nav=1&weapp=1#/zh-CN/${path}`; + return `${prefix}/vant/mobile.html?hide_nav=1&weapp=1#/zh-CN/${path}`; } return `./preview.html#${path}`;