@vue-ui-kit/ant 2.0.4 → 2.0.6
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/README.md +1393 -1386
- package/dist/cjs/index.js +3 -3
- package/dist/declarations/antProxy.d.ts +5 -1
- package/dist/es/index.js +247 -240
- package/package.json +4 -2
- package/src/declarations/antProxy.ts +5 -1
- package/src/packages/components/PCanvasGrid.vue +34 -13
- package/src/packages/components/PFormGroup.vue +4 -1
package/dist/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as de, createVNode as k, watch as Ve, computed as z, resolveComponent as oe, createElementBlock as V, openBlock as
|
|
1
|
+
import { defineComponent as de, createVNode as k, watch as Ve, computed as z, resolveComponent as oe, createElementBlock as V, openBlock as T, createElementVNode as he, mergeProps as X, unref as R, createSlots as Ni, withCtx as H, createBlock as Y, createCommentVNode as ie, createTextVNode as Ne, toRefs as Mt, ref as P, resolveDynamicComponent as yr, normalizeProps as ts, Fragment as se, renderList as ge, reactive as yt, useAttrs as Lr, onMounted as Ki, onBeforeUnmount as ea, toDisplayString as Ge, normalizeClass as Dr, normalizeStyle as St, renderSlot as wr, mergeModels as Hl, useModel as Bl, watchEffect as is, nextTick as $i } from "vue";
|
|
2
2
|
import { TreeSelect as Er, TimePicker as rs, Slider as Pl, Rate as Yl, Mentions as Wl, Checkbox as zl, Cascader as ss, AutoComplete as ta, RangePicker as os, DatePicker as as, Select as ns, InputNumber as ls, Textarea as cs, Input as hs, TypographyParagraph as Xl, CheckboxGroup as us, Switch as Vl, RadioGroup as ds, Button as ue, Dropdown as ia, Form as Hi, Row as Ar, message as ot, Modal as ra, Spin as sa, Table as Gl, Pagination as Ul, Card as ql, Tabs as Zl, TabPane as Jl, Menu as Ql, MenuItem as jl } from "ant-design-vue";
|
|
3
3
|
import * as ec from "@ant-design/icons-vue";
|
|
4
4
|
import { InfoCircleOutlined as fs, DownOutlined as oa, MoreOutlined as tc } from "@ant-design/icons-vue";
|
|
@@ -2257,7 +2257,7 @@ const Gr = (i) => {
|
|
|
2257
2257
|
});
|
|
2258
2258
|
return (d, f) => {
|
|
2259
2259
|
const g = oe("a-form-item-rest"), v = oe("a-table"), x = oe("a-button");
|
|
2260
|
-
return
|
|
2260
|
+
return T(), V("div", null, [
|
|
2261
2261
|
k(v, X({ "data-source": a.value }, s.value, {
|
|
2262
2262
|
columns: n.value.map((p) => R(Gr)(p))
|
|
2263
2263
|
}), Ni({ _: 2 }, [
|
|
@@ -2266,7 +2266,7 @@ const Gr = (i) => {
|
|
|
2266
2266
|
fn: H(({ column: p, record: E, index: b }) => [
|
|
2267
2267
|
k(g, null, {
|
|
2268
2268
|
default: H(() => [
|
|
2269
|
-
u.value.some((y) => p.key && y.field === p.key) ? (
|
|
2269
|
+
u.value.some((y) => p.key && y.field === p.key) ? (T(), Y(R(al), {
|
|
2270
2270
|
key: b,
|
|
2271
2271
|
"row-index": b,
|
|
2272
2272
|
"default-handler": {},
|
|
@@ -3069,13 +3069,13 @@ const Gr = (i) => {
|
|
|
3069
3069
|
_.isEqual(d, f) || u();
|
|
3070
3070
|
}, { deep: !0 }), (d, f) => {
|
|
3071
3071
|
const g = oe("a-tooltip"), v = oe("a-form-item"), x = oe("a-col");
|
|
3072
|
-
return
|
|
3072
|
+
return T(), Y(x, X({
|
|
3073
3073
|
key: `_col_${o.value}`
|
|
3074
3074
|
}, d.item.col ?? (d.item.span ? { span: d.item.span } : R(sl))), {
|
|
3075
3075
|
default: H(() => {
|
|
3076
3076
|
var p;
|
|
3077
3077
|
return [
|
|
3078
|
-
(
|
|
3078
|
+
(T(), Y(v, X({
|
|
3079
3079
|
key: `_item_${o.value}`,
|
|
3080
3080
|
class: [
|
|
3081
3081
|
`p-content-align-${d.item.align ?? "left"} ${d.item.forceRequired ? "p-required" : ""}`,
|
|
@@ -3089,20 +3089,20 @@ const Gr = (i) => {
|
|
|
3089
3089
|
default: H(() => {
|
|
3090
3090
|
var E, b;
|
|
3091
3091
|
return [
|
|
3092
|
-
(E = d.item.slots) != null && E.default ? (
|
|
3092
|
+
(E = d.item.slots) != null && E.default ? (T(), Y(R(U4), {
|
|
3093
3093
|
key: `_sl_${d.item.field ?? "_"}_${o.value}`,
|
|
3094
3094
|
"form-data": d.formData,
|
|
3095
3095
|
item: d.item,
|
|
3096
3096
|
"pass-delay-trigger": a,
|
|
3097
3097
|
"pass-trigger": n
|
|
3098
|
-
}, null, 8, ["form-data", "item"])) : (b = d.item.itemRender) != null && b.name ? (
|
|
3098
|
+
}, null, 8, ["form-data", "item"])) : (b = d.item.itemRender) != null && b.name ? (T(), Y(R(G4), {
|
|
3099
3099
|
key: `_re_${d.item.field ?? "_"}_${o.value}`,
|
|
3100
3100
|
"default-handler": { reset: l },
|
|
3101
3101
|
"item-render": d.item.itemRender,
|
|
3102
3102
|
"render-form-params": { data: d.formData, field: d.item.field },
|
|
3103
3103
|
onDelayTrigger: a,
|
|
3104
3104
|
onTrigger: n
|
|
3105
|
-
}, null, 8, ["default-handler", "item-render", "render-form-params"])) : (
|
|
3105
|
+
}, null, 8, ["default-handler", "item-render", "render-form-params"])) : (T(), V("span", q4))
|
|
3106
3106
|
];
|
|
3107
3107
|
}),
|
|
3108
3108
|
_: 2
|
|
@@ -3110,14 +3110,14 @@ const Gr = (i) => {
|
|
|
3110
3110
|
(p = d.item.slots) != null && p.title ? {
|
|
3111
3111
|
name: "label",
|
|
3112
3112
|
fn: H(() => [
|
|
3113
|
-
(
|
|
3113
|
+
(T(), Y(yr(d.item.slots.title)))
|
|
3114
3114
|
]),
|
|
3115
3115
|
key: "0"
|
|
3116
3116
|
} : void 0,
|
|
3117
3117
|
d.item.tooltipConfig ? {
|
|
3118
3118
|
name: "tooltip",
|
|
3119
3119
|
fn: H(() => [
|
|
3120
|
-
R(_.isFunction)(d.item.tooltipConfig.title) ? (
|
|
3120
|
+
R(_.isFunction)(d.item.tooltipConfig.title) ? (T(), Y(g, ts(X({ key: 0 }, R(_.omit)(d.item.tooltipConfig, ["title"]))), {
|
|
3121
3121
|
title: H(() => [
|
|
3122
3122
|
he("div", {
|
|
3123
3123
|
innerHTML: d.item.tooltipConfig.title()
|
|
@@ -3127,7 +3127,7 @@ const Gr = (i) => {
|
|
|
3127
3127
|
k(R(fs), { class: "cursor-pointer py-4 px-2" })
|
|
3128
3128
|
]),
|
|
3129
3129
|
_: 1
|
|
3130
|
-
}, 16)) : (
|
|
3130
|
+
}, 16)) : (T(), Y(g, ts(X({ key: 1 }, d.item.tooltipConfig)), {
|
|
3131
3131
|
default: H(() => [
|
|
3132
3132
|
k(R(fs), { class: "cursor-pointer py-4 px-2" })
|
|
3133
3133
|
]),
|
|
@@ -3215,8 +3215,8 @@ const Gr = (i) => {
|
|
|
3215
3215
|
}), (E, b) => R(n).some((y) => {
|
|
3216
3216
|
var C;
|
|
3217
3217
|
return y.field && y.itemRender || ((C = y.slots) == null ? void 0 : C.default);
|
|
3218
|
-
}) ? (
|
|
3219
|
-
(
|
|
3218
|
+
}) ? (T(), V("div", J4, [
|
|
3219
|
+
(T(), Y(R(Hi), X({
|
|
3220
3220
|
key: d.value,
|
|
3221
3221
|
ref_key: "formEl",
|
|
3222
3222
|
ref: u,
|
|
@@ -3225,7 +3225,7 @@ const Gr = (i) => {
|
|
|
3225
3225
|
default: H(() => [
|
|
3226
3226
|
k(R(Ar), { gutter: [6, 12] }, {
|
|
3227
3227
|
default: H(() => [
|
|
3228
|
-
(
|
|
3228
|
+
(T(!0), V(se, null, ge(R(n), (y, C) => (T(), Y(Ur, {
|
|
3229
3229
|
key: `_col_${y.field || C}`,
|
|
3230
3230
|
"form-data": R(l),
|
|
3231
3231
|
item: y,
|
|
@@ -3314,13 +3314,13 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3314
3314
|
table: !1,
|
|
3315
3315
|
toolbar: !1,
|
|
3316
3316
|
form: !1
|
|
3317
|
-
}), x = (
|
|
3318
|
-
_.isObject(
|
|
3319
|
-
v[M] =
|
|
3320
|
-
}) : _.isBoolean(
|
|
3321
|
-
}, p = P(), E = P(), b = P(500), y = P([]), C = P([]), w = (
|
|
3317
|
+
}), x = ($) => {
|
|
3318
|
+
_.isObject($) ? Object.keys($).forEach((M) => {
|
|
3319
|
+
v[M] = $[M];
|
|
3320
|
+
}) : _.isBoolean($) && (v.form = $, v.table = $, v.toolbar = $);
|
|
3321
|
+
}, p = P(), E = P(), b = P(500), y = P([]), C = P([]), w = ($) => {
|
|
3322
3322
|
const { ajax: M } = u.value;
|
|
3323
|
-
switch (
|
|
3323
|
+
switch ($) {
|
|
3324
3324
|
case "multiDelete":
|
|
3325
3325
|
M.multiDelete && (y.value.length > 0 ? ul({
|
|
3326
3326
|
title: "警告",
|
|
@@ -3337,27 +3337,27 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3337
3337
|
break;
|
|
3338
3338
|
}
|
|
3339
3339
|
}, I = z(() => {
|
|
3340
|
-
const
|
|
3340
|
+
const $ = [];
|
|
3341
3341
|
return Zt(l.value ?? [], (M) => {
|
|
3342
|
-
M.slots && M.slots.title && (M.field || (M.field = "__holder__" +
|
|
3343
|
-
}),
|
|
3344
|
-
}), L = P(), D = P(),
|
|
3342
|
+
M.slots && M.slots.title && (M.field || (M.field = "__holder__" + $.length), $.push(M));
|
|
3343
|
+
}), $;
|
|
3344
|
+
}), L = P(), D = P(), O = P(Ue()), S = P(Ue()), m = yt(
|
|
3345
3345
|
[
|
|
3346
|
-
...(((Se = (Ce = r.toolbarConfig) == null ? void 0 : Ce.buttons) == null ? void 0 : Se.map((
|
|
3347
|
-
...(((W = (Xt = r.toolbarConfig) == null ? void 0 : Xt.tools) == null ? void 0 : W.map((
|
|
3346
|
+
...(((Se = (Ce = r.toolbarConfig) == null ? void 0 : Ce.buttons) == null ? void 0 : Se.map(($) => $.code)) ?? []).filter(($) => $),
|
|
3347
|
+
...(((W = (Xt = r.toolbarConfig) == null ? void 0 : Xt.tools) == null ? void 0 : W.map(($) => $.code)) ?? []).filter(($) => $)
|
|
3348
3348
|
].reduce(
|
|
3349
|
-
(
|
|
3349
|
+
($, M) => ($[M] = !1, $),
|
|
3350
3350
|
{}
|
|
3351
3351
|
)
|
|
3352
|
-
), F = (
|
|
3353
|
-
m[
|
|
3352
|
+
), F = ($, M) => {
|
|
3353
|
+
m[$] = M;
|
|
3354
3354
|
}, G = () => {
|
|
3355
|
-
|
|
3355
|
+
S.value = Ue();
|
|
3356
3356
|
}, B = _.debounce(G, 100), j = z(() => {
|
|
3357
|
-
const
|
|
3357
|
+
const $ = [];
|
|
3358
3358
|
return Zt(l.value ?? [], (M) => {
|
|
3359
|
-
(M.slots && M.slots.default || M.formatter || M.cellRender) && (M.field || (M.field = "__holder__" +
|
|
3360
|
-
}),
|
|
3359
|
+
(M.slots && M.slots.default || M.formatter || M.cellRender) && (M.field || (M.field = "__holder__" + $.length), $.push(M));
|
|
3360
|
+
}), $;
|
|
3361
3361
|
}), q = yt({
|
|
3362
3362
|
page: 1,
|
|
3363
3363
|
size: ((tt = n.value) == null ? void 0 : tt.pageSize) ?? 10
|
|
@@ -3365,25 +3365,25 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3365
3365
|
() => u.value && u.value.ajax ? n.value ? "pagination" : "list" : "bad"
|
|
3366
3366
|
), Ie = Lr(), me = t, We = z(
|
|
3367
3367
|
() => C.value.filter(
|
|
3368
|
-
(
|
|
3368
|
+
($) => y.value.includes($[r.rowKey ?? "id"])
|
|
3369
3369
|
)
|
|
3370
|
-
), ce = (
|
|
3370
|
+
), ce = ($) => {
|
|
3371
3371
|
me("toolbarButtonClick", {
|
|
3372
3372
|
data: U.value,
|
|
3373
|
-
code:
|
|
3373
|
+
code: $,
|
|
3374
3374
|
selectedKeys: y.value,
|
|
3375
3375
|
records: We.value
|
|
3376
|
-
}), w(
|
|
3377
|
-
}, di = _.debounce(ce, 100), Qi = ({ key:
|
|
3376
|
+
}), w($);
|
|
3377
|
+
}, di = _.debounce(ce, 100), Qi = ({ key: $ }) => di($), ji = ($) => {
|
|
3378
3378
|
me("toolbarToolClick", {
|
|
3379
3379
|
data: U.value,
|
|
3380
|
-
code:
|
|
3380
|
+
code: $,
|
|
3381
3381
|
selectedKeys: y.value,
|
|
3382
3382
|
records: We.value
|
|
3383
|
-
}), w(
|
|
3384
|
-
}, Yt = _.debounce(ji, 100), et = P({}), Wt = ({ row:
|
|
3385
|
-
me("pick", { row:
|
|
3386
|
-
}, dt = (
|
|
3383
|
+
}), w($);
|
|
3384
|
+
}, Yt = _.debounce(ji, 100), et = P({}), Wt = ({ row: $, field: M }) => {
|
|
3385
|
+
me("pick", { row: $, field: M });
|
|
3386
|
+
}, dt = ($) => {
|
|
3387
3387
|
if (a.value && a.value.items.length > 0) {
|
|
3388
3388
|
if (a.value.customReset)
|
|
3389
3389
|
a.value.customReset();
|
|
@@ -3395,15 +3395,15 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3395
3395
|
}
|
|
3396
3396
|
me("resetQuery");
|
|
3397
3397
|
}
|
|
3398
|
-
q.page = 1,
|
|
3399
|
-
}, er = (
|
|
3400
|
-
list: _.isString(M.list) ? _.get(
|
|
3401
|
-
total: _.isString(M.total) ? _.get(
|
|
3402
|
-
result: _.isString(M.result) ? _.get(
|
|
3403
|
-
message: _.isString(M.message) ? _.get(
|
|
3398
|
+
q.page = 1, $ || gt();
|
|
3399
|
+
}, er = ($, M) => M ? {
|
|
3400
|
+
list: _.isString(M.list) ? _.get($, M.list) : _.isFunction(M.list) ? M.list($) : void 0,
|
|
3401
|
+
total: _.isString(M.total) ? _.get($, M.total) : _.isFunction(M.total) ? M.total($) : void 0,
|
|
3402
|
+
result: _.isString(M.result) ? _.get($, M.result) : _.isFunction(M.result) ? M.result($) : void 0,
|
|
3403
|
+
message: _.isString(M.message) ? _.get($, M.message) : _.isFunction(M.message) ? M.message($) : void 0
|
|
3404
3404
|
} : {
|
|
3405
|
-
list:
|
|
3406
|
-
}, zt = P(!0), tr = () => (C.value = [], y.value = [], dt()), ft = () => (q.page = 1, C.value = [], y.value = [], ze()), ir = (
|
|
3405
|
+
list: $
|
|
3406
|
+
}, zt = P(!0), tr = () => (C.value = [], y.value = [], dt()), ft = () => (q.page = 1, C.value = [], y.value = [], ze()), ir = ($, M, te) => (q.page = $.current, q.size = $.pageSize, ze()), ze = () => new Promise(($) => {
|
|
3407
3407
|
if (Me.value !== "bad") {
|
|
3408
3408
|
v.form = !0, v.table = !0;
|
|
3409
3409
|
const { ajax: M } = u.value;
|
|
@@ -3415,26 +3415,26 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3415
3415
|
te,
|
|
3416
3416
|
u.value.response
|
|
3417
3417
|
);
|
|
3418
|
-
$e ? (U.value = $e, Z.value++) : ne ? (U.value = ne, J.value = xt ?? ne.length, Z.value++) : (U.value = [], Z.value++, ke && ot.warn(ke)),
|
|
3418
|
+
$e ? (U.value = $e, Z.value++) : ne ? (U.value = ne, J.value = xt ?? ne.length, Z.value++) : (U.value = [], Z.value++, ke && ot.warn(ke)), $(U.value);
|
|
3419
3419
|
}).catch((te) => {
|
|
3420
|
-
console.error("fetchData error", te),
|
|
3420
|
+
console.error("fetchData error", te), $([]);
|
|
3421
3421
|
}).finally(() => {
|
|
3422
3422
|
v.form = !1, v.table = !1;
|
|
3423
3423
|
});
|
|
3424
3424
|
}
|
|
3425
|
-
}), gt = _.debounce(ze, 160), fi = (
|
|
3425
|
+
}), gt = _.debounce(ze, 160), fi = ($, M) => (Object.assign(et.value, $), q.page = 1, M ? Promise.resolve() : gt()), gi = z(
|
|
3426
3426
|
() => Me.value === "pagination" ? {
|
|
3427
3427
|
current: q.page,
|
|
3428
3428
|
total: J.value,
|
|
3429
3429
|
pageSize: q.size,
|
|
3430
3430
|
responsive: !1,
|
|
3431
3431
|
showSizeChanger: !0,
|
|
3432
|
-
showTotal: (
|
|
3432
|
+
showTotal: ($) => `共${$}条数据`
|
|
3433
3433
|
} : !1
|
|
3434
3434
|
), vi = {
|
|
3435
3435
|
size: "small",
|
|
3436
3436
|
sticky: !0,
|
|
3437
|
-
transformCellText: ({ text:
|
|
3437
|
+
transformCellText: ({ text: $ }) => _.isArray($) && $.length === 0 ? "-" : $
|
|
3438
3438
|
}, xi = z(
|
|
3439
3439
|
() => _.merge(
|
|
3440
3440
|
{},
|
|
@@ -3445,9 +3445,9 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3445
3445
|
type: f.value.multiple ? "checkbox" : "radio",
|
|
3446
3446
|
preserveSelectedRowKeys: !0,
|
|
3447
3447
|
selectedRowKeys: y.value,
|
|
3448
|
-
onChange: (
|
|
3449
|
-
y.value =
|
|
3450
|
-
const M = r.rowKey ?? "id", te = C.value.map((ne) => ne[M]), xt =
|
|
3448
|
+
onChange: ($) => {
|
|
3449
|
+
y.value = $;
|
|
3450
|
+
const M = r.rowKey ?? "id", te = C.value.map((ne) => ne[M]), xt = $.filter((ne) => !te.includes(ne)).map((ne) => U.value.find((ke) => ke[M] === ne)).filter((ne) => !!ne);
|
|
3451
3451
|
C.value = [...C.value, ...xt];
|
|
3452
3452
|
},
|
|
3453
3453
|
getCheckboxProps: f.value.getCheckboxProps
|
|
@@ -3466,7 +3466,7 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3466
3466
|
);
|
|
3467
3467
|
const N = () => {
|
|
3468
3468
|
var ne, ke;
|
|
3469
|
-
const
|
|
3469
|
+
const $ = (ne = p.value) == null ? void 0 : ne.parentElement, M = $ ? window.getComputedStyle($).height : "0px", te = E.value ? window.getComputedStyle(E.value).height : "0px", $e = te.includes("px") ? _.toNumber(te.replace("px", "")) : 0, xt = (ke = f.value) != null && ke.showCount ? 22 : 0;
|
|
3470
3470
|
b.value = r.renderY ?? _.toNumber(M.replace("px", "")) - o.value.fitHeight - (r.toolbarConfig ? 30 : 0) - $e - xt, zt.value = _.toNumber(M.replace("px", "")) > 600;
|
|
3471
3471
|
};
|
|
3472
3472
|
e({
|
|
@@ -3487,8 +3487,8 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3487
3487
|
});
|
|
3488
3488
|
let ee;
|
|
3489
3489
|
Ki(() => {
|
|
3490
|
-
N(), window.addEventListener("resize", N), ee = new MutationObserver((
|
|
3491
|
-
|
|
3490
|
+
N(), window.addEventListener("resize", N), ee = new MutationObserver(($) => {
|
|
3491
|
+
$.forEach((M) => {
|
|
3492
3492
|
if (M.type === "attributes" && M.attributeName === "style") {
|
|
3493
3493
|
const te = M.target;
|
|
3494
3494
|
window.getComputedStyle(te).display !== "none" && N();
|
|
@@ -3496,7 +3496,7 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3496
3496
|
});
|
|
3497
3497
|
}), p.value && ee.observe(p.value, { attributes: !0, attributeFilter: ["style"] }), dt(r.manualFetch);
|
|
3498
3498
|
});
|
|
3499
|
-
const Xe = ["align"], vt = (
|
|
3499
|
+
const Xe = ["align"], vt = ($) => $.map((M) => ({
|
|
3500
3500
|
...Xe.reduce(
|
|
3501
3501
|
(te, $e) => ({
|
|
3502
3502
|
[$e]: o.value[$e]
|
|
@@ -3507,16 +3507,16 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3507
3507
|
}));
|
|
3508
3508
|
return ea(() => {
|
|
3509
3509
|
window.removeEventListener("resize", N), ee.disconnect();
|
|
3510
|
-
}), (
|
|
3510
|
+
}), ($, M) => {
|
|
3511
3511
|
var ne, ke, es;
|
|
3512
3512
|
const te = oe("a-menu-item"), $e = oe("a-menu"), xt = oe("a-dropdown");
|
|
3513
|
-
return
|
|
3513
|
+
return T(), V("div", X({
|
|
3514
3514
|
ref_key: "boxEl",
|
|
3515
3515
|
ref: p,
|
|
3516
3516
|
class: "h-full p-wrapper flex flex-col gap-8px overflow-y-auto"
|
|
3517
3517
|
}, R(Ie)), [
|
|
3518
|
-
Me.value === "bad" ? (
|
|
3519
|
-
(ke = (ne = R(a)) == null ? void 0 : ne.items) != null && ke.some((K) => K.field && K.itemRender) ? (
|
|
3518
|
+
Me.value === "bad" ? (T(), V("div", tC, "请检查配置")) : (T(), V(se, { key: 1 }, [
|
|
3519
|
+
(ke = (ne = R(a)) == null ? void 0 : ne.items) != null && ke.some((K) => K.field && K.itemRender) ? (T(), V("div", {
|
|
3520
3520
|
key: 0,
|
|
3521
3521
|
class: "p-pane p-form-wrapper",
|
|
3522
3522
|
ref_key: "pFormWrapper",
|
|
@@ -3526,8 +3526,8 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3526
3526
|
spinning: v.form
|
|
3527
3527
|
}, {
|
|
3528
3528
|
default: H(() => [
|
|
3529
|
-
(
|
|
3530
|
-
key:
|
|
3529
|
+
(T(), Y(R(Hi), X({
|
|
3530
|
+
key: O.value,
|
|
3531
3531
|
ref_key: "formEl",
|
|
3532
3532
|
ref: L,
|
|
3533
3533
|
model: et.value
|
|
@@ -3535,7 +3535,7 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3535
3535
|
default: H(() => [
|
|
3536
3536
|
k(R(Ar), { gutter: [6, 12] }, {
|
|
3537
3537
|
default: H(() => [
|
|
3538
|
-
(
|
|
3538
|
+
(T(!0), V(se, null, ge(R(a).items, (K, Oe) => (T(), Y(Ur, {
|
|
3539
3539
|
key: `_col_${K.field || Oe}`,
|
|
3540
3540
|
"form-data": et.value,
|
|
3541
3541
|
item: K,
|
|
@@ -3551,14 +3551,14 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3551
3551
|
_: 1
|
|
3552
3552
|
}, 8, ["spinning"])
|
|
3553
3553
|
], 512)) : ie("", !0),
|
|
3554
|
-
R(h) ? (
|
|
3554
|
+
R(h) ? (T(), V("div", iC, [
|
|
3555
3555
|
he("div", rC, [
|
|
3556
|
-
R(h).buttons && R(h).buttons.length > 0 ? (
|
|
3557
|
-
K.dropdowns && K.dropdowns.length ? (
|
|
3556
|
+
R(h).buttons && R(h).buttons.length > 0 ? (T(!0), V(se, { key: 0 }, ge(R(h).buttons, (K, Oe) => (T(), V(se, { key: Oe }, [
|
|
3557
|
+
K.dropdowns && K.dropdowns.length ? (T(), Y(xt, { key: 0 }, {
|
|
3558
3558
|
overlay: H(() => [
|
|
3559
3559
|
k($e, { onClick: Qi }, {
|
|
3560
3560
|
default: H(() => [
|
|
3561
|
-
(
|
|
3561
|
+
(T(!0), V(se, null, ge(K.dropdowns, (pt) => (T(), Y(te, {
|
|
3562
3562
|
key: pt.code
|
|
3563
3563
|
}, {
|
|
3564
3564
|
default: H(() => [
|
|
@@ -3578,7 +3578,7 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3578
3578
|
loading: v.toolbar || !!K.code && m[K.code]
|
|
3579
3579
|
}, {
|
|
3580
3580
|
default: H(() => [
|
|
3581
|
-
K.icon ? (
|
|
3581
|
+
K.icon ? (T(), Y(R(ye), {
|
|
3582
3582
|
key: 0,
|
|
3583
3583
|
icon: K.icon
|
|
3584
3584
|
}, null, 8, ["icon"])) : ie("", !0),
|
|
@@ -3589,7 +3589,7 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3589
3589
|
}, 1032, ["type", "size", "disabled", "loading"])
|
|
3590
3590
|
]),
|
|
3591
3591
|
_: 2
|
|
3592
|
-
}, 1024)) : K.code ? (
|
|
3592
|
+
}, 1024)) : K.code ? (T(), Y(R(ue), {
|
|
3593
3593
|
key: 1,
|
|
3594
3594
|
type: K.type,
|
|
3595
3595
|
size: K.size ?? "middle",
|
|
@@ -3598,18 +3598,18 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3598
3598
|
onClick: (pt) => R(di)(K.code)
|
|
3599
3599
|
}, {
|
|
3600
3600
|
default: H(() => [
|
|
3601
|
-
K.icon ? (
|
|
3601
|
+
K.icon ? (T(), Y(R(ye), {
|
|
3602
3602
|
key: 0,
|
|
3603
3603
|
icon: K.icon
|
|
3604
3604
|
}, null, 8, ["icon"])) : ie("", !0),
|
|
3605
3605
|
Ne(" " + Ge(K.content), 1)
|
|
3606
3606
|
]),
|
|
3607
3607
|
_: 2
|
|
3608
|
-
}, 1032, ["type", "size", "disabled", "loading", "onClick"])) : (
|
|
3608
|
+
}, 1032, ["type", "size", "disabled", "loading", "onClick"])) : (T(), V("div", sC))
|
|
3609
3609
|
], 64))), 128)) : ie("", !0)
|
|
3610
3610
|
]),
|
|
3611
3611
|
he("span", oC, [
|
|
3612
|
-
R(h).tools && R(h).tools.length > 0 ? (
|
|
3612
|
+
R(h).tools && R(h).tools.length > 0 ? (T(!0), V(se, { key: 0 }, ge(R(h).tools, (K, Oe) => (T(), Y(R(ue), {
|
|
3613
3613
|
key: Oe,
|
|
3614
3614
|
type: K.type,
|
|
3615
3615
|
size: K.size ?? "middle",
|
|
@@ -3629,10 +3629,10 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3629
3629
|
he("div", {
|
|
3630
3630
|
class: Dr(`p-pane flex-1 ${zt.value ? "h-0" : ""} p-${R(g) ?? "inner"}-scroll`)
|
|
3631
3631
|
}, [
|
|
3632
|
-
(es = R(f)) != null && es.multiple && R(f).showCount ? (
|
|
3633
|
-
(
|
|
3634
|
-
key:
|
|
3635
|
-
"row-key":
|
|
3632
|
+
(es = R(f)) != null && es.multiple && R(f).showCount ? (T(), V("div", aC, " 已选:" + Ge(y.value.length), 1)) : ie("", !0),
|
|
3633
|
+
(T(), Y(R(Gl), X({
|
|
3634
|
+
key: S.value + "_table",
|
|
3635
|
+
"row-key": $.rowKey ?? "id",
|
|
3636
3636
|
ref_key: "tableEl",
|
|
3637
3637
|
ref: D,
|
|
3638
3638
|
columns: vt(R(l) ?? []).map((K) => R(Gr)(K)),
|
|
@@ -3649,8 +3649,8 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3649
3649
|
I.value.length > 0 ? {
|
|
3650
3650
|
name: "headerCell",
|
|
3651
3651
|
fn: H(({ column: K }) => [
|
|
3652
|
-
I.value.some((Oe) => K.key && Oe.field === K.key) ? (
|
|
3653
|
-
key:
|
|
3652
|
+
I.value.some((Oe) => K.key && Oe.field === K.key) ? (T(), Y(R(Q4), {
|
|
3653
|
+
key: S.value + "_title_" + Z.value + "_slot_" + K.key,
|
|
3654
3654
|
column: I.value.find((Oe) => K.key && Oe.field === K.key)
|
|
3655
3655
|
}, null, 8, ["column"])) : ie("", !0)
|
|
3656
3656
|
]),
|
|
@@ -3659,8 +3659,8 @@ const Di = ot.warning, tC = { key: 0 }, iC = {
|
|
|
3659
3659
|
j.value.length > 0 ? {
|
|
3660
3660
|
name: "bodyCell",
|
|
3661
3661
|
fn: H(({ column: K, record: Oe, index: pt }) => [
|
|
3662
|
-
j.value.some((rr) => K.key && rr.field === K.key) ? (
|
|
3663
|
-
key:
|
|
3662
|
+
j.value.some((rr) => K.key && rr.field === K.key) ? (T(), Y(R(al), {
|
|
3663
|
+
key: S.value + "_cell_" + Z.value + "_slot_" + K.key,
|
|
3664
3664
|
column: j.value.find((rr) => K.key && rr.field === K.key),
|
|
3665
3665
|
"default-handler": { pick: Wt, setLoadings: x },
|
|
3666
3666
|
row: Oe,
|
|
@@ -4090,14 +4090,14 @@ class qr extends yl {
|
|
|
4090
4090
|
if (this.cellType === "footer") {
|
|
4091
4091
|
let I = l, L = n;
|
|
4092
4092
|
if (typeof s == "function") {
|
|
4093
|
-
const D = s, { backgroundColor:
|
|
4093
|
+
const D = s, { backgroundColor: O, color: S } = D({
|
|
4094
4094
|
row: this.row,
|
|
4095
4095
|
rowIndex: this.rowIndex,
|
|
4096
4096
|
colIndex: this.colIndex,
|
|
4097
4097
|
column: this.column,
|
|
4098
4098
|
value: this.getValue()
|
|
4099
4099
|
}) || {};
|
|
4100
|
-
|
|
4100
|
+
O && (I = O), S && (L = S);
|
|
4101
4101
|
}
|
|
4102
4102
|
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = I, this.drawTextColor = L;
|
|
4103
4103
|
return;
|
|
@@ -5163,38 +5163,38 @@ class pC {
|
|
|
5163
5163
|
let p = t, E = t, b = n, y = n, C = [], w = 0, I = 0, L = 0, D = 0;
|
|
5164
5164
|
if (u !== 1 && v) {
|
|
5165
5165
|
D = f;
|
|
5166
|
-
const
|
|
5166
|
+
const O = l.reduce((S, m) => {
|
|
5167
5167
|
const F = this.getItemValue(s, m) ?? "";
|
|
5168
|
-
return `${
|
|
5168
|
+
return `${S}${F}`;
|
|
5169
5169
|
}, "");
|
|
5170
|
-
for (let
|
|
5171
|
-
const m = this.rowIndexRowKeyMap.get(
|
|
5170
|
+
for (let S = t - 1; S >= 0; S--) {
|
|
5171
|
+
const m = this.rowIndexRowKeyMap.get(S) || "", F = l.reduce((G, B) => {
|
|
5172
5172
|
const j = this.getItemValue(m, B) ?? "";
|
|
5173
5173
|
return `${G}${j}`;
|
|
5174
5174
|
}, "");
|
|
5175
|
-
if (
|
|
5176
|
-
p =
|
|
5175
|
+
if (O === F)
|
|
5176
|
+
p = S;
|
|
5177
5177
|
else
|
|
5178
5178
|
break;
|
|
5179
5179
|
}
|
|
5180
|
-
for (let
|
|
5181
|
-
const m = this.rowIndexRowKeyMap.get(
|
|
5180
|
+
for (let S = t; S <= this.ctx.maxRowIndex; S++) {
|
|
5181
|
+
const m = this.rowIndexRowKeyMap.get(S) || "", F = l.reduce((G, B) => {
|
|
5182
5182
|
const j = this.getItemValue(m, B) ?? "";
|
|
5183
5183
|
return `${G}${j}`;
|
|
5184
5184
|
}, "");
|
|
5185
|
-
if (
|
|
5186
|
-
E =
|
|
5185
|
+
if (O === F)
|
|
5186
|
+
E = S;
|
|
5187
5187
|
else
|
|
5188
5188
|
break;
|
|
5189
5189
|
}
|
|
5190
|
-
for (let
|
|
5191
|
-
const { height: m } = this.positions[
|
|
5190
|
+
for (let S = p; S < t; S++) {
|
|
5191
|
+
const { height: m } = this.positions[S];
|
|
5192
5192
|
w += m;
|
|
5193
5193
|
}
|
|
5194
|
-
for (let
|
|
5195
|
-
const { height: m } = this.positions[
|
|
5194
|
+
for (let S = p; S <= E; S++) {
|
|
5195
|
+
const { height: m } = this.positions[S];
|
|
5196
5196
|
L += m;
|
|
5197
|
-
const F = this.rowIndexRowKeyMap.get(
|
|
5197
|
+
const F = this.rowIndexRowKeyMap.get(S) || "", { item: G } = this.rowKeyMap.get(F), B = this.getItemValue(F, r);
|
|
5198
5198
|
C.push({
|
|
5199
5199
|
rowKey: F,
|
|
5200
5200
|
key: r,
|
|
@@ -5205,40 +5205,40 @@ class pC {
|
|
|
5205
5205
|
}
|
|
5206
5206
|
if (g !== 1 && x) {
|
|
5207
5207
|
L = d;
|
|
5208
|
-
for (let
|
|
5209
|
-
const
|
|
5210
|
-
if (
|
|
5208
|
+
for (let O = n - 1; O >= 0; O--) {
|
|
5209
|
+
const S = this.getColumnByColIndex(O);
|
|
5210
|
+
if (!S)
|
|
5211
5211
|
break;
|
|
5212
|
-
const m = this.getItemValue(s, r), F = this.getItemValue(s,
|
|
5213
|
-
if (m === F && h.includes(
|
|
5214
|
-
b =
|
|
5212
|
+
const m = this.getItemValue(s, r), F = this.getItemValue(s, S.key);
|
|
5213
|
+
if (m === F && h.includes(S.key))
|
|
5214
|
+
b = O;
|
|
5215
5215
|
else
|
|
5216
5216
|
break;
|
|
5217
5217
|
}
|
|
5218
|
-
for (let
|
|
5219
|
-
const
|
|
5220
|
-
if (
|
|
5218
|
+
for (let O = n; O <= this.ctx.maxColIndex; O++) {
|
|
5219
|
+
const S = this.getColumnByColIndex(O);
|
|
5220
|
+
if (!S)
|
|
5221
5221
|
break;
|
|
5222
|
-
const m = this.getItemValue(s, r), F = this.getItemValue(s,
|
|
5223
|
-
if (m === F && h.includes(
|
|
5224
|
-
y =
|
|
5222
|
+
const m = this.getItemValue(s, r), F = this.getItemValue(s, S.key);
|
|
5223
|
+
if (m === F && h.includes(S.key))
|
|
5224
|
+
y = O;
|
|
5225
5225
|
else
|
|
5226
5226
|
break;
|
|
5227
5227
|
}
|
|
5228
|
-
for (let
|
|
5229
|
-
const
|
|
5230
|
-
if (
|
|
5228
|
+
for (let O = b; O < n; O++) {
|
|
5229
|
+
const S = this.getColumnByColIndex(O);
|
|
5230
|
+
if (!S)
|
|
5231
5231
|
break;
|
|
5232
|
-
I +=
|
|
5232
|
+
I += S.width || 100;
|
|
5233
5233
|
}
|
|
5234
|
-
for (let
|
|
5235
|
-
const
|
|
5236
|
-
if (
|
|
5234
|
+
for (let O = b; O <= y; O++) {
|
|
5235
|
+
const S = this.getColumnByColIndex(O);
|
|
5236
|
+
if (!S)
|
|
5237
5237
|
break;
|
|
5238
|
-
D +=
|
|
5238
|
+
D += S.width || 100, C.push({
|
|
5239
5239
|
rowKey: s,
|
|
5240
|
-
key:
|
|
5241
|
-
value: this.getItemValue(s,
|
|
5240
|
+
key: S.key,
|
|
5241
|
+
value: this.getItemValue(s, S.key),
|
|
5242
5242
|
row: o
|
|
5243
5243
|
});
|
|
5244
5244
|
}
|
|
@@ -6668,8 +6668,8 @@ class SC {
|
|
|
6668
6668
|
width: this.width,
|
|
6669
6669
|
height: this.data.length ? 0 : l + x
|
|
6670
6670
|
});
|
|
6671
|
-
const
|
|
6672
|
-
this.ctx.canvasElement.setAttribute("style", `height:${
|
|
6671
|
+
const O = Math.round(e.width / w * 1e4) / 1e4, S = Math.round(e.height / w * 1e4) / 1e4;
|
|
6672
|
+
this.ctx.canvasElement.setAttribute("style", `height:${S}px;width:${O}px;`), this.ctx.paint.scale(w);
|
|
6673
6673
|
}
|
|
6674
6674
|
// 调整行的高度
|
|
6675
6675
|
initResizeRow() {
|
|
@@ -7252,14 +7252,14 @@ class OC {
|
|
|
7252
7252
|
for (let y = 0; y <= a.length - 1; y++) {
|
|
7253
7253
|
const C = a[y].length;
|
|
7254
7254
|
for (let w = 0; w <= C - 1; w++) {
|
|
7255
|
-
const I = y + t, L = w + r, D = a[y][w],
|
|
7255
|
+
const I = y + t, L = w + r, D = a[y][w], O = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
7256
7256
|
I,
|
|
7257
7257
|
L
|
|
7258
7258
|
);
|
|
7259
|
-
if (
|
|
7260
|
-
const { rowKey:
|
|
7261
|
-
this.ctx.database.getReadonly(
|
|
7262
|
-
rowKey:
|
|
7259
|
+
if (O) {
|
|
7260
|
+
const { rowKey: S, key: m } = O;
|
|
7261
|
+
this.ctx.database.getReadonly(S, m) || (s.add(S), p.push({
|
|
7262
|
+
rowKey: S,
|
|
7263
7263
|
key: m,
|
|
7264
7264
|
value: D,
|
|
7265
7265
|
row: {}
|
|
@@ -7396,9 +7396,9 @@ class OC {
|
|
|
7396
7396
|
L > l.visibleHeight && (L = l.visibleHeight);
|
|
7397
7397
|
let D = 0;
|
|
7398
7398
|
f && (g === "top" ? I = a.height + n.height - p : D = n.visibleHeight);
|
|
7399
|
-
const
|
|
7400
|
-
let
|
|
7401
|
-
w > 0 && !y ?
|
|
7399
|
+
const O = p + L - (e - D - d);
|
|
7400
|
+
let S = h, m = u;
|
|
7401
|
+
w > 0 && !y ? S = Math.floor(h + w) : C > 0 && !y && (S = Math.floor(h - C)), I > 0 ? m = Math.floor(u - I) : O > 0 && (m = Math.floor(u + O)), (Math.abs(h - S) > 2 || Math.abs(u - m) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(S, m), this.ctx.emit("adjustBoundaryPosition", r));
|
|
7402
7402
|
}
|
|
7403
7403
|
destroy() {
|
|
7404
7404
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
@@ -7826,7 +7826,7 @@ const HC = (i) => ({
|
|
|
7826
7826
|
}, g = Jr(s), v = Zr(g), x = await a.getDimensions(h), p = g === "y", E = p ? "top" : "left", b = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", C = o.reference[v] + o.reference[g] - f[g] - o.floating[v], w = f[g] - o.reference[g], I = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(h));
|
|
7827
7827
|
let L = I ? I[y] : 0;
|
|
7828
7828
|
(!L || !await (a.isElement == null ? void 0 : a.isElement(I))) && (L = n.floating[y] || o.floating[v]);
|
|
7829
|
-
const D = C / 2 - w / 2,
|
|
7829
|
+
const D = C / 2 - w / 2, O = L / 2 - x[v] / 2 - 1, S = Qt(d[E], O), m = Qt(d[b], O), F = S, G = L - x[v] - m, B = L / 2 - x[v] / 2 + D, j = Sr(F, B, G), q = !l.arrow && hi(s) != null && B !== j && o.reference[v] / 2 - (B < F ? S : m) - x[v] / 2 < 0, Z = q ? B < F ? B - F : B - G : 0;
|
|
7830
7830
|
return {
|
|
7831
7831
|
[g]: f[g] + Z,
|
|
7832
7832
|
data: {
|
|
@@ -7865,34 +7865,34 @@ const HC = (i) => ({
|
|
|
7865
7865
|
return {};
|
|
7866
7866
|
const E = Et(s), b = Dt(n), y = Et(n) === n, C = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), w = f || (y || !x ? [ki(n)] : MC(n)), I = v !== "none";
|
|
7867
7867
|
!f && I && w.push(...FC(n, x, v, C));
|
|
7868
|
-
const L = [n, ...w], D = await _l(e, p),
|
|
7869
|
-
let
|
|
7870
|
-
if (u &&
|
|
7868
|
+
const L = [n, ...w], D = await _l(e, p), O = [];
|
|
7869
|
+
let S = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
7870
|
+
if (u && O.push(D[E]), d) {
|
|
7871
7871
|
const B = AC(s, a, C);
|
|
7872
|
-
|
|
7872
|
+
O.push(D[B[0]], D[B[1]]);
|
|
7873
7873
|
}
|
|
7874
|
-
if (
|
|
7874
|
+
if (S = [...S, {
|
|
7875
7875
|
placement: s,
|
|
7876
|
-
overflows:
|
|
7877
|
-
}], !
|
|
7876
|
+
overflows: O
|
|
7877
|
+
}], !O.every((B) => B <= 0)) {
|
|
7878
7878
|
var m, F;
|
|
7879
7879
|
const B = (((m = o.flip) == null ? void 0 : m.index) || 0) + 1, j = L[B];
|
|
7880
7880
|
if (j)
|
|
7881
7881
|
return {
|
|
7882
7882
|
data: {
|
|
7883
7883
|
index: B,
|
|
7884
|
-
overflows:
|
|
7884
|
+
overflows: S
|
|
7885
7885
|
},
|
|
7886
7886
|
reset: {
|
|
7887
7887
|
placement: j
|
|
7888
7888
|
}
|
|
7889
7889
|
};
|
|
7890
|
-
let q = (F =
|
|
7890
|
+
let q = (F = S.filter((Z) => Z.overflows[0] <= 0).sort((Z, J) => Z.overflows[1] - J.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
7891
7891
|
if (!q)
|
|
7892
7892
|
switch (g) {
|
|
7893
7893
|
case "bestFit": {
|
|
7894
7894
|
var G;
|
|
7895
|
-
const Z = (G =
|
|
7895
|
+
const Z = (G = S.filter((J) => {
|
|
7896
7896
|
if (I) {
|
|
7897
7897
|
const U = Dt(J.placement);
|
|
7898
7898
|
return U === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -9413,13 +9413,13 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9413
9413
|
s.value = m, r("selectionChange", m);
|
|
9414
9414
|
}), r("ready", l));
|
|
9415
9415
|
});
|
|
9416
|
-
function
|
|
9416
|
+
function O(m) {
|
|
9417
9417
|
if (!l || !v.value)
|
|
9418
9418
|
return;
|
|
9419
9419
|
const { rowKey: F, key: G } = v.value;
|
|
9420
9420
|
l == null || l.setItemValueByEditor(F, G, m);
|
|
9421
9421
|
}
|
|
9422
|
-
const
|
|
9422
|
+
const S = () => document.body;
|
|
9423
9423
|
return Ve(
|
|
9424
9424
|
() => o.data,
|
|
9425
9425
|
(m) => {
|
|
@@ -9458,7 +9458,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9458
9458
|
}
|
|
9459
9459
|
}), (m, F) => {
|
|
9460
9460
|
const G = oe("a-empty"), B = oe("a-spin");
|
|
9461
|
-
return
|
|
9461
|
+
return T(), Y(B, { spinning: m.loading }, {
|
|
9462
9462
|
default: H(() => {
|
|
9463
9463
|
var j, q, Z, J, U, Me, Ie;
|
|
9464
9464
|
return [
|
|
@@ -9470,7 +9470,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9470
9470
|
ref_key: "eVirtTableEditorRef",
|
|
9471
9471
|
ref: d
|
|
9472
9472
|
}, [
|
|
9473
|
-
x.value.startsWith("__slot:") ? (
|
|
9473
|
+
x.value.startsWith("__slot:") ? (T(), Y(yr(
|
|
9474
9474
|
E[x.value].slots.edit({
|
|
9475
9475
|
row: v.value.row,
|
|
9476
9476
|
column: E[x.value],
|
|
@@ -9481,12 +9481,12 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9481
9481
|
bordered: !1,
|
|
9482
9482
|
style: St(y.value),
|
|
9483
9483
|
class: "ev-editor-wrapper",
|
|
9484
|
-
"get-popup-container":
|
|
9484
|
+
"get-popup-container": S,
|
|
9485
9485
|
value: v.value.value,
|
|
9486
9486
|
"onUpdate:value": F[0] || (F[0] = (me) => v.value.value = me),
|
|
9487
9487
|
cell: v.value,
|
|
9488
|
-
onBlur:
|
|
9489
|
-
}, null, 40, ["style", "value", "cell"])) : (j = R(Jt).renders[x.value]) != null && j.renderEdit ? (
|
|
9488
|
+
onBlur: O
|
|
9489
|
+
}, null, 40, ["style", "value", "cell"])) : (j = R(Jt).renders[x.value]) != null && j.renderEdit ? (T(), Y(R(f6), {
|
|
9490
9490
|
key: 1,
|
|
9491
9491
|
"cell-render": b[v.value.key],
|
|
9492
9492
|
class: "ev-editor-wrapper",
|
|
@@ -9499,8 +9499,8 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9499
9499
|
title: ((Me = (U = v.value) == null ? void 0 : U.column) == null ? void 0 : Me.title) ?? ""
|
|
9500
9500
|
},
|
|
9501
9501
|
bordered: !1,
|
|
9502
|
-
"get-popup-container":
|
|
9503
|
-
onBlur:
|
|
9502
|
+
"get-popup-container": S,
|
|
9503
|
+
onBlur: O
|
|
9504
9504
|
}, null, 8, ["cell-render", "style", "render-table-params"])) : ie("", !0)
|
|
9505
9505
|
], 512),
|
|
9506
9506
|
he("div", {
|
|
@@ -9515,21 +9515,21 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9515
9515
|
ref_key: "eVirtTableOverlayerRef",
|
|
9516
9516
|
ref: g
|
|
9517
9517
|
}, [
|
|
9518
|
-
(
|
|
9518
|
+
(T(!0), V(se, null, ge(((Ie = p.value) == null ? void 0 : Ie.views) || [], (me) => (T(), V("div", {
|
|
9519
9519
|
class: Dr(me.class),
|
|
9520
9520
|
style: St(me.style),
|
|
9521
9521
|
key: me.type
|
|
9522
9522
|
}, [
|
|
9523
|
-
(
|
|
9523
|
+
(T(!0), V(se, null, ge(me.views, (We) => (T(), V("div", {
|
|
9524
9524
|
style: St(We.style),
|
|
9525
9525
|
key: We.key
|
|
9526
9526
|
}, [
|
|
9527
|
-
(
|
|
9527
|
+
(T(!0), V(se, null, ge(We.cells, (ce) => (T(), V("div", {
|
|
9528
9528
|
class: "canvas-cell",
|
|
9529
9529
|
key: `${ce.rowKey}_${ce.key}`,
|
|
9530
9530
|
style: St(ce.style)
|
|
9531
9531
|
}, [
|
|
9532
|
-
typeof ce.render == "function" ? (
|
|
9532
|
+
typeof ce.render == "function" ? (T(), Y(yr(ce.render(ce)), {
|
|
9533
9533
|
key: 0,
|
|
9534
9534
|
bordered: !1
|
|
9535
9535
|
})) : typeof ce.render == "string" && ce.render.startsWith("slot:") ? wr(m.$slots, ce.render.replace("slot:", ""), X({
|
|
@@ -9558,7 +9558,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9558
9558
|
}, E6 = /* @__PURE__ */ de({
|
|
9559
9559
|
__name: "PCanvasGrid",
|
|
9560
9560
|
props: {
|
|
9561
|
-
|
|
9561
|
+
staticConfig: {},
|
|
9562
9562
|
manualFetch: { type: Boolean },
|
|
9563
9563
|
formConfig: {},
|
|
9564
9564
|
columns: {},
|
|
@@ -9572,7 +9572,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9572
9572
|
emits: ["toolbarButtonClick", "toolbarToolClick", "pick", "resetQuery"],
|
|
9573
9573
|
setup(i, { expose: e, emit: t }) {
|
|
9574
9574
|
var fi, gi, vi, xi, pi;
|
|
9575
|
-
const r = i, s = Lr(), o = t, { formConfig: a, pageConfig: n, columns: l, toolbarConfig: h, proxyConfig: u, config: d,
|
|
9575
|
+
const r = i, s = Lr(), o = t, { formConfig: a, pageConfig: n, columns: l, toolbarConfig: h, proxyConfig: u, config: d, staticConfig: f } = Mt(r), g = il(), v = rl(), x = P(Ue()), p = P({}), E = z(() => ({
|
|
9576
9576
|
...r,
|
|
9577
9577
|
config: {
|
|
9578
9578
|
...v,
|
|
@@ -9600,7 +9600,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9600
9600
|
}), w = yt({
|
|
9601
9601
|
page: 1,
|
|
9602
9602
|
size: ((fi = n.value) == null ? void 0 : fi.pageSize) ?? 10
|
|
9603
|
-
}), I = P(0), L = P(0), D = P([]),
|
|
9603
|
+
}), I = P(0), L = P(0), D = P([]), O = P(), S = P(), m = P(), F = P(), G = P(500), B = P({}), j = (A) => {
|
|
9604
9604
|
B.value[w.page] = A;
|
|
9605
9605
|
}, q = yt(
|
|
9606
9606
|
[
|
|
@@ -9687,20 +9687,27 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9687
9687
|
}) : Di("请选择要删除的数据"));
|
|
9688
9688
|
break;
|
|
9689
9689
|
}
|
|
9690
|
-
}, tr = z(
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9690
|
+
}, tr = z(() => !f.value || !f.value.selectable && !f.value.tree ? l.value : [f.value.selectable && f.value.tree ? {
|
|
9691
|
+
type: "tree-selection",
|
|
9692
|
+
width: 40,
|
|
9693
|
+
widthFillDisable: !0,
|
|
9694
|
+
title: ""
|
|
9695
|
+
} : f.value.selectable ? {
|
|
9696
|
+
type: "selection",
|
|
9697
|
+
width: 40,
|
|
9698
|
+
widthFillDisable: !0,
|
|
9699
|
+
title: ""
|
|
9700
|
+
} : f.value.tree ? {
|
|
9701
|
+
type: "tree",
|
|
9702
|
+
width: 40,
|
|
9703
|
+
widthFillDisable: !0,
|
|
9704
|
+
title: ""
|
|
9705
|
+
} : {
|
|
9706
|
+
type: "index",
|
|
9707
|
+
width: 40,
|
|
9708
|
+
widthFillDisable: !0,
|
|
9709
|
+
title: ""
|
|
9710
|
+
}, ...l.value]), ft = (A) => {
|
|
9704
9711
|
if (a.value && a.value.items.length > 0) {
|
|
9705
9712
|
if (a.value.customReset)
|
|
9706
9713
|
a.value.customReset();
|
|
@@ -9737,24 +9744,24 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9737
9744
|
reloadPage: Wt,
|
|
9738
9745
|
passQuery: er
|
|
9739
9746
|
},
|
|
9740
|
-
$canvasTable: z(() =>
|
|
9747
|
+
$canvasTable: z(() => S.value),
|
|
9741
9748
|
selectedRowKeys: Ie,
|
|
9742
9749
|
setBtnLoading: Z,
|
|
9743
9750
|
selectedRecords: U,
|
|
9744
|
-
$form: z(() =>
|
|
9751
|
+
$form: z(() => O.value),
|
|
9745
9752
|
getFormData: () => p.value,
|
|
9746
9753
|
setLoadings: J,
|
|
9747
9754
|
resizeTable: ze
|
|
9748
9755
|
}), (A, N) => {
|
|
9749
9756
|
var Ce, Se, Xt;
|
|
9750
9757
|
const ee = oe("a-menu-item"), Xe = oe("a-menu"), vt = oe("a-dropdown");
|
|
9751
|
-
return
|
|
9758
|
+
return T(), V("div", X({
|
|
9752
9759
|
ref_key: "boxEl",
|
|
9753
9760
|
ref: m,
|
|
9754
9761
|
class: "h-full p-wrapper flex flex-col gap-8px overflow-y-auto"
|
|
9755
9762
|
}, R(s)), [
|
|
9756
|
-
b.value === "bad" ? (
|
|
9757
|
-
(Se = (Ce = R(a)) == null ? void 0 : Ce.items) != null && Se.some((W) => W.field && W.itemRender) ? (
|
|
9763
|
+
b.value === "bad" ? (T(), V("div", g6, "请检查配置")) : (T(), V(se, { key: 1 }, [
|
|
9764
|
+
(Se = (Ce = R(a)) == null ? void 0 : Ce.items) != null && Se.some((W) => W.field && W.itemRender) ? (T(), V("div", {
|
|
9758
9765
|
key: 0,
|
|
9759
9766
|
class: "p-pane p-form-wrapper",
|
|
9760
9767
|
ref_key: "pFormWrapper",
|
|
@@ -9764,20 +9771,20 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9764
9771
|
spinning: C.form
|
|
9765
9772
|
}, {
|
|
9766
9773
|
default: H(() => [
|
|
9767
|
-
(
|
|
9774
|
+
(T(), Y(R(Hi), X({
|
|
9768
9775
|
key: x.value,
|
|
9769
9776
|
ref_key: "formEl",
|
|
9770
|
-
ref:
|
|
9777
|
+
ref: O,
|
|
9771
9778
|
model: p.value
|
|
9772
9779
|
}, y.value, { onSubmit: Me }), {
|
|
9773
9780
|
default: H(() => [
|
|
9774
9781
|
k(R(Ar), { gutter: [6, 12] }, {
|
|
9775
9782
|
default: H(() => [
|
|
9776
|
-
(
|
|
9783
|
+
(T(!0), V(se, null, ge(R(a).items, (W, tt) => (T(), Y(Ur, {
|
|
9777
9784
|
key: `_col_${W.field || tt}`,
|
|
9778
9785
|
"form-data": p.value,
|
|
9779
9786
|
item: W,
|
|
9780
|
-
onReset: N[0] || (N[0] = (
|
|
9787
|
+
onReset: N[0] || (N[0] = ($) => ft(E.value.lazyReset))
|
|
9781
9788
|
}, null, 8, ["form-data", "item"]))), 128))
|
|
9782
9789
|
]),
|
|
9783
9790
|
_: 1
|
|
@@ -9789,18 +9796,18 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9789
9796
|
_: 1
|
|
9790
9797
|
}, 8, ["spinning"])
|
|
9791
9798
|
], 512)) : ie("", !0),
|
|
9792
|
-
R(h) ? (
|
|
9799
|
+
R(h) ? (T(), V("div", v6, [
|
|
9793
9800
|
he("div", x6, [
|
|
9794
|
-
R(h).buttons && R(h).buttons.length > 0 ? (
|
|
9795
|
-
W.dropdowns && W.dropdowns.length ? (
|
|
9801
|
+
R(h).buttons && R(h).buttons.length > 0 ? (T(!0), V(se, { key: 0 }, ge(R(h).buttons, (W, tt) => (T(), V(se, { key: tt }, [
|
|
9802
|
+
W.dropdowns && W.dropdowns.length ? (T(), Y(vt, { key: 0 }, {
|
|
9796
9803
|
overlay: H(() => [
|
|
9797
9804
|
k(Xe, { onClick: di }, {
|
|
9798
9805
|
default: H(() => [
|
|
9799
|
-
(
|
|
9800
|
-
key:
|
|
9806
|
+
(T(!0), V(se, null, ge(W.dropdowns, ($) => (T(), Y(ee, {
|
|
9807
|
+
key: $.code
|
|
9801
9808
|
}, {
|
|
9802
9809
|
default: H(() => [
|
|
9803
|
-
Ne(Ge(
|
|
9810
|
+
Ne(Ge($.content), 1)
|
|
9804
9811
|
]),
|
|
9805
9812
|
_: 2
|
|
9806
9813
|
}, 1024))), 128))
|
|
@@ -9816,7 +9823,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9816
9823
|
loading: C.toolbar || !!W.code && q[W.code]
|
|
9817
9824
|
}, {
|
|
9818
9825
|
default: H(() => [
|
|
9819
|
-
W.icon ? (
|
|
9826
|
+
W.icon ? (T(), Y(R(ye), {
|
|
9820
9827
|
key: 0,
|
|
9821
9828
|
icon: W.icon
|
|
9822
9829
|
}, null, 8, ["icon"])) : ie("", !0),
|
|
@@ -9827,32 +9834,32 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9827
9834
|
}, 1032, ["type", "size", "disabled", "loading"])
|
|
9828
9835
|
]),
|
|
9829
9836
|
_: 2
|
|
9830
|
-
}, 1024)) : W.code ? (
|
|
9837
|
+
}, 1024)) : W.code ? (T(), Y(R(ue), {
|
|
9831
9838
|
key: 1,
|
|
9832
9839
|
type: W.type,
|
|
9833
9840
|
size: W.size ?? "middle",
|
|
9834
9841
|
disabled: R(h).disabled || W.disabled,
|
|
9835
9842
|
loading: C.toolbar || !!W.code && q[W.code],
|
|
9836
|
-
onClick: (
|
|
9843
|
+
onClick: ($) => R(ce)(W.code)
|
|
9837
9844
|
}, {
|
|
9838
9845
|
default: H(() => [
|
|
9839
|
-
W.icon ? (
|
|
9846
|
+
W.icon ? (T(), Y(R(ye), {
|
|
9840
9847
|
key: 0,
|
|
9841
9848
|
icon: W.icon
|
|
9842
9849
|
}, null, 8, ["icon"])) : ie("", !0),
|
|
9843
9850
|
Ne(" " + Ge(W.content), 1)
|
|
9844
9851
|
]),
|
|
9845
9852
|
_: 2
|
|
9846
|
-
}, 1032, ["type", "size", "disabled", "loading", "onClick"])) : (
|
|
9853
|
+
}, 1032, ["type", "size", "disabled", "loading", "onClick"])) : (T(), V("div", p6))
|
|
9847
9854
|
], 64))), 128)) : ie("", !0)
|
|
9848
9855
|
]),
|
|
9849
9856
|
he("span", m6, [
|
|
9850
|
-
R(h).tools && R(h).tools.length > 0 ? (
|
|
9857
|
+
R(h).tools && R(h).tools.length > 0 ? (T(!0), V(se, { key: 0 }, ge(R(h).tools, (W, tt) => (T(), Y(R(ue), {
|
|
9851
9858
|
key: tt,
|
|
9852
9859
|
type: W.type,
|
|
9853
9860
|
size: W.size ?? "middle",
|
|
9854
9861
|
disabled: R(h).disabled || W.disabled,
|
|
9855
|
-
onClick: (
|
|
9862
|
+
onClick: ($) => R(ji)(W.code),
|
|
9856
9863
|
loading: C.toolbar || !!W.code && q[W.code]
|
|
9857
9864
|
}, {
|
|
9858
9865
|
default: H(() => [
|
|
@@ -9865,10 +9872,10 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9865
9872
|
])
|
|
9866
9873
|
])) : ie("", !0),
|
|
9867
9874
|
he("div", y6, [
|
|
9868
|
-
(Xt = R(f)) != null && Xt.
|
|
9875
|
+
(Xt = R(f)) != null && Xt.selectable && R(f).showCount ? (T(), V("div", w6, " 已选:" + Ge(Ie.value.length), 1)) : ie("", !0),
|
|
9869
9876
|
k(Nl, {
|
|
9870
9877
|
ref_key: "canvasTableRef",
|
|
9871
|
-
ref:
|
|
9878
|
+
ref: S,
|
|
9872
9879
|
columns: tr.value,
|
|
9873
9880
|
config: {
|
|
9874
9881
|
...R(d),
|
|
@@ -9878,7 +9885,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9878
9885
|
data: D.value,
|
|
9879
9886
|
loading: C.table
|
|
9880
9887
|
}, null, 8, ["columns", "config", "data", "loading"]),
|
|
9881
|
-
b.value === "pagination" ? (
|
|
9888
|
+
b.value === "pagination" ? (T(), Y(R(Ul), {
|
|
9882
9889
|
key: 1,
|
|
9883
9890
|
class: "p-canvas-pagination",
|
|
9884
9891
|
size: "small",
|
|
@@ -9905,7 +9912,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9905
9912
|
}), a = z(() => t.getFormSetting(s.value));
|
|
9906
9913
|
return e({
|
|
9907
9914
|
$form: o
|
|
9908
|
-
}), (n, l) => (
|
|
9915
|
+
}), (n, l) => (T(), Y(hl, X({
|
|
9909
9916
|
ref_key: "formEl",
|
|
9910
9917
|
ref: r
|
|
9911
9918
|
}, a.value, {
|
|
@@ -9946,19 +9953,19 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9946
9953
|
...a.value,
|
|
9947
9954
|
{
|
|
9948
9955
|
...L,
|
|
9949
|
-
__index: (((D = _.max(a.value, (
|
|
9956
|
+
__index: (((D = _.max(a.value, (O) => O.__index ?? -1)) == null ? void 0 : D.__index) ?? -1) + 1
|
|
9950
9957
|
}
|
|
9951
9958
|
], n.value = w;
|
|
9952
9959
|
});
|
|
9953
9960
|
}, g = s.itemMenus ?? [
|
|
9954
9961
|
{ content: "复制", code: "copy" },
|
|
9955
9962
|
{ content: "删除", code: "delete" }
|
|
9956
|
-
], v = () => {
|
|
9957
|
-
var
|
|
9958
|
-
return ((w = o.value) == null ? void 0 :
|
|
9963
|
+
], v = (w) => {
|
|
9964
|
+
var I, L, D, O, S, m;
|
|
9965
|
+
return ((S = (O = (D = (L = (I = w == null ? void 0 : w.parentElement) == null ? void 0 : I.parentElement) == null ? void 0 : L.parentElement) == null ? void 0 : D.parentElement) == null ? void 0 : O.parentElement) == null ? void 0 : S.parentElement) ?? ((m = o.value) == null ? void 0 : m.$el) ?? document.body;
|
|
9959
9966
|
}, x = z(() => s.forceRender || a.value.length <= 5), p = (w) => {
|
|
9960
9967
|
var L;
|
|
9961
|
-
const I = (L = a.value.find((D,
|
|
9968
|
+
const I = (L = a.value.find((D, O) => O === w)) == null ? void 0 : L.__index;
|
|
9962
9969
|
re(I) && (l.value = l.value.filter((D) => D !== I));
|
|
9963
9970
|
}, E = () => {
|
|
9964
9971
|
$i().then(() => {
|
|
@@ -9986,8 +9993,8 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9986
9993
|
else
|
|
9987
9994
|
switch (w) {
|
|
9988
9995
|
case "delete":
|
|
9989
|
-
a.value = a.value.filter((
|
|
9990
|
-
h.value = h.value.filter((
|
|
9996
|
+
a.value = a.value.filter((O, S) => S !== L), $i(() => {
|
|
9997
|
+
h.value = h.value.filter((O) => !!O), L <= n.value && n.value > 0 && n.value--;
|
|
9991
9998
|
});
|
|
9992
9999
|
break;
|
|
9993
10000
|
case "copy":
|
|
@@ -9999,7 +10006,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
9999
10006
|
...a.value,
|
|
10000
10007
|
_.clone({
|
|
10001
10008
|
..._.omit(I, ["id", "__index"]),
|
|
10002
|
-
__index: (((D = _.max(a.value, (
|
|
10009
|
+
__index: (((D = _.max(a.value, (O) => O.__index ?? -1)) == null ? void 0 : D.__index) ?? -1) + 1
|
|
10003
10010
|
})
|
|
10004
10011
|
];
|
|
10005
10012
|
break;
|
|
@@ -10011,11 +10018,11 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10011
10018
|
const C = _.debounce(p, 50);
|
|
10012
10019
|
return is(() => {
|
|
10013
10020
|
var L;
|
|
10014
|
-
const w = a.value.map((D,
|
|
10021
|
+
const w = a.value.map((D, O) => l.value.includes(D.__index) ? O : void 0).filter(re), I = (L = r.value) == null ? void 0 : L.$el;
|
|
10015
10022
|
I && I.querySelectorAll(
|
|
10016
10023
|
":scope >.ant-tabs-nav>.ant-tabs-nav-wrap>.ant-tabs-nav-list>.ant-tabs-tab>.ant-tabs-tab-btn"
|
|
10017
|
-
).forEach((
|
|
10018
|
-
w.includes(
|
|
10024
|
+
).forEach((O, S) => {
|
|
10025
|
+
w.includes(S) ? O.classList.add("p-error-group-tab") : O.classList.remove("p-error-group-tab");
|
|
10019
10026
|
});
|
|
10020
10027
|
}), e({
|
|
10021
10028
|
activeKey: z(() => n.value),
|
|
@@ -10033,38 +10040,38 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10033
10040
|
return Promise.allSettled(w).then((I) => {
|
|
10034
10041
|
if (l.value = I.map(
|
|
10035
10042
|
(L, D) => {
|
|
10036
|
-
var
|
|
10037
|
-
return L.status === "rejected" && typeof ((
|
|
10043
|
+
var O;
|
|
10044
|
+
return L.status === "rejected" && typeof ((O = a.value[D]) == null ? void 0 : O.__index) == "number" ? a.value[D].__index : void 0;
|
|
10038
10045
|
}
|
|
10039
10046
|
).filter((L) => typeof L == "number"), !s.lazyErrorMark && l.value.length) {
|
|
10040
|
-
const L = l.value[0], D = a.value.findIndex((
|
|
10047
|
+
const L = l.value[0], D = a.value.findIndex((O) => O.__index === L);
|
|
10041
10048
|
D !== -1 && (n.value = D);
|
|
10042
10049
|
}
|
|
10043
10050
|
return l.value.length ? Promise.reject({ error_indexes: l.value, results: I }) : Promise.resolve(I);
|
|
10044
10051
|
});
|
|
10045
10052
|
},
|
|
10046
10053
|
validate: async (w, I) => {
|
|
10047
|
-
var D,
|
|
10054
|
+
var D, O, S;
|
|
10048
10055
|
const L = a.value.findIndex((m) => m.__index === w);
|
|
10049
10056
|
try {
|
|
10050
|
-
return await (x.value ? ((
|
|
10057
|
+
return await (x.value ? ((O = (D = h.value[L]) == null ? void 0 : D.$form) == null ? void 0 : O.validate()) ?? Promise.resolve() : ((S = t(
|
|
10051
10058
|
a.value[L],
|
|
10052
10059
|
s.getFormSetting(a.value[L]).rules
|
|
10053
|
-
)) == null ? void 0 :
|
|
10060
|
+
)) == null ? void 0 : S.validate()) ?? Promise.resolve()), l.value = l.value.filter((m) => m !== w), Promise.resolve();
|
|
10054
10061
|
} catch (m) {
|
|
10055
10062
|
return !l.value.includes(w) && !I && (l.value = [...l.value, w]), Promise.reject(m);
|
|
10056
10063
|
}
|
|
10057
10064
|
},
|
|
10058
10065
|
validateFields: async (w, I, L) => {
|
|
10059
10066
|
var F, G;
|
|
10060
|
-
const D = a.value.findIndex((B) => B.__index === w),
|
|
10067
|
+
const D = a.value.findIndex((B) => B.__index === w), S = s.getFormSetting(a.value[D]).rules, m = t(a.value[D], S);
|
|
10061
10068
|
try {
|
|
10062
10069
|
return await (x.value ? ((G = (F = h.value[D]) == null ? void 0 : F.$form) == null ? void 0 : G.validateFields(I)) ?? Promise.resolve() : Promise.allSettled(
|
|
10063
10070
|
I.map(
|
|
10064
10071
|
(B) => m.validateField(
|
|
10065
10072
|
B,
|
|
10066
10073
|
a.value[D][B],
|
|
10067
|
-
|
|
10074
|
+
S[B] ?? []
|
|
10068
10075
|
)
|
|
10069
10076
|
)
|
|
10070
10077
|
)), Promise.resolve();
|
|
@@ -10074,17 +10081,17 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10074
10081
|
}
|
|
10075
10082
|
}), (w, I) => {
|
|
10076
10083
|
const L = oe("a-spin");
|
|
10077
|
-
return
|
|
10084
|
+
return T(), Y(R(ql), {
|
|
10078
10085
|
ref_key: "rootRef",
|
|
10079
10086
|
ref: o,
|
|
10080
10087
|
title: w.title,
|
|
10081
10088
|
size: "small"
|
|
10082
10089
|
}, {
|
|
10083
10090
|
default: H(() => [
|
|
10084
|
-
w.loading ? (
|
|
10091
|
+
w.loading ? (T(), Y(L, {
|
|
10085
10092
|
key: 0,
|
|
10086
10093
|
class: "w-full"
|
|
10087
|
-
})) : (
|
|
10094
|
+
})) : (T(), Y(R(Zl), {
|
|
10088
10095
|
key: 1,
|
|
10089
10096
|
ref_key: "tabsRef",
|
|
10090
10097
|
ref: r,
|
|
@@ -10096,7 +10103,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10096
10103
|
}, {
|
|
10097
10104
|
rightExtra: H(() => [
|
|
10098
10105
|
wr(w.$slots, "rightExtra", {}, () => [
|
|
10099
|
-
w.showAdd && a.value.length < d.value ? (
|
|
10106
|
+
w.showAdd && a.value.length < d.value ? (T(), Y(R(ue), {
|
|
10100
10107
|
key: 0,
|
|
10101
10108
|
type: "link",
|
|
10102
10109
|
onClick: I[0] || (I[0] = (D) => f(a.value.length))
|
|
@@ -10110,29 +10117,29 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10110
10117
|
])
|
|
10111
10118
|
]),
|
|
10112
10119
|
default: H(() => [
|
|
10113
|
-
(
|
|
10114
|
-
key:
|
|
10115
|
-
tab: `${w.tabLabel} ${w.keepSerial ?
|
|
10120
|
+
(T(!0), V(se, null, ge(a.value, (D, O) => (T(), Y(R(Jl), {
|
|
10121
|
+
key: O,
|
|
10122
|
+
tab: `${w.tabLabel} ${w.keepSerial ? O + 1 : (D.__index ?? 0) + 1}`,
|
|
10116
10123
|
"force-render": x.value
|
|
10117
10124
|
}, {
|
|
10118
10125
|
closeIcon: H(() => {
|
|
10119
|
-
var
|
|
10126
|
+
var S;
|
|
10120
10127
|
return [
|
|
10121
|
-
w.editAble && ((
|
|
10128
|
+
w.editAble && ((S = R(g)) != null && S.length) ? (T(), Y(R(ia), {
|
|
10122
10129
|
key: 0,
|
|
10123
10130
|
"get-popup-container": v
|
|
10124
10131
|
}, {
|
|
10125
10132
|
overlay: H(() => [
|
|
10126
10133
|
k(R(Ql), {
|
|
10127
|
-
onClick: (m) => R(y)(m, D,
|
|
10134
|
+
onClick: (m) => R(y)(m, D, O)
|
|
10128
10135
|
}, {
|
|
10129
10136
|
default: H(() => [
|
|
10130
|
-
(
|
|
10137
|
+
(T(!0), V(se, null, ge(R(g).filter(
|
|
10131
10138
|
(m) => {
|
|
10132
10139
|
var F;
|
|
10133
|
-
return ((F = m.visibleMethod) == null ? void 0 : F.call(m, { data: D, index:
|
|
10140
|
+
return ((F = m.visibleMethod) == null ? void 0 : F.call(m, { data: D, index: O })) ?? !0;
|
|
10134
10141
|
}
|
|
10135
|
-
), (m) => (
|
|
10142
|
+
), (m) => (T(), Y(R(jl), {
|
|
10136
10143
|
key: m.code
|
|
10137
10144
|
}, {
|
|
10138
10145
|
default: H(() => [
|
|
@@ -10152,15 +10159,15 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10152
10159
|
];
|
|
10153
10160
|
}),
|
|
10154
10161
|
default: H(() => [
|
|
10155
|
-
(
|
|
10162
|
+
(T(), Y(Kl, {
|
|
10156
10163
|
ref_for: !0,
|
|
10157
10164
|
ref_key: "blockInstance",
|
|
10158
10165
|
ref: h,
|
|
10159
|
-
key:
|
|
10166
|
+
key: O,
|
|
10160
10167
|
source: D,
|
|
10161
10168
|
"get-form-setting": w.getFormSetting,
|
|
10162
|
-
onFocusCapture: (
|
|
10163
|
-
onClickCapture: (
|
|
10169
|
+
onFocusCapture: (S) => R(C)(O),
|
|
10170
|
+
onClickCapture: (S) => R(C)(O)
|
|
10164
10171
|
}, null, 8, ["source", "get-form-setting", "onFocusCapture", "onClickCapture"]))
|
|
10165
10172
|
]),
|
|
10166
10173
|
_: 2
|
|
@@ -10222,7 +10229,7 @@ const f6 = /* @__PURE__ */ de((i, {
|
|
|
10222
10229
|
hide: () => {
|
|
10223
10230
|
h.modal = !1;
|
|
10224
10231
|
}
|
|
10225
|
-
}), (v, x) => (
|
|
10232
|
+
}), (v, x) => (T(), Y(R(ra), {
|
|
10226
10233
|
open: h.modal,
|
|
10227
10234
|
"onUpdate:open": x[0] || (x[0] = (p) => h.modal = p),
|
|
10228
10235
|
"destroy-on-close": "",
|