@web-utils/form-ui 1.0.0-beta75 → 1.0.0-beta77
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/chunks/{CzA5Lt_l2.mjs → B-WTB0ce2.mjs} +1 -1
- package/chunks/{DjFlEzPM2.mjs → BK6DiJfX2.mjs} +3 -3
- package/chunks/{aG2VZRRm2.mjs → BLBHnUme2.mjs} +1 -1
- package/chunks/{CMyOgBni2.mjs → BM8snKHN2.mjs} +1 -1
- package/chunks/{CEDZmNDG2.mjs → BTNnujZA2.mjs} +1 -1
- package/chunks/{DS86zxjN2.mjs → BVsvRLea2.mjs} +2 -2
- package/chunks/{BCI1maFm2.mjs → BaB0bq4I2.mjs} +1 -1
- package/chunks/{B2p5StJk2.mjs → BvlU_Z6D2.mjs} +1 -1
- package/chunks/{B5gBCT5G2.mjs → CI-pH-gR2.mjs} +1 -1
- package/chunks/{BA_en_FG2.mjs → CVM0lwn22.mjs} +1 -1
- package/chunks/{CizBLN6J2.mjs → CWaId08S2.mjs} +1 -1
- package/chunks/{Dv-_PE3-.mjs → CeEYChF4.mjs} +2 -2
- package/chunks/{Bh4XihEh.mjs → Cg6ahpHk.mjs} +1 -1
- package/chunks/{BoXQg1h12.mjs → CoPlnbwi2.mjs} +2 -2
- package/chunks/{C_UxYEd72.mjs → D5_ezGUV2.mjs} +2 -2
- package/chunks/{DCTK5oyK.mjs → DMDsZeqv.mjs} +1 -1
- package/chunks/{CfxgQ-wf2.mjs → DP7eF99m2.mjs} +1 -1
- package/chunks/{CstdEG9K2.mjs → DRXM1Mt22.mjs} +1 -1
- package/chunks/{nZTrOKQf2.mjs → DS4Iw8Y42.mjs} +66 -66
- package/chunks/{Cfz-cav7.mjs → Dgwcljur.mjs} +63 -41
- package/chunks/{_BhTD9wf.mjs → Dhdoa4M6.mjs} +1 -1
- package/chunks/{UCeucUsB.mjs → Dpzw7Rtp.mjs} +1 -1
- package/chunks/{BbO6NHlx2.mjs → JjnlFlI02.mjs} +109 -109
- package/chunks/{VbE4wwJT2.mjs → kAaQhLJs2.mjs} +1 -1
- package/chunks/{Cjxblk9N2.mjs → lPQBM7xc2.mjs} +2 -2
- package/chunks/{CBsdczGQ.mjs → ohCkWdwS.mjs} +1 -1
- package/chunks/{Bp4VotK62.mjs → uDwSrV7X2.mjs} +2 -2
- package/chunks/{C6AxHCkY2.mjs → x2jJ6cfy2.mjs} +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/helper/input.d.ts +3 -1
- package/helper/input.mjs +1 -1
- package/helper/sub-table-plus.d.ts +1 -1
- package/index.css +1 -1
- package/index.mjs +28 -28
- package/package.json +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-view/index.mjs +1 -1
- package/tag-render/index.mjs +15 -16
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +36 -37
|
@@ -3,16 +3,15 @@ import { formItemProps as r, predicate as i, useFormItemAutoBind as a } from "..
|
|
|
3
3
|
import { colProps as o, predicate as s, useColAutoBind as c } from "../props/col.mjs";
|
|
4
4
|
import { formHolderContextKey as l, formItemConfigProviderContextKey as u, formItemGroupContextKey as d, formViewContextKey as f } from "../constants/index.mjs";
|
|
5
5
|
import { useFormItemProps as p, useRequired as m } from "../helper/form-item.mjs";
|
|
6
|
-
import { ElCol as h, ElFormItem as g, ElTooltip as _ } from "element-plus/es";
|
|
6
|
+
import { ElCol as h, ElFormItem as g, ElTooltip as _, rowContextKey as v } from "element-plus/es";
|
|
7
7
|
import "element-plus/es/components/base/style/css";
|
|
8
|
-
import { computed as
|
|
8
|
+
import { computed as y, createVNode as b, h as x, inject as S, mergeProps as C, toRef as w, useTemplateRef as T } from "vue";
|
|
9
9
|
import "element-plus/es/components/col/style/css";
|
|
10
10
|
import "element-plus/es/components/tooltip/style/css";
|
|
11
11
|
import "element-plus/es/components/form-item/style/css";
|
|
12
|
-
import { rowContextKey as E } from "element-plus";
|
|
13
12
|
//#endregion
|
|
14
13
|
//#region src/components/form/FormItemX.vue
|
|
15
|
-
var
|
|
14
|
+
var E = {
|
|
16
15
|
name: "FormItemX",
|
|
17
16
|
inheritAttrs: !1,
|
|
18
17
|
props: {
|
|
@@ -20,9 +19,9 @@ var D = {
|
|
|
20
19
|
...o
|
|
21
20
|
},
|
|
22
21
|
setup(e, { attrs: t, slots: n, expose: r }) {
|
|
23
|
-
let o =
|
|
22
|
+
let o = S(v, null), d = S(u, null), f = S(l, null), p = t.embed ? y(() => t.disabled) : O(e), x = a(e, { predicate: i }), w = c(e, { predicate: s }), E = y(() => (d == null ? void 0 : d.reactive) === !0 && d.block === !1 && e.fixedSpan === void 0 && !e.half), D = m(e), k = T("formItem"), A = y(() => (d == null ? void 0 : d.wrapCol) === !1 ? !1 : !!o && e.wrapCol), j = y(() => f != null && f.tableForm ? "" : d != null && d.block ? "100%" : e.half && A.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), M = y(() => (d == null ? void 0 : d.block) === !0 || e.block || e.half ? 24 : e.span), N = y(() => {
|
|
24
23
|
if (p.value) return [];
|
|
25
|
-
if (
|
|
24
|
+
if (D.value) {
|
|
26
25
|
let t = {
|
|
27
26
|
required: !0,
|
|
28
27
|
message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
|
|
@@ -32,59 +31,79 @@ var D = {
|
|
|
32
31
|
return e.rules;
|
|
33
32
|
});
|
|
34
33
|
return r({
|
|
35
|
-
clearValidate:
|
|
34
|
+
clearValidate: () => {
|
|
36
35
|
var e;
|
|
37
|
-
|
|
36
|
+
return (e = k.value) == null ? void 0 : e.clearValidate();
|
|
38
37
|
},
|
|
39
|
-
validate:
|
|
38
|
+
validate: () => {
|
|
40
39
|
var e;
|
|
41
|
-
|
|
42
|
-
}
|
|
40
|
+
return (e = k.value) == null ? void 0 : e.validate();
|
|
41
|
+
},
|
|
42
|
+
resetField: () => {
|
|
43
|
+
var e;
|
|
44
|
+
return (e = k.value) == null ? void 0 : e.resetField();
|
|
45
|
+
},
|
|
46
|
+
setInitialValue: () => {
|
|
47
|
+
var e;
|
|
48
|
+
return (e = k.value) == null ? void 0 : e.setInitialValue();
|
|
49
|
+
},
|
|
50
|
+
size: y(() => {
|
|
51
|
+
var e;
|
|
52
|
+
return (e = k.value) == null ? void 0 : e.size;
|
|
53
|
+
}),
|
|
54
|
+
validateMessage: y(() => {
|
|
55
|
+
var e;
|
|
56
|
+
return (e = k.value) == null ? void 0 : e.validateMessage;
|
|
57
|
+
}),
|
|
58
|
+
validateState: y(() => {
|
|
59
|
+
var e;
|
|
60
|
+
return (e = k.value) == null ? void 0 : e.validateState;
|
|
61
|
+
})
|
|
43
62
|
}), () => {
|
|
44
63
|
var r;
|
|
45
|
-
let i = n.tips || e.tips, a = i ?
|
|
64
|
+
let i = n.tips || e.tips, a = i ? b(_, {
|
|
46
65
|
effect: "light",
|
|
47
66
|
content: e.tips,
|
|
48
67
|
offset: 4
|
|
49
68
|
}, {
|
|
50
|
-
default: () =>
|
|
69
|
+
default: () => b("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
51
70
|
content: n.tips ? n.tips : null
|
|
52
|
-
}) : null, o =
|
|
71
|
+
}) : null, o = b(g, C(x.value, t, {
|
|
53
72
|
ref: "formItem",
|
|
54
|
-
style: { width:
|
|
73
|
+
style: { width: j.value },
|
|
55
74
|
class: [
|
|
56
75
|
"form-item",
|
|
57
76
|
e.formItemClass,
|
|
58
77
|
{
|
|
59
78
|
"form-item-hide-label": e.hideLabel,
|
|
60
79
|
"with-tips": !e.tipsAfterLabel && i,
|
|
61
|
-
required: p.value === !1 &&
|
|
80
|
+
required: p.value === !1 && D.value
|
|
62
81
|
}
|
|
63
82
|
],
|
|
64
|
-
rules:
|
|
83
|
+
rules: N.value
|
|
65
84
|
}), {
|
|
66
85
|
...n,
|
|
67
86
|
default: () => {
|
|
68
87
|
var t;
|
|
69
88
|
return [(t = n.default) == null ? void 0 : t.call(n, {
|
|
70
89
|
disabled: p.value,
|
|
71
|
-
required:
|
|
90
|
+
required: D.value
|
|
72
91
|
}), i && !e.tipsAfterLabel ? a : null];
|
|
73
92
|
},
|
|
74
93
|
label: () => [n.label ? n.label() : e.label, e.tipsAfterLabel ? a : null]
|
|
75
94
|
}), s = [o, (r = n.below) == null ? void 0 : r.call(n)];
|
|
76
|
-
return e.unwrap ? s :
|
|
95
|
+
return e.unwrap ? s : A.value ? b(h, C(w.value, E.value ? {
|
|
77
96
|
xs: 24,
|
|
78
97
|
sm: 12,
|
|
79
98
|
md: 12,
|
|
80
99
|
lg: 8,
|
|
81
100
|
xl: 6
|
|
82
|
-
} : {}, { span:
|
|
101
|
+
} : {}, { span: M.value }), { default: () => s }) : o;
|
|
83
102
|
};
|
|
84
103
|
}
|
|
85
|
-
},
|
|
86
|
-
let t =
|
|
87
|
-
return
|
|
104
|
+
}, D = "update:modelValue", O = (e) => {
|
|
105
|
+
let t = S(l, null), n = S(d, null);
|
|
106
|
+
return y(() => {
|
|
88
107
|
if (e.disabled !== void 0) return e.disabled;
|
|
89
108
|
if (t) {
|
|
90
109
|
if (t.requiredFieldsMap[e.prop] === !0 || t.enabledFieldsMap[e.prop] === !0) return !1;
|
|
@@ -92,18 +111,19 @@ var D = {
|
|
|
92
111
|
}
|
|
93
112
|
return (n == null ? void 0 : n.enabled) === !0 ? !1 : (n == null ? void 0 : n.disabled) === !0 ? !0 : (t == null ? void 0 : t.disabled) === !0;
|
|
94
113
|
});
|
|
95
|
-
},
|
|
114
|
+
}, k = { [D]: null }, A = (e, t) => e(D, t), j = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i, ref: a }) => e.wrapFormItem ? x(E, {
|
|
96
115
|
...n.value,
|
|
97
116
|
embed: !0,
|
|
98
|
-
disabled: i == null ? void 0 : i.value
|
|
117
|
+
disabled: i == null ? void 0 : i.value,
|
|
118
|
+
ref: a
|
|
99
119
|
}, {
|
|
100
120
|
default: () => t,
|
|
101
121
|
label: r.label,
|
|
102
122
|
error: r.error,
|
|
103
123
|
tips: r.tips,
|
|
104
124
|
below: r.below
|
|
105
|
-
}) : t,
|
|
106
|
-
let
|
|
125
|
+
}) : t, M = (r, { emit: i, slots: a, events: o, predicate: s, removeOn: c = !1, attrs: l, block: u, class: d, rules: m, messagePrefix: g = "请输入", extraFormItemProps: _ }) => {
|
|
126
|
+
let v = O(r), b = S(f, null), C = y(() => v.value || r.placeholder === !1 ? "" : r.placeholder === !0 ? `${g}${r.label}` : r.placeholder ?? `${g}${r.label}`), E = p(r, {
|
|
107
127
|
rules: m,
|
|
108
128
|
block: w(() => u === void 0 ? r.type === "textarea" && r.block === void 0 ? !0 : r.block : u),
|
|
109
129
|
attrs: l,
|
|
@@ -111,23 +131,25 @@ var D = {
|
|
|
111
131
|
message: C.value,
|
|
112
132
|
messagePrefix: g,
|
|
113
133
|
..._
|
|
114
|
-
}),
|
|
115
|
-
vNodes:
|
|
116
|
-
formItemProps:
|
|
134
|
+
}), D = (e) => A(i, e), k = (e) => r.col ? x(h, { span: r.block ? 24 : r.span }, { default: () => e }) : e, M = T("formItem"), N = ({ vNodes: e }) => j(r, {
|
|
135
|
+
vNodes: k(e),
|
|
136
|
+
formItemProps: E,
|
|
117
137
|
slots: a,
|
|
118
|
-
disabled:
|
|
119
|
-
|
|
138
|
+
disabled: v,
|
|
139
|
+
ref: "formItem"
|
|
140
|
+
}), P = y(() => n(r, s, o, i)), F = e({ removeOn: c });
|
|
120
141
|
return {
|
|
121
|
-
emitInput:
|
|
122
|
-
render:
|
|
142
|
+
emitInput: D,
|
|
143
|
+
render: N,
|
|
123
144
|
placeholder: C,
|
|
124
|
-
disabled:
|
|
125
|
-
formItemProps:
|
|
126
|
-
autoBind:
|
|
145
|
+
disabled: v,
|
|
146
|
+
formItemProps: E,
|
|
147
|
+
autoBind: P,
|
|
127
148
|
inputProps: t(r, s),
|
|
128
|
-
listeners:
|
|
129
|
-
|
|
149
|
+
listeners: F,
|
|
150
|
+
formItem: M,
|
|
151
|
+
printing: y(() => (b == null ? void 0 : b.printing) === !0)
|
|
130
152
|
};
|
|
131
|
-
},
|
|
153
|
+
}, N = (e) => e.icon ? x("i", { class: e.icon }) : null;
|
|
132
154
|
//#endregion
|
|
133
|
-
export {
|
|
155
|
+
export { O as a, A as i, k as n, M as o, j as r, E as s, N as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { allProps as e, predicate as t } from "../props/checkbox.mjs";
|
|
2
|
-
import { n, o as r } from "./
|
|
2
|
+
import { n, o as r } from "./Dgwcljur.mjs";
|
|
3
3
|
import { ElCheckbox as i } from "element-plus/es";
|
|
4
4
|
import "element-plus/es/components/base/style/css";
|
|
5
5
|
import { createVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, o as t, t as n } from "./
|
|
1
|
+
import { n as e, o as t, t as n } from "./Dgwcljur.mjs";
|
|
2
2
|
import { allProps as r, predicate as i } from "../props/input.mjs";
|
|
3
3
|
import { ElInput as a } from "element-plus/es";
|
|
4
4
|
import "element-plus/es/components/base/style/css";
|
|
@@ -4,20 +4,20 @@ import { t as n } from "./Cb7kjZa-.mjs";
|
|
|
4
4
|
import { cellClickHandlerContextKey as r } from "../constants/index.mjs";
|
|
5
5
|
import { t as i } from "./mnqSaATq.mjs";
|
|
6
6
|
import { t as a } from "./tzjUpVIj.mjs";
|
|
7
|
-
import { n as o } from "./
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
7
|
+
import { n as o } from "./Dgwcljur.mjs";
|
|
8
|
+
import { t as ee } from "./ohCkWdwS.mjs";
|
|
9
|
+
import { t as s } from "./Dhdoa4M6.mjs";
|
|
10
|
+
import { t as c } from "./Dpzw7Rtp.mjs";
|
|
11
|
+
import { t as l } from "./CeEYChF4.mjs";
|
|
12
|
+
import { t as u } from "./DMDsZeqv.mjs";
|
|
13
|
+
import { t as d } from "./BTNnujZA2.mjs";
|
|
14
|
+
import { t as f } from "./D5_ezGUV2.mjs";
|
|
15
|
+
import { t as p } from "./BaB0bq4I2.mjs";
|
|
16
|
+
import m from "../table-column-def/index.mjs";
|
|
17
|
+
import { formContextKey as h, formItemContextKey as g } from "element-plus/es";
|
|
18
|
+
import { Fragment as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as S, createTextVNode as C, createVNode as w, mergeProps as T, normalizeClass as E, openBlock as D, renderList as O, renderSlot as k, resolveComponent as A, toDisplayString as j, toHandlers as M, withCtx as N, withModifiers as P } from "vue";
|
|
19
|
+
import { findTreeChildren as F, isFunction as I } from "@web-utils/core";
|
|
20
|
+
import { cloneDeep as L } from "@web-utils/integrations/lodash";
|
|
21
21
|
//#region src/components/table/sub-table-plus.ts
|
|
22
22
|
var R = {
|
|
23
23
|
modelValue: Array,
|
|
@@ -50,11 +50,11 @@ var R = {
|
|
|
50
50
|
name: "SubTablePlus",
|
|
51
51
|
inject: {
|
|
52
52
|
elForm: {
|
|
53
|
-
from:
|
|
53
|
+
from: h,
|
|
54
54
|
default: ""
|
|
55
55
|
},
|
|
56
56
|
elFormItem: {
|
|
57
|
-
from:
|
|
57
|
+
from: g,
|
|
58
58
|
default: ""
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -115,7 +115,7 @@ var R = {
|
|
|
115
115
|
},
|
|
116
116
|
methods: {
|
|
117
117
|
getCellType(e, t) {
|
|
118
|
-
return
|
|
118
|
+
return I(t.getType) ? t.getType(e, t) : t.type;
|
|
119
119
|
},
|
|
120
120
|
getInputAttr(e, t, n) {
|
|
121
121
|
var r;
|
|
@@ -148,7 +148,7 @@ var R = {
|
|
|
148
148
|
if (this.fetchApi) this.addRow();
|
|
149
149
|
else {
|
|
150
150
|
var n;
|
|
151
|
-
let e =
|
|
151
|
+
let e = L(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
|
|
152
152
|
t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -174,14 +174,14 @@ var R = {
|
|
|
174
174
|
},
|
|
175
175
|
getVal(e, t, n) {
|
|
176
176
|
var r, i;
|
|
177
|
-
if (
|
|
177
|
+
if (I(n.getVal)) return n.getVal(e, t, n);
|
|
178
178
|
if (n.type === "select" && (r = n.attrs) != null && r.options) {
|
|
179
179
|
let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
|
|
180
180
|
if (r) return r.label || r.name;
|
|
181
181
|
}
|
|
182
182
|
if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
|
|
183
183
|
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
184
|
-
let [r] =
|
|
184
|
+
let [r] = F(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
185
185
|
if (r) return r[n.attrs.valueKey || "label"];
|
|
186
186
|
}
|
|
187
187
|
return e[t.property];
|
|
@@ -214,14 +214,14 @@ var R = {
|
|
|
214
214
|
"border-top": "none"
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
|
-
function q(e, t, r, o,
|
|
217
|
+
function q(e, t, r, o, h, g) {
|
|
218
218
|
var F, I;
|
|
219
|
-
let L = i, R =
|
|
220
|
-
return
|
|
221
|
-
|
|
219
|
+
let L = i, R = c, z = s, q = f, J = A("FormInputUser"), Y = A("FormInputDepartment"), X = p, Z = u, Q = ee, te = l, ne = d, re = a, $ = m, ie = n;
|
|
220
|
+
return D(), b("div", { class: E(["sub-table-plus", { "hide-message": !e.showMessage }]) }, [
|
|
221
|
+
w(ie, T(e.$attrs, {
|
|
222
222
|
ref: "table",
|
|
223
223
|
"auto-height": "",
|
|
224
|
-
data: e.fetchApi ? null :
|
|
224
|
+
data: e.fetchApi ? null : h.rows,
|
|
225
225
|
api: e.fetchApi,
|
|
226
226
|
"payload-style": "body",
|
|
227
227
|
"show-summary": e.showSummary,
|
|
@@ -232,11 +232,11 @@ function q(e, t, r, o, N, P) {
|
|
|
232
232
|
"hide-on-single-page": "",
|
|
233
233
|
selection: e.selection,
|
|
234
234
|
index: e.index,
|
|
235
|
-
"row-db-click":
|
|
236
|
-
onRowDblclick:
|
|
237
|
-
},
|
|
238
|
-
default:
|
|
239
|
-
|
|
235
|
+
"row-db-click": g.rowDbClick,
|
|
236
|
+
onRowDblclick: g.rowDbClick
|
|
237
|
+
}, M(g.listeners), { onSelectionChange: g.onSelectionChange }), S({
|
|
238
|
+
default: N(() => [
|
|
239
|
+
k(e.$slots, "columns", { columns: e.columns }, () => [(D(!0), b(_, null, O(g.filteredColumns, (t) => (D(), v($, {
|
|
240
240
|
key: t.prop,
|
|
241
241
|
label: t.label,
|
|
242
242
|
width: t.width,
|
|
@@ -247,16 +247,16 @@ function q(e, t, r, o, N, P) {
|
|
|
247
247
|
options: t.options,
|
|
248
248
|
"show-overflow-tooltip": !t.editable && t.showOverflowTooltip
|
|
249
249
|
}, {
|
|
250
|
-
header:
|
|
251
|
-
default:
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
header: N(() => [!e.disabled && t.required ? (D(), b("span", U, "*")) : y("v-if", !0), x("span", { title: t.label }, j(t.label), 9, W)]),
|
|
251
|
+
default: N(({ row: n, column: r, $index: i }) => [
|
|
252
|
+
y("tag 插槽"),
|
|
253
|
+
k(e.$slots, "tag", {
|
|
254
254
|
row: n,
|
|
255
255
|
column: r,
|
|
256
256
|
index: i
|
|
257
257
|
}),
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
y("列默认插槽,名字和 prop 保持一致"),
|
|
259
|
+
k(e.$slots, t.prop, {
|
|
260
260
|
row: n,
|
|
261
261
|
column: r,
|
|
262
262
|
wrapCol: !1,
|
|
@@ -266,78 +266,78 @@ function q(e, t, r, o, N, P) {
|
|
|
266
266
|
editable: t.editable
|
|
267
267
|
}, () => {
|
|
268
268
|
var e;
|
|
269
|
-
return [
|
|
269
|
+
return [g.enabled && t.editable === !0 ? (D(), b(_, { key: 0 }, [g.getCellType(n, t) === "input" ? (D(), v(R, T({
|
|
270
270
|
key: 0,
|
|
271
271
|
ref_for: !0
|
|
272
|
-
},
|
|
273
|
-
onBlur: () =>
|
|
274
|
-
"onUpdate:modelValue": (e) =>
|
|
275
|
-
}), null, 16, ["onBlur", "onUpdate:modelValue"])) :
|
|
272
|
+
}, g.getInputAttr(n, t, i), {
|
|
273
|
+
onBlur: () => g.onBlur(n, t),
|
|
274
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
275
|
+
}), null, 16, ["onBlur", "onUpdate:modelValue"])) : g.getCellType(n, t) === "checkbox1" ? (D(), v(z, T({
|
|
276
276
|
key: 1,
|
|
277
277
|
ref_for: !0
|
|
278
|
-
},
|
|
278
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "inputPhoneNumber" ? (D(), v(q, T({
|
|
279
279
|
key: 2,
|
|
280
280
|
ref_for: !0
|
|
281
|
-
},
|
|
281
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "user" ? (D(), b(_, { key: 3 }, [t.single ? (D(), v(J, T({
|
|
282
282
|
key: 0,
|
|
283
283
|
ref_for: !0
|
|
284
|
-
},
|
|
284
|
+
}, g.getInputAttr(n, t, i), {
|
|
285
285
|
id: n[r.idProp || `${r.property}Id`],
|
|
286
286
|
"onUpdate:id": (e) => n[r.idProp || `${r.property}Id`] = e,
|
|
287
287
|
name: n[r.property],
|
|
288
288
|
"onUpdate:name": (e) => n[r.property] = e,
|
|
289
|
-
"onUpdate:modelValue": (e) =>
|
|
289
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
290
290
|
}), null, 16, [
|
|
291
291
|
"id",
|
|
292
292
|
"onUpdate:id",
|
|
293
293
|
"name",
|
|
294
294
|
"onUpdate:name",
|
|
295
295
|
"onUpdate:modelValue"
|
|
296
|
-
])) : (
|
|
296
|
+
])) : (D(), v(J, T({
|
|
297
297
|
key: 1,
|
|
298
298
|
ref_for: !0
|
|
299
|
-
},
|
|
299
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"]))], 64)) : g.getCellType(n, t) === "department" ? (D(), b(_, { key: 4 }, [t.single ? (D(), v(Y, T({
|
|
300
300
|
key: 0,
|
|
301
301
|
ref_for: !0
|
|
302
|
-
},
|
|
302
|
+
}, g.getInputAttr(n, t, i), {
|
|
303
303
|
name: n[r.property],
|
|
304
304
|
"onUpdate:name": (e) => n[r.property] = e,
|
|
305
|
-
"onUpdate:modelValue": (e) =>
|
|
305
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
306
306
|
}), null, 16, [
|
|
307
307
|
"name",
|
|
308
308
|
"onUpdate:name",
|
|
309
309
|
"onUpdate:modelValue"
|
|
310
|
-
])) : (
|
|
310
|
+
])) : (D(), v(Y, T({
|
|
311
311
|
key: 1,
|
|
312
312
|
ref_for: !0
|
|
313
|
-
},
|
|
313
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"]))], 64)) : g.getCellType(n, t) === "select" ? (D(), v(X, T({
|
|
314
314
|
key: 5,
|
|
315
315
|
ref_for: !0
|
|
316
|
-
},
|
|
316
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "datePicker" ? (D(), v(Z, T({
|
|
317
317
|
key: 6,
|
|
318
318
|
ref_for: !0
|
|
319
|
-
},
|
|
319
|
+
}, g.getInputAttr(n, t, i), {
|
|
320
320
|
start: n[t.start],
|
|
321
321
|
"onUpdate:start": (e) => n[t.start] = e,
|
|
322
322
|
end: n[t.end],
|
|
323
323
|
"onUpdate:end": (e) => n[t.end] = e,
|
|
324
|
-
"onUpdate:modelValue": (e) =>
|
|
324
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
325
325
|
}), null, 16, [
|
|
326
326
|
"start",
|
|
327
327
|
"onUpdate:start",
|
|
328
328
|
"end",
|
|
329
329
|
"onUpdate:end",
|
|
330
330
|
"onUpdate:modelValue"
|
|
331
|
-
])) :
|
|
331
|
+
])) : g.getCellType(n, t) === "cascader" ? (D(), v(Q, T({
|
|
332
332
|
key: 7,
|
|
333
333
|
ref_for: !0
|
|
334
|
-
},
|
|
334
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "checkbox" ? (D(), v(te, T({
|
|
335
335
|
key: 8,
|
|
336
336
|
ref_for: !0
|
|
337
|
-
},
|
|
337
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "number" ? (D(), v(ne, T({
|
|
338
338
|
key: 9,
|
|
339
339
|
ref_for: !0
|
|
340
|
-
},
|
|
340
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : (D(), b(_, { key: 10 }, [C(j(g.getVal(n, r, t)), 1)], 64))], 64)) : t.dictType || (e = t.options) != null && e.length ? (D(), v(re, {
|
|
341
341
|
key: 1,
|
|
342
342
|
"dict-type": t.dictType,
|
|
343
343
|
"id-as-value": t.idAsValue,
|
|
@@ -352,7 +352,7 @@ function q(e, t, r, o, N, P) {
|
|
|
352
352
|
"column",
|
|
353
353
|
"row",
|
|
354
354
|
"options"
|
|
355
|
-
])) : (
|
|
355
|
+
])) : (D(), b(_, { key: 2 }, [C(j(g.getVal(n, r, t)), 1)], 64))];
|
|
356
356
|
})
|
|
357
357
|
]),
|
|
358
358
|
_: 2
|
|
@@ -366,24 +366,24 @@ function q(e, t, r, o, N, P) {
|
|
|
366
366
|
"options",
|
|
367
367
|
"show-overflow-tooltip"
|
|
368
368
|
]))), 128))]),
|
|
369
|
-
|
|
370
|
-
add:
|
|
371
|
-
remove:
|
|
369
|
+
k(e.$slots, "handle", {
|
|
370
|
+
add: g.add,
|
|
371
|
+
remove: g.remove
|
|
372
372
|
}),
|
|
373
|
-
!e.disabled &&
|
|
373
|
+
!e.disabled && g.hasHandleMenus ? (D(), v($, {
|
|
374
374
|
key: 0,
|
|
375
375
|
label: "操作",
|
|
376
376
|
width: "80",
|
|
377
377
|
align: "center",
|
|
378
378
|
prop: "menu"
|
|
379
379
|
}, {
|
|
380
|
-
header:
|
|
380
|
+
header: N(({ column: t, $index: n }) => [k(e.$slots, "handle-column-header", {
|
|
381
381
|
column: t,
|
|
382
382
|
index: n
|
|
383
|
-
}, () => [
|
|
384
|
-
default:
|
|
383
|
+
}, () => [C(j(t.label), 1)])]),
|
|
384
|
+
default: N(({ row: t, $index: n }) => {
|
|
385
385
|
var r, i, a;
|
|
386
|
-
return [(r = e.handleMenus) != null && r.includes("add") && ((i = e.modelValue) == null ? void 0 : i.length) < e.limit ? (
|
|
386
|
+
return [(r = e.handleMenus) != null && r.includes("add") && ((i = e.modelValue) == null ? void 0 : i.length) < e.limit ? (D(), b("i", {
|
|
387
387
|
key: 0,
|
|
388
388
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
389
389
|
style: {
|
|
@@ -392,90 +392,90 @@ function q(e, t, r, o, N, P) {
|
|
|
392
392
|
cursor: "pointer"
|
|
393
393
|
},
|
|
394
394
|
title: "添加",
|
|
395
|
-
onClick:
|
|
396
|
-
}, null, 8, G)) :
|
|
395
|
+
onClick: P((e) => g.add(t, n), ["stop"])
|
|
396
|
+
}, null, 8, G)) : y("v-if", !0), (a = e.handleMenus) != null && a.includes("delete") ? (D(), v(L, {
|
|
397
397
|
key: 1,
|
|
398
398
|
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
399
399
|
confirm: "",
|
|
400
400
|
text: "",
|
|
401
401
|
title: "删除",
|
|
402
402
|
message: "您确定要删除该行吗?",
|
|
403
|
-
onClick:
|
|
404
|
-
}, null, 8, ["onClick"])) :
|
|
403
|
+
onClick: P((e) => g.remove(t, n), ["stop"])
|
|
404
|
+
}, null, 8, ["onClick"])) : y("v-if", !0)];
|
|
405
405
|
}),
|
|
406
406
|
_: 3
|
|
407
|
-
})) :
|
|
407
|
+
})) : y("v-if", !0)
|
|
408
408
|
]),
|
|
409
409
|
_: 2
|
|
410
|
-
}, [!e.disabled ||
|
|
410
|
+
}, [!e.disabled || g.hasToolBarMenu ? {
|
|
411
411
|
name: "toolbar",
|
|
412
|
-
fn:
|
|
413
|
-
addRow:
|
|
414
|
-
delRow:
|
|
415
|
-
refresh:
|
|
416
|
-
}, () => [
|
|
417
|
-
addRow:
|
|
418
|
-
delRow:
|
|
419
|
-
refresh:
|
|
412
|
+
fn: N(() => [x("div", B, [k(e.$slots, "toolbar", {
|
|
413
|
+
addRow: g.addRow,
|
|
414
|
+
delRow: g.delRow,
|
|
415
|
+
refresh: g.refresh
|
|
416
|
+
}, () => [x("div", V, [k(e.$slots, "toolbar-left", {
|
|
417
|
+
addRow: g.addRow,
|
|
418
|
+
delRow: g.delRow,
|
|
419
|
+
refresh: g.refresh
|
|
420
420
|
}, () => {
|
|
421
421
|
var n, r, i;
|
|
422
422
|
return [
|
|
423
|
-
(n = e.toolbarMenus) != null && n.includes("add") ? (
|
|
423
|
+
(n = e.toolbarMenus) != null && n.includes("add") ? (D(), v(L, {
|
|
424
424
|
key: 0,
|
|
425
425
|
class: "table-header-button add",
|
|
426
426
|
icon: "el-icon-circle-plus",
|
|
427
427
|
type: "text",
|
|
428
|
-
onClick:
|
|
428
|
+
onClick: g.addRow
|
|
429
429
|
}, {
|
|
430
|
-
default:
|
|
430
|
+
default: N(() => [...t[2] || (t[2] = [C(" 添加 ", -1)])]),
|
|
431
431
|
_: 1
|
|
432
|
-
}, 8, ["onClick"])) :
|
|
433
|
-
(r = e.toolbarMenus) != null && r.includes("delete") ? (
|
|
432
|
+
}, 8, ["onClick"])) : y("v-if", !0),
|
|
433
|
+
(r = e.toolbarMenus) != null && r.includes("delete") ? (D(), v(L, {
|
|
434
434
|
key: 1,
|
|
435
|
-
disabled:
|
|
435
|
+
disabled: h.selectedRows.length <= 0,
|
|
436
436
|
class: "table-header-button remove",
|
|
437
437
|
confirm: "",
|
|
438
438
|
message: "您确定要删除选中的记录吗?",
|
|
439
439
|
icon: "el-icon-error",
|
|
440
440
|
text: "",
|
|
441
|
-
onClick:
|
|
441
|
+
onClick: g.delRow
|
|
442
442
|
}, {
|
|
443
|
-
default:
|
|
443
|
+
default: N(() => [...t[3] || (t[3] = [C(" 删除 ", -1)])]),
|
|
444
444
|
_: 1
|
|
445
|
-
}, 8, ["disabled", "onClick"])) :
|
|
446
|
-
(i = e.toolbarMenus) != null && i.includes("refresh") ? (
|
|
445
|
+
}, 8, ["disabled", "onClick"])) : y("v-if", !0),
|
|
446
|
+
(i = e.toolbarMenus) != null && i.includes("refresh") ? (D(), v(L, {
|
|
447
447
|
key: 2,
|
|
448
448
|
class: "table-header-button refresh",
|
|
449
449
|
icon: "el-icon-refresh-left",
|
|
450
450
|
text: "",
|
|
451
451
|
disabled: !1,
|
|
452
|
-
onClick:
|
|
452
|
+
onClick: g.refresh
|
|
453
453
|
}, {
|
|
454
|
-
default:
|
|
454
|
+
default: N(() => [...t[4] || (t[4] = [C(" 刷新 ", -1)])]),
|
|
455
455
|
_: 1
|
|
456
|
-
}, 8, ["onClick"])) :
|
|
456
|
+
}, 8, ["onClick"])) : y("v-if", !0)
|
|
457
457
|
];
|
|
458
|
-
}),
|
|
459
|
-
addRow:
|
|
460
|
-
delRow:
|
|
461
|
-
refresh:
|
|
462
|
-
})]),
|
|
463
|
-
removeSelectedRows:
|
|
464
|
-
selectedRows:
|
|
458
|
+
}), k(e.$slots, "toolbar-left-append", {
|
|
459
|
+
addRow: g.addRow,
|
|
460
|
+
delRow: g.delRow,
|
|
461
|
+
refresh: g.refresh
|
|
462
|
+
})]), x("div", H, [k(e.$slots, "toolbar-right", {
|
|
463
|
+
removeSelectedRows: g.removeSelectedRows,
|
|
464
|
+
selectedRows: h.selectedRows
|
|
465
465
|
})])])])]),
|
|
466
466
|
key: "0"
|
|
467
467
|
} : void 0, e.bottomAddButton ? {
|
|
468
468
|
name: "empty",
|
|
469
|
-
fn:
|
|
469
|
+
fn: N(() => [x("i", {
|
|
470
470
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
471
471
|
style: {
|
|
472
472
|
"font-size": "20px",
|
|
473
473
|
cursor: "pointer"
|
|
474
474
|
},
|
|
475
475
|
title: "添加",
|
|
476
|
-
onClick: t[0] || (t[0] =
|
|
476
|
+
onClick: t[0] || (t[0] = P((t) => {
|
|
477
477
|
var n;
|
|
478
|
-
return
|
|
478
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
479
479
|
}, ["stop"]))
|
|
480
480
|
})]),
|
|
481
481
|
key: "1"
|
|
@@ -493,19 +493,19 @@ function q(e, t, r, o, N, P) {
|
|
|
493
493
|
"onRowDblclick",
|
|
494
494
|
"onSelectionChange"
|
|
495
495
|
]),
|
|
496
|
-
|
|
497
|
-
!e.disabled && e.bottomAddButton && ((F = e.modelValue) == null ? void 0 : F.length) < e.limit && ((I = e.modelValue) == null ? void 0 : I.length) > 0 ? (
|
|
496
|
+
y("底部添加按钮"),
|
|
497
|
+
!e.disabled && e.bottomAddButton && ((F = e.modelValue) == null ? void 0 : F.length) < e.limit && ((I = e.modelValue) == null ? void 0 : I.length) > 0 ? (D(), b("div", K, [x("i", {
|
|
498
498
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
499
499
|
style: {
|
|
500
500
|
"font-size": "20px",
|
|
501
501
|
cursor: "pointer"
|
|
502
502
|
},
|
|
503
503
|
title: "添加",
|
|
504
|
-
onClick: t[1] || (t[1] =
|
|
504
|
+
onClick: t[1] || (t[1] = P((t) => {
|
|
505
505
|
var n;
|
|
506
|
-
return
|
|
506
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
507
507
|
}, ["stop"]))
|
|
508
|
-
})])) :
|
|
508
|
+
})])) : y("v-if", !0)
|
|
509
509
|
], 2);
|
|
510
510
|
}
|
|
511
511
|
var J = /* @__PURE__ */ t(z, [["render", q]]);
|