mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
feat(cli): using postmessage (#8497)
* feat(cli): export action functions * fix: listenToSyncPath * fix: config.site.simulatorUrl
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user