【发布时间】:2015-11-10 21:38:30
【问题描述】:
我在我的 vue 实例中创建了一个组件。
components: {
plan: {
template: "#suggested-properties",
props: ['plan', 'active'],
computed: {
isActive: function(){
return this.plan.name == this.active.name;
}
},
methods: {
setActivePlan: function(){
var that = this;
that.activeParameter= true;
this.active = this.plan;
}
}
}
}
有没有一种方法可以在我单击按钮时通过传递数据来动态创建相同组件的实例?
【问题讨论】:
标签: vue.js