如何根据其他模型值获取以下代码以进行默认设置?这大致就是我所拥有的
var Model = Backbone.Model.extend({
defaults:{
name:"",
surname:"",
fullTextString:""
}
});
model = new Model({name"John", surname:"Doe", fullTextString:"John"+" "+"Doe"})
我想要的是:
Backbone.Model.extend({
defaults:{
name:"",
surname:"",
fullTextString:name+" "+surname
}
});