我是 Upshot 的新手,找不到 Upshot 的文档/组,所以我将其发布在这里。我想在我的模型中计算属性,它是否受支持,我该如何实现?例如:
upshot.metadata({
"Cocktail:#Cocktail.Models": {
"key": ["Id"],
"fields": {
"Id": { "type": "Int32:#System" },
"Image": { "type": "String:#System" },
"HtmlId": { "type": "String:#System"},
// Calculated Property
"DetailUrl": { "type": "String:#System", "value": function(){return 'cocktail' + this.Id;} },
}
}
});