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

@@ -4,7 +4,7 @@ import DemoHome from './components/DemoHome';
import { decamelize } from '../common';
import { demos, config } from 'site-mobile-shared';
import { getLang, setDefaultLang } from '../common/locales';
import '../common/iframe-router';
import { listenToSyncPath, syncPathToParent } from '../common/iframe-router';
const { locales, defaultLang } = config.site;
@@ -97,8 +97,10 @@ export const router = createRouter({
watch(router.currentRoute, () => {
if (!router.currentRoute.value.redirectedFrom) {
nextTick(window.syncPath);
nextTick(syncPathToParent);
}
});
listenToSyncPath(router);
window.vueRouter = router;