@kengic/vue 0.30.1-beta.7 → 0.30.1-beta.8

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.
@@ -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 ret: any = {};
22
+ const result: any = {};
23
23
 
24
- for (const envName of Object.keys(envConf)) {
25
- let realName = envConf[envName].replace(/\\n/g, '\n');
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
- if (envName === 'VITE_PORT') {
29
- realName = Number(realName);
27
+ value = value === 'true' ? true : value === 'false' ? false : value;
28
+
29
+ if (key === 'VITE_PORT') {
30
+ value = Number(value);
30
31
  }
31
- if (envName === 'VITE_PROXY' && realName) {
32
+
33
+ if (key === 'VITE_PROXY' && value) {
32
34
  try {
33
- realName = JSON.parse(realName.replace(/'/g, '"'));
35
+ value = JSON.parse(value.replace(/'/g, '"'));
34
36
  } catch (error) {
35
- realName = '';
37
+ value = '';
36
38
  }
37
39
  }
38
- ret[envName] = realName;
39
- if (typeof realName === 'string') {
40
- process.env[envName] = realName;
41
- } else if (typeof realName === 'object') {
42
- process.env[envName] = JSON.stringify(realName);
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
- return ret;
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: 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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.30.1-beta.7",
3
+ "version": "0.30.1-beta.8",
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
  },