diff --git a/src/store/modules/dict.js b/src/store/modules/dict.js index 27fc308..eb2e7c1 100644 --- a/src/store/modules/dict.js +++ b/src/store/modules/dict.js @@ -7,12 +7,12 @@ const useDictStore = defineStore( actions: { // 获取字典 getDict(_key) { - if (_key == null && _key == "") { + if (_key == null && _key === "") { return null; } try { for (let i = 0; i < this.dict.length; i++) { - if (this.dict[i].key == _key) { + if (this.dict[i].key === _key) { return this.dict[i].value; } } @@ -34,7 +34,7 @@ const useDictStore = defineStore( var bln = false; try { for (let i = 0; i < this.dict.length; i++) { - if (this.dict[i].key == _key) { + if (this.dict[i].key === _key) { this.dict.splice(i, 1); return true; }