You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
804 B
29 lines
804 B
2 months ago
|
import Invite from '../components/GlobalView/GlobalView.vue'
|
||
|
|
||
|
export default {
|
||
|
install(Vue) {
|
||
|
//
|
||
|
const Profile = Vue.extend(Invite)
|
||
|
|
||
|
// 弹出邀请
|
||
|
Vue.prototype.$openInvite = function(params) {
|
||
|
const instance = new Profile()
|
||
|
instance._props._specia = params
|
||
|
instance.vm = instance.$mount()
|
||
|
const InviteEle = document.body.lastElementChild
|
||
|
if (InviteEle.className === 'invite-box') return
|
||
|
setTimeout(() => document.body.appendChild(instance.vm.$el))
|
||
|
return instance
|
||
|
}
|
||
|
|
||
|
// 关闭邀请
|
||
|
Vue.prototype.$closeInvite = function() {
|
||
|
const instance = new Profile()
|
||
|
instance.vm = instance.$mount()
|
||
|
const InviteEle = document.body.lastElementChild
|
||
|
if (InviteEle.className !== 'invite-box') return
|
||
|
document.body.removeChild(InviteEle)
|
||
|
return instance
|
||
|
}
|
||
|
}
|
||
|
}
|