@kengic/vue 0.14.1 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
- var Ke = Object.defineProperty;
2
- var Le = (e, t, r) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var b = (e, t, r) => (Le(e, typeof t != "symbol" ? t + "" : t, r), r);
1
+ var Le = Object.defineProperty;
2
+ var $e = (e, t, r) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var b = (e, t, r) => ($e(e, typeof t != "symbol" ? t + "" : t, r), r);
4
4
  import { h, nextTick, createVNode, defineComponent, getCurrentInstance, inject, markRaw, ref, watch, reactive, effectScope, isRef, isReactive, toRef, toRaw, computed, onUnmounted, toRefs, unref, watchEffect, Fragment, isVNode, createTextVNode, provide, onMounted, mergeProps, onBeforeUnmount, onActivated, onDeactivated, Teleport, getCurrentScope, onScopeDispose } from "vue";
5
5
  import { Spin, Tooltip, Select, SelectOption, Button, Modal, Progress, Form, Checkbox, Divider, Row, Col, DatePicker, Input, InputNumber, Radio, Switch, Textarea, message, Drawer, Transfer, Table, Tabs, Dropdown, Menu, Tag, Pagination, TableSummary, Upload, ConfigProvider, Card, TabPane } from "ant-design-vue";
6
6
  const index$7 = "", en = {
@@ -2870,7 +2870,7 @@ const emptyIcon = {
2870
2870
  ...t.data
2871
2871
  }, r);
2872
2872
  }
