this.units给了我一个未定义的。我如何访问此值?或者你会以不同的方式设置这一整体吗?也许你们可以帮助我?
var calculator = calculator || {};
(function() {
calculator.sliderValues = {
applications: 42,
capacity: 140,
activeData: 30,
performance: 30,
virtualized: 100
}
calculator.overview = {
apps: {
HighPerformanceApps: {
units: Math.ceil(calculator.sliderValues.applications/100 * calculator.sliderValues.performance),
virtualized: calculator.sliderValues.virtualized < 81 ? 0 : this.units
}
}
}
})();
提前致谢