gant-core 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/index.js +1 -1
- package/lib/cli/template/types.d.txt +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/cli/index.js
CHANGED
|
@@ -48717,7 +48717,7 @@ const createCwdConfig = (cwd, name, vue) => {
|
|
|
48717
48717
|
};
|
|
48718
48718
|
|
|
48719
48719
|
var name = "gant-core";
|
|
48720
|
-
var version = "0.1.
|
|
48720
|
+
var version = "0.1.23";
|
|
48721
48721
|
var description = "";
|
|
48722
48722
|
var main = "lib/index.js";
|
|
48723
48723
|
var bin = {
|
|
@@ -8,7 +8,8 @@ declare global {
|
|
|
8
8
|
const BASE: string;
|
|
9
9
|
const microServiceMap: any;
|
|
10
10
|
const SETTING: CONFIG_TYPE;
|
|
11
|
-
|
|
11
|
+
}
|
|
12
|
+
declare module '*.css' {
|
|
12
13
|
const classes: CSSModuleClasses;
|
|
13
14
|
export default classes;
|
|
14
15
|
}
|
|
@@ -142,4 +143,3 @@ declare global {
|
|
|
142
143
|
const src: string;
|
|
143
144
|
export default src;
|
|
144
145
|
}
|
|
145
|
-
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1983,6 +1983,7 @@ interface GlobalOptions {
|
|
|
1983
1983
|
loginConfig?: LOGIN_CONFIG;
|
|
1984
1984
|
base?: string;
|
|
1985
1985
|
menuData?: ServerMenuData | ((res: UserAggregateInfo) => ServerMenuData);
|
|
1986
|
+
loginSuccessCallback?: () => void;
|
|
1986
1987
|
}
|
|
1987
1988
|
|
|
1988
1989
|
declare const MENU_HISTORY_UPDATE = "MENU_HISTORY_UPDATE";
|
package/lib/index.js
CHANGED
|
@@ -1148,7 +1148,7 @@ class GlobalStoreClass {
|
|
|
1148
1148
|
platformLanguages = [];
|
|
1149
1149
|
productInfo = {
|
|
1150
1150
|
isProdEnv: false,
|
|
1151
|
-
productName:
|
|
1151
|
+
productName: "",
|
|
1152
1152
|
};
|
|
1153
1153
|
get isPrd() {
|
|
1154
1154
|
return this.productInfo?.isProdEnv;
|
|
@@ -1169,11 +1169,11 @@ class GlobalStoreClass {
|
|
|
1169
1169
|
const { user: currentUser, startMenus, isSuperAdmin, ...restInfo } = res;
|
|
1170
1170
|
this.userStore.setUserAggregateInfo({ ...restInfo, currentUser });
|
|
1171
1171
|
this.isSuperAdmin = isSuperAdmin;
|
|
1172
|
-
const localeMenus = typeof menus ==
|
|
1172
|
+
const localeMenus = typeof menus == "function" ? menus(res) : menus;
|
|
1173
1173
|
this.menuStore.init(isEmpty(localeMenus) ? startMenus : localeMenus, currentUser.id);
|
|
1174
1174
|
};
|
|
1175
1175
|
init = async (options) => {
|
|
1176
|
-
const { base =
|
|
1176
|
+
const { base = "/", menuData, loginSuccessCallback } = options;
|
|
1177
1177
|
this.loginStore.init(options?.loginConfig, base);
|
|
1178
1178
|
try {
|
|
1179
1179
|
//检查token
|
|
@@ -1186,6 +1186,7 @@ class GlobalStoreClass {
|
|
|
1186
1186
|
await parameterStoreInstance.findAllParameters();
|
|
1187
1187
|
//websocket注册
|
|
1188
1188
|
websocket.init(this.userStore.currentUser.userLoginName);
|
|
1189
|
+
await loginSuccessCallback?.();
|
|
1189
1190
|
return true;
|
|
1190
1191
|
}
|
|
1191
1192
|
//未登录情况下跳转到登录
|