@kengic/vue 0.23.2 → 0.23.3-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +0 -4
- package/dist/kengic-vue.js +2001 -1944
- package/dist/src/services/http-client.d.ts +4 -2
- package/dist/src/utils/kg-var.util.d.ts +31 -1
- package/dist/src/utils/kg.util.d.ts +16 -33
- package/package.json +9 -7
@@ -8,10 +8,12 @@ interface IHttpClient {
|
|
8
8
|
} & AxiosRequestConfig;
|
9
9
|
request<T = any>(config: IRequestConfig, options?: IRequestOptions): Promise<T>;
|
10
10
|
}
|
11
|
+
/** @deprecated 已弃用, 请使用 {@link kgSetupHttpClient}. */
|
12
|
+
declare function setupHttpClient(httpClient: IHttpClient | null): void;
|
11
13
|
/**
|
12
14
|
* 设置 httpClient 实例.
|
13
15
|
*/
|
14
|
-
declare function
|
16
|
+
declare function kgSetupHttpClient(httpClient: IHttpClient | null): void;
|
15
17
|
/**
|
16
18
|
* 获取 httpClient 实例.
|
17
19
|
*/
|
@@ -43,4 +45,4 @@ interface IRequestOptions {
|
|
43
45
|
*/
|
44
46
|
dayjs?: typeof dayjs;
|
45
47
|
}
|
46
|
-
export { setupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
|
48
|
+
export { setupHttpClient, kgSetupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
|
@@ -10,7 +10,7 @@ export declare class KgVarUtil {
|
|
10
10
|
* @param params JSON 字符串形式的参数.
|
11
11
|
* @return {} 参数对象.
|
12
12
|
*/
|
13
|
-
static parseRequestParamsToJSON(params
|
13
|
+
static parseRequestParamsToJSON(params: string | null | undefined): Record<string, any>;
|
14
14
|
/**
|
15
15
|
* 根据控件类型, 将任意的值(可能非法)转换为合法的值.
|
16
16
|
*
|
@@ -46,4 +46,34 @@ export declare class KgVarUtil {
|
|
46
46
|
* @param controlType 控件类型.
|
47
47
|
*/
|
48
48
|
static getDynamicQueryOperatorSelectOptions(controlType: KG__VAR_CONFIG_CONTROL__CONTROL_TYPE | null | undefined): any;
|
49
|
+
/**
|
50
|
+
* <p>获取根据查询条件拼接后的 SQL 语句片段.</p>
|
51
|
+
* <p>根据查询参数拼接为一个 SQL, 格式如下: `WHERE ... ORDER BY ...OFFSET...`.</p>
|
52
|
+
* <p>
|
53
|
+
* 参数 formID 和 dynamicQueryOperatorModel 只能其中一个传值.
|
54
|
+
* <ul>
|
55
|
+
* <li>如果 formID 传值, 表示通过变量配置获取高级查询操作符.</li>
|
56
|
+
* <li>如果 dynamicQueryOperators 传值, 表示直接使用传入的 dynamicQueryOperatorModel 作为高级查询操作符.</li>
|
57
|
+
* </ul>
|
58
|
+
* </p>
|
59
|
+
*
|
60
|
+
* @param param.$dayjs dayjs.
|
61
|
+
* @param param.dynamicQueryOperators 各个字段的高级查询操作符.
|
62
|
+
* @param param.formID 界面标识.
|
63
|
+
* @param param.kgSearchFormID 查询条件的界面标识.
|
64
|
+
* @param param.params 请求参数.
|
65
|
+
*/
|
66
|
+
static getQueryHeaders(param: {
|
67
|
+
$dayjs: typeof dayjs;
|
68
|
+
dynamicQueryOperatorModel: Record<string, any> | null | undefined;
|
69
|
+
formID: string | null | undefined;
|
70
|
+
kgSearchFormID: string | null | undefined;
|
71
|
+
params: Record<string, any> | null | undefined;
|
72
|
+
}): {
|
73
|
+
offsetSql: string;
|
74
|
+
operatorJSON: string;
|
75
|
+
orderBySql: string;
|
76
|
+
sql: string;
|
77
|
+
whereSql: string;
|
78
|
+
};
|
49
79
|
}
|
@@ -30,39 +30,17 @@ export declare class KgUtil {
|
|
30
30
|
static downloadFile(data: string | BlobPart, fileName: string, contentType?: string): void;
|
31
31
|
/**
|
32
32
|
* <p>处理请求参数.</p>
|
33
|
+
* <ul>
|
34
|
+
* <li>删除无用属性,</li>
|
35
|
+
* <li>日期转换为字符串,</li>
|
36
|
+
* <li>解析动态属性, 比如 {WAREHOUSE},</li>
|
37
|
+
* </ul>
|
38
|
+
*
|
33
39
|
* @param params 请求参数.
|
34
40
|
* @param formID 界面标识.
|
35
41
|
* @param $dayjs dayjs.
|
36
42
|
*/
|
37
43
|
static parseParams(params: Record<string, any> | null | undefined, formID?: string | null, $dayjs?: typeof dayjs): Record<string, any>;
|
38
|
-
/**
|
39
|
-
* <p>获取根据查询条件拼接后的 SQL 语句片段.</p>
|
40
|
-
* <p>根据查询参数拼接为一个 SQL, 格式如下: `WHERE ... ORDER BY ...OFFSET...`.</p>
|
41
|
-
* <p>
|
42
|
-
* 参数 formID 和 dynamicQueryOperatorModel 只能其中一个传值.
|
43
|
-
* <ul>
|
44
|
-
* <li>如果 formID 传值, 表示通过变量配置获取高级查询操作符.</li>
|
45
|
-
* <li>如果 dynamicQueryOperators 传值, 表示直接使用传入的 dynamicQueryOperatorModel 作为高级查询操作符.</li>
|
46
|
-
* </ul>
|
47
|
-
* </p>
|
48
|
-
*
|
49
|
-
* @param param.$dayjs dayjs.
|
50
|
-
* @param param.dynamicQueryOperators 各个字段的高级查询操作符.
|
51
|
-
* @param param.formID 界面标识.
|
52
|
-
* @param param.params 请求参数.
|
53
|
-
*/
|
54
|
-
static getQueryHeaders(param: {
|
55
|
-
$dayjs: typeof dayjs;
|
56
|
-
dynamicQueryOperatorModel: Record<string, any> | null | undefined;
|
57
|
-
formID: string | null | undefined;
|
58
|
-
params: Record<string, any> | null | undefined;
|
59
|
-
}): {
|
60
|
-
offsetSql: string;
|
61
|
-
operatorJSON: string;
|
62
|
-
orderBySql: string;
|
63
|
-
sql: string;
|
64
|
-
whereSql: string;
|
65
|
-
};
|
66
44
|
/**
|
67
45
|
* 处理请求参数: 解析字符串类型的参数值.
|
68
46
|
*
|
@@ -77,15 +55,20 @@ export declare class KgUtil {
|
|
77
55
|
*
|
78
56
|
* @param value 参数的原始值.
|
79
57
|
*/
|
80
|
-
|
58
|
+
static parseParamFromString(value: string): string;
|
81
59
|
/**
|
82
|
-
* 处理请求参数: 解析
|
83
|
-
* @param param.key 属性名.
|
84
|
-
* @param param.value 参数的原始值.
|
60
|
+
* 处理请求参数: 解析 Dayjs 类型的参数值.
|
85
61
|
* @param param.formID 界面标识.
|
86
62
|
* @param param.isPad 是否补齐日期格式. 即将 `YYYY-MM-DD` 补齐为 `YYYY-MM-DD 00:00:00`, 将 `HH:mm:ss` 补齐为 `1900-01-01 HH:mm:ss`.
|
63
|
+
* @param param.key 属性名.
|
64
|
+
* @param param.value 参数的原始值.
|
87
65
|
*/
|
88
|
-
|
66
|
+
static parseParamFromDayjs(param: {
|
67
|
+
formID?: string | null;
|
68
|
+
isPad?: boolean;
|
69
|
+
key: string;
|
70
|
+
value: any;
|
71
|
+
}): string;
|
89
72
|
/**
|
90
73
|
* 确认弹窗.
|
91
74
|
* 设置了多个属性的默认值, 简化使用.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.23.
|
3
|
+
"version": "0.23.3-beta.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|
@@ -11,11 +11,6 @@
|
|
11
11
|
"publish:all:beta": "npm run bump-version:beta && npm run publish:all",
|
12
12
|
"----- --------------------------------------------": "",
|
13
13
|
"gen:apis:WMS": "npm run switch-node-version && kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
14
|
-
"--- ----------------------------------------------": "",
|
15
|
-
"bump-to:luotao.wms-vue3--dev-3.1": "npm run switch-node-version && tsx scripts/bump-to.luotao.wms-vue3.ts",
|
16
|
-
"copy-to:luotao.wms-vue3--dev-3.1": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.ts",
|
17
|
-
"bump-to:luotao.wms-vue3--focus": "npm run switch-node-version && tsx scripts/bump-to.luotao.wms-vue3.focus.ts",
|
18
|
-
"copy-to:luotao.wms-vue3--focus": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.focus.ts",
|
19
14
|
"- ------------------------------------------------": "",
|
20
15
|
"cnpm:sync": "npm run switch-node-version && npx cnpm --yes sync @kengic/vue",
|
21
16
|
"switch-node-version": "nvm use 18.16.0 && corepack enable && corepack prepare pnpm@7.30.5 --activate",
|
@@ -26,7 +21,14 @@
|
|
26
21
|
"bump-version:patch": "npm run switch-node-version && tsx scripts/bump.ts patch",
|
27
22
|
"---- ---------------------------------------------": "",
|
28
23
|
"publish:all": "npm run switch-node-version && tsx scripts/publish.ts",
|
29
|
-
"publish:npm": "npm run switch-node-version && npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public"
|
24
|
+
"publish:npm": "npm run switch-node-version && npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public",
|
25
|
+
"------- ------------------------------------------": "",
|
26
|
+
"copy-to:luotao:smartfactory.product.wms.wms--dev-3.1": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.product.wms.wms--dev-3.1.ts",
|
27
|
+
"copy-to:luotao:smartfactory.product.wms.wms-vue3--focus": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts",
|
28
|
+
"copy-to:luotao:smartfactory.tyre.haohua.gantry.was-java--main": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.tyre.haohua.gantry.was-java--main.ts",
|
29
|
+
"--- ----------------------------------------------": "",
|
30
|
+
"bump-to:luotao:smartfactory.product.wms.wms--dev-3.1": "npm run switch-node-version && tsx scripts/bump-to.luotao.smartfactory.product.wms.wms--dev-3.1.ts",
|
31
|
+
"bump-to:luotao:smartfactory.product.wms.wms-vue3--focus": "npm run switch-node-version && tsx scripts/bump-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts"
|
30
32
|
},
|
31
33
|
"peerDependencies": {
|
32
34
|
"vue": "3.2.43"
|