谷歌搜索"javascript克隆对象"带来一些非常奇怪的结果,其中一些是绝望的过时,有些只是太复杂,不是那么容易:
let clone = {...original};
Run Code Online (Sandbox Code Playgroud)
这有什么不对吗?
这是我的选项的样子:
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
maxTicksLimit: 5,
suggestedMax: maxValue
}
}],
xAxes : [{
categoryPercentage: 1.0,
display : false, // set this to false to hide the labels under the bars
gridLines: {
display: false
}
}]
},
Run Code Online (Sandbox Code Playgroud)