style: 减少前端部分 warning 提示

This commit is contained in:
2023-08-27 23:40:19 +08:00
parent 3bb1333b2b
commit 35fd681092
9 changed files with 28 additions and 17 deletions

View File

@@ -9,14 +9,10 @@ const useDictStore = defineStore('dict', {
if (_name == null || _name === '') {
return null;
}
try {
for (let i = 0; i < this.dict.length; i += 1) {
if (this.dict[i].name === _name) {
return this.dict[i].detail;
}
for (let i = 0; i < this.dict.length; i += 1) {
if (this.dict[i].name === _name) {
return this.dict[i].detail;
}
} catch (e) {
console.log(e);
}
return null;
},