feat(cli): using postmessage (#8497)

* feat(cli): export action functions

* fix: listenToSyncPath

* fix: config.site.simulatorUrl
This commit is contained in:
neverland
2021-04-10 15:44:55 +08:00
committed by GitHub
parent a066e3a4bb
commit f46f59fce2
6 changed files with 116 additions and 72 deletions

View File

@@ -3,7 +3,7 @@ import { createRouter, createWebHashHistory } from 'vue-router';
import { isMobile, decamelize } from '../common';
import { config, documents } from 'site-desktop-shared';
import { getLang, setDefaultLang } from '../common/locales';
import '../common/iframe-router';
import { listenToSyncPath, syncPathToChild } from '../common/iframe-router';
if (isMobile) {
location.replace('mobile.html' + location.hash);
@@ -117,7 +117,9 @@ export const router = createRouter({
});
router.afterEach(() => {
nextTick(() => window.syncPath());
nextTick(syncPathToChild);
});
listenToSyncPath(router);
window.vueRouter = router;