12345678910111213141516171819202122232425262728293031 |
- import Invite from './index.vue'
- import i18n from '@/util/lang/lang'
- Invite.install = function (Vue, store) {
- const Constructor = Vue.extend(Invite)
- let instance
- Vue.prototype.$showInvite = () => {
- if (instance) {
- document.body.removeChild(instance.$el)
- instance = null
- }
- instance = new Constructor({
- el: document.createElement('div'),
- computed: {
- $store () { return store }
- },
- data () {
- return {
- visible: true
- }
- },
- i18n
- })
- document.body.appendChild(instance.$el)
- }
- }
- export default Invite
|