var Product = kendo.data.Model.define({
fields: {
"quantity": {
type: "number"
},
"price": {
type: "number"
}
},
total: function() { //define the calculated field
return this.get("quantity") * this.get("price");
},
t:function(){
var p={p2:this.get("price")};
return p.p2;
}
});

var viewModel = kendo.observable({
data: [
new Product({ "quantity": 1, "price": 2 })
]
});

相关文章:

  • 2021-11-17
  • 2021-12-28
  • 2021-06-29
  • 2022-02-08
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-04
  • 2021-10-01
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案