2873
- }), name = "@kengic/vue", version = "0.14.1", data$1 = {
2873
+ }), name = "@kengic/vue", version = "0.14.2", data$1 = {
2874
2874
  width: 24,
2875
2875
  height: 24,
2876
2876
  body: '<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h11.175q.4 0 .763.15t.637.425l2.85 2.85q.275.275.425.638t.15.762V12.3q-.475-.2-.988-.263T19 12.05V7.825L16.175 5H5v14h6v2H5ZM5 5v14V5Zm8 17v-1.65q0-.2.075-.388t.225-.337l5.225-5.2q.225-.225.5-.325t.55-.1q.3 0 .575.113t.5.337l.925.925q.2.225.313.5t.112.55q0 .275-.1.563t-.325.512l-5.2 5.2q-.15.15-.338.225T15.65 23H14q-.425 0-.712-.287T13 22Zm7.5-5.575l-.925-.925l.925.925Zm-6 5.075h.95l3.025-3.05l-.45-.475l-.475-.45l-3.05 3.025v.95Zm3.525-3.525l-.475-.45l.925.925l-.45-.475ZM7 10h7q.425 0 .713-.288T15 9V7q0-.425-.288-.713T14 6H7q-.425 0-.713.288T6 7v2q0 .425.288.713T7 10Zm5 8h.1l2.9-2.875V15q0-1.25-.875-2.125T12 12q-1.25 0-2.125.875T9 15q0 1.25.875 2.125T12 18Z"/>'
@@ -3515,11 +3515,11 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
3515
3515
  }, O.valueOf = function() {
3516
3516
  return this.$d.getTime();
3517
3517
  }, O.startOf = function(V, $) {
3518
- var P = this, G = !!K.u($) || $, N = K.p(V), x = function(ge, ae) {
3519
- var F = K.w(P.$u ? Date.UTC(P.$y, ae, ge) : new Date(P.$y, ae, ge), P);
3518
+ var P = this, G = !!K.u($) || $, N = K.p(V), x = function(fe, ae) {
3519
+ var F = K.w(P.$u ? Date.UTC(P.$y, ae, fe) : new Date(P.$y, ae, fe), P);
3520
3520
  return G ? F : F.endOf(c);
3521
- }, Y = function(ge, ae) {
3522
- return K.w(P.toDate()[ge].apply(P.toDate("s"), (G ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), P);
3521
+ }, Y = function(fe, ae) {
3522
+ return K.w(P.toDate()[fe].apply(P.toDate("s"), (G ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), P);
3523
3523
  }, q = this.$W, J = this.$M, X = this.$D, ee = "set" + (this.$u ? "UTC" : "");
3524
3524
  switch (N) {
3525
3525
  case E:
@@ -3527,8 +3527,8 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
3527
3527
  case d:
3528
3528
  return G ? x(1, J) : x(0, J + 1);
3529
3529
  case u:
3530
- var le = this.$locale().weekStart || 0, me = (q < le ? q + 7 : q) - le;
3531
- return x(G ? X - me : X + (6 - me), J);
3530
+ var le = this.$locale().weekStart || 0, he = (q < le ? q + 7 : q) - le;
3531
+ return x(G ? X - he : X + (6 - he), J);
3532
3532
  case c:
3533
3533
  case y:
3534
3534
  return Y(ee + "Hours", 0);
@@ -3580,9 +3580,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
3580
3580
  return P.invalidDate || p;
3581
3581
  var G = V || "YYYY-MM-DDTHH:mm:ssZ", N = K.z(this), x = this.$H, Y = this.$m, q = this.$M, J = P.weekdays, X = P.months, ee = P.meridiem, le = function(ae, F, U, Q) {
3582
3582
  return ae && (ae[F] || ae($, G)) || U[F].slice(0, Q);
3583
- }, me = function(ae) {
3583
+ }, he = function(ae) {
3584
3584
  return K.s(x % 12 || 12, ae, "0");
3585
- }, ge = ee || function(ae, F, U) {
3585
+ }, fe = ee || function(ae, F, U) {
3586
3586
  var Q = ae < 12 ? "AM" : "PM";
3587
3587
  return U ? Q.toLowerCase() : Q;
3588
3588
  };
@@ -3618,13 +3618,13 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
3618
3618
  case "HH":
3619
3619
  return K.s(x, 2, "0");
3620
3620
  case "h":
3621
- return me(1);
3621
+ return he(1);
3622
3622
  case "hh":
3623
- return me(2);
3623
+ return he(2);
3624
3624
  case "a":
3625
- return ge(x, Y, !0);
3625
+ return fe(x, Y, !0);
3626
3626
  case "A":
3627
- return ge(x, Y, !1);
3627
+ return fe(x, Y, !1);
3628
3628
  case "m":
3629
3629
  return String(Y);
3630
3630
  case "mm":
@@ -9745,7 +9745,7 @@ const getProps$p = () => ({
9745
9745
  setup(e, {
9746
9746
  attrs: t
9747
9747
  }) {
9748
- var Ce, ke, Me;
9748
+ var Te, Ae, Ie;
9749
9749
  const r = inject("$dayjs", dayjs), a = inject(DI_KG_VAR__KG_SLOTS, null);
9750
9750
  inject(DI_KG_VAR__KG_PROPS, null);
9751
9751
  const n = useKg(), s = useKgVar(), l = useKgButton(), o = useKgTable(), i = useKgSubmit(), c = useKgSearch();
@@ -9820,12 +9820,12 @@ const getProps$p = () => ({
9820
9820
  }), {
9821
9821
  getClass: le
9822
9822
  } = _useClass(e, ee), {
9823
- getLayout: me
9823
+ getLayout: he
9824
9824
  } = _useLayout(), {
9825
- getDefaultWidth: ge
9825
+ getDefaultWidth: fe
9826
9826
  } = _useDefaultWidth(), ae = computed(() => {
9827
9827
  var B, W, Z;
9828
- switch (me.value) {
9828
+ switch (he.value) {
9829
9829
  case "horizontal":
9830
9830
  switch ((B = g.value) == null ? void 0 : B.label_col_unit) {
9831
9831
  case KG_WIDTH_UNIT.SPAN:
@@ -9844,7 +9844,7 @@ const getProps$p = () => ({
9844
9844
  }
9845
9845
  }), F = computed(() => {
9846
9846
  var B, W;
9847
- switch (me.value) {
9847
+ switch (he.value) {
9848
9848
  case "horizontal":
9849
9849
  switch ((B = g.value) == null ? void 0 : B.label_col_unit) {
9850
9850
  case KG_WIDTH_UNIT.SPAN:
@@ -9871,7 +9871,7 @@ const getProps$p = () => ({
9871
9871
  }
9872
9872
  return n.t("kg.save");
9873
9873
  }), Q = computed(() => i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL && !ee.isFullscreen);
9874
- ((Me = (ke = (Ce = n.option.value) == null ? void 0 : Ce.KgModal) == null ? void 0 : ke.drag) == null ? void 0 : Me.on) === !0 && useKgDragModal({
9874
+ ((Ie = (Ae = (Te = n.option.value) == null ? void 0 : Te.KgModal) == null ? void 0 : Ae.drag) == null ? void 0 : Ie.on) === !0 && useKgDragModal({
9875
9875
  visible: X,
9876
9876
  draggable: Q,
9877
9877
  destroyOnClose: ref(!0),
@@ -9882,7 +9882,7 @@ const getProps$p = () => ({
9882
9882
  B === !0 && z(), W === !0 && B === !1 && te();
9883
9883
  }, {
9884
9884
  immediate: !0
9885
- }), watch(ge, (B) => {
9885
+ }), watch(fe, (B) => {
9886
9886
  B && ($.value.kgWidth = B);
9887
9887
  }, {
9888
9888
  immediate: !0
@@ -9913,7 +9913,7 @@ const getProps$p = () => ({
9913
9913
  });
9914
9914
  }
9915
9915
  async function te() {
9916
- $.value.kgWidth = ge.value, ee.isFullscreen = !1, await i.store.emit(s.formID, "close", null);
9916
+ $.value.kgWidth = fe.value, ee.isFullscreen = !1, await i.store.emit(s.formID, "close", null);
9917
9917
  }
9918
9918
  function ue() {
9919
9919
  switch (!0) {
@@ -9961,24 +9961,24 @@ const getProps$p = () => ({
9961
9961
  return;
9962
9962
  switch (!0) {
9963
9963
  case s.isCreating.value:
9964
- await fe();
9964
+ await pe();
9965
9965
  break;
9966
9966
  case s.isUpdating.value:
9967
- await he();
9967
+ await ve();
9968
9968
  break;
9969
9969
  case s.isCopying.value:
9970
- await Se();
9970
+ await Ce();
9971
9971
  break;
9972
9972
  case s.isDeleting.value:
9973
- await ve();
9973
+ await be();
9974
9974
  break;
9975
9975
  }
9976
9976
  } catch (Z) {
9977
9977
  KgUtil.throwIfNotFormError(Z);
9978
9978
  }
9979
9979
  }
9980
- async function fe() {
9981
- var W, Z, re, se, oe, ce;
9980
+ async function pe() {
9981
+ var W, Z, re, se, oe, ce, de;
9982
9982
  const B = (W = s.varButtonCreate.value) == null ? void 0 : W.cmd;
9983
9983
  if (!B) {
9984
9984
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -9988,7 +9988,7 @@ const getProps$p = () => ({
9988
9988
  }
9989
9989
  s.store.setIsCreatingRequesting(s.formID, !0);
9990
9990
  try {
9991
- let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCreate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), de = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
9991
+ let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCreate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), ge = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
9992
9992
  if (await i.store.emit(s.formID, "beforeRequest", {
9993
9993
  isCreating: s.isCreating.value,
9994
9994
  isUpdating: s.isUpdating.value,
@@ -9998,23 +9998,25 @@ const getProps$p = () => ({
9998
9998
  rows: o.selectedRows.value,
9999
9999
  model: i.model,
10000
10000
  params: ne,
10001
- data: de
10001
+ data: ge
10002
10002
  }))
10003
10003
  return;
10004
- await httpClient().request({
10004
+ const Se = await httpClient().request({
10005
10005
  method: (oe = (se = s.varButtonCreate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
10006
10006
  url: B,
10007
10007
  params: ne.value,
10008
- data: de.value
10009
- }), ((ce = s.varButtonCreate.value) == null ? void 0 : ce.show_success_message_flg) !== 0 && message.success(q.title.value + n.t("kg.succeed")), await i.store.emit(s.formID, "ok", {
10010
- isCreating: s.isCreating.value,
10011
- isUpdating: s.isUpdating.value,
10012
- isCopying: s.isCopying.value,
10013
- isDeleting: s.isDeleting.value,
10014
- row: o.selectedFirstRow.value,
10015
- model: i.model
10016
- }), s.store.setIsCreating(s.formID, !1), c.search({
10008
+ data: ge.value
10009
+ });
10010
+ ((ce = s.varButtonCreate.value) == null ? void 0 : ce.show_success_message_flg) !== 0 && message.success(q.title.value + n.t("kg.succeed")), s.store.setIsCreating(s.formID, !1), ((de = s.varButtonCreate.value) == null ? void 0 : de.reload_all_after_done_flg) !== 0 && c.search({
10017
10011
  isSearchFirstPage: !0
10012
+ }), await i.store.emit(s.formID, "ok", {
10013
+ isCreating: !0,
10014
+ isUpdating: !1,
10015
+ isCopying: !1,
10016
+ isDeleting: !1,
10017
+ row: o.selectedFirstRow.value,
10018
+ model: i.model,
10019
+ result: Se
10018
10020
  });
10019
10021
  } catch (ne) {
10020
10022
  console.error(ne), i.store.emit(s.formID, "error", ne);
@@ -10022,8 +10024,8 @@ const getProps$p = () => ({
10022
10024
  s.store.setIsCreatingRequesting(s.formID, !1);
10023
10025
  }
10024
10026
  }
10025
- async function he() {
10026
- var W, Z, re, se, oe, ce;
10027
+ async function ve() {
10028
+ var W, Z, re, se, oe, ce, de;
10027
10029
  const B = (W = s.varButtonUpdate.value) == null ? void 0 : W.cmd;
10028
10030
  if (!B) {
10029
10031
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10033,7 +10035,7 @@ const getProps$p = () => ({
10033
10035
  }
10034
10036
  try {
10035
10037
  s.store.setIsUpdatingRequesting(s.formID, !0);
10036
- let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonUpdate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), de = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
10038
+ let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonUpdate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), ge = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
10037
10039
  if (await i.store.emit(s.formID, "beforeRequest", {
10038
10040
  isCreating: s.isCreating.value,
10039
10041
  isUpdating: s.isUpdating.value,
@@ -10043,23 +10045,23 @@ const getProps$p = () => ({
10043
10045
  rows: o.selectedRows.value,
10044
10046
  model: i.model,
10045
10047
  params: ne,
10046
- data: de
10048
+ data: ge
10047
10049
  }))
10048
10050
  return;
10049
10051
  await httpClient().request({
10050
10052
  method: (oe = (se = s.varButtonUpdate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
10051
10053
  url: B,
10052
10054
  params: ne.value,
10053
- data: de.value
10054
- }), ((ce = s.varButtonUpdate.value) == null ? void 0 : ce.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), await i.store.emit(s.formID, "ok", {
10055
- isCreating: s.isCreating.value,
10056
- isUpdating: s.isUpdating.value,
10057
- isCopying: s.isCopying.value,
10058
- isDeleting: s.isDeleting.value,
10055
+ data: ge.value
10056
+ }), ((ce = s.varButtonUpdate.value) == null ? void 0 : ce.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), s.store.setIsUpdating(s.formID, !1), ((de = s.varButtonUpdate.value) == null ? void 0 : de.reload_all_after_done_flg) !== 0 && c.search({
10057
+ isPreserveSelectedRows: !0
10058
+ }), await i.store.emit(s.formID, "ok", {
10059
+ isCreating: !1,
10060
+ isUpdating: !0,
10061
+ isCopying: !1,
10062
+ isDeleting: !1,
10059
10063
  row: o.selectedFirstRow.value,
10060
10064
  model: i.model
10061
- }), s.store.setIsUpdating(s.formID, !1), c.search({
10062
- isPreserveSelectedRows: !0
10063
10065
  });
10064
10066
  } catch (ne) {
10065
10067
  console.error(ne), i.store.emit(s.formID, "error", ne);
@@ -10067,8 +10069,8 @@ const getProps$p = () => ({
10067
10069
  s.store.setIsUpdatingRequesting(s.formID, !1);
10068
10070
  }
10069
10071
  }
10070
- async function Se() {
10071
- var W, Z, re, se, oe, ce, ne, de;
10072
+ async function Ce() {
10073
+ var W, Z, re, se, oe, ce, de, ne, ge;
10072
10074
  const B = (W = s.varButtonCopy.value) == null ? void 0 : W.cmd;
10073
10075
  if (!B) {
10074
10076
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10078,11 +10080,11 @@ const getProps$p = () => ({
10078
10080
  }
10079
10081
  try {
10080
10082
  s.store.setIsCopyingRequesting(s.formID, !0);
10081
- let _e = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCopy.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), Ee = ref(KgUtil.parseParams({
10083
+ let me = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCopy.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), Se = ref(KgUtil.parseParams({
10082
10084
  ...(se = o.selectedFirstRow.value) != null ? se : {},
10083
10085
  ...toRaw(i.model.value)
10084
10086
  }, s.formID, r));
10085
- if (((oe = g.value) == null ? void 0 : oe.cpy_clear_id_flg) !== 0 && delete Ee.value.id, await i.store.emit(s.formID, "beforeRequest", {
10087
+ if (((oe = g.value) == null ? void 0 : oe.cpy_clear_id_flg) !== 0 && delete Se.value.id, await i.store.emit(s.formID, "beforeRequest", {
10086
10088
  isCreating: s.isCreating.value,
10087
10089
  isUpdating: s.isUpdating.value,
10088
10090
  isCopying: s.isCopying.value,
@@ -10090,33 +10092,33 @@ const getProps$p = () => ({
10090
10092
  row: o.selectedRow.value,
10091
10093
  rows: o.selectedRows.value,
10092
10094
  model: i.model,
10093
- params: _e,
10094
- data: Ee
10095
+ params: me,
10096
+ data: Se
10095
10097
  }))
10096
10098
  return;
10097
10099
  await httpClient().request({
10098
- method: (ne = (ce = s.varButtonCopy.value) == null ? void 0 : ce.cmd_method) != null ? ne : "POST",
10100
+ method: (de = (ce = s.varButtonCopy.value) == null ? void 0 : ce.cmd_method) != null ? de : "POST",
10099
10101
  url: B,
10100
- params: _e.value,
10101
- data: Ee.value
10102
- }), ((de = s.varButtonCopy.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), await i.store.emit(s.formID, "ok", {
10103
- isCreating: s.isCreating.value,
10104
- isUpdating: s.isUpdating.value,
10105
- isCopying: s.isCopying.value,
10106
- isDeleting: s.isDeleting.value,
10102
+ params: me.value,
10103
+ data: Se.value
10104
+ }), ((ne = s.varButtonCopy.value) == null ? void 0 : ne.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), s.store.setIsCopying(s.formID, !1), ((ge = s.varButtonCopy.value) == null ? void 0 : ge.reload_all_after_done_flg) !== 0 && c.search({
10105
+ isSearchFirstPage: !0
10106
+ }), await i.store.emit(s.formID, "ok", {
10107
+ isCreating: !1,
10108
+ isUpdating: !1,
10109
+ isCopying: !0,
10110
+ isDeleting: !1,
10107
10111
  row: o.selectedFirstRow.value,
10108
10112
  model: i.model
10109
- }), s.store.setIsCopying(s.formID, !1), c.search({
10110
- isSearchFirstPage: !0
10111
10113
  });
10112
- } catch (_e) {
10113
- console.error(_e), i.store.emit(s.formID, "error", _e);
10114
+ } catch (me) {
10115
+ console.error(me), i.store.emit(s.formID, "error", me);
10114
10116
  } finally {
10115
10117
  s.store.setIsCopyingRequesting(s.formID, !1);
10116
10118
  }
10117
10119
  }
10118
- async function ve() {
10119
- var W, Z, re, se, oe, ce, ne, de, _e, Ee;
10120
+ async function be() {
10121
+ var W, Z, re, se, oe, ce, de, ne, ge, me, Se;
10120
10122
  const B = (W = s.varButtonDelete.value) == null ? void 0 : W.cmd;
10121
10123
  if (!B) {
10122
10124
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10126,13 +10128,13 @@ const getProps$p = () => ({
10126
10128
  }
10127
10129
  try {
10128
10130
  s.store.setIsDeletingRequesting(s.formID, !0);
10129
- let Te = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), we = ref((se = o.selectedRows.value) != null ? se : []);
10130
- if (((oe = s.varButtonDelete.value) == null ? void 0 : oe.del_param_clm) !== "__kg__new_delete_param" && (Te = ref({
10131
- ids: (ne = (ce = o.selectedRows.value) == null ? void 0 : ce.map((Ve) => {
10132
- var Oe, De, Re;
10133
- return (Re = Ve[(De = (Oe = s.varButtonDelete.value) == null ? void 0 : Oe.del_param_clm) != null ? De : "id"]) != null ? Re : "";
10134
- })) != null ? ne : []
10135
- }), we = ref({})), await i.store.emit(s.formID, "beforeRequest", {
10131
+ let ke = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), Oe = ref((se = o.selectedRows.value) != null ? se : []);
10132
+ if (((oe = s.varButtonDelete.value) == null ? void 0 : oe.del_param_clm) !== "__kg__new_delete_param" && (ke = ref({
10133
+ ids: (de = (ce = o.selectedRows.value) == null ? void 0 : ce.map((Ke) => {
10134
+ var De, Re, Ve;
10135
+ return (Ve = Ke[(Re = (De = s.varButtonDelete.value) == null ? void 0 : De.del_param_clm) != null ? Re : "id"]) != null ? Ve : "";
10136
+ })) != null ? de : []
10137
+ }), Oe = ref({})), await i.store.emit(s.formID, "beforeRequest", {
10136
10138
  isCreating: s.isCreating.value,
10137
10139
  isUpdating: s.isUpdating.value,
10138
10140
  isCopying: s.isCopying.value,
@@ -10140,37 +10142,37 @@ const getProps$p = () => ({
10140
10142
  row: o.selectedFirstRow.value,
10141
10143
  rows: o.selectedRows.value,
10142
10144
  model: i.model,
10143
- params: Te,
10144
- data: we
10145
+ params: ke,
10146
+ data: Oe
10145
10147
  }))
10146
10148
  return;
10147
10149
  await httpClient().request({
10148
- method: (_e = (de = s.varButtonDelete.value) == null ? void 0 : de.cmd_method) != null ? _e : "DELETE",
10150
+ method: (ge = (ne = s.varButtonDelete.value) == null ? void 0 : ne.cmd_method) != null ? ge : "DELETE",
10149
10151
  url: B,
10150
- params: Te.value,
10151
- data: we.value
10152
+ params: ke.value,
10153
+ data: Oe.value
10152
10154
  }, {
10153
10155
  joinParamsToUrl: !0
10154
- }), ((Ee = s.varButtonDelete.value) == null ? void 0 : Ee.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), await l.store.emit(s.formID, "deleteOk", {
10155
- button: s.varButtonDelete.value,
10156
- rows: o.selectedRows.value
10156
+ }), ((me = s.varButtonDelete.value) == null ? void 0 : me.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), s.store.setIsDeleting(s.formID, !1), ((Se = s.varButtonDelete.value) == null ? void 0 : Se.reload_all_after_done_flg) !== 0 && c.search({
10157
+ isSearchFirstPage: !0
10157
10158
  }), await i.store.emit(s.formID, "ok", {
10158
- isCreating: s.isCreating.value,
10159
- isUpdating: s.isUpdating.value,
10160
- isCopying: s.isCopying.value,
10161
- isDeleting: s.isDeleting.value,
10159
+ isCreating: !1,
10160
+ isUpdating: !1,
10161
+ isCopying: !1,
10162
+ isDeleting: !0,
10162
10163
  row: o.selectedFirstRow.value,
10163
10164
  model: i.model
10164
- }), s.store.setIsDeleting(s.formID, !1), c.search({
10165
- isSearchFirstPage: !0
10165
+ }), await l.store.emit(s.formID, "deleteOk", {
10166
+ button: s.varButtonDelete.value,
10167
+ rows: o.selectedRows.value
10166
10168
  });
10167
- } catch (Te) {
10168
- console.error(Te), i.store.emit(s.formID, "error", Te);
10169
+ } catch (ke) {
10170
+ console.error(ke), i.store.emit(s.formID, "error", ke);
10169
10171
  } finally {
10170
10172
  s.store.setIsDeletingRequesting(s.formID, !1);
10171
10173
  }
10172
10174
  }
10173
- function be(B) {
10175
+ function ye(B) {
10174
10176
  var Z, re;
10175
10177
  const W = (re = (Z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : Z["KgForm.Item"]) == null ? void 0 : re[B.var_nam];
10176
10178
  return isFunction$2(W) ? createVNode(KgForm.Item, {
@@ -10183,18 +10185,18 @@ const getProps$p = () => ({
10183
10185
  frm_id: se,
10184
10186
  varName: oe,
10185
10187
  props: ce,
10186
- model: ne,
10187
- varVariableConfig: de,
10188
- varProfileDetail: _e,
10189
- varSubmitField: Ee
10188
+ model: de,
10189
+ varVariableConfig: ne,
10190
+ varProfileDetail: ge,
10191
+ varSubmitField: me
10190
10192
  }) => W({
10191
10193
  frm_id: se,
10192
10194
  varName: oe,
10193
10195
  props: ce,
10194
- model: ne,
10195
- varVariableConfig: de,
10196
- varProfileDetail: _e,
10197
- varSubmitField: Ee
10196
+ model: de,
10197
+ varVariableConfig: ne,
10198
+ varProfileDetail: ge,
10199
+ varSubmitField: me
10198
10200
  })
10199
10201
  }) : createVNode(KgForm.Item, {
10200
10202
  kgVarName: B.var_nam,
@@ -10203,7 +10205,7 @@ const getProps$p = () => ({
10203
10205
  onKgSubmit: ie
10204
10206
  }, null);
10205
10207
  }
10206
- function ye() {
10208
+ function Ee() {
10207
10209
  let B, W;
10208
10210
  return createVNode(KgResizable, {
10209
10211
  kgType: i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
@@ -10219,7 +10221,7 @@ const getProps$p = () => ({
10219
10221
  default: () => [createVNode(KgForm, {
10220
10222
  ref: i.formRef,
10221
10223
  model: i.model.value,
10222
- layout: me.value,
10224
+ layout: he.value,
10223
10225
  labelCol: ae.value,
10224
10226
  wrapperCol: F.value
10225
10227
  }, {
@@ -10227,11 +10229,11 @@ const getProps$p = () => ({
10227
10229
  ref: Y
10228
10230
  }, [M.value.length > 0 && createVNode(Row, {
10229
10231
  gutter: 12
10230
- }, _isSlot$9(B = M.value.map(be)) ? B : {
10232
+ }, _isSlot$9(B = M.value.map(ye)) ? B : {
10231
10233
  default: () => [B]
10232
10234
  }), K.value.length > 0 && H.value.length > 0 && createVNode(Divider, null, null), L.value.length > 0 && createVNode(Row, {
10233
10235
  gutter: 12
10234
- }, _isSlot$9(W = L.value.map(be)) ? W : {
10236
+ }, _isSlot$9(W = L.value.map(ye)) ? W : {
10235
10237
  default: () => [W]
10236
10238
  }), u.value && createVNode("div", {
10237
10239
  style: "text-align: center; padding: 6px 0 12px;"
@@ -10240,7 +10242,7 @@ const getProps$p = () => ({
10240
10242
  })]
10241
10243
  });
10242
10244
  }
10243
- function Ae() {
10245
+ function Me() {
10244
10246
  let B;
10245
10247
  return createVNode("div", null, [createVNode(Button, {
10246
10248
  type: "primary",
@@ -10259,12 +10261,12 @@ const getProps$p = () => ({
10259
10261
  default: () => [U.value]
10260
10262
  })]);
10261
10263
  }
10262
- function Ie() {
10264
+ function we() {
10263
10265
  return createVNode("div", {
10264
10266
  title: q.title.value
10265
10267
  }, [q.title.value]);
10266
10268
  }
10267
- function pe() {
10269
+ function _e() {
10268
10270
  return createVNode(KgSubmitHeader, {
10269
10271
  isFullscreen: ee.isFullscreen,
10270
10272
  "onUpdate:isFullscreen": (B) => ee.isFullscreen = B,
@@ -10286,10 +10288,10 @@ const getProps$p = () => ({
10286
10288
  class: le.value,
10287
10289
  "kg-frm_id": s.formID
10288
10290
  }, {
10289
- title: Ie,
10290
- extra: pe,
10291
- default: ye,
10292
- footer: Ae
10291
+ title: we,
10292
+ extra: _e,
10293
+ default: Ee,
10294
+ footer: Me
10293
10295
  });
10294
10296
  }
10295
10297
  });
@@ -13535,7 +13537,7 @@ const KgTable$1 = "", getProps$g = () => ({
13535
13537
  var F, U;
13536
13538
  return (U = (F = s.varButtonSearch.value) == null ? void 0 : F.cmd) != null ? U : null;
13537
13539
  }), k = computed(() => {
13538
- var U, Q, z, te, ue, ie, fe, he, Se;
13540
+ var U, Q, z, te, ue, ie, pe, ve, Ce;
13539
13541
  let F = {
13540
13542
  pageNo: O.pageIndex,
13541
13543
  pageSize: O.pageSize,
@@ -13546,10 +13548,10 @@ const KgTable$1 = "", getProps$g = () => ({
13546
13548
  return s.varButtonSearch.value && (F = {
13547
13549
  ...F,
13548
13550
  ...KgVarUtil.parseCommandParameter((ie = (ue = s.varButtonSearch.value) == null ? void 0 : ue.cmd_prm) != null ? ie : "")
13549
- }), (fe = s.varGridConfig.value) != null && fe.cmd_prm && (F = {
13551
+ }), (pe = s.varGridConfig.value) != null && pe.cmd_prm && (F = {
13550
13552
  ...F,
13551
- ...KgVarUtil.parseCommandParameter((he = s.varGridConfig.value.cmd_prm) != null ? he : "")
13552
- }), ((Se = s.varGridConfig.value) == null ? void 0 : Se.convert_sort_field_to_under_score_flg) === 1 && F.column && (F.column = snakeCase$1(F.column)), F;
13553
+ ...KgVarUtil.parseCommandParameter((ve = s.varGridConfig.value.cmd_prm) != null ? ve : "")
13554
+ }), ((Ce = s.varGridConfig.value) == null ? void 0 : Ce.convert_sort_field_to_under_score_flg) === 1 && F.column && (F.column = snakeCase$1(F.column)), F;
13553
13555
  }), I = computed(() => {
13554
13556
  var F, U, Q, z;
13555
13557
  if (!isNil((U = (F = a == null ? void 0 : a.value) == null ? void 0 : F.KgTable) == null ? void 0 : U.kgDisabled))
@@ -13673,7 +13675,7 @@ const KgTable$1 = "", getProps$g = () => ({
13673
13675
  immediate: !0
13674
13676
  });
13675
13677
  async function Q() {
13676
- var z, te, ue, ie, fe, he, Se;
13678
+ var z, te, ue, ie, pe, ve, Ce;
13677
13679
  if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u6267\u884C\u5F00\u59CB.`), !T.value) {
13678
13680
  KgLogger.error(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6309\u94AE\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3.`, {
13679
13681
  VarButton: s.varButtonSearch.value
@@ -13682,25 +13684,25 @@ const KgTable$1 = "", getProps$g = () => ({
13682
13684
  }
13683
13685
  F.isSearchFirstPage && (O.pageIndex = 1), o.store.setIsRetrieving(s.formID, !0);
13684
13686
  try {
13685
- const ve = KgUtil.parseParams(k.value, o.profileFormID.value, t), be = ref({});
13687
+ const be = KgUtil.parseParams(k.value, o.profileFormID.value, t), ye = ref({});
13686
13688
  if (!await o.store.emit(s.formID, "beforeRetrieve", {
13687
- params: ve,
13688
- response: be
13689
+ params: be,
13690
+ response: ye
13689
13691
  })) {
13690
- const pe = ((te = (z = n.option.value.KgSearch) == null ? void 0 : z.dynamicQuery) == null ? void 0 : te.on) === !0 && ((ue = s.currentVarProfileMaster.value) == null ? void 0 : ue.dyn_flg) === 1, {
13691
- sql: Ce,
13692
- whereSql: ke,
13693
- orderBySql: Me
13692
+ const _e = ((te = (z = n.option.value.KgSearch) == null ? void 0 : z.dynamicQuery) == null ? void 0 : te.on) === !0 && ((ue = s.currentVarProfileMaster.value) == null ? void 0 : ue.dyn_flg) === 1, {
13693
+ sql: Te,
13694
+ whereSql: Ae,
13695
+ orderBySql: Ie
13694
13696
  } = KgUtil.getQuerySql(k.value, o.profileFormID.value, null, t), B = await httpClient().request({
13695
- method: (fe = (ie = s.varButtonSearch.value) == null ? void 0 : ie.cmd_method) != null ? fe : "GET",
13697
+ method: (pe = (ie = s.varButtonSearch.value) == null ? void 0 : ie.cmd_method) != null ? pe : "GET",
13696
13698
  url: T.value,
13697
- params: ve,
13698
- data: ve,
13699
+ params: be,
13700
+ data: be,
13699
13701
  headers: {
13700
- [KG_HTTP_HEADERS.KG_DYNAMIC_QUERY]: pe,
13701
- [KG_HTTP_HEADERS.KG_QUERY_SQL]: Ce,
13702
- [KG_HTTP_HEADERS.KG_QUERY_WHERE_SQL]: ke,
13703
- [KG_HTTP_HEADERS.KG_QUERY_ORDER_BY_SQL]: Me
13702
+ [KG_HTTP_HEADERS.KG_DYNAMIC_QUERY]: _e,
13703
+ [KG_HTTP_HEADERS.KG_QUERY_SQL]: Te,
13704
+ [KG_HTTP_HEADERS.KG_QUERY_WHERE_SQL]: Ae,
13705
+ [KG_HTTP_HEADERS.KG_QUERY_ORDER_BY_SQL]: Ie
13704
13706
  }
13705
13707
  }, {
13706
13708
  isReturnNativeResponse: !0,
@@ -13708,37 +13710,37 @@ const KgTable$1 = "", getProps$g = () => ({
13708
13710
  });
13709
13711
  if (!B.data)
13710
13712
  throw message.error(n.t("kg.KgTable.request-fail-no-data")), new Error(n.t("kg.KgTable.request-fail-no-data"));
13711
- if (![0, 200].includes((he = B.data.code) != null ? he : -1) || !B.data.success)
13713
+ if (![0, 200].includes((ve = B.data.code) != null ? ve : -1) || !B.data.success)
13712
13714
  throw message.error(B.data.message || n.t("kg.KgTable.request-fail-error")), new Error(B.data.message || n.t("kg.KgTable.request-fail-error"));
13713
- pe && B.headers[KG_HTTP_HEADERS.KG_DYNAMIC_QUERY.toLowerCase()] !== "true" && message.warning(n.t("kg.KgTable.dynamic-query-is-off-in-server")), be.value = B.data.result, KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6210\u529F.`, {
13714
- params: ve,
13715
- response: be.value
13715
+ _e && B.headers[KG_HTTP_HEADERS.KG_DYNAMIC_QUERY.toLowerCase()] !== "true" && message.warning(n.t("kg.KgTable.dynamic-query-is-off-in-server")), ye.value = B.data.result, KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6210\u529F.`, {
13716
+ params: be,
13717
+ response: ye.value
13716
13718
  });
13717
13719
  }
13718
13720
  const {
13719
- datas: ye,
13720
- total: Ae
13721
- } = v(be);
13721
+ datas: Ee,
13722
+ total: Me
13723
+ } = v(ye);
13722
13724
  await o.store.emit(s.formID, "beforeSetDatas", {
13723
- datas: ye,
13724
- total: Ae,
13725
- setDatas(pe) {
13726
- o.store.setDatas(s.formID, pe);
13725
+ datas: Ee,
13726
+ total: Me,
13727
+ setDatas(_e) {
13728
+ o.store.setDatas(s.formID, _e);
13727
13729
  }
13728
- }), d.value = {}, o.store.setDatas(s.formID, ye.value), O.total = Ae.value;
13729
- const Ie = cloneDeep(w.value);
13730
- G(), c.value = [], await nextTick(), F.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID, Ie.map((pe) => {
13731
- var Ce;
13732
- return (Ce = ye.value) == null ? void 0 : Ce.find((ke) => ke[o.id.value] === pe);
13733
- }).filter((pe) => !!pe)) : ((Se = s.varGridConfig.value) == null ? void 0 : Se.check_first_row_after_retrieve) === 1 && ye.value.length > 0 && o.store.setSelectedRows(s.formID, [ye.value[0]]), await o.store.emit(s.formID, "retrieve", {
13734
- page: be.value,
13735
- datas: ye,
13736
- setDatas(pe) {
13737
- o.store.setDatas(s.formID, pe);
13730
+ }), d.value = {}, o.store.setDatas(s.formID, Ee.value), O.total = Me.value;
13731
+ const we = cloneDeep(w.value);
13732
+ G(), c.value = [], await nextTick(), F.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID, we.map((_e) => {
13733
+ var Te;
13734
+ return (Te = Ee.value) == null ? void 0 : Te.find((Ae) => Ae[o.id.value] === _e);
13735
+ }).filter((_e) => !!_e)) : ((Ce = s.varGridConfig.value) == null ? void 0 : Ce.check_first_row_after_retrieve) === 1 && Ee.value.length > 0 && o.store.setSelectedRows(s.formID, [Ee.value[0]]), await o.store.emit(s.formID, "retrieve", {
13736
+ page: ye.value,
13737
+ datas: Ee,
13738
+ setDatas(_e) {
13739
+ o.store.setDatas(s.formID, _e);
13738
13740
  }
13739
13741
  }), o.store.setIsRetrieved(s.formID, !0);
13740
- } catch (ve) {
13741
- throw ve;
13742
+ } catch (be) {
13743
+ throw be;
13742
13744
  } finally {
13743
13745
  o.store.setIsRetrieving(s.formID, !1);
13744
13746
  }
@@ -13816,7 +13818,7 @@ const KgTable$1 = "", getProps$g = () => ({
13816
13818
  }, [F]);
13817
13819
  }
13818
13820
  }
13819
- function me() {
13821
+ function he() {
13820
13822
  var F;
13821
13823
  return (F = r == null ? void 0 : r.KgTable) != null && F["summary.bodyCell"] ? createVNode(TableSummary, {
13822
13824
  fixed: "bottom"
@@ -13834,8 +13836,8 @@ const KgTable$1 = "", getProps$g = () => ({
13834
13836
  align: ue
13835
13837
  }, {
13836
13838
  default: () => {
13837
- var fe, he;
13838
- return [(he = (fe = r == null ? void 0 : r.KgTable) == null ? void 0 : fe["summary.bodyCell"]) == null ? void 0 : he.call(fe, {
13839
+ var pe, ve;
13840
+ return [(ve = (pe = r == null ? void 0 : r.KgTable) == null ? void 0 : pe["summary.bodyCell"]) == null ? void 0 : ve.call(pe, {
13839
13841
  column: U,
13840
13842
  index: ie,
13841
13843
  varGridDetail: te
@@ -13846,7 +13848,7 @@ const KgTable$1 = "", getProps$g = () => ({
13846
13848
  })]
13847
13849
  }) : null;
13848
13850
  }
13849
- function ge() {
13851
+ function fe() {
13850
13852
  return !o.isReadAutomatically.value && !o.store.getIsRetrieved(s.formID) ? n.t("kg.KgTable.emptyText") : n.t("kg.emptyText");
13851
13853
  }
13852
13854
  return () => {
@@ -13881,9 +13883,9 @@ const KgTable$1 = "", getProps$g = () => ({
13881
13883
  }, {
13882
13884
  headerCell: le,
13883
13885
  bodyCell: _,
13884
- emptyText: ge,
13886
+ emptyText: fe,
13885
13887
  expandedRowRender: (Q = r == null ? void 0 : r.KgTable) == null ? void 0 : Q.expandedRowRender,
13886
- summary: me
13888
+ summary: he
13887
13889
  }), (o.isShowBottomLeft.value || o.isShowBottomRight.value) && createVNode("div", {
13888
13890
  class: H.value
13889
13891
  }, [createVNode("div", {
@@ -78,6 +78,8 @@ export declare type IKgSubmitOkCbParam = {
78
78
  isDeleting: boolean | null;
79
79
  row: IKgTableRow | null;
80
80
  model: Ref<Record<string, any>>;
81
+ /** 接口返回结果. */
82
+ result: any | null;
81
83
  };
82
84
  export declare type IKgSubmitOkCb = ((param: IKgSubmitOkCbParam) => Promise<boolean>) & IKgEventCb;
83
85
  /** 事件监听函数: error. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",