我有以下json对象:
{
"chart": {
"type": "linerdfgdgdfgf",
"backgroundColor": "#FFFFFF",
"borderColor": "#000",
"borderWidth": 0,
"height": 300,
"inverted": false,
"plotBackgroundColor": "#FFFFFF",
"plotBorderColor": "#FFFFFF",
"plotBorderWidth": 1,
"style": {
"fontFamily": "Open Sans"
}
}
}
如何将这些对象值映射到输入框?
我在方法函数中使用了此函数。
getmyEditor: function(){
chartType: this.options.chart.type;
this.backgroundColor = this.options.chart.backgroundColor;
this.borderColor = this.options.chart.borderColor;
this.borderWidth = this.options.chart.borderWidth;
this.height = this.options.chart.height;
this.inverted = this.options.chart.inverted;
this.plotBackgroundColor = this.options.chart.plotBackgroundColor;
}