diff --git a/back/src/views/modules/workBench/components/frequency-top5-view.vue b/back/src/views/modules/workBench/components/frequency-top5-view.vue index b1594f0c..b691ec4a 100644 --- a/back/src/views/modules/workBench/components/frequency-top5-view.vue +++ b/back/src/views/modules/workBench/components/frequency-top5-view.vue @@ -87,12 +87,7 @@ export default { this.noData = true return } - let num = 0 - if (_arr.length < 3) { - num = _arr.length - } else { - num = 3 - } + const num = _arr.length < 3 ? _arr.length : 3 for (let i = 0; i < num; i++) { const k = i + 1 this[`no${k}Obj`].name = _arr[i].name