rations.js 516 B

1234567891011121314151617181920212223
  1. /**
  2. * Created by Mai on 2017/4/1.
  3. */
  4. var Rations = {
  5. createNew: function (project) {
  6. // 用户定义private方法
  7. var tools = {};
  8. // 所有通过this访问的属性,都不应在此单元外部进行写入操作
  9. var rations = function (proj) {
  10. this.project = proj;
  11. this.datas = null;
  12. };
  13. // prototype用于定义public方法
  14. rations.prototype.loadDatas = function (datas) {
  15. this.datas = datas;
  16. };
  17. return new rations(project);
  18. }
  19. };