@kengic/vue 0.6.11 → 0.6.12

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.
@@ -270,6 +270,7 @@ class VarGridConfig {
270
270
  p(this, "id");
271
271
  p(this, "id_clm");
272
272
  p(this, "mult_flg");
273
+ p(this, "operation_on_row_click");
273
274
  p(this, "pg_size_opt");
274
275
  p(this, "pg_size_opts");
275
276
  p(this, "prf_frm_id");
@@ -288,6 +289,7 @@ class VarGridConfig {
288
289
  case "id":
289
290
  case "id_clm":
290
291
  case "mult_flg":
292
+ case "operation_on_row_click":
291
293
  case "pg_size_opt":
292
294
  case "pg_size_opts":
293
295
  case "prf_frm_id":
@@ -7969,19 +7971,20 @@ function transformVarProfileConfig(e) {
7969
7971
  function transformVarGridConfig(e) {
7970
7972
  if (!e)
7971
7973
  return null;
7972
- e.pg_size_opts || (e.pg_size_opts = DEFAULT_PAGE_SIZES);
7974
+ let t = e.operation_on_row_click;
7975
+ isNil(t) ? e.operation_on_row_click = 1 : (t = Number(e.operation_on_row_click), [0, 1, 2].includes(t) || (e.operation_on_row_click = 1, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.min_width \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${1}. \u5408\u6CD5\u7684\u503C\u4E3A 0, 1, 2.`, { VarGridConfig: e }))), e.pg_size_opts || (e.pg_size_opts = DEFAULT_PAGE_SIZES);
7973
7976
  try {
7974
- let t = JSON.parse(e.pg_size_opts);
7977
+ let r = JSON.parse(e.pg_size_opts);
7975
7978
  switch (!0) {
7976
- case !isArray$1(t):
7977
- case t.length < 1:
7978
- case t.some((r) => Number.isNaN(Number(r)) || Math.floor(Number(r)) <= 0):
7979
+ case !isArray$1(r):
7980
+ case r.length < 1:
7981
+ case r.some((a) => Number.isNaN(Number(a)) || Math.floor(Number(a)) <= 0):
7979
7982
  e.pg_size_opts = DEFAULT_PAGE_SIZES, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.pg_size_opts \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${DEFAULT_PAGE_SIZES}.`, { VarGridConfig: e });
7980
7983
  break;
7981
7984
  default:
7982
- switch (t = sortBy$1(uniq(t.map((r) => Math.floor(r)))), e.pg_size_opts = JSON.stringify(t), e.pg_size_opt || (e.pg_size_opt = t[0]), e.pg_size_opt = Number(e.pg_size_opt), !0) {
7985
+ switch (r = sortBy$1(uniq(r.map((a) => Math.floor(a)))), e.pg_size_opts = JSON.stringify(r), e.pg_size_opt || (e.pg_size_opt = r[0]), e.pg_size_opt = Number(e.pg_size_opt), !0) {
7983
7986
  case Number.isNaN(e.pg_size_opt):
7984
- case !t.includes(e.pg_size_opt):
7987
+ case !r.includes(e.pg_size_opt):
7985
7988
  e.pg_size_opt = DEFAULT_PAGE_SIZE, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.pg_size_opt \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${DEFAULT_PAGE_SIZE}.`, { VarGridConfig: e });
7986
7989
  break;
7987
7990
  }
@@ -10543,27 +10546,27 @@ const getProps$p = () => ({
10543
10546
  const n = useKg(), o = useKgVar(), i = useKgButton(), s = useKgTable(), l = useKgSubmit(), c = useKgSearch();
10544
10547
  i.onSubmitSave(async () => (await ue(), !1)), i.onSubmitCancel(async () => (await oe(), !1)), _useFormModel$1();
10545
10548
  const u = computed(() => o.isDeleting.value && T.value.length === 0 && M.value.length === 0), d = computed(() => l.store.isLoading(o.formID)), m = computed(() => o.store.getVarSubmitConfig(o.formID)), v = computed(() => o.store.getVarSubmitFieldsForCreateKey(o.formID)), C = computed(() => o.store.getVarSubmitFieldsForCreateNotKey(o.formID)), g = computed(() => o.store.getVarSubmitFieldsForUpdateKey(o.formID)), _ = computed(() => o.store.getVarSubmitFieldsForUpdateNotKey(o.formID)), b = computed(() => o.store.getVarSubmitFieldsForCopyKey(o.formID)), y = computed(() => o.store.getVarSubmitFieldsForCopyNotKey(o.formID)), k = computed(() => o.store.getVarSubmitFieldsForDelete(o.formID)), T = computed(() => {
10546
- var L, B, z;
10549
+ var L, B, W;
10547
10550
  switch (!0) {
10548
10551
  case o.isCreating.value:
10549
10552
  return (L = v.value) != null ? L : [];
10550
10553
  case o.isUpdating.value:
10551
10554
  return (B = g.value) != null ? B : [];
10552
10555
  case o.isCopying.value:
10553
- return (z = b.value) != null ? z : [];
10556
+ return (W = b.value) != null ? W : [];
10554
10557
  case o.isDeleting.value:
10555
10558
  return [];
10556
10559
  }
10557
10560
  return [];
10558
10561
  }), M = computed(() => {
10559
- var L, B, z, Z;
10562
+ var L, B, W, Z;
10560
10563
  switch (!0) {
10561
10564
  case o.isCreating.value:
10562
10565
  return (L = C.value) != null ? L : [];
10563
10566
  case o.isUpdating.value:
10564
10567
  return (B = _.value) != null ? B : [];
10565
10568
  case o.isCopying.value:
10566
- return (z = y.value) != null ? z : [];
10569
+ return (W = y.value) != null ? W : [];
10567
10570
  case o.isDeleting.value:
10568
10571
  return (Z = k.value) != null ? Z : [];
10569
10572
  }
@@ -10590,7 +10593,7 @@ const getProps$p = () => ({
10590
10593
  } = _useLayout(), {
10591
10594
  getDefaultWidth: Q
10592
10595
  } = _useDefaultWidth(), X = computed(() => {
10593
- var L, B, z;
10596
+ var L, B, W;
10594
10597
  switch (H.value) {
10595
10598
  case "horizontal":
10596
10599
  switch ((L = m.value) == null ? void 0 : L.label_col_unit) {
@@ -10601,7 +10604,7 @@ const getProps$p = () => ({
10601
10604
  default:
10602
10605
  return {
10603
10606
  style: {
10604
- width: `${(z = m.value) == null ? void 0 : z.label_col}px`
10607
+ width: `${(W = m.value) == null ? void 0 : W.label_col}px`
10605
10608
  }
10606
10609
  };
10607
10610
  }
@@ -10635,8 +10638,8 @@ const getProps$p = () => ({
10635
10638
  });
10636
10639
  function te() {
10637
10640
  var B;
10638
- const L = watch(l.model, (z) => {
10639
- z && Object.keys(z).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10641
+ const L = watch(l.model, (W) => {
10642
+ W && Object.keys(W).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10640
10643
  isCreating: o.isCreating.value,
10641
10644
  isUpdating: o.isUpdating.value,
10642
10645
  isCopying: o.isCopying.value,
@@ -10710,12 +10713,12 @@ const getProps$p = () => ({
10710
10713
  await fe();
10711
10714
  break;
10712
10715
  }
10713
- } catch (z) {
10714
- KgUtil.throwIfNotFormError(z);
10716
+ } catch (W) {
10717
+ KgUtil.throwIfNotFormError(W);
10715
10718
  }
10716
10719
  }
10717
10720
  async function de() {
10718
- var B, z, Z, ne, se, ie;
10721
+ var B, W, Z, ne, se, ie;
10719
10722
  const L = (B = o.varButtonCreate.value) == null ? void 0 : B.cmd;
10720
10723
  if (!L) {
10721
10724
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10725,7 +10728,7 @@ const getProps$p = () => ({
10725
10728
  }
10726
10729
  o.store.setIsCreatingRequesting(o.formID, !0);
10727
10730
  try {
10728
- let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonCreate.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10731
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonCreate.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10729
10732
  if (await l.store.emit(o.formID, "beforeRequest", {
10730
10733
  isCreating: o.isCreating.value,
10731
10734
  isUpdating: o.isUpdating.value,
@@ -10758,7 +10761,7 @@ const getProps$p = () => ({
10758
10761
  }
10759
10762
  }
10760
10763
  async function re() {
10761
- var B, z, Z, ne, se, ie;
10764
+ var B, W, Z, ne, se, ie;
10762
10765
  const L = (B = o.varButtonUpdate.value) == null ? void 0 : B.cmd;
10763
10766
  if (!L) {
10764
10767
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10768,7 +10771,7 @@ const getProps$p = () => ({
10768
10771
  }
10769
10772
  try {
10770
10773
  o.store.setIsUpdatingRequesting(o.formID, !0);
10771
- let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonUpdate.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10774
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonUpdate.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10772
10775
  if (await l.store.emit(o.formID, "beforeRequest", {
10773
10776
  isCreating: o.isCreating.value,
10774
10777
  isUpdating: o.isUpdating.value,
@@ -10801,7 +10804,7 @@ const getProps$p = () => ({
10801
10804
  }
10802
10805
  }
10803
10806
  async function ce() {
10804
- var B, z, Z, ne, se, ie, ee, le;
10807
+ var B, W, Z, ne, se, ie, ee, le;
10805
10808
  const L = (B = o.varButtonCopy.value) == null ? void 0 : B.cmd;
10806
10809
  if (!L) {
10807
10810
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10811,7 +10814,7 @@ const getProps$p = () => ({
10811
10814
  }
10812
10815
  try {
10813
10816
  o.store.setIsCopyingRequesting(o.formID, !0);
10814
- let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonCopy.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10817
+ let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonCopy.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10815
10818
  ...(ne = s.selectedFirstRow.value) != null ? ne : {},
10816
10819
  ...toRaw(l.model.value)
10817
10820
  }, o.formID, r));
@@ -10847,7 +10850,7 @@ const getProps$p = () => ({
10847
10850
  }
10848
10851
  }
10849
10852
  async function fe() {
10850
- var B, z, Z, ne, se, ie;
10853
+ var B, W, Z, ne, se, ie;
10851
10854
  const L = (B = o.varButtonDelete.value) == null ? void 0 : B.cmd;
10852
10855
  if (!L) {
10853
10856
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10858,7 +10861,7 @@ const getProps$p = () => ({
10858
10861
  try {
10859
10862
  o.store.setIsDeletingRequesting(o.formID, !0);
10860
10863
  let ee = ref({
10861
- ids: (Z = (z = s.selectedRows.value) == null ? void 0 : z.map((pe) => {
10864
+ ids: (Z = (W = s.selectedRows.value) == null ? void 0 : W.map((pe) => {
10862
10865
  var me, _e, he;
10863
10866
  return (he = pe[(_e = (me = o.varButtonDelete.value) == null ? void 0 : me.del_param_clm) != null ? _e : "id"]) != null ? he : "";
10864
10867
  })) != null ? Z : []
@@ -10897,8 +10900,8 @@ const getProps$p = () => ({
10897
10900
  }
10898
10901
  }
10899
10902
  function K(L) {
10900
- var z, Z;
10901
- const B = (Z = (z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : z["KgForm.Item"]) == null ? void 0 : Z[L.var_nam];
10903
+ var W, Z;
10904
+ const B = (Z = (W = a == null ? void 0 : a.KgSubmit) == null ? void 0 : W["KgForm.Item"]) == null ? void 0 : Z[L.var_nam];
10902
10905
  return isFunction$2(B) ? createVNode(KgForm.Item, {
10903
10906
  kgVarName: L.var_nam,
10904
10907
  kgContext: KG_FORM_CONTEXT.SUBMIT,
@@ -10935,7 +10938,7 @@ const getProps$p = () => ({
10935
10938
  kgMaxWidth: $.value,
10936
10939
  kgWidth: P.value,
10937
10940
  kgDisabled: w.value,
10938
- "onUpdate:kgWidth": (z) => A.value.kgWidth = z
10941
+ "onUpdate:kgWidth": (W) => A.value.kgWidth = W
10939
10942
  }, {
10940
10943
  default: () => [createVNode(Spin, {
10941
10944
  spinning: d.value
@@ -10964,7 +10967,7 @@ const getProps$p = () => ({
10964
10967
  })]
10965
10968
  });
10966
10969
  }
10967
- function W() {
10970
+ function z() {
10968
10971
  let L, B;
10969
10972
  return createVNode("div", null, [createVNode(Button, {
10970
10973
  type: "primary",
@@ -11013,7 +11016,7 @@ const getProps$p = () => ({
11013
11016
  title: q,
11014
11017
  extra: J,
11015
11018
  default: U,
11016
- footer: W
11019
+ footer: z
11017
11020
  });
11018
11021
  }
11019
11022
  }), KgYesOrNo$1 = "", getProps$o = () => ({
@@ -11988,7 +11991,7 @@ const KgTable$1 = "", getProps$g = () => ({
11988
11991
  switch (K) {
11989
11992
  case "setRowSelect":
11990
11993
  if (U[0] === s.formID) {
11991
- const W = U[1], q = U[2], J = W[u.id.value];
11994
+ const z = U[1], q = U[2], J = z[u.id.value];
11992
11995
  switch (!0) {
11993
11996
  case (q && !$.value.includes(J)):
11994
11997
  H([...$.value, J]);
@@ -12012,12 +12015,12 @@ const KgTable$1 = "", getProps$g = () => ({
12012
12015
  var K, U;
12013
12016
  return (U = (K = s.varButtonSearch.value) == null ? void 0 : K.cmd) != null ? U : null;
12014
12017
  }), k = computed(() => {
12015
- var U, W, q, J, L, B, z;
12018
+ var U, z, q, J, L, B, W;
12016
12019
  let K = {
12017
12020
  pageNo: P.pageIndex,
12018
12021
  pageSize: P.pageSize,
12019
12022
  ...V,
12020
- ...(W = (U = l.model) == null ? void 0 : U.value) != null ? W : {}
12023
+ ...(z = (U = l.model) == null ? void 0 : U.value) != null ? z : {}
12021
12024
  };
12022
12025
  return s.varButtonSearch.value && (K = {
12023
12026
  ...K,
@@ -12025,7 +12028,7 @@ const KgTable$1 = "", getProps$g = () => ({
12025
12028
  }), (L = s.varGridConfig.value) != null && L.cmd_prm && (K = {
12026
12029
  ...K,
12027
12030
  ...KgVarUtil.parseCommandParameter((B = s.varGridConfig.value.cmd_prm) != null ? B : "")
12028
- }), ((z = s.varGridConfig.value) == null ? void 0 : z.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12031
+ }), ((W = s.varGridConfig.value) == null ? void 0 : W.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12029
12032
  }), T = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || P.total === 0), M = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), E = computed(() => {
12030
12033
  var K;
12031
12034
  return !!((K = n == null ? void 0 : n.KgTable) != null && K.expandedRowRender);
@@ -12068,8 +12071,8 @@ const KgTable$1 = "", getProps$g = () => ({
12068
12071
  });
12069
12072
  watch(u.pageSizeOptions, (K) => {
12070
12073
  K.length > 0 && !K.includes(P.pageSize) && (P.pageSize = u.pageSizeOption.value);
12071
- }), watch([y, u.isReadAutomatically, l.isReady], ([K, U, W]) => {
12072
- K && U && W && !u.store.getIsRetrieved(s.formID) && G(!0);
12074
+ }), watch([y, u.isReadAutomatically, l.isReady], ([K, U, z]) => {
12075
+ K && U && z && !u.store.getIsRetrieved(s.formID) && G(!0);
12073
12076
  }, {
12074
12077
  immediate: !0
12075
12078
  }), watch(s.isCreating, (K, U) => {
@@ -12090,6 +12093,7 @@ const KgTable$1 = "", getProps$g = () => ({
12090
12093
  K && (F.value = without$1(F.value, K), u.store.setSelectedRows(s.formID, []));
12091
12094
  }
12092
12095
  function x(K, U) {
12096
+ var z;
12093
12097
  if (!(!!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value) && !!I.value) {
12094
12098
  if (!U) {
12095
12099
  u.store.setSelectedRows(s.formID, []);
@@ -12097,7 +12101,13 @@ const KgTable$1 = "", getProps$g = () => ({
12097
12101
  }
12098
12102
  switch (K == null ? void 0 : K.detail) {
12099
12103
  case 1:
12100
- u.store.setSelectedRows(s.formID, [U]);
12104
+ switch ((z = s.varGridConfig.value) == null ? void 0 : z.operation_on_row_click) {
12105
+ case 0:
12106
+ break;
12107
+ case 1:
12108
+ u.store.setSelectedRows(s.formID, [U]);
12109
+ break;
12110
+ }
12101
12111
  break;
12102
12112
  case 2:
12103
12113
  u.store.emit(s.formID, "rowDoubleClick", {
@@ -12110,11 +12120,11 @@ const KgTable$1 = "", getProps$g = () => ({
12110
12120
  function G(K = !1) {
12111
12121
  KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u8FDB\u5165\u65B9\u6CD5.`);
12112
12122
  const U = watch(m, (q) => {
12113
- q && (setTimeout(() => U()), W());
12123
+ q && (setTimeout(() => U()), z());
12114
12124
  }, {
12115
12125
  immediate: !0
12116
12126
  });
12117
- async function W() {
12127
+ async function z() {
12118
12128
  var q, J;
12119
12129
  if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u8FDB\u5165\u65B9\u6CD5.`), !y.value) {
12120
12130
  KgLogger.error("[KgTable] '\u67E5\u8BE2\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -12135,22 +12145,22 @@ const KgTable$1 = "", getProps$g = () => ({
12135
12145
  }, {
12136
12146
  successMessageMode: "none"
12137
12147
  });
12138
- let z = ref([]), Z = ref(0);
12148
+ let W = ref([]), Z = ref(0);
12139
12149
  switch (!0) {
12140
12150
  case !B.value:
12141
- z.value = [], Z.value = 0;
12151
+ W.value = [], Z.value = 0;
12142
12152
  break;
12143
12153
  case isArrayLike(B.value):
12144
- z.value = B.value, Z.value = B.value.length;
12154
+ W.value = B.value, Z.value = B.value.length;
12145
12155
  break;
12146
12156
  case ("total" in B.value && "records" in B.value):
12147
- z.value = (q = B.value.records) != null ? q : [], Z.value = (J = B.value.total) != null ? J : 0;
12157
+ W.value = (q = B.value.records) != null ? q : [], Z.value = (J = B.value.total) != null ? J : 0;
12148
12158
  break;
12149
12159
  }
12150
12160
  await u.store.emit(s.formID, "beforeSetDatas", {
12151
- datas: z,
12161
+ datas: W,
12152
12162
  total: Z
12153
- }), F.value = z.value, P.total = Z.value, x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12163
+ }), F.value = W.value, P.total = Z.value, x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12154
12164
  page: B.value,
12155
12165
  datas: F
12156
12166
  }), u.store.setIsRetrieved(s.formID, !0);
@@ -12163,12 +12173,12 @@ const KgTable$1 = "", getProps$g = () => ({
12163
12173
  }
12164
12174
  function H(K) {
12165
12175
  u.store.setSelectedRows(s.formID, K.map((U) => {
12166
- var W;
12167
- return (W = F.value) == null ? void 0 : W.find((q) => q[u.id.value] === U);
12176
+ var z;
12177
+ return (z = F.value) == null ? void 0 : z.find((q) => q[u.id.value] === U);
12168
12178
  }).filter((U) => !!U));
12169
12179
  }
12170
12180
  function Q(K) {
12171
- var U, W;
12181
+ var U, z;
12172
12182
  switch (u.isMultiSelect.value) {
12173
12183
  case !0:
12174
12184
  {
@@ -12179,7 +12189,7 @@ const KgTable$1 = "", getProps$g = () => ({
12179
12189
  case !1:
12180
12190
  {
12181
12191
  const q = K[u.id.value];
12182
- (W = $.value) != null && W.includes(q) ? $.value = [] : $.value = [q];
12192
+ (z = $.value) != null && z.includes(q) ? $.value = [] : $.value = [q];
12183
12193
  }
12184
12194
  break;
12185
12195
  }
@@ -12191,13 +12201,13 @@ const KgTable$1 = "", getProps$g = () => ({
12191
12201
  function X(K, U) {
12192
12202
  U.width = K, s.store.setVarGridDetailWidth(s.formID, U.dataIndex, K);
12193
12203
  }
12194
- async function Y(K, U, W, q) {
12204
+ async function Y(K, U, z, q) {
12195
12205
  var J;
12196
12206
  switch (q.action) {
12197
12207
  case "sort":
12198
12208
  {
12199
12209
  await nextTick();
12200
- let L = W;
12210
+ let L = z;
12201
12211
  L.order ? (V.column = (J = L.field) != null ? J : void 0, V.order = L.order === "ascend" ? "asc" : L.order === "descend" ? "desc" : void 0) : (V.column = void 0, V.order = void 0), G(!0);
12202
12212
  }
12203
12213
  break;
@@ -12205,13 +12215,13 @@ const KgTable$1 = "", getProps$g = () => ({
12205
12215
  }
12206
12216
  function te(K, U) {
12207
12217
  var q;
12208
- const W = U[u.id.value];
12218
+ const z = U[u.id.value];
12209
12219
  switch ((q = s.varGridConfig.value) == null ? void 0 : q.expand_accordion_flg) {
12210
12220
  case 0:
12211
- K ? v.value = uniq([...v.value, W]) : v.value = without$1(v.value, W);
12221
+ K ? v.value = uniq([...v.value, z]) : v.value = without$1(v.value, z);
12212
12222
  break;
12213
12223
  default:
12214
- K ? v.value = [W] : v.value = [];
12224
+ K ? v.value = [z] : v.value = [];
12215
12225
  break;
12216
12226
  }
12217
12227
  }
@@ -12220,8 +12230,8 @@ const KgTable$1 = "", getProps$g = () => ({
12220
12230
  }
12221
12231
  function oe(K) {
12222
12232
  u.store.setSelectedRows(s.formID, [K].map((U) => {
12223
- var W;
12224
- return (W = F.value) == null ? void 0 : W.find((q) => q[u.id.value] === U[u.id.value]);
12233
+ var z;
12234
+ return (z = F.value) == null ? void 0 : z.find((q) => q[u.id.value] === U[u.id.value]);
12225
12235
  }).filter((U) => !!U)), c.click(s.formID, KG_BUTTON_TYPE.UPDATE);
12226
12236
  }
12227
12237
  function ue({
@@ -12230,7 +12240,7 @@ const KgTable$1 = "", getProps$g = () => ({
12230
12240
  }) {
12231
12241
  switch (U.dataIndex) {
12232
12242
  case "index": {
12233
- const W = (() => {
12243
+ const z = (() => {
12234
12244
  var q, J, L, B;
12235
12245
  if (!isNil((J = (q = o == null ? void 0 : o.value) == null ? void 0 : q.KgTable) == null ? void 0 : J.kgDisabled))
12236
12246
  return (B = (L = o == null ? void 0 : o.value) == null ? void 0 : L.KgTable) == null ? void 0 : B.kgDisabled;
@@ -12238,7 +12248,7 @@ const KgTable$1 = "", getProps$g = () => ({
12238
12248
  return e.kgDisabled;
12239
12249
  })();
12240
12250
  return createVNode(KgTableSetting, {
12241
- kgDisabled: W
12251
+ kgDisabled: z
12242
12252
  }, null);
12243
12253
  }
12244
12254
  default:
@@ -12255,9 +12265,9 @@ const KgTable$1 = "", getProps$g = () => ({
12255
12265
  index: 0
12256
12266
  }, null), N.value && createVNode(TableSummary.Cell, {
12257
12267
  index: E.value ? 1 : 0
12258
- }, null), C.value.map((U, W) => {
12268
+ }, null), C.value.map((U, z) => {
12259
12269
  const q = s.store.getVarGridDetail(s.formID, U.dataIndex);
12260
- let J = W;
12270
+ let J = z;
12261
12271
  return E.value && N.value ? J += 2 : (E.value || N.value) && (J += 1), createVNode(TableSummary.Cell, {
12262
12272
  index: J
12263
12273
  }, {
@@ -12277,35 +12287,35 @@ const KgTable$1 = "", getProps$g = () => ({
12277
12287
  function re({
12278
12288
  column: K,
12279
12289
  index: U,
12280
- record: W,
12290
+ record: z,
12281
12291
  text: q,
12282
12292
  value: J
12283
12293
  }) {
12284
- var z;
12294
+ var W;
12285
12295
  let L = "";
12286
12296
  K.customRender ? L = K.customRender({
12287
12297
  index: U,
12288
- record: W,
12298
+ record: z,
12289
12299
  column: K,
12290
12300
  text: q,
12291
12301
  value: J,
12292
12302
  renderIndex: U
12293
12303
  }) : L = J;
12294
12304
  const B = createVNode(KgTableCell, {
12295
- kgRow: W,
12305
+ kgRow: z,
12296
12306
  kgValue: L,
12297
12307
  kgVarName: K.dataIndex,
12298
- onKgUpdateLinkClick: () => oe(W)
12308
+ onKgUpdateLinkClick: () => oe(z)
12299
12309
  }, null);
12300
- if ((z = n == null ? void 0 : n.KgTable) != null && z.bodyCell) {
12310
+ if ((W = n == null ? void 0 : n.KgTable) != null && W.bodyCell) {
12301
12311
  const Z = K.dataIndex ? s.store.getVarGridDetail(s.formID, K.dataIndex) : null;
12302
12312
  return n.KgTable.bodyCell({
12303
12313
  column: K,
12304
12314
  index: U,
12305
- record: W,
12315
+ record: z,
12306
12316
  text: q,
12307
12317
  value: J,
12308
- row: W,
12318
+ row: z,
12309
12319
  varGridDetail: Z,
12310
12320
  defaultRender: B
12311
12321
  });
@@ -12338,7 +12348,7 @@ const KgTable$1 = "", getProps$g = () => ({
12338
12348
  expandColumnWidth: 28,
12339
12349
  expandedRowKeys: v.value,
12340
12350
  customRow: (U) => ({
12341
- onClick: (W) => x(W, U)
12351
+ onClick: (z) => x(z, U)
12342
12352
  }),
12343
12353
  onResizeColumn: X,
12344
12354
  onChange: Y,
@@ -12374,12 +12384,12 @@ const KgTable$1 = "", getProps$g = () => ({
12374
12384
  locale: {
12375
12385
  page: ""
12376
12386
  },
12377
- showTotal: (U, W) => i.t("kg.KgTable.totalText", {
12378
- from: W[0],
12379
- to: W[1],
12387
+ showTotal: (U, z) => i.t("kg.KgTable.totalText", {
12388
+ from: z[0],
12389
+ to: z[1],
12380
12390
  total: U
12381
12391
  }),
12382
- onChange: (U, W) => ae(U, W)
12392
+ onChange: (U, z) => ae(U, z)
12383
12393
  }, null)])])]);
12384
12394
  };
12385
12395
  }
@@ -209,6 +209,8 @@ export declare class VarGridConfig {
209
209
  id_clm?: string | null;
210
210
  /** 是否支持多行选择(MultipleFlag). */
211
211
  mult_flg?: number | null;
212
+ /** 单击某行时的操作. */
213
+ operation_on_row_click?: number | null;
212
214
  /** 当前分页下拉选项(PageSizeOption). */
213
215
  pg_size_opt?: number | null;
214
216
  /** 所有分页下拉选项(PageSizeOptions). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",