objectjs:javascript中的可扩展对象,只要你想要的级别

tire5935 1 0 zip 2024-09-21 07:09:47

对象js javascript中的可扩展对象

安装: npm install objectjs

使用: var ObjectJs = require('objectjs');


// 创建对象A

A = ObjectJs.extend({

  value: null,

  init: function() {

    this.value = 0;

  },

  get: function() {

    return this.value;

  },

  set: function(value) {

    this.value = value;

  }

});

用户评论
请输入评论内容
评分:
暂无评论