v3.14.0 更新;【新增】EasyExcel重磅升级为FastExcel;【新增】使用最强Argon2算法作为密码存储;【新增】大家吐槽的数据字典改为可重复;【新增】前端布局再增加多种样式;【优化】升级SaToken到最新版本;【优化】token使用Sa-Token的Bearer类型;【优化】优化其他

This commit is contained in:
zhuoda
2025-03-12 20:17:39 +08:00
parent 5553aac514
commit eeb9c569de
147 changed files with 7035 additions and 1565 deletions

View File

@@ -30,6 +30,9 @@ import 'vue3-tabs-chrome/dist/vue3-tabs-chrome.css';
import '/@/theme/index.less';
import { localRead } from '/@/utils/local-util.js';
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
import { Table } from 'ant-design-vue';
import { useAppConfigStore } from '/@/store/modules/system/app-config';
import '/@/utils/ployfill';
/*
* -------------------- ※ 着重 解释说明下main.js的初始化逻辑 begin ※ --------------------
@@ -64,7 +67,7 @@ async function getLoginInfo() {
}
}
function initVue() {
async function initVue() {
let vueApp = createApp(App);
let app = vueApp.use(router).use(store).use(i18n).use(Antd).use(smartEnumPlugin, constantsInfo).use(privilegePlugin).use(JsonViewer);
//注入权限
@@ -83,11 +86,17 @@ function initVue() {
//挂载
app.mount('#app');
}
function setTableYHeight() {
Table.props.scroll.default = {
y: useAppConfigStore().tableYHeight,
};
}
//不需要获取用户信息、用户菜单、用户菜单动态路由直接初始化vue即可
let token = localRead(LocalStorageKeyConst.USER_TOKEN);
if (!token) {
initVue();
await initVue();
setTableYHeight();
} else {
getLoginInfo();
await getLoginInfo();
setTableYHeight();
}