动态给对象添加属性 将列表添加到对象属性中 layerIdList.value.forEach((item: any) => { layerObj.data = { ...layerObj.data, ...{ [item.layerId]: clickHandle } } })