收到此错误:
在这一行:totalFundedLabel.push( "label": "Funded");
JS:
var totalFunded = '${totalFunded}';
var totalUnfunded = '${totalUnfunded}';
var totalFundedValue = [];
var totalFundedLabel = [];
var totalFundedText = [];
var unFundedValue = [];
var unFundedLabel = [];
var unFundedText = [];
if (totalFunded != null)
{
totalFundedLabel.push( "label": "Funded");
totalFundedValue.push( "value": <tld-msst:fc-value var="${totalFunded}"/>);
totalFundedText.push( "toolText": "<fmt:formatNumber value='${totalFunded}' type='currency' groupingUsed='true' />");
}
if (totalUnfunded != null)
{
unFundedLabel.push( "label": "unFunded");
unFundedValue.push( "value": <tld-msst:fc-value var="${totalUnfunded}"/>);
unFundedText.push( "toolText": "<fmt:formatNumber value='${totalUnfunded}' type='currency' groupingUsed='true' />");
}
渲染的 HTML:
var totalFunded = '109321734.06';
var totalUnfunded = '381234572.79';
var totalFundedValue = [];
var totalFundedLabel = [];
var totalFundedText = [];
var unFundedValue = [];
var unFundedLabel = [];
var unFundedText = [];
if (totalFunded != null)
{
totalFundedLabel.push( "label": "Funded");
totalFundedValue.push( "value": "109321734.06");
totalFundedText.push( "toolText": "$109,321,734.06");
}
if (totalUnfunded != null)
{
unFundedLabel.push( "label": "unFunded");
unFundedValue.push( "value": "381234572.79");
unFundedText.push( "toolText": "$381,234,572.79");
}