@kengic/vue 0.30.1-beta.7 → 0.30.1-beta.9
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/dist/index.css +1 -1
- package/dist/kengic-vue.js +1763 -1776
- package/dist/project/build/utils.ts +20 -15
- package/dist/src/config/config.store.d.ts +5 -1
- package/dist/src/project/src/utils/env.d.ts +0 -16
- package/package.json +4 -2
@@ -19,30 +19,35 @@ export function isReportMode(): boolean {
|
|
19
19
|
|
20
20
|
// Read all environment variable configuration files to process.env
|
21
21
|
export function wrapperEnv(envConf: Recordable): ViteEnv {
|
22
|
-
const
|
22
|
+
const result: any = {};
|
23
23
|
|
24
|
-
for (const
|
25
|
-
let
|
26
|
-
realName = realName === 'true' ? true : realName === 'false' ? false : realName;
|
24
|
+
for (const key of Object.keys(envConf)) {
|
25
|
+
let value = envConf[key].replace(/\\n/g, '\n');
|
27
26
|
|
28
|
-
|
29
|
-
|
27
|
+
value = value === 'true' ? true : value === 'false' ? false : value;
|
28
|
+
|
29
|
+
if (key === 'VITE_PORT') {
|
30
|
+
value = Number(value);
|
30
31
|
}
|
31
|
-
|
32
|
+
|
33
|
+
if (key === 'VITE_PROXY' && value) {
|
32
34
|
try {
|
33
|
-
|
35
|
+
value = JSON.parse(value.replace(/'/g, '"'));
|
34
36
|
} catch (error) {
|
35
|
-
|
37
|
+
value = '';
|
36
38
|
}
|
37
39
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
process.env[
|
40
|
+
|
41
|
+
result[key] = value;
|
42
|
+
|
43
|
+
if (typeof value === 'string') {
|
44
|
+
process.env[key] = value;
|
45
|
+
} else if (typeof value === 'object') {
|
46
|
+
process.env[key] = JSON.stringify(value);
|
43
47
|
}
|
44
48
|
}
|
45
|
-
|
49
|
+
|
50
|
+
return result;
|
46
51
|
}
|
47
52
|
|
48
53
|
/**
|
@@ -296,8 +296,12 @@ export interface IUseKgStoreActions {
|
|
296
296
|
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
297
297
|
/**
|
298
298
|
* 翻译.
|
299
|
+
*
|
300
|
+
* @param key 键.
|
301
|
+
* @param param 参数对象.
|
302
|
+
* @param defaultValue 默认翻译结果.
|
299
303
|
*/
|
300
|
-
t:
|
304
|
+
t(key: string | null | undefined, param?: Record<string, any> | null | undefined, defaultValue?: string | null | undefined): string;
|
301
305
|
}
|
302
306
|
export declare const useKgStore: KgStoreDefinition<IUseKgStoreGetters, IUseKgStoreActions>;
|
303
307
|
export {};
|
@@ -10,23 +10,7 @@ export declare function getAppEnvConfig(): {
|
|
10
10
|
VITE_GLOB_DOMAIN_URL: string;
|
11
11
|
VITE_GLOB_ONLINE_VIEW_URL: string | undefined;
|
12
12
|
};
|
13
|
-
/**
|
14
|
-
* @description: Development mode
|
15
|
-
*/
|
16
13
|
export declare const devMode = "development";
|
17
|
-
/**
|
18
|
-
* @description: Production mode
|
19
|
-
*/
|
20
14
|
export declare const prodMode = "production";
|
21
|
-
/**
|
22
|
-
* @description: Is it a development mode
|
23
|
-
* @returns:
|
24
|
-
* @example:
|
25
|
-
*/
|
26
15
|
export declare function isDevMode(): boolean;
|
27
|
-
/**
|
28
|
-
* @description: Is it a production mode
|
29
|
-
* @returns:
|
30
|
-
* @example:
|
31
|
-
*/
|
32
16
|
export declare function isProdMode(): boolean;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.30.1-beta.
|
3
|
+
"version": "0.30.1-beta.9",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run use-node && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
|
@@ -15,6 +15,7 @@
|
|
15
15
|
"copy-to:luotao:smartfactory.product.wms.wms--project-kengic-factory": "npm run use-node && npm run build:dev && tsx script/copy-to.luotao.smartfactory.product.wms.wms--project-kengic-factory.ts",
|
16
16
|
"bump-to:luotao:smartfactory.product.wms.wms--project-kengic-factory": "npm run use-node && tsx script/bump-to.luotao.smartfactory.product.wms.wms--project-kengic-factory.ts",
|
17
17
|
"copy-to:luotao:smartfactory.product.wms.wms--project-kengic-factory-test": "npm run use-node && npm run build:dev && tsx script/copy-to.luotao.smartfactory.product.wms.wms--project-kengic-factory-test.ts",
|
18
|
+
"copy-to:luotao:smartfactory.product.simulator--main": "npm run use-node && npm run build:dev && tsx script/copy-to.luotao.smartfactory.product.simulator--main.ts",
|
18
19
|
"copy-to:luotao:smartfactory.tyre.haohua.basic.was-java--PcrTireWeb": "npm run use-node && npm run build:dev && tsx script/copy-to.luotao.smartfactory.tyre.haohua.basic.was-java--PcrTireWeb.ts",
|
19
20
|
"----- --------------------------------------------": "更新组件库的版本",
|
20
21
|
"bump:major": "npm run use-node && tsx script/bump.ts major",
|
@@ -115,7 +116,8 @@
|
|
115
116
|
"types": "./dist/src/index.d.ts",
|
116
117
|
"exports": {
|
117
118
|
".": {
|
118
|
-
"import": "./dist/kengic-vue.js"
|
119
|
+
"import": "./dist/kengic-vue.js",
|
120
|
+
"types": "./dist/src/index.d.ts"
|
119
121
|
},
|
120
122
|
"./dist/index.css": "./dist/index.css"
|
121
123
|
},
|