@kengic/vue 0.27.1-beta.4 → 0.27.1-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +40 -29
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +10 -9
- package/dist/src/component/KgTable/KgTable.store.d.ts +0 -11
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +9 -1
- package/dist/src/component/KgVar/KgVar.store.d.ts +10 -0
- package/dist/src/project/src/api/index.d.ts +3 -0
- package/dist/src/project/src/api/sys/model/menuModel.d.ts +15 -0
- package/dist/src/project/src/api/sys/model/uploadModel.d.ts +5 -0
- package/dist/src/project/src/api/sys/model/userModel.d.ts +46 -0
- package/dist/src/project/src/components/Dropdown/index.d.ts +1 -0
- package/dist/src/project/src/components/Dropdown/src/typing.d.ts +9 -0
- package/dist/src/project/src/components/index.d.ts +1 -0
- package/dist/src/project/src/enums/CompTypeEnum.d.ts +19 -0
- package/dist/src/project/src/enums/DateTypeEnum.d.ts +8 -0
- package/dist/src/project/src/enums/appEnum.d.ts +40 -0
- package/dist/src/project/src/enums/breakpointEnum.d.ts +18 -0
- package/dist/src/project/src/enums/cacheEnum.d.ts +18 -0
- package/dist/src/project/src/enums/exceptionEnum.d.ts +17 -0
- package/dist/src/project/src/enums/httpEnum.d.ts +38 -0
- package/dist/src/project/src/enums/index.d.ts +13 -0
- package/dist/src/project/src/enums/jeecgEnum.d.ts +16 -0
- package/dist/src/project/src/enums/menuEnum.d.ts +35 -0
- package/dist/src/project/src/enums/pageEnum.d.ts +14 -0
- package/dist/src/project/src/enums/roleEnum.d.ts +4 -0
- package/dist/src/project/src/enums/sizeEnum.d.ts +18 -0
- package/dist/src/project/src/hooks/index.d.ts +1 -0
- package/dist/src/project/src/hooks/web/useI18n.d.ts +13 -0
- package/dist/src/project/src/index.d.ts +14 -0
- package/dist/src/project/src/locales/helper.d.ts +5 -0
- package/dist/src/project/src/locales/index.d.ts +3 -0
- package/dist/src/project/src/locales/setupI18n.d.ts +4 -0
- package/dist/src/project/src/locales/useLocale.d.ts +10 -0
- package/dist/src/project/src/router/types.d.ts +42 -0
- package/dist/src/project/src/settings/componentSetting.d.ts +44 -0
- package/dist/src/project/src/settings/designSetting.d.ts +6 -0
- package/dist/src/project/src/settings/encryptionSetting.d.ts +6 -0
- package/dist/src/project/src/settings/index.d.ts +3 -0
- package/dist/src/project/src/store/index.d.ts +1 -0
- package/dist/src/project/src/store/modules/index.d.ts +1 -0
- package/dist/src/project/src/store/modules/locale.d.ts +38 -0
- package/dist/src/project/src/utils/cache/index.d.ts +7 -0
- package/dist/src/project/src/utils/cache/memory.d.ts +22 -0
- package/dist/src/project/src/utils/cache/persistent.d.ts +33 -0
- package/dist/src/project/src/utils/cache/storageCache.d.ts +8 -0
- package/dist/src/project/src/utils/cipher.d.ts +19 -0
- package/dist/src/project/src/utils/env.d.ts +34 -0
- package/dist/src/util/kg.util.d.ts +1 -1
- package/package.json +1 -1
- package/script/bump-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts +0 -3
- package/script/bump-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts +0 -3
- package/script/bump-to.ts +0 -38
- package/script/bump.ts +0 -35
- package/script/copy-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts +0 -3
- package/script/copy-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts +0 -3
- package/script/copy-to.luotao.smartfactory.tyre.haohua.gantry.was-java--main.ts +0 -3
- package/script/copy-to.ts +0 -23
- package/script/publish.ts +0 -30
package/dist/kengic-vue.js
CHANGED
@@ -70071,7 +70071,7 @@ function fi(e) {
|
|
70071
70071
|
})
|
70072
70072
|
);
|
70073
70073
|
}
|
70074
|
-
const version = "0.27.1-beta.
|
70074
|
+
const version = "0.27.1-beta.6", en$1 = {
|
70075
70075
|
kg: {
|
70076
70076
|
KgAppSelect: {
|
70077
70077
|
businessManager: "Business Manager",
|
@@ -75952,7 +75952,7 @@ class _KgUtil {
|
|
75952
75952
|
varName: o
|
75953
75953
|
} = e != null ? e : {};
|
75954
75954
|
if (typeof a != "string")
|
75955
|
-
return
|
75955
|
+
return a;
|
75956
75956
|
const l = useKg(), u = r ? useKgVar(r) : null;
|
75957
75957
|
let p = (() => {
|
75958
75958
|
var C, w, N, U, ne, oe, ue, se, st, ut, ea, ta, oa, aa, sa, ua, ga;
|
@@ -90103,7 +90103,7 @@ const getProps$F = () => ({
|
|
90103
90103
|
});
|
90104
90104
|
});
|
90105
90105
|
}), !1;
|
90106
|
-
}), w.kgTable.onRowDoubleClick(async () => (await se(), !1)), w.
|
90106
|
+
}), w.kgTable.onRowDoubleClick(async () => (await se(), !1)), w.patchVarGridConfig({
|
90107
90107
|
properties: {
|
90108
90108
|
mult_flg: ((st = C.store.getVarConfigLookup(C.formID, o)) == null ? void 0 : st.mult_flg) === 1 ? 1 : 0
|
90109
90109
|
}
|
@@ -96550,29 +96550,6 @@ const KgTable$1 = "", getProps$t = () => ({
|
|
96550
96550
|
}
|
96551
96551
|
return o;
|
96552
96552
|
},
|
96553
|
-
patchVarGridConfig(e, r) {
|
96554
|
-
if (!e)
|
96555
|
-
return Promise.resolve();
|
96556
|
-
const { properties: n } = r != null ? r : {};
|
96557
|
-
return new Promise((a) => {
|
96558
|
-
const o = watch(
|
96559
|
-
() => this.isRequestedMap.get(e),
|
96560
|
-
(l) => {
|
96561
|
-
if (!l)
|
96562
|
-
return;
|
96563
|
-
const p = useKgVar(e).store.getVarGridConfig(e);
|
96564
|
-
if (!p)
|
96565
|
-
return Pe(`${e} | kgTable.store.patchVarGridConfig() | VarGridConfig \u4E3A\u7A7A.`, { formID: e }), a();
|
96566
|
-
setTimeout(() => {
|
96567
|
-
o(), Object.entries(n).forEach(([C, w]) => {
|
96568
|
-
C in p && (p[C] = w);
|
96569
|
-
}), a();
|
96570
|
-
});
|
96571
|
-
},
|
96572
|
-
{ immediate: !0 }
|
96573
|
-
);
|
96574
|
-
});
|
96575
|
-
},
|
96576
96553
|
refreshSelectedRows(e) {
|
96577
96554
|
var l, u;
|
96578
96555
|
if (!e) {
|
@@ -96859,12 +96836,12 @@ function useKgTable(e) {
|
|
96859
96836
|
var a, o;
|
96860
96837
|
return JSON.parse((o = (a = r.varGridConfig.value) == null ? void 0 : a.pg_size_opts) != null ? o : "[]");
|
96861
96838
|
}),
|
96862
|
-
patchVarGridConfig: async (a) => n.patchVarGridConfig(r.formID, a),
|
96863
96839
|
requestParams: computed(() => n.getRequestParams(r.formID)),
|
96864
96840
|
selectedFirstRow: computed(() => n.getSelectedFirstRow(r.formID)),
|
96865
96841
|
selectedRow: computed(() => n.getSelectedRow(r.formID)),
|
96866
96842
|
selectedRows: computed(() => n.getSelectedRows(r.formID)),
|
96867
96843
|
setIsShowDescription: (a) => n.setIsShowDescription(r.formID, a),
|
96844
|
+
setSelectedRows: (a) => n.setSelectedRows(r.formID, a.selectedRows),
|
96868
96845
|
store: n
|
96869
96846
|
};
|
96870
96847
|
}
|
@@ -102300,6 +102277,28 @@ const KgVarConfig$1 = "", KgVarConfig = defineComponent({
|
|
102300
102277
|
);
|
102301
102278
|
});
|
102302
102279
|
},
|
102280
|
+
patchVarGridConfig(e, r) {
|
102281
|
+
if (!e)
|
102282
|
+
return Promise.resolve();
|
102283
|
+
const { properties: n } = r != null ? r : {};
|
102284
|
+
return new Promise((a) => {
|
102285
|
+
const o = watch(
|
102286
|
+
() => this.isRequestedMap.get(e),
|
102287
|
+
(l) => {
|
102288
|
+
!l || setTimeout(() => {
|
102289
|
+
o();
|
102290
|
+
const u = this.getVarGridConfig(e);
|
102291
|
+
if (!u)
|
102292
|
+
return Pe(`${e} | kgVar.store.patchVarGridConfig() | VarGridConfig \u4E3A\u7A7A.`, { formID: e }), a();
|
102293
|
+
Object.entries(n).forEach(([p, C]) => {
|
102294
|
+
p in u && (u[p] = C);
|
102295
|
+
}), a();
|
102296
|
+
});
|
102297
|
+
},
|
102298
|
+
{ immediate: !0 }
|
102299
|
+
);
|
102300
|
+
});
|
102301
|
+
},
|
102303
102302
|
patchVarGridDetail(e, r) {
|
102304
102303
|
const { varName: n, properties: a } = r != null ? r : {};
|
102305
102304
|
return !e || !n ? Promise.resolve() : new Promise((o) => {
|
@@ -102397,7 +102396,18 @@ const KgVarConfig$1 = "", KgVarConfig = defineComponent({
|
|
102397
102396
|
varSubmitConfigs: ma,
|
102398
102397
|
varSubmitDetails: fa,
|
102399
102398
|
varVariables: va
|
102400
|
-
} = await GetAll({
|
102399
|
+
} = await GetAll({
|
102400
|
+
data: {
|
102401
|
+
frm_id: (() => {
|
102402
|
+
var Aa, Ha;
|
102403
|
+
let Va = e;
|
102404
|
+
const Da = /CLONE\[(.*)?]TO\[(.*)?]/;
|
102405
|
+
if (Da.test(e) && (Va = (Ha = (Aa = Da.exec(e)) == null ? void 0 : Aa[1]) != null ? Ha : ""), !Va)
|
102406
|
+
throw new Error(`\u9519\u8BEF\u7684\u754C\u9762\u6807\u8BC6:${e}`);
|
102407
|
+
return Va;
|
102408
|
+
})()
|
102409
|
+
}
|
102410
|
+
}), xa = transformVarButtons(U), ba = transformVarButtonConfig(ne), ha = transformVarChildDetails(oe), Ca = oa != null ? oa : null, $a = transformVarConfigControls(ue), ka = se != null ? se : [], Ta = transformVarConfigInputs(st), Ra = transformVarConfigLookups(ut), Ia = transformVarConfigPossibilities(ea), Sa = transformVarConfigTips(ta), Ma = transformVarGridConfig(aa), Ka = transformVarGridMasters(sa), Ga = transformVarProfileConfig(ua), gi = transformVarProfileMasters(ga), Ei = transformVarSubmitConfigs(ma), _i = transformVarSubmitDetails(fa), bi = va != null ? va : [], Si = (l = (o = (ga == null ? void 0 : ga.find((Va) => Va.id === this.getCurrentVarProfileMasterID(e))) || (ga == null ? void 0 : ga.find((Va) => Va.def_flg === 1)) || (ga == null ? void 0 : ga.find((Va) => Va.cust_lvl === KG_CUSTOM_LEVEL.L0)) || (ga == null ? void 0 : ga.find(() => !0))) == null ? void 0 : o.id) != null ? l : null, Xa = (p = (u = (sa == null ? void 0 : sa.find((Va) => Va.id === this.getCurrentVarGridMasterID(e))) || (sa == null ? void 0 : sa.find((Va) => Va.def_flg === 1)) || (sa == null ? void 0 : sa.find((Va) => Va.cust_lvl === KG_CUSTOM_LEVEL.L0)) || (sa == null ? void 0 : sa.find(() => !0))) == null ? void 0 : u.id) != null ? p : null;
|
102401
102411
|
createDefaultVarSubmitDetailsForVarProfileDetails(Ka, _i, xa), this.varButtonMap.set(e, xa), this.varButtonConfigMap.set(e, ba), this.varChildDetailMap.set(e, ha), this.varConfigControlMap.set(e, $a), this.varConfigDescriptionMap.set(e, ka), this.varConfigInputMap.set(e, Ta), this.varConfigLookupMap.set(e, Ra), this.varConfigPossibilityMap.set(e, Ia), this.varConfigTipMap.set(e, Sa), this.varDdaMap.set(e, Ca), this.varGridConfigMap.set(e, Ma), this.varGridMasterMap.set(e, { varGridMasters: Ka, currentVarGridMasterID: Xa }), this.varProfileConfigMap.set(e, Ga), this.varProfileMasterMap.set(e, { varProfileMasters: gi, currentVarProfileMasterID: Si }), this.varSubmitConfigMap.set(e, Ei), this.varSubmitDetailMap.set(e, _i), this.varVariableMap.set(e, bi), await Promise.all([
|
102402
102412
|
this.setCurrentVarGridMasterID(e, this.getCurrentVarGridMasterID(e)),
|
102403
102413
|
this.setCurrentVarProfileMasterID(e, this.getCurrentVarProfileMasterID(e))
|
@@ -102930,7 +102940,8 @@ function useKgVar(e, r, n = 0) {
|
|
102930
102940
|
}),
|
102931
102941
|
parent: computed(() => u.getParent(l)),
|
102932
102942
|
patchVarButton: (se) => u.patchVarButton(l, se),
|
102933
|
-
|
102943
|
+
patchVarGridConfig: (se) => u.patchVarGridConfig(l, se),
|
102944
|
+
patchVarGridDetail: (se) => u.patchVarGridDetail(l, se),
|
102934
102945
|
props: computed(() => u.getProps(l)),
|
102935
102946
|
requestAll: (se) => u.requestAll(l, se),
|
102936
102947
|
setProps: (se) => u.setProps(l, se),
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import { VarGridConfig } from '../../api/WMS/models';
|
4
3
|
import { IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
5
4
|
import { IKgTableStore } from './KgTable.store';
|
5
|
+
import { IKgTableRow } from './KgTable.vm';
|
6
6
|
export interface IUseKgTable {
|
7
7
|
/**
|
8
8
|
* 列表数据.
|
@@ -100,14 +100,6 @@ export interface IUseKgTable {
|
|
100
100
|
pageSizeOption: ComputedRef<number>;
|
101
101
|
/** 所有分页选项. */
|
102
102
|
pageSizeOptions: ComputedRef<number[]>;
|
103
|
-
/**
|
104
|
-
* 修改「表格配置」的部分属性.
|
105
|
-
*
|
106
|
-
* @param param.properties 要修改的部分属性.
|
107
|
-
*/
|
108
|
-
patchVarGridConfig(param: {
|
109
|
-
properties: VarGridConfig;
|
110
|
-
}): Promise<void>;
|
111
103
|
/**
|
112
104
|
* <p>查询参数.</p>
|
113
105
|
* <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
|
@@ -120,6 +112,15 @@ export interface IUseKgTable {
|
|
120
112
|
/** 当前勾选的所有行. */
|
121
113
|
selectedRows: ComputedRef<ReturnType<IKgTableStore['getSelectedRows']>>;
|
122
114
|
setIsShowDescription(value: boolean): void;
|
115
|
+
/**
|
116
|
+
* 设置勾选的行.
|
117
|
+
*
|
118
|
+
* @param param
|
119
|
+
* @param param.selectedRows 勾选的行.
|
120
|
+
*/
|
121
|
+
setSelectedRows<T extends IKgTableRow = any>(param: {
|
122
|
+
selectedRows: Array<T>;
|
123
|
+
}): void;
|
123
124
|
/** 状态数据. */
|
124
125
|
store: IKgTableStore;
|
125
126
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Key } from 'ant-design-vue/lib/_util/type';
|
2
2
|
import { StoreDefinition } from 'pinia';
|
3
3
|
import { Ref } from 'vue';
|
4
|
-
import { VarGridConfig } from '../../api/WMS/models';
|
5
4
|
import { IKgTableEvent, IKgTableEventListenerParameter, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
6
5
|
import { IKgTableRow, IKgTableRowHeight } from './KgTable.vm';
|
7
6
|
export interface IUseKgTableStoreState {
|
@@ -109,16 +108,6 @@ export interface IUseKgTableStoreActions {
|
|
109
108
|
* @param parameter 事件参数.
|
110
109
|
*/
|
111
110
|
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, parameter: T): Promise<boolean>;
|
112
|
-
/**
|
113
|
-
* 修改「表格配置」的部分属性.
|
114
|
-
*
|
115
|
-
* @param formID 界面标识.
|
116
|
-
* @param param
|
117
|
-
* @param param.properties 要修改的部分属性.
|
118
|
-
*/
|
119
|
-
patchVarGridConfig(formID: string | null | undefined, param: {
|
120
|
-
properties: VarGridConfig;
|
121
|
-
}): Promise<void>;
|
122
111
|
/**
|
123
112
|
* 刷新勾选的行. 表格列表数据变更之后, 需要同步到勾选的行.
|
124
113
|
* @param formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import { VarButton, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarGridDetail, VarGridMasterDTO } from '../../api/WMS/models';
|
3
|
+
import { VarButton, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarGridConfig, VarGridDetail, VarGridMasterDTO } from '../../api/WMS/models';
|
4
4
|
import { KG__VAR_BUTTON__TYPE } from '../../const';
|
5
5
|
import { IUseKgButton } from '../KgButton';
|
6
6
|
import { IUseKgForm } from '../KgForm';
|
@@ -172,6 +172,14 @@ export declare type IUseKgVar = {
|
|
172
172
|
properties: VarButton;
|
173
173
|
varName: string | null | undefined;
|
174
174
|
}): Promise<void>;
|
175
|
+
/**
|
176
|
+
* 修改「表格配置」的部分属性.
|
177
|
+
*
|
178
|
+
* @param param.properties 要修改的部分属性.
|
179
|
+
*/
|
180
|
+
patchVarGridConfig(param: {
|
181
|
+
properties: VarGridConfig;
|
182
|
+
}): Promise<void>;
|
175
183
|
/**
|
176
184
|
* 修改「表格视图明细」的部分属性.
|
177
185
|
*
|
@@ -184,6 +184,16 @@ export interface IUseKgVarStoreActions {
|
|
184
184
|
properties: VarButton;
|
185
185
|
varName: string | null | undefined;
|
186
186
|
}): Promise<void>;
|
187
|
+
/**
|
188
|
+
* 修改「表格配置」的部分属性.
|
189
|
+
*
|
190
|
+
* @param formID 界面标识.
|
191
|
+
* @param param
|
192
|
+
* @param param.properties 要修改的部分属性.
|
193
|
+
*/
|
194
|
+
patchVarGridConfig(formID: string | null | undefined, param: {
|
195
|
+
properties: VarGridConfig;
|
196
|
+
}): Promise<void>;
|
187
197
|
/**
|
188
198
|
* 修改「表格视图明细」的部分属性.
|
189
199
|
*
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { RouteMeta } from 'vue-router';
|
2
|
+
export interface RouteItem {
|
3
|
+
path: string;
|
4
|
+
component: any;
|
5
|
+
meta: RouteMeta;
|
6
|
+
name?: string;
|
7
|
+
alias?: string | string[];
|
8
|
+
redirect?: string;
|
9
|
+
caseSensitive?: boolean;
|
10
|
+
children?: RouteItem[];
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* @description: Get menu return value
|
14
|
+
*/
|
15
|
+
export declare type getMenuListResultModel = RouteItem[];
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/**
|
2
|
+
* @description: Login interface parameters
|
3
|
+
*/
|
4
|
+
export interface LoginParams {
|
5
|
+
username: string;
|
6
|
+
password: string;
|
7
|
+
}
|
8
|
+
export interface ThirdLoginParams {
|
9
|
+
token: string;
|
10
|
+
thirdType: string;
|
11
|
+
}
|
12
|
+
export interface RoleInfo {
|
13
|
+
roleName: string;
|
14
|
+
value: string;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* @description: Login interface return value
|
18
|
+
*/
|
19
|
+
export interface LoginResultModel {
|
20
|
+
userId: string | number;
|
21
|
+
token: string;
|
22
|
+
role: RoleInfo;
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* @description: Get user information return value
|
26
|
+
*/
|
27
|
+
export interface GetUserInfoModel {
|
28
|
+
roles: RoleInfo[];
|
29
|
+
userId: string | number;
|
30
|
+
username: string;
|
31
|
+
realname: string;
|
32
|
+
avatar: string;
|
33
|
+
desc?: string;
|
34
|
+
userInfo?: any;
|
35
|
+
sysAllDictItems?: any;
|
36
|
+
userWarehouses?: any;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* @description: Get user information return value
|
40
|
+
*/
|
41
|
+
export interface GetResultModel {
|
42
|
+
code: number;
|
43
|
+
message: string;
|
44
|
+
result: object;
|
45
|
+
success: Boolean;
|
46
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './src/typing';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Dropdown';
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* 组件类型
|
3
|
+
*/
|
4
|
+
export declare enum CompTypeEnum {
|
5
|
+
Radio = "radio",
|
6
|
+
RadioButton = "radioButton",
|
7
|
+
Select = "select",
|
8
|
+
List = "list",
|
9
|
+
Switch = "switch",
|
10
|
+
SelTree = "sel_tree",
|
11
|
+
CatTree = "cat_tree",
|
12
|
+
SelSearch = "search",
|
13
|
+
SelUser = "sel_user",
|
14
|
+
Checkbox = "checkbox",
|
15
|
+
ListMulti = "list_multi",
|
16
|
+
Pca = "pca",
|
17
|
+
Popup = "popup",
|
18
|
+
SelDepart = "sel_depart"
|
19
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
export declare const SIDE_BAR_MINI_WIDTH = 48;
|
2
|
+
export declare const SIDE_BAR_SHOW_TIT_MINI_WIDTH = 80;
|
3
|
+
export declare enum TabsThemeEnum {
|
4
|
+
SMOOTH = "smooth",
|
5
|
+
CARD = "card",
|
6
|
+
SIMPLE = "simple"
|
7
|
+
}
|
8
|
+
export declare enum ContentEnum {
|
9
|
+
FULL = "full",
|
10
|
+
FIXED = "fixed"
|
11
|
+
}
|
12
|
+
export declare enum ThemeEnum {
|
13
|
+
DARK = "dark",
|
14
|
+
LIGHT = "light"
|
15
|
+
}
|
16
|
+
export declare enum SettingButtonPositionEnum {
|
17
|
+
AUTO = "auto",
|
18
|
+
HEADER = "header",
|
19
|
+
FIXED = "fixed"
|
20
|
+
}
|
21
|
+
export declare enum SessionTimeoutProcessingEnum {
|
22
|
+
ROUTE_JUMP = 0,
|
23
|
+
PAGE_COVERAGE = 1
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* 权限模式
|
27
|
+
*/
|
28
|
+
export declare enum PermissionModeEnum {
|
29
|
+
ROLE = "ROLE",
|
30
|
+
BACK = "BACK",
|
31
|
+
ROUTE_MAPPING = "ROUTE_MAPPING"
|
32
|
+
}
|
33
|
+
export declare enum RouterTransitionEnum {
|
34
|
+
ZOOM_FADE = "zoom-fade",
|
35
|
+
ZOOM_OUT = "zoom-out",
|
36
|
+
FADE_SIDE = "fade-slide",
|
37
|
+
FADE = "fade",
|
38
|
+
FADE_BOTTOM = "fade-bottom",
|
39
|
+
FADE_SCALE = "fade-scale"
|
40
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare enum sizeEnum {
|
2
|
+
XS = "XS",
|
3
|
+
SM = "SM",
|
4
|
+
MD = "MD",
|
5
|
+
LG = "LG",
|
6
|
+
XL = "XL",
|
7
|
+
XXL = "XXL"
|
8
|
+
}
|
9
|
+
export declare enum screenEnum {
|
10
|
+
XS = 480,
|
11
|
+
SM = 576,
|
12
|
+
MD = 768,
|
13
|
+
LG = 992,
|
14
|
+
XL = 1200,
|
15
|
+
XXL = 1600
|
16
|
+
}
|
17
|
+
declare const screenMap: Map<sizeEnum, number>;
|
18
|
+
export { screenMap };
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare const TOKEN_KEY = "TOKEN__";
|
2
|
+
export declare const USER_INFO_KEY = "USER__INFO__";
|
3
|
+
export declare const LOCALE_KEY = "LOCALE__";
|
4
|
+
export declare const ROLES_KEY = "ROLES__KEY__";
|
5
|
+
export declare const USER_WAREHOUSE_KEY = "USER_WAREHOUSE__KEY__";
|
6
|
+
export declare const DB_DICT_DATA_KEY = "UI_CACHE_DB_DICT_DATA";
|
7
|
+
export declare const PROJ_CFG_KEY = "PROJ__CFG__KEY__";
|
8
|
+
export declare const LOCK_INFO_KEY = "LOCK__INFO__KEY__";
|
9
|
+
export declare const MULTIPLE_TABS_KEY = "MULTIPLE_TABS__KEY__";
|
10
|
+
export declare const APP_DARK_MODE_KEY_ = "__APP__DARK__MODE__";
|
11
|
+
export declare const APP_LOCAL_CACHE_KEY = "COMMON__LOCAL__KEY__";
|
12
|
+
export declare const APP_SESSION_CACHE_KEY = "COMMON__SESSION__KEY__";
|
13
|
+
export declare const TENANT_ID = "TENANT_ID";
|
14
|
+
export declare const LOGIN_INFO_KEY = "LOGIN__INFO__";
|
15
|
+
export declare enum CacheTypeEnum {
|
16
|
+
SESSION = 0,
|
17
|
+
LOCAL = 1
|
18
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* @description: Exception related enumeration
|
3
|
+
*/
|
4
|
+
export declare enum ExceptionEnum {
|
5
|
+
PAGE_NOT_ACCESS = 403,
|
6
|
+
PAGE_NOT_FOUND = 404,
|
7
|
+
ERROR = 500,
|
8
|
+
NET_WORK_ERROR = 10000,
|
9
|
+
PAGE_NOT_DATA = 10100
|
10
|
+
}
|
11
|
+
export declare enum ErrorTypeEnum {
|
12
|
+
VUE = "vue",
|
13
|
+
SCRIPT = "script",
|
14
|
+
RESOURCE = "resource",
|
15
|
+
AJAX = "ajax",
|
16
|
+
PROMISE = "promise"
|
17
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/**
|
2
|
+
* @description: Request result set
|
3
|
+
*/
|
4
|
+
export declare enum ResultEnum {
|
5
|
+
SUCCESS = 0,
|
6
|
+
ERROR = 1,
|
7
|
+
TIMEOUT = 401,
|
8
|
+
TYPE = "success"
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* @description: request method
|
12
|
+
*/
|
13
|
+
export declare enum RequestEnum {
|
14
|
+
GET = "GET",
|
15
|
+
POST = "POST",
|
16
|
+
PUT = "PUT",
|
17
|
+
DELETE = "DELETE"
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* @description: contentTyp
|
21
|
+
*/
|
22
|
+
export declare enum ContentTypeEnum {
|
23
|
+
JSON = "application/json;charset=UTF-8",
|
24
|
+
FORM_URLENCODED = "application/x-www-form-urlencoded;charset=UTF-8",
|
25
|
+
FORM_DATA = "multipart/form-data;charset=UTF-8"
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* 请求header
|
29
|
+
* @description: contentTyp
|
30
|
+
*/
|
31
|
+
export declare enum ConfigEnum {
|
32
|
+
TOKEN = "X-Access-Token",
|
33
|
+
TIMESTAMP = "X-TIMESTAMP",
|
34
|
+
Sign = "X-Sign",
|
35
|
+
TENANT_ID = "tenant-id",
|
36
|
+
VERSION = "X-Version",
|
37
|
+
X_LOW_APP_ID = "X-Low-App-ID"
|
38
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export * from './appEnum';
|
2
|
+
export * from './breakpointEnum';
|
3
|
+
export * from './cacheEnum';
|
4
|
+
export * from './CompTypeEnum';
|
5
|
+
export * from './DateTypeEnum';
|
6
|
+
export * from './exceptionEnum';
|
7
|
+
export * from './httpEnum';
|
8
|
+
export * from './index';
|
9
|
+
export * from './jeecgEnum';
|
10
|
+
export * from './menuEnum';
|
11
|
+
export * from './pageEnum';
|
12
|
+
export * from './roleEnum';
|
13
|
+
export * from './sizeEnum';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* JInput组件类型
|
3
|
+
*/
|
4
|
+
export declare enum JInputTypeEnum {
|
5
|
+
JINPUT_QUERY_LIKE = "like",
|
6
|
+
JINPUT_QUERY_NE = "ne",
|
7
|
+
JINPUT_QUERY_GE = "ge",
|
8
|
+
JINPUT_QUERY_LE = "le"
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* 面板设计器需要的常量定义
|
12
|
+
*/
|
13
|
+
export declare enum JDragConfigEnum {
|
14
|
+
DRAG_BASE_URL = "drag-base-url",
|
15
|
+
DRAG_CACHE_PREFIX = "drag-cache:"
|
16
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* @description: menu type
|
3
|
+
*/
|
4
|
+
export declare enum MenuTypeEnum {
|
5
|
+
SIDEBAR = "sidebar",
|
6
|
+
MIX_SIDEBAR = "mix-sidebar",
|
7
|
+
MIX = "mix",
|
8
|
+
TOP_MENU = "top-menu"
|
9
|
+
}
|
10
|
+
export declare enum TriggerEnum {
|
11
|
+
NONE = "NONE",
|
12
|
+
FOOTER = "FOOTER",
|
13
|
+
HEADER = "HEADER"
|
14
|
+
}
|
15
|
+
export declare type Mode = 'vertical' | 'vertical-right' | 'horizontal' | 'inline';
|
16
|
+
export declare enum MenuModeEnum {
|
17
|
+
VERTICAL = "vertical",
|
18
|
+
HORIZONTAL = "horizontal",
|
19
|
+
VERTICAL_RIGHT = "vertical-right",
|
20
|
+
INLINE = "inline"
|
21
|
+
}
|
22
|
+
export declare enum MenuSplitTyeEnum {
|
23
|
+
NONE = 0,
|
24
|
+
TOP = 1,
|
25
|
+
LEFT = 2
|
26
|
+
}
|
27
|
+
export declare enum TopMenuAlignEnum {
|
28
|
+
CENTER = "center",
|
29
|
+
START = "start",
|
30
|
+
END = "end"
|
31
|
+
}
|
32
|
+
export declare enum MixSidebarTriggerEnum {
|
33
|
+
HOVER = "hover",
|
34
|
+
CLICK = "click"
|
35
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export declare enum PageEnum {
|
2
|
+
BASE_LOGIN = "/login",
|
3
|
+
BASE_HOME = "/home",
|
4
|
+
ERROR_PAGE = "/exception",
|
5
|
+
ERROR_LOG_PAGE = "/error-log/list",
|
6
|
+
OAUTH2_LOGIN_PAGE_PATH = "/oauth2-app/login",
|
7
|
+
LABEL = "/wms/business-manager/print-manager/label",
|
8
|
+
/** 打印模板:物料标签. */
|
9
|
+
PRINT_TEMPLATE_ITEM = "/wms/print-template/item",
|
10
|
+
/** 打印模板:备料标签. */
|
11
|
+
PRINT_TEMPLATE_SPARE = "/wms/print-template/spare",
|
12
|
+
/** 打印模板:出库订单. */
|
13
|
+
PRINT_TEMPLATE_ORDER = "/wms/print-template/order"
|
14
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare enum SizeEnum {
|
2
|
+
DEFAULT = "default",
|
3
|
+
SMALL = "small",
|
4
|
+
LARGE = "large"
|
5
|
+
}
|
6
|
+
export declare enum SizeNumberEnum {
|
7
|
+
DEFAULT = 48,
|
8
|
+
SMALL = 16,
|
9
|
+
LARGE = 64
|
10
|
+
}
|
11
|
+
export declare enum ScreenSizeEnum {
|
12
|
+
XS = 480,
|
13
|
+
SM = 576,
|
14
|
+
MD = 768,
|
15
|
+
LG = 992,
|
16
|
+
XL = 1200
|
17
|
+
}
|
18
|
+
export declare const sizeMap: Map<SizeEnum, SizeNumberEnum>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './web/useI18n';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
declare type I18nGlobalTranslation = {
|
2
|
+
(key: string): string;
|
3
|
+
(key: string, locale: string): string;
|
4
|
+
(key: string, locale: string, list: unknown[]): string;
|
5
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
6
|
+
(key: string, list: unknown[]): string;
|
7
|
+
(key: string, named: Record<string, unknown>): string;
|
8
|
+
};
|
9
|
+
export declare function useI18n(namespace?: string): {
|
10
|
+
t: I18nGlobalTranslation;
|
11
|
+
};
|
12
|
+
export declare const t: (key: string) => string;
|
13
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export * from './api';
|
2
|
+
export * from './components';
|
3
|
+
export * from './enums';
|
4
|
+
export * from './hooks';
|
5
|
+
export * from './locales';
|
6
|
+
export * from './settings';
|
7
|
+
export * from './store';
|
8
|
+
export * from './router/types';
|
9
|
+
export * from './utils/cache/index';
|
10
|
+
export * from './utils/cache/memory';
|
11
|
+
export * from './utils/cache/persistent';
|
12
|
+
export * from './utils/cache/storageCache';
|
13
|
+
export * from './utils/cipher';
|
14
|
+
export * from './utils/env';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { LocaleType } from '../../types';
|
2
|
+
export declare const loadLocalePool: LocaleType[];
|
3
|
+
export declare function setHtmlPageLang(locale: LocaleType): void;
|
4
|
+
export declare function setLoadLocalePool(cb: (loadLocalePool: LocaleType[]) => void): void;
|
5
|
+
export declare function genMessage(langs: Record<string, Record<string, any>>, prefix?: string): Recordable<any>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Multi-language related operations
|
3
|
+
*/
|
4
|
+
import { LocaleType } from '../../types';
|
5
|
+
export declare function useLocale(): {
|
6
|
+
getLocale: import("vue").ComputedRef<LocaleType>;
|
7
|
+
getShowLocalePicker: import("vue").ComputedRef<boolean>;
|
8
|
+
changeLocale: (locale: LocaleType) => Promise<LocaleType | undefined>;
|
9
|
+
getAntdLocale: import("vue").ComputedRef<any>;
|
10
|
+
};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { defineComponent } from 'vue';
|
2
|
+
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
3
|
+
export declare type Component<T extends any = any> = ReturnType<typeof defineComponent> | (() => Promise<any>) | (() => Promise<T>);
|
4
|
+
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
5
|
+
app?: string;
|
6
|
+
name: string;
|
7
|
+
meta: RouteMeta;
|
8
|
+
component?: Component | string;
|
9
|
+
components?: Component;
|
10
|
+
children?: AppRouteRecordRaw[];
|
11
|
+
props?: Recordable;
|
12
|
+
fullPath?: string;
|
13
|
+
alwaysShow?: boolean;
|
14
|
+
}
|
15
|
+
export interface MenuTag {
|
16
|
+
type?: 'primary' | 'error' | 'warn' | 'success';
|
17
|
+
content?: string;
|
18
|
+
dot?: boolean;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* 菜单.
|
22
|
+
*/
|
23
|
+
export interface Menu {
|
24
|
+
id: string;
|
25
|
+
app: string | null;
|
26
|
+
name: string;
|
27
|
+
title: string;
|
28
|
+
path?: string;
|
29
|
+
paramPath?: string;
|
30
|
+
icon?: string;
|
31
|
+
hideMenu?: boolean;
|
32
|
+
children?: Menu[];
|
33
|
+
meta?: Partial<RouteMeta>;
|
34
|
+
tag?: MenuTag;
|
35
|
+
alwaysShow?: boolean;
|
36
|
+
[key: string]: any;
|
37
|
+
}
|
38
|
+
export interface MenuModule {
|
39
|
+
orderNo?: number;
|
40
|
+
menu: Menu;
|
41
|
+
}
|
42
|
+
export declare type AppRouteModule = AppRouteRecordRaw;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
export declare const componentSetting: {
|
2
|
+
table: {
|
3
|
+
fetchSetting: {
|
4
|
+
pageField: string;
|
5
|
+
sizeField: string;
|
6
|
+
listField: string;
|
7
|
+
totalField: string;
|
8
|
+
};
|
9
|
+
pageSizeOptions: string[];
|
10
|
+
defaultSize: string;
|
11
|
+
defaultPageSize: number;
|
12
|
+
defaultSortFn: (sortInfo: any) => string | {
|
13
|
+
column: any;
|
14
|
+
order: string;
|
15
|
+
} | {
|
16
|
+
sortInfoString: string;
|
17
|
+
} | {
|
18
|
+
sortInfoString?: undefined;
|
19
|
+
};
|
20
|
+
defaultFilterFn: (data: Partial<Recordable<string[]>>) => Partial<Recordable<string[]>>;
|
21
|
+
};
|
22
|
+
scrollbar: {
|
23
|
+
native: boolean;
|
24
|
+
};
|
25
|
+
form: {
|
26
|
+
labelCol: {
|
27
|
+
xs: {
|
28
|
+
span: number;
|
29
|
+
};
|
30
|
+
sm: {
|
31
|
+
span: number;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
wrapperCol: {
|
35
|
+
xs: {
|
36
|
+
span: number;
|
37
|
+
};
|
38
|
+
sm: {
|
39
|
+
span: number;
|
40
|
+
};
|
41
|
+
};
|
42
|
+
colon: boolean;
|
43
|
+
};
|
44
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ThemeEnum } from '../enums';
|
2
|
+
export declare const prefixCls = "jeecg";
|
3
|
+
export declare const darkMode = ThemeEnum.LIGHT;
|
4
|
+
export declare const APP_PRESET_COLOR_LIST: string[];
|
5
|
+
export declare const HEADER_PRESET_BG_COLOR_LIST: string[];
|
6
|
+
export declare const SIDE_BAR_BG_COLOR_LIST: string[];
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './modules';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './locale';
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { LocaleSetting, LocaleType } from '../../../types';
|
2
|
+
interface LocaleState {
|
3
|
+
localInfo: LocaleSetting;
|
4
|
+
pathTitleMap: Record<string, string>;
|
5
|
+
}
|
6
|
+
export declare const _useLocaleStore: import("pinia").StoreDefinition<"app-locale", LocaleState, {
|
7
|
+
getShowPicker(): boolean;
|
8
|
+
getLocale(): LocaleType;
|
9
|
+
getPathTitle: (state: {
|
10
|
+
localInfo: {
|
11
|
+
showPicker: boolean;
|
12
|
+
locale: LocaleType;
|
13
|
+
fallback: LocaleType;
|
14
|
+
availableLocales: LocaleType[];
|
15
|
+
};
|
16
|
+
pathTitleMap: Record<string, string>;
|
17
|
+
} & import("pinia").PiniaCustomStateProperties<LocaleState>) => (path: string) => string;
|
18
|
+
}, {
|
19
|
+
setLocaleInfo(info: Partial<LocaleSetting>): void;
|
20
|
+
setPathTitle(path: string, title: string): void;
|
21
|
+
}>;
|
22
|
+
export declare function useLocaleStore(): import("pinia").Store<"app-locale", LocaleState, {
|
23
|
+
getShowPicker(): boolean;
|
24
|
+
getLocale(): LocaleType;
|
25
|
+
getPathTitle: (state: {
|
26
|
+
localInfo: {
|
27
|
+
showPicker: boolean;
|
28
|
+
locale: LocaleType;
|
29
|
+
fallback: LocaleType;
|
30
|
+
availableLocales: LocaleType[];
|
31
|
+
};
|
32
|
+
pathTitleMap: Record<string, string>;
|
33
|
+
} & import("pinia").PiniaCustomStateProperties<LocaleState>) => (path: string) => string;
|
34
|
+
}, {
|
35
|
+
setLocaleInfo(info: Partial<LocaleSetting>): void;
|
36
|
+
setPathTitle(path: string, title: string): void;
|
37
|
+
}>;
|
38
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { CreateStorageParams } from './storageCache';
|
2
|
+
export declare type Options = Partial<CreateStorageParams>;
|
3
|
+
export declare const WebStorage: any;
|
4
|
+
export declare const createStorage: (storage?: Storage, options?: Options) => any;
|
5
|
+
export declare const createSessionStorage: (options?: Options) => any;
|
6
|
+
export declare const createLocalStorage: (options?: Options) => any;
|
7
|
+
export default WebStorage;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export interface Cache<V = any> {
|
2
|
+
value?: V;
|
3
|
+
timeoutId?: ReturnType<typeof setTimeout>;
|
4
|
+
time?: number;
|
5
|
+
alive?: number;
|
6
|
+
}
|
7
|
+
export declare class Memory<T = any, V = any> {
|
8
|
+
private cache;
|
9
|
+
private alive;
|
10
|
+
constructor(alive?: number);
|
11
|
+
get getCache(): { [key in keyof T]?: Cache<V> | undefined; };
|
12
|
+
setCache(cache: {
|
13
|
+
[key in keyof T]?: Cache<V>;
|
14
|
+
}): void;
|
15
|
+
get<K extends keyof T>(key: K): { [key in keyof T]?: Cache<V> | undefined; }[K];
|
16
|
+
set<K extends keyof T>(key: K, value: V, expires?: number): V;
|
17
|
+
remove<K extends keyof T>(key: K): V | undefined;
|
18
|
+
resetCache(cache: {
|
19
|
+
[K in keyof T]: Cache;
|
20
|
+
}): void;
|
21
|
+
clear(): void;
|
22
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { RouteLocationNormalized } from 'vue-router';
|
2
|
+
import { SysUserWarehouseDTO } from '../../../../api/WMS/models';
|
3
|
+
import { LoginInfo, ProjectConfig, UserInfo } from '../../../types';
|
4
|
+
import { DB_DICT_DATA_KEY, LOCK_INFO_KEY, LOGIN_INFO_KEY, MULTIPLE_TABS_KEY, PROJ_CFG_KEY, ROLES_KEY, TENANT_ID, TOKEN_KEY, USER_INFO_KEY, USER_WAREHOUSE_KEY } from '../../enums';
|
5
|
+
interface BasicStore {
|
6
|
+
[TOKEN_KEY]: string | number | null | undefined;
|
7
|
+
[USER_INFO_KEY]: UserInfo;
|
8
|
+
[ROLES_KEY]: string[];
|
9
|
+
[USER_WAREHOUSE_KEY]: SysUserWarehouseDTO[];
|
10
|
+
[LOCK_INFO_KEY]: LockInfo;
|
11
|
+
[PROJ_CFG_KEY]: ProjectConfig;
|
12
|
+
[MULTIPLE_TABS_KEY]: RouteLocationNormalized[];
|
13
|
+
[DB_DICT_DATA_KEY]: string;
|
14
|
+
[TENANT_ID]: string;
|
15
|
+
[LOGIN_INFO_KEY]: LoginInfo;
|
16
|
+
}
|
17
|
+
declare type LocalStore = BasicStore;
|
18
|
+
declare type SessionStore = BasicStore;
|
19
|
+
export declare type BasicKeys = keyof BasicStore;
|
20
|
+
declare type LocalKeys = keyof LocalStore;
|
21
|
+
declare type SessionKeys = keyof SessionStore;
|
22
|
+
export declare class Persistent {
|
23
|
+
static getLocal<T>(key: LocalKeys): Nullable<T>;
|
24
|
+
static setLocal(key: LocalKeys, value: LocalStore[LocalKeys], immediate?: boolean): void;
|
25
|
+
static removeLocal(key: LocalKeys, immediate?: boolean): void;
|
26
|
+
static clearLocal(immediate?: boolean): void;
|
27
|
+
static getSession<T>(key: SessionKeys): Nullable<T>;
|
28
|
+
static setSession(key: SessionKeys, value: SessionStore[SessionKeys], immediate?: boolean): void;
|
29
|
+
static removeSession(key: SessionKeys, immediate?: boolean): void;
|
30
|
+
static clearSession(immediate?: boolean): void;
|
31
|
+
static clearAll(immediate?: boolean): void;
|
32
|
+
}
|
33
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export interface EncryptionParams {
|
2
|
+
key: string;
|
3
|
+
iv: string;
|
4
|
+
}
|
5
|
+
export declare class AesEncryption {
|
6
|
+
private key;
|
7
|
+
private iv;
|
8
|
+
constructor(opt?: Partial<EncryptionParams>);
|
9
|
+
get getOptions(): {
|
10
|
+
mode: any;
|
11
|
+
padding: any;
|
12
|
+
iv: any;
|
13
|
+
};
|
14
|
+
encryptByAES(cipherText: string): string;
|
15
|
+
decryptByAES(cipherText: string): string;
|
16
|
+
}
|
17
|
+
export declare function encryptByBase64(cipherText: string): string;
|
18
|
+
export declare function decodeByBase64(cipherText: string): string;
|
19
|
+
export declare function encryptByMd5(password: string): string;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export declare function getCommonStoragePrefix(): string;
|
2
|
+
export declare function getStorageShortName(): string;
|
3
|
+
export declare function getAppEnvConfig(): {
|
4
|
+
VITE_GLOB_APP_TITLE: string;
|
5
|
+
VITE_GLOB_API_URL: string;
|
6
|
+
VITE_USE_MOCK: string;
|
7
|
+
VITE_GLOB_APP_SHORT_NAME: string;
|
8
|
+
VITE_GLOB_API_URL_PREFIX: string | undefined;
|
9
|
+
VITE_GLOB_APP_OPEN_SSO: string;
|
10
|
+
VITE_GLOB_APP_OPEN_QIANKUN: string;
|
11
|
+
VITE_GLOB_APP_CAS_BASE_URL: string;
|
12
|
+
VITE_GLOB_DOMAIN_URL: string;
|
13
|
+
VITE_GLOB_ONLINE_VIEW_URL: string | undefined;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* @description: Development mode
|
17
|
+
*/
|
18
|
+
export declare const devMode = "development";
|
19
|
+
/**
|
20
|
+
* @description: Production mode
|
21
|
+
*/
|
22
|
+
export declare const prodMode = "production";
|
23
|
+
/**
|
24
|
+
* @description: Is it a development mode
|
25
|
+
* @returns:
|
26
|
+
* @example:
|
27
|
+
*/
|
28
|
+
export declare function isDevMode(): boolean;
|
29
|
+
/**
|
30
|
+
* @description: Is it a production mode
|
31
|
+
* @returns:
|
32
|
+
* @example:
|
33
|
+
*/
|
34
|
+
export declare function isProdMode(): boolean;
|
package/package.json
CHANGED
package/script/bump-to.ts
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import chalk from 'chalk';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* 更新前端项目中包的版本号.
|
6
|
-
* 当我们升级了这些包的版本后, 可以使用该方法快速将新的版本号同步到前端项目中去.
|
7
|
-
*
|
8
|
-
* @param projectPath 前端项目目录.
|
9
|
-
* @param excludes 要排除的包.
|
10
|
-
*/
|
11
|
-
function bumpVersionToProjects(projectPath: string, excludes: Array<string> = []) {
|
12
|
-
// file:///D:/foo/...
|
13
|
-
const pkgPath = `${projectPath}/package.json`;
|
14
|
-
// D:/foo/...
|
15
|
-
const absolutePkgPath = pkgPath.replace('file:///', '');
|
16
|
-
|
17
|
-
import(pkgPath)
|
18
|
-
.then(({ default: json }) => {
|
19
|
-
Promise.all([import('../package.json')])
|
20
|
-
.then(([{ version, name, dependencies, devDependencies }]) => {
|
21
|
-
if (json.dependencies[name]) {
|
22
|
-
json.dependencies[name] = version;
|
23
|
-
}
|
24
|
-
|
25
|
-
fs.writeFileSync(absolutePkgPath, `${JSON.stringify(json, null, 2)}\n`, {});
|
26
|
-
console.log();
|
27
|
-
console.log(chalk.green(`版本更新成功`) + ' | ' + chalk.blueBright(version) + ' | ' + absolutePkgPath);
|
28
|
-
})
|
29
|
-
.catch((e) => {
|
30
|
-
console.log(e);
|
31
|
-
});
|
32
|
-
})
|
33
|
-
.catch((e) => {
|
34
|
-
console.error(e);
|
35
|
-
});
|
36
|
-
}
|
37
|
-
|
38
|
-
export { bumpVersionToProjects };
|
package/script/bump.ts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import semver from 'semver';
|
3
|
-
|
4
|
-
//____________________________________________________________________________________________________
|
5
|
-
// 自动更新所有包的版本号
|
6
|
-
//____________________________________________________________________________________________________
|
7
|
-
|
8
|
-
import('../package.json').then(({ default: json }) => {
|
9
|
-
const type = process.argv[2];
|
10
|
-
let version = json.version;
|
11
|
-
|
12
|
-
switch (type) {
|
13
|
-
case 'major':
|
14
|
-
version = semver.inc(version, 'major');
|
15
|
-
break;
|
16
|
-
case 'minor':
|
17
|
-
version = semver.inc(version, 'minor');
|
18
|
-
break;
|
19
|
-
case 'patch':
|
20
|
-
version = semver.inc(version, 'patch');
|
21
|
-
break;
|
22
|
-
case 'beta':
|
23
|
-
version = semver.inc(version, 'prerelease', 'beta');
|
24
|
-
break;
|
25
|
-
default:
|
26
|
-
throw new Error('INVALID SEMVER TYPE');
|
27
|
-
}
|
28
|
-
|
29
|
-
import('../package.json').then(({ default: json }) => {
|
30
|
-
json.version = version;
|
31
|
-
fs.writeFileSync('./package.json', `${JSON.stringify(json, null, 4)}\n`, {});
|
32
|
-
});
|
33
|
-
});
|
34
|
-
|
35
|
-
export {};
|
package/script/copy-to.ts
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import path from 'path';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* 开发时, 需要将打包后的文件复制到项目的 node_modules 目录下进行测试.
|
6
|
-
*
|
7
|
-
* @param projectPath 前端项目目录.
|
8
|
-
*/
|
9
|
-
function copyToProject(projectPath: string) {
|
10
|
-
const cacheDir = path.join(projectPath, '/node_modules/.vite/');
|
11
|
-
if (fs.existsSync(cacheDir)) {
|
12
|
-
fs.rmSync(cacheDir, { recursive: true, force: true });
|
13
|
-
}
|
14
|
-
|
15
|
-
const dir = path.join(projectPath, '/node_modules/@kengic/vue/dist/');
|
16
|
-
if (fs.existsSync(dir)) {
|
17
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
18
|
-
}
|
19
|
-
|
20
|
-
fs.cpSync('./dist/', dir, { recursive: true });
|
21
|
-
}
|
22
|
-
|
23
|
-
export { copyToProject };
|
package/script/publish.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import chalk from 'chalk';
|
2
|
-
import { execSync } from 'node:child_process';
|
3
|
-
import { name, version } from '../package.json';
|
4
|
-
|
5
|
-
/*
|
6
|
-
* 使用下面的脚本来简化打包发布流程.
|
7
|
-
*/
|
8
|
-
|
9
|
-
const PKGNAME = `${name}@${version}`;
|
10
|
-
|
11
|
-
//region 安装依赖
|
12
|
-
//____________________________________________________________________________________________________
|
13
|
-
console.log('');
|
14
|
-
execSync('npm cache clean -f', { cwd: './', stdio: 'ignore' });
|
15
|
-
execSync('pnpm install', { cwd: './', stdio: 'ignore' });
|
16
|
-
console.log(`${chalk.blueBright('INSTALL ')}| ${PKGNAME}`);
|
17
|
-
//endregion
|
18
|
-
|
19
|
-
//region 打包
|
20
|
-
//____________________________________________________________________________________________________
|
21
|
-
execSync('npm run build', { cwd: './', stdio: 'ignore' });
|
22
|
-
console.log(`${chalk.blueBright(' BUILD ')}| ${PKGNAME}`);
|
23
|
-
//endregion
|
24
|
-
|
25
|
-
//region 发布
|
26
|
-
//____________________________________________________________________________________________________
|
27
|
-
execSync('npm run publish:npm', { cwd: './', stdio: 'ignore' });
|
28
|
-
console.log(`${chalk.blueBright('PUBLISH ')}| ${PKGNAME}`);
|
29
|
-
console.log('');
|
30
|
-
//endregion
|