vue-post-bridge
v1.0.0
Published
Communication between `Vue` and `window.open`
Downloads
2
Readme
vue-post-bridge
Communication between Vue
and window.open
Install
npm i vue-post-bridge
# or
yarn add vue-post-bridge
1. Use in main.js
import vuePostBridge from "vue-post-bridge";
Vue.use(vuePostBridge);
2. Use component in .vue
<!--
@title { string } - title of
@url { string } - route with same domain
@option { json } - option of window.open
@outer { boolean } - according to the outer window when set `true`
@auto { boolean } - no button when set `true`
!-->
<vue-post-bridge
:title="title"
:url="url"
:option="option"
:outer="false"
:auto="false"
/>
Register Action in Vue
this.$registry({
message(info) {
console.log(`Get info from opener : ${info}`);
}
});
Use Action in Opener
this.$charm("message", "hello world");