谁的笔记

  • 首页
  • 前端
  • 后端
  • 数据库
  • 虚拟机

Object.defineProperties set的使用方法

  • admin
  • 2023-11-08
  • 0
    Object.defineProperties(client, {
      waitConfig: {
        get: function () {
          return client.waitConfig
        },
        set: val => {
          if (!val) this.success(client.config)
        }
      }
    })

set 当中无需重复设置值 client.waitConfig = val

© 2025 谁的笔记
Theme by Wing
ICP备案号:浙ICP备2020030373号-1
  • {{ item.name }}
  • {{ item.name }}