BUG修改

This commit is contained in:
a0049873 2022-08-05 14:50:38 +08:00
parent a24b273809
commit d4f2efd515
1 changed files with 7 additions and 1 deletions

View File

@ -87,7 +87,13 @@ export default {
this.noData = true this.noData = true
return return
} }
for (let i = 0; i < 3; i++) { let num = 0
if (_arr.length < 3) {
num = _arr.length
} else {
num = 3
}
for (let i = 0; i < num; i++) {
const k = i + 1 const k = i + 1
this[`no${k}Obj`].name = _arr[i].name this[`no${k}Obj`].name = _arr[i].name
this[`no${k}Obj`].count = _arr[i].count this[`no${k}Obj`].count = _arr[i].count