'init'
This commit is contained in:
11
src/components/ListDialog/index.js
Normal file
11
src/components/ListDialog/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user