instance_base.js 381 B

1234567891011121314
  1. "use strict";
  2. /**继承单例 */
  3. //@ts-ignore
  4. class instance_base {
  5. /* -------------------------------segmentation------------------------------- */
  6. /**单例方法 */
  7. static instance(...args_as_) {
  8. if (!this._instance_o) {
  9. this._instance_o = new this(...args_as_);
  10. }
  11. return this._instance_o;
  12. }
  13. }
  14. module.exports = instance_base;