如何在content中添加自定义vue组件?
KappaFish0914 opened this issue · comments
KappaFish commented
leo commented
你应该在弹窗弹出的事件回调里,执行类似,$mount( '#content-id' )
KappaFish commented
leo commented
var author = Vue.extend({
template: "<p><a :href='url'>{{author}} & {{name}}</a></p>",
data : function() {
return {
author : 'vamous',
url : 'http://blog.csdn.net/Dear_Mr/article/details/72614370'
}
},
props : ['name']
});
new author({propsData: {name : 'dear_mr'}}).$mount('#author');