Object.Defineproperties changed using object data structure

This method of setting the key when the key if necessary to make the required variables in square brackets [] following

let addKeys = Number(keys[keys.length - 1]) + 1
Object.assign(this.tableConfig.rows[0].cells, {
  [addKeys]: {
      text: '自定义标准'
       }
   })

 

Guess you like

Origin www.cnblogs.com/qqfontofweb/p/11828036.html