@kengic/vue 0.25.1-beta.0 → 0.25.1-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2437,7 +2437,7 @@ const emptyIcon = {
2437
2437
  ...t.data
2438
2438
  }, a);
2439
2439
  }
2440
- }), version = "0.25.1-beta.0";
2440
+ }), version = "0.25.1-beta.1";
2441
2441
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
2442
2442
  const freeGlobal$1 = freeGlobal;
2443
2443
  var freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal$1 || freeSelf || Function("return this")();
@@ -5666,6 +5666,9 @@ class KgUtil {
5666
5666
  const t = document.body.querySelector("#__kg_loading__");
5667
5667
  t && (t.style.display = "none");
5668
5668
  }
5669
+ static snakeCase(t) {
5670
+ return snakeCase$1(t).replaceAll(/_(\d)+/g, "$1");
5671
+ }
5669
5672
  }
5670
5673
  function _isSlot$g(e) {
5671
5674
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !isVNode(e);
@@ -6029,7 +6032,7 @@ class KgVarUtil {
6029
6032
  let y = A;
6030
6033
  const R = l[A];
6031
6034
  let F = d == null ? void 0 : d[A];
6032
- switch ((((M = (I = u.option.value.KgSearch) == null ? void 0 : I.dynamicQuery) == null ? void 0 : M.on) !== !0 || r && ((K = (D = (P = _ == null ? void 0 : _.kgSearch) == null ? void 0 : P.currentVarProfileMaster) == null ? void 0 : D.value) == null ? void 0 : K.dyn_flg) !== 1) && (F = KG_DYNAMIC_QUERY_OPERATOR.EQ), r && (V == null ? void 0 : V.use_underscore_when_dynamic_query_flag) !== 0 && (y = A.split(".").map((w) => snakeCase$1(w)).join(".")), !0) {
6035
+ switch ((((M = (I = u.option.value.KgSearch) == null ? void 0 : I.dynamicQuery) == null ? void 0 : M.on) !== !0 || r && ((K = (D = (P = _ == null ? void 0 : _.kgSearch) == null ? void 0 : P.currentVarProfileMaster) == null ? void 0 : D.value) == null ? void 0 : K.dyn_flg) !== 1) && (F = KG_DYNAMIC_QUERY_OPERATOR.EQ), r && (V == null ? void 0 : V.use_underscore_when_dynamic_query_flag) !== 0 && (y = A.split(".").map((w) => KgUtil.snakeCase(w)).join(".")), !0) {
6033
6036
  case (!!s && s.isDayjs(R)): {
6034
6037
  const w = R;
6035
6038
  let x = r ? KgUtil.parseParamFromDayjs({
@@ -6368,7 +6371,7 @@ class KgVarUtil {
6368
6371
  }
6369
6372
  }
6370
6373
  let A = l.column;
6371
- ((C = c == null ? void 0 : c.varGridConfig.value) == null ? void 0 : C.convert_sort_field_to_under_score_flg) === 1 && (A = l.column.split(".").map((V) => snakeCase$1(V)).join(".")), A && (p = `ORDER BY ${A}`, l.order === "asc" ? p += " ASC" : l.order === "desc" && (p += " DESC"), p = encodeURIComponent(p.trim()));
6374
+ ((C = c == null ? void 0 : c.varGridConfig.value) == null ? void 0 : C.convert_sort_field_to_under_score_flg) === 1 && (A = l.column.split(".").map((V) => KgUtil.snakeCase(V)).join(".")), A && (p = `ORDER BY ${A}`, l.order === "asc" ? p += " ASC" : l.order === "desc" && (p += " DESC"), p = encodeURIComponent(p.trim()));
6372
6375
  }
6373
6376
  let T = "";
6374
6377
  if (!isNil(l.pageNo)) {
@@ -14749,7 +14752,7 @@ const KgTable$1 = "", getProps$r = () => ({
14749
14752
  ...KgVarUtil.parseRequestParamsToJSON((ee = (Z = i.varGridConfig.value) == null ? void 0 : Z.cmd_prm) != null ? ee : ""),
14750
14753
  ...k.value
14751
14754
  };
14752
- return ((ne = i.varGridConfig.value) == null ? void 0 : ne.convert_sort_field_to_under_score_flg) === 1 && G.column && (G.column = snakeCase$1(G.column)), G;
14755
+ return ((ne = i.varGridConfig.value) == null ? void 0 : ne.convert_sort_field_to_under_score_flg) === 1 && G.column && (G.column = KgUtil.snakeCase(G.column)), G;
14753
14756
  }), k = computed(() => {
14754
14757
  var $, Y, Q;
14755
14758
  let G = {};
@@ -37,7 +37,9 @@ interface IRequestOptions {
37
37
  /** 是否使用模拟数据. */
38
38
  mock?: boolean;
39
39
  /**
40
- * 如果该参数不为空, 表示该请求启用了高级查询, 该参数包含各个字段的高级查询操作符.
40
+ * <p>各个请求参数的高级查询操作符.</p>
41
+ * <p>如果该参数不为空, 表示该请求启用了高级查询.</p>
42
+ * <p>其中的 key 表示参数名, 对应的 value 表示该参数的高级查询操作符(>,=,<...).</p>
41
43
  */
42
44
  dynamicQueryOperatorModel?: Record<string, KG_DYNAMIC_QUERY_OPERATOR>;
43
45
  /**
@@ -58,7 +58,7 @@ export declare class KgVarUtil {
58
58
  * </p>
59
59
  *
60
60
  * @param param.$dayjs dayjs.
61
- * @param param.dynamicQueryOperators 各个字段的高级查询操作符.
61
+ * @param param.dynamicQueryOperatorModel 各个字段的高级查询操作符.
62
62
  * @param param.formID 界面标识.
63
63
  * @param param.kgSearchFormID 查询条件的界面标识.
64
64
  * @param param.params 请求参数.
@@ -115,6 +115,13 @@ export declare class KgUtil {
115
115
  static showLoading(): void;
116
116
  /** 隐藏全局遮罩. */
117
117
  static hideLoading(): void;
118
+ /**
119
+ * <p>使用 lodash 的 snakeCase() 将字符串转换为 snake_case 的命名方式. 但是数字前面不加下划线.</p>
120
+ *
121
+ * @param value 转换前的字符串.
122
+ * @return 转换后的字符串.
123
+ */
124
+ static snakeCase(value: any): string;
118
125
  }
119
126
  export declare type ModalFunc = {
120
127
  destroy: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.25.1-beta.0",
3
+ "version": "0.25.1-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",