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