12 lines
380 B
JavaScript
12 lines
380 B
JavaScript
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)
|
||
}
|