如何在vue組件中設置自定義屬性?將自定義屬性添加到vuejs組件
var myComponent = Vue.extend({
data: function() {
return {
item: {}
}
},
created: function() {
// This does not seem to work
this.item.customProperty = 'customProperty';
}
});
謝謝,就是這樣! – user2968356