@kengic/vue 0.6.2 → 0.6.3-beta.0
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.
- package/dist/kengic-vue.js +105 -103
- package/dist/src/components/KgTable/index.vm.d.ts +4 -2
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -4013,8 +4013,8 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4013
4013
|
return this.$d.getTime();
|
4014
4014
|
}, N.startOf = function($, w) {
|
4015
4015
|
var D = this, B = !!O.u(w) || w, x = O.p($), H = function(L, F) {
|
4016
|
-
var
|
4017
|
-
return B ?
|
4016
|
+
var U = O.w(D.$u ? Date.UTC(D.$y, F, L) : new Date(D.$y, F, L), D);
|
4017
|
+
return B ? U : U.endOf(u);
|
4018
4018
|
}, Y = function(L, F) {
|
4019
4019
|
return O.w(D.toDate()[L].apply(D.toDate("s"), (B ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), D);
|
4020
4020
|
}, q = this.$W, Z = this.$M, ae = this.$D, ne = "set" + (this.$u ? "UTC" : "");
|
@@ -4075,16 +4075,16 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4075
4075
|
var w = this, D = this.$locale();
|
4076
4076
|
if (!this.isValid())
|
4077
4077
|
return D.invalidDate || v;
|
4078
|
-
var B = $ || "YYYY-MM-DDTHH:mm:ssZ", x = O.z(this), H = this.$H, Y = this.$m, q = this.$M, Z = D.weekdays, ae = D.months, ne = function(F,
|
4079
|
-
return F && (F[
|
4078
|
+
var B = $ || "YYYY-MM-DDTHH:mm:ssZ", x = O.z(this), H = this.$H, Y = this.$m, q = this.$M, Z = D.weekdays, ae = D.months, ne = function(F, U, z, J) {
|
4079
|
+
return F && (F[U] || F(w, B)) || z[U].slice(0, J);
|
4080
4080
|
}, de = function(F) {
|
4081
4081
|
return O.s(H % 12 || 12, F, "0");
|
4082
|
-
}, ge = D.meridiem || function(F,
|
4082
|
+
}, ge = D.meridiem || function(F, U, z) {
|
4083
4083
|
var J = F < 12 ? "AM" : "PM";
|
4084
4084
|
return z ? J.toLowerCase() : J;
|
4085
4085
|
}, L = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: q + 1, MM: O.s(q + 1, 2, "0"), MMM: ne(D.monthsShort, q, ae, 3), MMMM: ne(ae, q), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: ne(D.weekdaysMin, this.$W, Z, 2), ddd: ne(D.weekdaysShort, this.$W, Z, 3), dddd: Z[this.$W], H: String(H), HH: O.s(H, 2, "0"), h: de(1), hh: de(2), a: ge(H, Y, !0), A: ge(H, Y, !1), m: String(Y), mm: O.s(Y, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: x };
|
4086
|
-
return B.replace(y, function(F,
|
4087
|
-
return
|
4086
|
+
return B.replace(y, function(F, U) {
|
4087
|
+
return U || L[F] || x.replace(":", "");
|
4088
4088
|
});
|
4089
4089
|
}, N.utcOffset = function() {
|
4090
4090
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
@@ -10310,14 +10310,14 @@ const getProps$n = () => ({
|
|
10310
10310
|
attrs: t
|
10311
10311
|
}) {
|
10312
10312
|
const r = inject("$dayjs", dayjs), a = useKg(), n = useKgVar(), o = useKgButton(), i = useKgTable(), s = useKgSubmit(), l = useKgSearch();
|
10313
|
-
o.onSubmitSave(async () => (await z(), !1)), o.onSubmitCancel(async () => (await
|
10313
|
+
o.onSubmitSave(async () => (await z(), !1)), o.onSubmitCancel(async () => (await U(), !1));
|
10314
10314
|
const u = inject(DI_KG_VAR__KG_SLOTS, null);
|
10315
10315
|
_useFormModel$1(), KG_VAR_SUBMIT__DISPLAY_TYPE.TABLE;
|
10316
10316
|
const c = computed(() => n.isDeleting.value && M.value.length === 0 && A.value.length === 0), g = computed(() => n.store.getVarButtonCreate(n.formID)), p = computed(() => n.store.getVarButtonUpdate(n.formID)), m = computed(() => n.store.getVarButtonCopy(n.formID)), _ = computed(() => n.store.getVarButtonDelete(n.formID)), v = computed(() => s.store.isLoading(n.formID)), b = computed(() => n.store.getVarSubmitConfig(n.formID)), y = computed(() => n.store.getVarSubmitFieldsForCreateKey(n.formID)), C = computed(() => n.store.getVarSubmitFieldsForCreateNotKey(n.formID)), E = computed(() => n.store.getVarSubmitFieldsForUpdateKey(n.formID)), T = computed(() => n.store.getVarSubmitFieldsForUpdateNotKey(n.formID)), I = computed(() => n.store.getVarSubmitFieldsForCopyKey(n.formID)), k = computed(() => n.store.getVarSubmitFieldsForCopyNotKey(n.formID)), V = computed(() => n.store.getVarSubmitFieldsForDelete(n.formID)), M = computed(() => {
|
10317
|
-
var
|
10317
|
+
var G, W, Q;
|
10318
10318
|
switch (!0) {
|
10319
10319
|
case n.isCreating.value:
|
10320
|
-
return (
|
10320
|
+
return (G = y.value) != null ? G : [];
|
10321
10321
|
case n.isUpdating.value:
|
10322
10322
|
return (W = E.value) != null ? W : [];
|
10323
10323
|
case n.isCopying.value:
|
@@ -10327,10 +10327,10 @@ const getProps$n = () => ({
|
|
10327
10327
|
}
|
10328
10328
|
return [];
|
10329
10329
|
}), A = computed(() => {
|
10330
|
-
var
|
10330
|
+
var G, W, Q, te;
|
10331
10331
|
switch (!0) {
|
10332
10332
|
case n.isCreating.value:
|
10333
|
-
return (
|
10333
|
+
return (G = C.value) != null ? G : [];
|
10334
10334
|
case n.isUpdating.value:
|
10335
10335
|
return (W = T.value) != null ? W : [];
|
10336
10336
|
case n.isCopying.value:
|
@@ -10342,14 +10342,14 @@ const getProps$n = () => ({
|
|
10342
10342
|
}), O = computed(() => !!n.store.isCreatingRequesting(n.formID) || !!n.store.isUpdatingRequesting(n.formID) || !!n.store.isCopyingRequesting(n.formID) || !!n.store.isDeletingRequesting(n.formID)), K = computed(() => O.value || v.value), P = computed(() => v.value), R = ref({
|
10343
10343
|
kgWidth: 0
|
10344
10344
|
}), N = computed(() => {
|
10345
|
-
var
|
10346
|
-
return !!(c.value || q.isFullscreen || ((
|
10345
|
+
var G;
|
10346
|
+
return !!(c.value || q.isFullscreen || ((G = b.value) == null ? void 0 : G.resizable_flg) === 0);
|
10347
10347
|
}), $ = computed(() => {
|
10348
|
-
var
|
10349
|
-
return c.value ? 398 : (W = (
|
10348
|
+
var G, W;
|
10349
|
+
return c.value ? 398 : (W = (G = b.value) == null ? void 0 : G.min_width) != null ? W : DEFAULT_MIN_WIDTH;
|
10350
10350
|
}), w = computed(() => {
|
10351
|
-
var
|
10352
|
-
return c.value ? 398 : (W = (
|
10351
|
+
var G, W;
|
10352
|
+
return c.value ? 398 : (W = (G = b.value) == null ? void 0 : G.max_width) != null ? W : DEFAULT_MAX_WIDTH;
|
10353
10353
|
}), D = computed(() => c.value ? 398 : R.value.kgWidth), B = ref(null);
|
10354
10354
|
_useResizeObserver$1(B);
|
10355
10355
|
const x = _useTitle(), H = computed(() => c.value ? 400 : R.value.kgWidth && R.value.kgWidth > 0 ? R.value.kgWidth + 2 : 0), Y = computed(() => H.value === 0 ? !1 : !!(n.isCreating.value || n.isUpdating.value || n.isCopying.value || n.isDeleting.value)), q = reactive({
|
@@ -10361,10 +10361,10 @@ const getProps$n = () => ({
|
|
10361
10361
|
} = _useLayout(), {
|
10362
10362
|
getDefaultWidth: ne
|
10363
10363
|
} = _useDefaultWidth(), de = computed(() => {
|
10364
|
-
var
|
10364
|
+
var G, W, Q;
|
10365
10365
|
switch (ae.value) {
|
10366
10366
|
case "horizontal":
|
10367
|
-
switch ((
|
10367
|
+
switch ((G = b.value) == null ? void 0 : G.label_col_unit) {
|
10368
10368
|
case KG_WIDTH_UNIT.SPAN:
|
10369
10369
|
return {
|
10370
10370
|
span: (W = b.value) == null ? void 0 : W.label_col
|
@@ -10380,10 +10380,10 @@ const getProps$n = () => ({
|
|
10380
10380
|
return;
|
10381
10381
|
}
|
10382
10382
|
}), ge = computed(() => {
|
10383
|
-
var
|
10383
|
+
var G, W;
|
10384
10384
|
switch (ae.value) {
|
10385
10385
|
case "horizontal":
|
10386
|
-
switch ((
|
10386
|
+
switch ((G = b.value) == null ? void 0 : G.label_col_unit) {
|
10387
10387
|
case KG_WIDTH_UNIT.SPAN:
|
10388
10388
|
return {
|
10389
10389
|
span: 24 - ((W = b.value) == null ? void 0 : W.label_col)
|
@@ -10395,19 +10395,19 @@ const getProps$n = () => ({
|
|
10395
10395
|
return;
|
10396
10396
|
}
|
10397
10397
|
});
|
10398
|
-
watch(Y, (
|
10399
|
-
|
10398
|
+
watch(Y, (G, W) => {
|
10399
|
+
G === !0 && L(), W === !0 && G === !1 && F();
|
10400
10400
|
}, {
|
10401
10401
|
immediate: !0
|
10402
|
-
}), watch(ne, (
|
10403
|
-
|
10402
|
+
}), watch(ne, (G) => {
|
10403
|
+
G && (R.value.kgWidth = G);
|
10404
10404
|
}, {
|
10405
10405
|
immediate: !0
|
10406
10406
|
});
|
10407
10407
|
function L() {
|
10408
10408
|
var W;
|
10409
|
-
const
|
10410
|
-
Q && Object.keys(Q).length > 0 && (setTimeout(() =>
|
10409
|
+
const G = watch(s.model, (Q) => {
|
10410
|
+
Q && Object.keys(Q).length > 0 && (setTimeout(() => G()), s.store.emit(n.formID, "open", {
|
10411
10411
|
isCreating: n.isCreating.value,
|
10412
10412
|
isUpdating: n.isUpdating.value,
|
10413
10413
|
isCopying: n.isCopying.value,
|
@@ -10423,7 +10423,7 @@ const getProps$n = () => ({
|
|
10423
10423
|
function F() {
|
10424
10424
|
R.value.kgWidth = ne.value, q.isFullscreen = !1, s.store.emit(n.formID, "close");
|
10425
10425
|
}
|
10426
|
-
function
|
10426
|
+
function U() {
|
10427
10427
|
switch (!0) {
|
10428
10428
|
case n.isCreating.value:
|
10429
10429
|
n.store.setIsCreating(n.formID, !1);
|
@@ -10440,7 +10440,7 @@ const getProps$n = () => ({
|
|
10440
10440
|
}
|
10441
10441
|
}
|
10442
10442
|
async function z() {
|
10443
|
-
var
|
10443
|
+
var G, W;
|
10444
10444
|
try {
|
10445
10445
|
if (await s.store.emit(n.formID, "beforeOk", {
|
10446
10446
|
isCreating: n.isCreating.value,
|
@@ -10453,7 +10453,7 @@ const getProps$n = () => ({
|
|
10453
10453
|
}))
|
10454
10454
|
return;
|
10455
10455
|
try {
|
10456
|
-
await ((
|
10456
|
+
await ((G = s.formRef.value) == null ? void 0 : G.validate());
|
10457
10457
|
} catch (re) {
|
10458
10458
|
KgUtil.throwIfNotFormError(re);
|
10459
10459
|
}
|
@@ -10487,8 +10487,8 @@ const getProps$n = () => ({
|
|
10487
10487
|
}
|
10488
10488
|
async function J() {
|
10489
10489
|
var W, Q, te, re, oe, se, ie, le;
|
10490
|
-
const
|
10491
|
-
if (!
|
10490
|
+
const G = (W = g.value) == null ? void 0 : W.cmd;
|
10491
|
+
if (!G) {
|
10492
10492
|
Logger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10493
10493
|
VarButton: g.value
|
10494
10494
|
});
|
@@ -10511,7 +10511,7 @@ const getProps$n = () => ({
|
|
10511
10511
|
return;
|
10512
10512
|
await httpClient().request({
|
10513
10513
|
method: (oe = (re = g.value) == null ? void 0 : re.cmd_method) != null ? oe : "POST",
|
10514
|
-
url:
|
10514
|
+
url: G,
|
10515
10515
|
params: ee.value,
|
10516
10516
|
data: ue.value
|
10517
10517
|
}), ((se = g.value) == null ? void 0 : se.show_success_message_flg) !== 0 && message.success(x.title.value + a.t("kg.succeed")), s.store.emit(n.formID, "ok"), n.store.setIsCreating(n.formID, !1), (le = (ie = l.search).value) == null || le.call(ie, !0);
|
@@ -10523,8 +10523,8 @@ const getProps$n = () => ({
|
|
10523
10523
|
}
|
10524
10524
|
async function X() {
|
10525
10525
|
var W, Q, te, re, oe, se, ie, le;
|
10526
|
-
const
|
10527
|
-
if (!
|
10526
|
+
const G = (W = p.value) == null ? void 0 : W.cmd;
|
10527
|
+
if (!G) {
|
10528
10528
|
Logger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10529
10529
|
VarButton: p.value
|
10530
10530
|
});
|
@@ -10547,7 +10547,7 @@ const getProps$n = () => ({
|
|
10547
10547
|
return;
|
10548
10548
|
await httpClient().request({
|
10549
10549
|
method: (oe = (re = p.value) == null ? void 0 : re.cmd_method) != null ? oe : "POST",
|
10550
|
-
url:
|
10550
|
+
url: G,
|
10551
10551
|
params: ee.value,
|
10552
10552
|
data: ue.value
|
10553
10553
|
}), ((se = p.value) == null ? void 0 : se.show_success_message_flg) !== 0 && message.success(a.t("kg.updateSuccess")), s.store.emit(n.formID, "ok"), n.store.setIsUpdating(n.formID, !1), (le = (ie = l.search).value) == null || le.call(ie);
|
@@ -10559,8 +10559,8 @@ const getProps$n = () => ({
|
|
10559
10559
|
}
|
10560
10560
|
async function ce() {
|
10561
10561
|
var W, Q, te, re, oe, se, ie, le, ee, ue;
|
10562
|
-
const
|
10563
|
-
if (!
|
10562
|
+
const G = (W = m.value) == null ? void 0 : W.cmd;
|
10563
|
+
if (!G) {
|
10564
10564
|
Logger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10565
10565
|
VarButton: m.value
|
10566
10566
|
});
|
@@ -10586,7 +10586,7 @@ const getProps$n = () => ({
|
|
10586
10586
|
return;
|
10587
10587
|
await httpClient().request({
|
10588
10588
|
method: (ie = (se = m.value) == null ? void 0 : se.cmd_method) != null ? ie : "POST",
|
10589
|
-
url:
|
10589
|
+
url: G,
|
10590
10590
|
params: pe.value,
|
10591
10591
|
data: me.value
|
10592
10592
|
}), ((le = m.value) == null ? void 0 : le.show_success_message_flg) !== 0 && message.success(a.t("kg.copySuccess")), s.store.emit(n.formID, "ok"), n.store.setIsCopying(n.formID, !1), (ue = (ee = l.search).value) == null || ue.call(ee, !0);
|
@@ -10598,8 +10598,8 @@ const getProps$n = () => ({
|
|
10598
10598
|
}
|
10599
10599
|
async function fe() {
|
10600
10600
|
var W, Q, te, re, oe, se, ie, le;
|
10601
|
-
const
|
10602
|
-
if (!
|
10601
|
+
const G = (W = _.value) == null ? void 0 : W.cmd;
|
10602
|
+
if (!G) {
|
10603
10603
|
Logger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10604
10604
|
VarButton: _.value
|
10605
10605
|
});
|
@@ -10627,7 +10627,7 @@ const getProps$n = () => ({
|
|
10627
10627
|
return;
|
10628
10628
|
await httpClient().request({
|
10629
10629
|
method: (oe = (re = _.value) == null ? void 0 : re.cmd_method) != null ? oe : "DELETE",
|
10630
|
-
url:
|
10630
|
+
url: G,
|
10631
10631
|
params: ee.value,
|
10632
10632
|
data: ue.value
|
10633
10633
|
}, {
|
@@ -10639,13 +10639,13 @@ const getProps$n = () => ({
|
|
10639
10639
|
n.store.setIsDeletingRequesting(n.formID, !1);
|
10640
10640
|
}
|
10641
10641
|
}
|
10642
|
-
function _e(
|
10642
|
+
function _e(G) {
|
10643
10643
|
var Q, te;
|
10644
|
-
const W = (te = (Q = u == null ? void 0 : u.KgSubmit) == null ? void 0 : Q["KgForm.Item"]) == null ? void 0 : te[
|
10644
|
+
const W = (te = (Q = u == null ? void 0 : u.KgSubmit) == null ? void 0 : Q["KgForm.Item"]) == null ? void 0 : te[G.var_nam];
|
10645
10645
|
return isFunction$2(W) ? createVNode(KgForm.Item, {
|
10646
|
-
kgVarName:
|
10646
|
+
kgVarName: G.var_nam,
|
10647
10647
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
10648
|
-
kgRules: s.rules.value[
|
10648
|
+
kgRules: s.rules.value[G.var_nam],
|
10649
10649
|
onKgSubmit: z
|
10650
10650
|
}, {
|
10651
10651
|
control: ({
|
@@ -10664,14 +10664,14 @@ const getProps$n = () => ({
|
|
10664
10664
|
varSubmitField: ee
|
10665
10665
|
})
|
10666
10666
|
}) : createVNode(KgForm.Item, {
|
10667
|
-
kgVarName:
|
10667
|
+
kgVarName: G.var_nam,
|
10668
10668
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
10669
|
-
kgRules: s.rules.value[
|
10669
|
+
kgRules: s.rules.value[G.var_nam],
|
10670
10670
|
onKgSubmit: z
|
10671
10671
|
}, null);
|
10672
10672
|
}
|
10673
10673
|
function ye() {
|
10674
|
-
let
|
10674
|
+
let G, W;
|
10675
10675
|
return createVNode(KgResizable, {
|
10676
10676
|
kgType: s.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
|
10677
10677
|
kgMinWidth: $.value,
|
@@ -10694,8 +10694,8 @@ const getProps$n = () => ({
|
|
10694
10694
|
ref: B
|
10695
10695
|
}, [M.value.length > 0 && createVNode(Row, {
|
10696
10696
|
gutter: 12
|
10697
|
-
}, _isSlot$8(
|
10698
|
-
default: () => [
|
10697
|
+
}, _isSlot$8(G = M.value.map(_e)) ? G : {
|
10698
|
+
default: () => [G]
|
10699
10699
|
}), M.value.length > 0 && A.value.length > 0 && createVNode(Divider, null, null), A.value.length > 0 && createVNode(Row, {
|
10700
10700
|
gutter: 12
|
10701
10701
|
}, _isSlot$8(W = A.value.map(_e)) ? W : {
|
@@ -10708,14 +10708,14 @@ const getProps$n = () => ({
|
|
10708
10708
|
});
|
10709
10709
|
}
|
10710
10710
|
function Se() {
|
10711
|
-
let
|
10711
|
+
let G, W;
|
10712
10712
|
return createVNode("div", null, [createVNode(Button, {
|
10713
10713
|
type: "primary",
|
10714
10714
|
ghost: !K.value,
|
10715
10715
|
disabled: K.value,
|
10716
|
-
onClick:
|
10717
|
-
}, _isSlot$8(
|
10718
|
-
default: () => [
|
10716
|
+
onClick: U
|
10717
|
+
}, _isSlot$8(G = a.t("kg.cancel")) ? G : {
|
10718
|
+
default: () => [G]
|
10719
10719
|
}), createVNode(Button, {
|
10720
10720
|
type: "primary",
|
10721
10721
|
disabled: P.value,
|
@@ -10734,10 +10734,10 @@ const getProps$n = () => ({
|
|
10734
10734
|
function Te() {
|
10735
10735
|
return createVNode(KgSubmitHeader, {
|
10736
10736
|
isFullscreen: q.isFullscreen,
|
10737
|
-
"onUpdate:isFullscreen": (
|
10737
|
+
"onUpdate:isFullscreen": (G) => q.isFullscreen = G,
|
10738
10738
|
kgShowFullscreenButton: !c.value,
|
10739
10739
|
kgShowConfigButton: !c.value && e.kgShowConfigButton,
|
10740
|
-
onKgCancel:
|
10740
|
+
onKgCancel: U
|
10741
10741
|
}, null);
|
10742
10742
|
}
|
10743
10743
|
return onUnmounted(() => {
|
@@ -11657,13 +11657,13 @@ const KgTable = defineComponent({
|
|
11657
11657
|
switch (L) {
|
11658
11658
|
case "setSelecte":
|
11659
11659
|
if (F[0] === i.formID) {
|
11660
|
-
const
|
11660
|
+
const U = F[1], z = F[2];
|
11661
11661
|
switch (!0) {
|
11662
|
-
case (z && !A.value.includes(
|
11663
|
-
D([...A.value,
|
11662
|
+
case (z && !A.value.includes(U[u.id.value])):
|
11663
|
+
D([...A.value, U[u.id.value]]);
|
11664
11664
|
break;
|
11665
|
-
case (!z && A.value.includes(
|
11666
|
-
D(without$1(A.value,
|
11665
|
+
case (!z && A.value.includes(U[u.id.value])):
|
11666
|
+
D(without$1(A.value, U[u.id.value]));
|
11667
11667
|
break;
|
11668
11668
|
}
|
11669
11669
|
}
|
@@ -11681,12 +11681,12 @@ const KgTable = defineComponent({
|
|
11681
11681
|
var L, F;
|
11682
11682
|
return (F = (L = i.varButtonSearch.value) == null ? void 0 : L.cmd) != null ? F : null;
|
11683
11683
|
}), C = computed(() => {
|
11684
|
-
var F,
|
11684
|
+
var F, U, z, J, X, ce, fe;
|
11685
11685
|
let L = {
|
11686
11686
|
pageNo: O.pageIndex,
|
11687
11687
|
pageSize: O.pageSize,
|
11688
11688
|
...K,
|
11689
|
-
...(
|
11689
|
+
...(U = (F = s.model) == null ? void 0 : F.value) != null ? U : {}
|
11690
11690
|
};
|
11691
11691
|
return i.varButtonSearch.value && (L = {
|
11692
11692
|
...L,
|
@@ -11730,8 +11730,8 @@ const KgTable = defineComponent({
|
|
11730
11730
|
});
|
11731
11731
|
watch(u.pageSizeOptions, (L) => {
|
11732
11732
|
L.length > 0 && !L.includes(O.pageSize) && (O.pageSize = u.pageSizeOption.value);
|
11733
|
-
}), watch([y, u.isReadAutomatically, s.isReady], ([L, F,
|
11734
|
-
L && F &&
|
11733
|
+
}), watch([y, u.isReadAutomatically, s.isReady], ([L, F, U]) => {
|
11734
|
+
L && F && U && !u.store.getIsRetrieved(i.formID) && w(!0);
|
11735
11735
|
}, {
|
11736
11736
|
immediate: !0
|
11737
11737
|
}), watch(i.isCreating, (L, F) => {
|
@@ -11759,10 +11759,10 @@ const KgTable = defineComponent({
|
|
11759
11759
|
}
|
11760
11760
|
switch (L == null ? void 0 : L.detail) {
|
11761
11761
|
case 1:
|
11762
|
-
A.value = [F[u.id.value]], u.store.setSelectedRows(i.formID, A.value.map((
|
11762
|
+
A.value = [F[u.id.value]], u.store.setSelectedRows(i.formID, A.value.map((U) => {
|
11763
11763
|
var z;
|
11764
|
-
return (z = M.value) == null ? void 0 : z.find((J) => J[u.id.value] ===
|
11765
|
-
}).filter((
|
11764
|
+
return (z = M.value) == null ? void 0 : z.find((J) => J[u.id.value] === U);
|
11765
|
+
}).filter((U) => !!U));
|
11766
11766
|
break;
|
11767
11767
|
case 2:
|
11768
11768
|
u.store.emit(i.formID, "rowDoubleClick", F);
|
@@ -11772,11 +11772,11 @@ const KgTable = defineComponent({
|
|
11772
11772
|
}
|
11773
11773
|
function w(L = !1) {
|
11774
11774
|
const F = watch(g, (z) => {
|
11775
|
-
z && (setTimeout(() => F()),
|
11775
|
+
z && (setTimeout(() => F()), U());
|
11776
11776
|
}, {
|
11777
11777
|
immediate: !0
|
11778
11778
|
});
|
11779
|
-
async function
|
11779
|
+
async function U() {
|
11780
11780
|
var z, J;
|
11781
11781
|
if (!y.value) {
|
11782
11782
|
Logger.error("[KgTable] '\u67E5\u8BE2\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
@@ -11817,12 +11817,12 @@ const KgTable = defineComponent({
|
|
11817
11817
|
}
|
11818
11818
|
function D(L) {
|
11819
11819
|
A.value = L, u.store.setSelectedRows(i.formID, A.value.map((F) => {
|
11820
|
-
var
|
11821
|
-
return (
|
11820
|
+
var U;
|
11821
|
+
return (U = M.value) == null ? void 0 : U.find((z) => z[u.id.value] === F);
|
11822
11822
|
}).filter((F) => !!F));
|
11823
11823
|
}
|
11824
11824
|
function B(L) {
|
11825
|
-
var F,
|
11825
|
+
var F, U;
|
11826
11826
|
switch (u.isMultiSelect.value) {
|
11827
11827
|
case !0:
|
11828
11828
|
{
|
@@ -11833,7 +11833,7 @@ const KgTable = defineComponent({
|
|
11833
11833
|
case !1:
|
11834
11834
|
{
|
11835
11835
|
const z = L[u.id.value];
|
11836
|
-
(
|
11836
|
+
(U = A.value) != null && U.includes(z) ? A.value = [] : A.value = [z];
|
11837
11837
|
}
|
11838
11838
|
break;
|
11839
11839
|
}
|
@@ -11845,13 +11845,13 @@ const KgTable = defineComponent({
|
|
11845
11845
|
function x(L, F) {
|
11846
11846
|
F.width = L, i.store.setVarGridDetailWidth(i.formID, F.dataIndex, L);
|
11847
11847
|
}
|
11848
|
-
async function H(L, F,
|
11848
|
+
async function H(L, F, U, z) {
|
11849
11849
|
var J;
|
11850
11850
|
switch (z.action) {
|
11851
11851
|
case "sort":
|
11852
11852
|
{
|
11853
11853
|
await nextTick();
|
11854
|
-
let X =
|
11854
|
+
let X = U;
|
11855
11855
|
X.order ? (K.column = (J = X.field) != null ? J : void 0, K.order = X.order === "ascend" ? "asc" : X.order === "descend" ? "desc" : void 0) : (K.column = void 0, K.order = void 0), w(!0);
|
11856
11856
|
}
|
11857
11857
|
break;
|
@@ -11859,13 +11859,13 @@ const KgTable = defineComponent({
|
|
11859
11859
|
}
|
11860
11860
|
function Y(L, F) {
|
11861
11861
|
var z;
|
11862
|
-
const
|
11862
|
+
const U = F[u.id.value];
|
11863
11863
|
switch ((z = i.varGridConfig.value) == null ? void 0 : z.expand_accordion_flg) {
|
11864
11864
|
case 0:
|
11865
|
-
L ? p.value = uniq([...p.value,
|
11865
|
+
L ? p.value = uniq([...p.value, U]) : p.value = without$1(p.value, U);
|
11866
11866
|
break;
|
11867
11867
|
default:
|
11868
|
-
L ? p.value = [
|
11868
|
+
L ? p.value = [U] : p.value = [];
|
11869
11869
|
break;
|
11870
11870
|
}
|
11871
11871
|
}
|
@@ -11874,8 +11874,8 @@ const KgTable = defineComponent({
|
|
11874
11874
|
}
|
11875
11875
|
function Z(L) {
|
11876
11876
|
A.value = [L[u.id.value]], u.store.setSelectedRows(i.formID, A.value.map((F) => {
|
11877
|
-
var
|
11878
|
-
return (
|
11877
|
+
var U;
|
11878
|
+
return (U = M.value) == null ? void 0 : U.find((z) => z[u.id.value] === F);
|
11879
11879
|
}).filter((F) => !!F)), l.click(i.formID, KG_BUTTON_TYPE.UPDATE);
|
11880
11880
|
}
|
11881
11881
|
function ae({
|
@@ -11895,15 +11895,15 @@ const KgTable = defineComponent({
|
|
11895
11895
|
return (F = n == null ? void 0 : n.KgTable) != null && F["summary.bodyCell"] ? createVNode(TableSummary, {
|
11896
11896
|
fixed: "bottom"
|
11897
11897
|
}, {
|
11898
|
-
default: () => [createVNode(TableSummary.Row, null, _isSlot$5(L = m.value.map((
|
11899
|
-
const J = i.store.getVarGridDetail(i.formID,
|
11898
|
+
default: () => [createVNode(TableSummary.Row, null, _isSlot$5(L = m.value.map((U, z) => {
|
11899
|
+
const J = i.store.getVarGridDetail(i.formID, U.dataIndex);
|
11900
11900
|
return createVNode(TableSummary.Cell, {
|
11901
11901
|
index: z
|
11902
11902
|
}, {
|
11903
11903
|
default: () => {
|
11904
11904
|
var X, ce;
|
11905
11905
|
return [(ce = (X = n == null ? void 0 : n.KgTable) == null ? void 0 : X["summary.bodyCell"]) == null ? void 0 : ce.call(X, {
|
11906
|
-
column:
|
11906
|
+
column: U,
|
11907
11907
|
index: z,
|
11908
11908
|
varGridDetail: J
|
11909
11909
|
})];
|
@@ -11917,33 +11917,35 @@ const KgTable = defineComponent({
|
|
11917
11917
|
function de({
|
11918
11918
|
column: L,
|
11919
11919
|
index: F,
|
11920
|
-
record:
|
11921
|
-
|
11922
|
-
|
11920
|
+
record: U,
|
11921
|
+
text: z,
|
11922
|
+
value: J
|
11923
11923
|
}) {
|
11924
11924
|
var fe;
|
11925
11925
|
let X = "";
|
11926
11926
|
L.customRender ? X = L.customRender({
|
11927
11927
|
index: F,
|
11928
|
-
record:
|
11928
|
+
record: U,
|
11929
11929
|
column: L,
|
11930
|
-
text:
|
11931
|
-
value:
|
11930
|
+
text: z,
|
11931
|
+
value: J,
|
11932
11932
|
renderIndex: F
|
11933
|
-
}) : X =
|
11933
|
+
}) : X = J;
|
11934
11934
|
const ce = createVNode(KgTableCell, {
|
11935
|
-
kgRow:
|
11935
|
+
kgRow: U,
|
11936
11936
|
kgValue: X,
|
11937
11937
|
kgVarName: L.dataIndex,
|
11938
|
-
onKgUpdateLinkClick: () => Z(
|
11938
|
+
onKgUpdateLinkClick: () => Z(U)
|
11939
11939
|
}, null);
|
11940
11940
|
if ((fe = n == null ? void 0 : n.KgTable) != null && fe.bodyCell) {
|
11941
11941
|
const _e = i.store.getVarGridDetail(i.formID, L.dataIndex);
|
11942
11942
|
return n.KgTable.bodyCell({
|
11943
|
-
row: G,
|
11944
|
-
index: F,
|
11945
|
-
value: z,
|
11946
11943
|
column: L,
|
11944
|
+
index: F,
|
11945
|
+
record: U,
|
11946
|
+
text: z,
|
11947
|
+
value: J,
|
11948
|
+
row: U,
|
11947
11949
|
varGridDetail: _e,
|
11948
11950
|
defaultRender: ce
|
11949
11951
|
});
|
@@ -11976,7 +11978,7 @@ const KgTable = defineComponent({
|
|
11976
11978
|
expandColumnWidth: 28,
|
11977
11979
|
expandedRowKeys: p.value,
|
11978
11980
|
customRow: (F) => ({
|
11979
|
-
onClick: (
|
11981
|
+
onClick: (U) => $(U, F)
|
11980
11982
|
}),
|
11981
11983
|
onResizeColumn: x,
|
11982
11984
|
onChange: H,
|
@@ -12012,12 +12014,12 @@ const KgTable = defineComponent({
|
|
12012
12014
|
locale: {
|
12013
12015
|
page: ""
|
12014
12016
|
},
|
12015
|
-
showTotal: (F,
|
12016
|
-
from:
|
12017
|
-
to:
|
12017
|
+
showTotal: (F, U) => o.t("kg.KgTable.totalText", {
|
12018
|
+
from: U[0],
|
12019
|
+
to: U[1],
|
12018
12020
|
total: F
|
12019
12021
|
}),
|
12020
|
-
onChange: (F,
|
12022
|
+
onChange: (F, U) => q(F, U)
|
12021
12023
|
}, null)])])]);
|
12022
12024
|
};
|
12023
12025
|
}
|
@@ -10,10 +10,12 @@ export declare type IKgTableRow<T = {}> = {
|
|
10
10
|
/** 插槽参数. */
|
11
11
|
export interface IKgTableSlotParams<T = {}> {
|
12
12
|
bodyCell: {
|
13
|
-
|
13
|
+
column: ColumnType;
|
14
14
|
index: number;
|
15
|
+
record: IKgTableRow<T>;
|
16
|
+
text: any | null;
|
15
17
|
value: any | null;
|
16
|
-
|
18
|
+
row: IKgTableRow<T>;
|
17
19
|
varGridDetail: VarGridDetail | null;
|
18
20
|
defaultRender: JSX.Element;
|
19
21
|
};
|