Files
11-mes-new/src/components/ListDialog/index.js
2022-11-07 08:45:49 +08:00

12 lines
380 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Vue from 'vue'
// 按照方法调用vue组件用完即销毁
const ListDialogConstrctor = Vue.extend(require('./main.vue').default)
// 定义原型方法
Vue.prototype.$createListReview = (options) => {
const instance = new ListDialogConstrctor({
data: options
})
instance.vm = instance.$mount()
document.getElementById('app').appendChild(instance.vm.$el)
}