v3.14.0 更新;【新增】EasyExcel重磅升级为FastExcel;【新增】使用最强Argon2算法作为密码存储;【新增】大家吐槽的数据字典改为可重复;【新增】前端布局再增加多种样式;

This commit is contained in:
zhuoda
2025-03-12 21:30:24 +08:00
parent e74f179a91
commit fecb3a9d81
207 changed files with 4260 additions and 2019 deletions

View File

@@ -0,0 +1,53 @@
import { defineStore } from 'pinia';
export const useDictStore = defineStore({
id: 'dict',
state: () => ({
dict: new Array(),
}),
actions: {
// 获取字典
getDict(keyCode) {
if (keyCode == null && keyCode == '') {
return null;
}
try {
for (let i = 0; i < this.dict.length; i++) {
if (this.dict[i].keyCode == keyCode) {
return this.dict[i].value;
}
}
} catch (e) {
return null;
}
},
// 设置字典
setDict(keyCode, value) {
if (keyCode !== null && keyCode !== '') {
this.dict.push({
key: keyCode,
value: value,
});
}
},
// 删除字典
removeDict(keyCode) {
let flag = false;
try {
for (let i = 0; i < this.dict.length; i++) {
if (this.dict[i].keyCode == keyCode) {
this.dict.splice(i, 1);
return true;
}
}
} catch (e) {
flag = false;
}
return false;
},
// 清空字典
cleanDict() {
this.dict = new Array();
},
},
});