@web-utils/form-ui 1.0.0-beta51 → 1.0.0-beta53
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/{Dt3lfDnL.mjs → 7GmKqdbC.mjs} +48 -33
- package/chunks/{6yfBZFOB.mjs → 9MExJqL-.mjs} +4 -3
- package/chunks/{BQk3-Ppb2.mjs → B3yVc-P62.mjs} +38 -39
- package/chunks/{bFbPPcdq.mjs → B6yWUT6z.mjs} +2 -2
- package/chunks/BEvOkSfB.mjs +417 -0
- package/chunks/{D_qiRmiE.mjs → BHbMJZPp.mjs} +69 -62
- package/chunks/{B9gA65rt2.mjs → BJYlobMz2.mjs} +2 -2
- package/chunks/{CJdkjadi.mjs → BNXbI4OG.mjs} +1 -1
- package/chunks/{V2p-PCpL.mjs → BV-XUugQ.mjs} +3 -3
- package/chunks/B_RAcbs_.mjs +108 -0
- package/chunks/{CqVd8D222.mjs → BgTCTXs72.mjs} +4 -3
- package/chunks/{BtcjAHE6.mjs → BjGlxyi6.mjs} +2 -2
- package/chunks/{pIzhYsBe.mjs → BqC_VU52.mjs} +2 -2
- package/chunks/{eae6huQB.mjs → BqzJ6vY6.mjs} +2 -2
- package/chunks/ByTyNsWf.mjs +653 -0
- package/chunks/{BfxDxIg0.mjs → CB9QUXUX.mjs} +2 -2
- package/chunks/CGDnQr1c.mjs +67 -0
- package/chunks/{DKwp6AMl.mjs → CGuDBVCB.mjs} +4 -3
- package/chunks/{C7G-cAoI.mjs → CPvdsnRN.mjs} +1 -1
- package/chunks/{Bwbtu2cp.mjs → CgN7m-1v.mjs} +4 -3
- package/chunks/{D_Fs3bkZ.mjs → D5EQJdPL.mjs} +3 -3
- package/chunks/D7R9Or2m2.mjs +87 -0
- package/chunks/D9IFsT272.mjs +513 -0
- package/chunks/{CuAoMR3n.mjs → DFFNxlqD.mjs} +5 -16
- package/chunks/{BWh6u1O0.mjs → DWMePN6q.mjs} +1 -1
- package/chunks/{CAd1zK9Q.mjs → DawYTjoT.mjs} +2 -2
- package/chunks/{BqWvBF14.mjs → DjnHvHXo.mjs} +2 -2
- package/chunks/{CabldOLo.mjs → DwkOWXIR.mjs} +6 -5
- package/chunks/{BQyL45PF2.mjs → DyCO22Ia2.mjs} +1 -1
- package/chunks/{B1IPSTA6.mjs → Dytof5EW.mjs} +2 -2
- package/chunks/{wXeqV-_7.mjs → H70Z56YY.mjs} +9 -3
- package/chunks/{BBERmTup.mjs → XoImEoke.mjs} +19 -4
- package/chunks/{ByHz4mmh.mjs → XwerN1TU.mjs} +2 -2
- package/chunks/{DA7oGHSX.mjs → c0Niqotr.mjs} +2 -2
- package/chunks/{C2zgFLYO.mjs → oVFbZ6yk.mjs} +30 -30
- package/chunks/{BbSPWDDZ.mjs → z5FJgzdc.mjs} +4 -3
- package/constants/index.d.ts +1 -0
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +2 -2
- package/form-cascader/index.d.ts +8 -2
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.d.ts +10 -4
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +8 -2
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +8 -2
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +8 -2
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +8 -2
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +8 -2
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +8 -2
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +8 -2
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +8 -2
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +8 -2
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +8 -2
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.d.ts +8 -2
- package/form-input-time/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.d.ts +8 -2
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- package/form-radio-group/index.d.ts +8 -2
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +8 -2
- package/form-rate/index.mjs +1 -1
- package/form-select/index.d.ts +8 -2
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +8 -2
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +8 -2
- package/form-switch/index.mjs +1 -1
- package/form-table/index.d.ts +43 -25
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.d.ts +8 -8
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.d.ts +8 -2
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +12 -12
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.d.ts +8 -2
- package/form-time-select/index.mjs +1 -1
- package/helper/sub-table-plus.d.ts +38 -0
- package/helper/sub-table-plus.mjs +4 -0
- package/index.css +1 -1
- package/index.mjs +35 -35
- package/package.json +1 -1
- package/pageable-table/index.d.ts +11 -11
- package/pageable-table/index.mjs +1 -1
- package/sub-table/index.d.ts +36 -30
- package/sub-table/index.mjs +2 -537
- package/sub-table-plus/index.d.ts +11 -2
- package/sub-table-plus/index.mjs +1 -1
- package/table-column/index.d.ts +8 -5
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.d.ts +14 -12
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.d.ts +4 -0
- package/table-view/index.mjs +16 -8
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/toolbar-button/style.css +1 -0
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +1 -1
- package/chunks/BG8z3V9d2.mjs +0 -643
- package/chunks/BsZgAJX_2.mjs +0 -81
- package/chunks/YFiU0ngn.mjs +0 -622
- package/chunks/gCeDFHo1.mjs +0 -32
- package/chunks/hlha6Bhc.mjs +0 -107
- package/chunks/wDS9KBFw.mjs +0 -67
package/sub-table/index.mjs
CHANGED
|
@@ -1,537 +1,2 @@
|
|
|
1
|
-
import e from "../
|
|
2
|
-
|
|
3
|
-
import { t as n } from "../chunks/DOZRzqlo.mjs";
|
|
4
|
-
import { t as r } from "../chunks/Dt3lfDnL.mjs";
|
|
5
|
-
import { t as i } from "../chunks/CkOD-_VV.mjs";
|
|
6
|
-
import { n as a } from "../chunks/D_qiRmiE.mjs";
|
|
7
|
-
import { t as o } from "../chunks/Bwbtu2cp.mjs";
|
|
8
|
-
import { t as s } from "../chunks/CabldOLo.mjs";
|
|
9
|
-
import { t as c } from "../chunks/V2p-PCpL.mjs";
|
|
10
|
-
import { t as l } from "../chunks/B1IPSTA6.mjs";
|
|
11
|
-
import { t as u } from "../chunks/BbSPWDDZ.mjs";
|
|
12
|
-
import { t as d } from "../chunks/bFbPPcdq.mjs";
|
|
13
|
-
import { t as f } from "../chunks/BtcjAHE6.mjs";
|
|
14
|
-
import { t as p } from "../chunks/YFiU0ngn.mjs";
|
|
15
|
-
import m from "../table-column-def/index.mjs";
|
|
16
|
-
import { t as h } from "../chunks/CuAoMR3n.mjs";
|
|
17
|
-
import { findTreeChildren as g, isFunction as _ } from "@web-utils/core";
|
|
18
|
-
import { Fragment as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, mergeProps as E, openBlock as D, renderList as O, renderSlot as k, resolveComponent as A, toDisplayString as j, withCtx as M, withModifiers as N } from "vue";
|
|
19
|
-
import { formContextKey as P, formItemContextKey as F } from "element-plus";
|
|
20
|
-
import { cloneDeep as I } from "@web-utils/integrations/lodash";
|
|
21
|
-
//#region src/components/table/SubTable.vue
|
|
22
|
-
var L = {
|
|
23
|
-
name: "SubTable",
|
|
24
|
-
emits: {
|
|
25
|
-
...a,
|
|
26
|
-
"add-row": null
|
|
27
|
-
},
|
|
28
|
-
inject: {
|
|
29
|
-
elForm: {
|
|
30
|
-
from: P,
|
|
31
|
-
default: ""
|
|
32
|
-
},
|
|
33
|
-
elFormItem: {
|
|
34
|
-
from: F,
|
|
35
|
-
default: ""
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
props: {
|
|
39
|
-
modelValue: Array,
|
|
40
|
-
prop: String,
|
|
41
|
-
columns: Array,
|
|
42
|
-
limit: {
|
|
43
|
-
type: Number,
|
|
44
|
-
default: Infinity
|
|
45
|
-
},
|
|
46
|
-
maxLimit: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default: Infinity
|
|
49
|
-
},
|
|
50
|
-
disabled: Boolean,
|
|
51
|
-
showSummary: Boolean,
|
|
52
|
-
selectionWidth: String,
|
|
53
|
-
allowEmpty: Boolean,
|
|
54
|
-
handleColumn: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: !0
|
|
57
|
-
},
|
|
58
|
-
editable: Boolean,
|
|
59
|
-
fetchApi: Function,
|
|
60
|
-
delApi: Function,
|
|
61
|
-
showHandleColumnAddButton: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: !0
|
|
64
|
-
},
|
|
65
|
-
showEmptyAddButton: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: !0
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
data() {
|
|
71
|
-
return {
|
|
72
|
-
rows: [],
|
|
73
|
-
selectedRows: []
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
computed: {
|
|
77
|
-
available() {
|
|
78
|
-
return this.editable && this.enabled;
|
|
79
|
-
},
|
|
80
|
-
enabled() {
|
|
81
|
-
return !this.disabled;
|
|
82
|
-
},
|
|
83
|
-
rowProps() {
|
|
84
|
-
let e = {};
|
|
85
|
-
return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
|
|
86
|
-
e[t] = null;
|
|
87
|
-
}), e;
|
|
88
|
-
},
|
|
89
|
-
filteredColumns() {
|
|
90
|
-
return this.columns.filter((e) => e.label && !e.hide && !e.slot);
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
watch: {
|
|
94
|
-
modelValue: {
|
|
95
|
-
deep: !0,
|
|
96
|
-
immediate: !0,
|
|
97
|
-
handler(e) {
|
|
98
|
-
this.rows = e || [];
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
rows: {
|
|
102
|
-
deep: !0,
|
|
103
|
-
immediate: !0,
|
|
104
|
-
handler(e) {
|
|
105
|
-
this.$emit("update:modelValue", e);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
methods: {
|
|
110
|
-
getCellType(e, t) {
|
|
111
|
-
return _(t.getType) ? t.getType(e, t) : t.type;
|
|
112
|
-
},
|
|
113
|
-
getInputAttr(e, t) {
|
|
114
|
-
return {
|
|
115
|
-
...t.attrs,
|
|
116
|
-
...t.getAttrs ? t.getAttrs(e) : {}
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
isInputDisabled(e, t) {
|
|
120
|
-
return t.isDisabled && t.isDisabled(e);
|
|
121
|
-
},
|
|
122
|
-
onInput(e, t, n) {
|
|
123
|
-
n.setValue ? n.setValue(e, t, n, this.rows) : e[n.prop] = t;
|
|
124
|
-
},
|
|
125
|
-
onSelectionChange(e) {
|
|
126
|
-
this.selectedRows = e;
|
|
127
|
-
},
|
|
128
|
-
remove(e, t) {
|
|
129
|
-
try {
|
|
130
|
-
this.rows.splice(t, 1);
|
|
131
|
-
} catch {}
|
|
132
|
-
},
|
|
133
|
-
add(e, t) {
|
|
134
|
-
let n = I(this.rowProps);
|
|
135
|
-
this.rows.splice(t + 1, 0, n);
|
|
136
|
-
},
|
|
137
|
-
addRow() {
|
|
138
|
-
this.$emit("add-row");
|
|
139
|
-
},
|
|
140
|
-
async delRow() {
|
|
141
|
-
if (!this.selectedRows.length) {
|
|
142
|
-
this.$message.warning("请选择要删除的记录!");
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
try {
|
|
146
|
-
if (this.delApi) try {
|
|
147
|
-
await this.delApi(this.selectedRows.map((e) => e.id).join(",")), this.refresh();
|
|
148
|
-
} catch {
|
|
149
|
-
this.$message.error("删除失败!");
|
|
150
|
-
}
|
|
151
|
-
else this.$emit("update:modelValue", this.rows.filter((e) => !this.selectedRows.includes(e)));
|
|
152
|
-
this.$message.success("删除成功!");
|
|
153
|
-
} catch {}
|
|
154
|
-
},
|
|
155
|
-
refresh() {
|
|
156
|
-
this.$refs.table.getPage();
|
|
157
|
-
},
|
|
158
|
-
getVal(e, t, n) {
|
|
159
|
-
var r, i;
|
|
160
|
-
if (n.type === "select" && (r = n.attrs) != null && r.options) {
|
|
161
|
-
let r = n.attrs.options.find((n) => n.code === e[t.property]);
|
|
162
|
-
if (r) return r.name;
|
|
163
|
-
}
|
|
164
|
-
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
165
|
-
let [r] = g(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
166
|
-
if (r) return r[n.attrs.valueKey || "label"];
|
|
167
|
-
}
|
|
168
|
-
return e[t.property];
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}, R = {
|
|
172
|
-
key: 0,
|
|
173
|
-
class: "table-header"
|
|
174
|
-
}, z = {
|
|
175
|
-
key: 0,
|
|
176
|
-
style: { color: "#f56c6c" }
|
|
177
|
-
}, B = ["onClick"];
|
|
178
|
-
function V(i, a, g, _, P, F) {
|
|
179
|
-
let I = r, L = t, V = s, H = d, U = A("FormInputUser"), W = A("FormInputDepartment"), G = f, K = l, q = o, J = c, Y = u, X = h, Z = n, Q = m, $ = e, ee = p;
|
|
180
|
-
return D(), y(ee, E({
|
|
181
|
-
ref: "table",
|
|
182
|
-
class: "sub-table",
|
|
183
|
-
"auto-height": "",
|
|
184
|
-
data: P.rows,
|
|
185
|
-
api: g.fetchApi,
|
|
186
|
-
"show-summary": g.showSummary,
|
|
187
|
-
"selection-width": g.selectionWidth
|
|
188
|
-
}, i.$attrs, {
|
|
189
|
-
"hide-on-single-page": "",
|
|
190
|
-
selection: F.enabled,
|
|
191
|
-
onSelectionChange: F.onSelectionChange
|
|
192
|
-
}), C({
|
|
193
|
-
default: M(() => [
|
|
194
|
-
k(i.$slots, "columns", { columns: g.columns }, () => [(D(!0), x(v, null, O(F.filteredColumns, (e) => (D(), y(Q, {
|
|
195
|
-
key: e.prop,
|
|
196
|
-
label: e.label,
|
|
197
|
-
width: e.width,
|
|
198
|
-
align: e.align,
|
|
199
|
-
prop: e.prop,
|
|
200
|
-
options: e.options,
|
|
201
|
-
"show-overflow-tooltip": !F.available && e.showOverflowTooltip
|
|
202
|
-
}, {
|
|
203
|
-
header: M(() => [!g.disabled && e.required ? (D(), x("span", z, "*")) : b("v-if", !0), w(" " + j(e.label), 1)]),
|
|
204
|
-
default: M(({ row: t, column: n, $index: r }) => [
|
|
205
|
-
b("tag 插槽"),
|
|
206
|
-
k(i.$slots, "tag", {
|
|
207
|
-
row: t,
|
|
208
|
-
column: n,
|
|
209
|
-
index: r
|
|
210
|
-
}),
|
|
211
|
-
b("列默认插槽,名字和 prop 保持一致"),
|
|
212
|
-
k(i.$slots, e.prop, {
|
|
213
|
-
row: t,
|
|
214
|
-
column: n,
|
|
215
|
-
index: r
|
|
216
|
-
}, () => {
|
|
217
|
-
var i;
|
|
218
|
-
return [F.available && F.getCellType(t, e) === "input" ? (D(), y(V, E({
|
|
219
|
-
key: 0,
|
|
220
|
-
"model-value": t[n.property]
|
|
221
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
222
|
-
disabled: F.isInputDisabled(t, e),
|
|
223
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
224
|
-
required: e.required,
|
|
225
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
226
|
-
}), null, 16, [
|
|
227
|
-
"model-value",
|
|
228
|
-
"disabled",
|
|
229
|
-
"prop",
|
|
230
|
-
"required",
|
|
231
|
-
"onInput"
|
|
232
|
-
])) : F.available && F.getCellType(t, e) === "inputPhoneNumber" ? (D(), y(H, E({
|
|
233
|
-
key: 1,
|
|
234
|
-
"model-value": t[n.property]
|
|
235
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
236
|
-
disabled: F.isInputDisabled(t, e),
|
|
237
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
238
|
-
required: e.required,
|
|
239
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
240
|
-
}), null, 16, [
|
|
241
|
-
"model-value",
|
|
242
|
-
"disabled",
|
|
243
|
-
"prop",
|
|
244
|
-
"required",
|
|
245
|
-
"onInput"
|
|
246
|
-
])) : F.available && F.getCellType(t, e) === "user" ? (D(), x(v, { key: 2 }, [e.single ? (D(), y(U, E({
|
|
247
|
-
key: 0,
|
|
248
|
-
name: t[n.property],
|
|
249
|
-
"onUpdate:name": (e) => t[n.property] = e
|
|
250
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
251
|
-
disabled: F.isInputDisabled(t, e),
|
|
252
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
253
|
-
required: e.required,
|
|
254
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
255
|
-
}), null, 16, [
|
|
256
|
-
"name",
|
|
257
|
-
"onUpdate:name",
|
|
258
|
-
"disabled",
|
|
259
|
-
"prop",
|
|
260
|
-
"required",
|
|
261
|
-
"onInput"
|
|
262
|
-
])) : (D(), y(U, E({
|
|
263
|
-
key: 1,
|
|
264
|
-
"model-value": t[n.property]
|
|
265
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
266
|
-
disabled: F.isInputDisabled(t, e),
|
|
267
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
268
|
-
required: e.required,
|
|
269
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
270
|
-
}), null, 16, [
|
|
271
|
-
"model-value",
|
|
272
|
-
"disabled",
|
|
273
|
-
"prop",
|
|
274
|
-
"required",
|
|
275
|
-
"onInput"
|
|
276
|
-
]))], 64)) : F.available && F.getCellType(t, e) === "department" ? (D(), x(v, { key: 3 }, [e.single ? (D(), y(W, E({
|
|
277
|
-
key: 0,
|
|
278
|
-
name: t[n.property],
|
|
279
|
-
"onUpdate:name": (e) => t[n.property] = e,
|
|
280
|
-
"ou-type": e.ouType
|
|
281
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
282
|
-
disabled: F.isInputDisabled(t, e),
|
|
283
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
284
|
-
required: e.required,
|
|
285
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
286
|
-
}), null, 16, [
|
|
287
|
-
"name",
|
|
288
|
-
"onUpdate:name",
|
|
289
|
-
"ou-type",
|
|
290
|
-
"disabled",
|
|
291
|
-
"prop",
|
|
292
|
-
"required",
|
|
293
|
-
"onInput"
|
|
294
|
-
])) : (D(), y(W, E({
|
|
295
|
-
key: 1,
|
|
296
|
-
"model-value": t[n.property]
|
|
297
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
298
|
-
disabled: F.isInputDisabled(t, e),
|
|
299
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
300
|
-
required: e.required,
|
|
301
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
302
|
-
}), null, 16, [
|
|
303
|
-
"model-value",
|
|
304
|
-
"disabled",
|
|
305
|
-
"prop",
|
|
306
|
-
"required",
|
|
307
|
-
"onInput"
|
|
308
|
-
]))], 64)) : F.available && F.getCellType(t, e) === "select" ? (D(), y(G, E({
|
|
309
|
-
key: 4,
|
|
310
|
-
"model-value": t[n.property]
|
|
311
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
312
|
-
disabled: F.isInputDisabled(t, e),
|
|
313
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
314
|
-
options: e.options,
|
|
315
|
-
required: e.required,
|
|
316
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
317
|
-
}), null, 16, [
|
|
318
|
-
"model-value",
|
|
319
|
-
"disabled",
|
|
320
|
-
"prop",
|
|
321
|
-
"options",
|
|
322
|
-
"required",
|
|
323
|
-
"onInput"
|
|
324
|
-
])) : F.available && F.getCellType(t, e) === "datePicker" ? (D(), y(K, E({
|
|
325
|
-
key: 5,
|
|
326
|
-
ref_for: !0
|
|
327
|
-
}, F.getInputAttr(t, e), {
|
|
328
|
-
start: t[e.start],
|
|
329
|
-
"onUpdate:start": (n) => t[e.start] = n,
|
|
330
|
-
end: t[e.end],
|
|
331
|
-
"onUpdate:end": (n) => t[e.end] = n,
|
|
332
|
-
"model-value": t[n.property],
|
|
333
|
-
disabled: F.isInputDisabled(t, e),
|
|
334
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
335
|
-
required: e.required,
|
|
336
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
337
|
-
}), null, 16, [
|
|
338
|
-
"start",
|
|
339
|
-
"onUpdate:start",
|
|
340
|
-
"end",
|
|
341
|
-
"onUpdate:end",
|
|
342
|
-
"model-value",
|
|
343
|
-
"disabled",
|
|
344
|
-
"prop",
|
|
345
|
-
"required",
|
|
346
|
-
"onInput"
|
|
347
|
-
])) : F.available && F.getCellType(t, e) === "cascader" ? (D(), y(q, E({
|
|
348
|
-
key: 6,
|
|
349
|
-
"model-value": t[n.property]
|
|
350
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
351
|
-
disabled: F.isInputDisabled(t, e),
|
|
352
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
353
|
-
required: e.required,
|
|
354
|
-
"label-key": e.labelKey,
|
|
355
|
-
"value-key": e.valueKey,
|
|
356
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
357
|
-
}), null, 16, [
|
|
358
|
-
"model-value",
|
|
359
|
-
"disabled",
|
|
360
|
-
"prop",
|
|
361
|
-
"required",
|
|
362
|
-
"label-key",
|
|
363
|
-
"value-key",
|
|
364
|
-
"onInput"
|
|
365
|
-
])) : F.available && F.getCellType(t, e) === "checkbox" ? (D(), y(J, E({
|
|
366
|
-
key: 7,
|
|
367
|
-
"model-value": t[n.property]
|
|
368
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
369
|
-
disabled: F.isInputDisabled(t, e),
|
|
370
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
371
|
-
required: e.required,
|
|
372
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
373
|
-
}), null, 16, [
|
|
374
|
-
"model-value",
|
|
375
|
-
"disabled",
|
|
376
|
-
"prop",
|
|
377
|
-
"required",
|
|
378
|
-
"onInput"
|
|
379
|
-
])) : F.available && F.getCellType(t, e) === "number" ? (D(), y(Y, E({
|
|
380
|
-
key: 8,
|
|
381
|
-
"model-value": t[n.property]
|
|
382
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
383
|
-
disabled: F.isInputDisabled(t, e),
|
|
384
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
385
|
-
required: e.required,
|
|
386
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
387
|
-
}), null, 16, [
|
|
388
|
-
"model-value",
|
|
389
|
-
"disabled",
|
|
390
|
-
"prop",
|
|
391
|
-
"required",
|
|
392
|
-
"onInput"
|
|
393
|
-
])) : F.available && F.getCellType(t, e) === "textarea" ? (D(), y(X, E({
|
|
394
|
-
key: 9,
|
|
395
|
-
rows: e.rows || "3",
|
|
396
|
-
"model-value": t[n.property]
|
|
397
|
-
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
398
|
-
disabled: F.isInputDisabled(t, e),
|
|
399
|
-
prop: `${g.prop}[${r}].${e.prop}`,
|
|
400
|
-
required: e.required,
|
|
401
|
-
onInput: (n) => F.onInput(t, n, e)
|
|
402
|
-
}), null, 16, [
|
|
403
|
-
"rows",
|
|
404
|
-
"model-value",
|
|
405
|
-
"disabled",
|
|
406
|
-
"prop",
|
|
407
|
-
"required",
|
|
408
|
-
"onInput"
|
|
409
|
-
])) : e.dicType || (i = e.options) != null && i.length ? (D(), y(Z, {
|
|
410
|
-
key: 10,
|
|
411
|
-
"dict-type": e.dicType,
|
|
412
|
-
"id-as-value": e.idAsValue,
|
|
413
|
-
"label-as-value": e.labelAsValue,
|
|
414
|
-
column: n,
|
|
415
|
-
row: t,
|
|
416
|
-
options: e.options
|
|
417
|
-
}, null, 8, [
|
|
418
|
-
"dict-type",
|
|
419
|
-
"id-as-value",
|
|
420
|
-
"label-as-value",
|
|
421
|
-
"column",
|
|
422
|
-
"row",
|
|
423
|
-
"options"
|
|
424
|
-
])) : (D(), x(v, { key: 11 }, [w(j(F.getVal(t, n, e)), 1)], 64))];
|
|
425
|
-
})
|
|
426
|
-
]),
|
|
427
|
-
_: 2
|
|
428
|
-
}, 1032, [
|
|
429
|
-
"label",
|
|
430
|
-
"width",
|
|
431
|
-
"align",
|
|
432
|
-
"prop",
|
|
433
|
-
"options",
|
|
434
|
-
"show-overflow-tooltip"
|
|
435
|
-
]))), 128))]),
|
|
436
|
-
b(" 自定义操作列 "),
|
|
437
|
-
k(i.$slots, "handle", {
|
|
438
|
-
add: F.add,
|
|
439
|
-
remove: F.remove
|
|
440
|
-
}),
|
|
441
|
-
b(" 操作列 "),
|
|
442
|
-
(!g.modelValue || g.modelValue.length < g.limit) && !g.disabled && F.enabled && g.editable && g.handleColumn ? (D(), y(Q, {
|
|
443
|
-
key: 0,
|
|
444
|
-
label: "操作",
|
|
445
|
-
fixed: "right",
|
|
446
|
-
width: "80",
|
|
447
|
-
align: "center",
|
|
448
|
-
prop: "menu"
|
|
449
|
-
}, {
|
|
450
|
-
header: M(({ column: e, $index: t }) => [k(i.$slots, "handle-column-header", {
|
|
451
|
-
column: e,
|
|
452
|
-
index: t
|
|
453
|
-
}, () => [w(j(e.label), 1)])]),
|
|
454
|
-
default: M(({ row: e, $index: t }) => [g.showHandleColumnAddButton && g.modelValue.length < g.maxLimit ? (D(), x("i", {
|
|
455
|
-
key: 0,
|
|
456
|
-
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
457
|
-
style: {
|
|
458
|
-
"margin-right": "5px",
|
|
459
|
-
"font-size": "20px",
|
|
460
|
-
cursor: "pointer"
|
|
461
|
-
},
|
|
462
|
-
title: "添加",
|
|
463
|
-
onClick: N((n) => F.add(e, t), ["stop"])
|
|
464
|
-
}, null, 8, B)) : b("v-if", !0), g.modelValue && g.modelValue.length > 1 || g.allowEmpty ? (D(), y($, {
|
|
465
|
-
key: 1,
|
|
466
|
-
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
467
|
-
style: {
|
|
468
|
-
"font-size": "20px",
|
|
469
|
-
cursor: "pointer"
|
|
470
|
-
},
|
|
471
|
-
title: "删除",
|
|
472
|
-
message: "您确定要删除该行吗?",
|
|
473
|
-
onClick: N((n) => F.remove(e, t), ["stop"])
|
|
474
|
-
}, null, 8, ["onClick"])) : b("v-if", !0)]),
|
|
475
|
-
_: 3
|
|
476
|
-
})) : b("v-if", !0)
|
|
477
|
-
]),
|
|
478
|
-
_: 2
|
|
479
|
-
}, [g.editable ? void 0 : {
|
|
480
|
-
name: "toolbar",
|
|
481
|
-
fn: M(() => [F.enabled || g.fetchApi ? (D(), x("div", R, [k(i.$slots, "toolbar", {
|
|
482
|
-
addRow: F.addRow,
|
|
483
|
-
delRow: F.delRow,
|
|
484
|
-
refresh: F.refresh
|
|
485
|
-
}, () => [F.enabled ? (D(), x(v, { key: 0 }, [T(I, {
|
|
486
|
-
class: "table-header-button add",
|
|
487
|
-
icon: "el-icon-circle-plus",
|
|
488
|
-
type: "text",
|
|
489
|
-
onClick: F.addRow
|
|
490
|
-
}, {
|
|
491
|
-
default: M(() => [...a[1] || (a[1] = [w(" 添加 ", -1)])]),
|
|
492
|
-
_: 1
|
|
493
|
-
}, 8, ["onClick"]), T(L, {
|
|
494
|
-
class: "table-header-button remove",
|
|
495
|
-
message: "您确定要删除选中的记录吗?",
|
|
496
|
-
icon: "el-icon-error",
|
|
497
|
-
type: "text",
|
|
498
|
-
onClick: F.delRow
|
|
499
|
-
}, {
|
|
500
|
-
default: M(() => [...a[2] || (a[2] = [w(" 删除 ", -1)])]),
|
|
501
|
-
_: 1
|
|
502
|
-
}, 8, ["onClick"])], 64)) : b("v-if", !0), g.fetchApi ? (D(), y(I, {
|
|
503
|
-
key: 1,
|
|
504
|
-
class: "table-header-button refresh",
|
|
505
|
-
icon: "el-icon-refresh-left",
|
|
506
|
-
type: "text",
|
|
507
|
-
disabled: !1,
|
|
508
|
-
onClick: F.refresh
|
|
509
|
-
}, {
|
|
510
|
-
default: M(() => [...a[3] || (a[3] = [w(" 刷新 ", -1)])]),
|
|
511
|
-
_: 1
|
|
512
|
-
}, 8, ["onClick"])) : b("v-if", !0)])])) : b("v-if", !0)]),
|
|
513
|
-
key: "0"
|
|
514
|
-
}, g.allowEmpty && !g.disabled && g.showEmptyAddButton ? {
|
|
515
|
-
name: "empty",
|
|
516
|
-
fn: M(() => [S("i", {
|
|
517
|
-
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
518
|
-
style: {
|
|
519
|
-
"font-size": "20px",
|
|
520
|
-
cursor: "pointer"
|
|
521
|
-
},
|
|
522
|
-
title: "添加",
|
|
523
|
-
onClick: a[0] || (a[0] = N((e) => F.add(null, 0), ["stop"]))
|
|
524
|
-
})]),
|
|
525
|
-
key: "1"
|
|
526
|
-
} : void 0]), 1040, [
|
|
527
|
-
"data",
|
|
528
|
-
"api",
|
|
529
|
-
"show-summary",
|
|
530
|
-
"selection-width",
|
|
531
|
-
"selection",
|
|
532
|
-
"onSelectionChange"
|
|
533
|
-
]);
|
|
534
|
-
}
|
|
535
|
-
var H = /* @__PURE__ */ i(L, [["render", V]]);
|
|
536
|
-
//#endregion
|
|
537
|
-
export { H as default };
|
|
1
|
+
import { t as e } from "../chunks/BEvOkSfB.mjs";
|
|
2
|
+
export { e as default };
|
|
@@ -38,8 +38,17 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
38
38
|
filteredColumns(): unknown[];
|
|
39
39
|
}, {
|
|
40
40
|
getCellType(row: any, item: any): any;
|
|
41
|
-
getInputAttr(row: any, item: any):
|
|
42
|
-
|
|
41
|
+
getInputAttr(row: any, item: any, index: any): {
|
|
42
|
+
wrapCol: boolean;
|
|
43
|
+
label: any;
|
|
44
|
+
ouType: any;
|
|
45
|
+
labelKey: any;
|
|
46
|
+
valueKey: any;
|
|
47
|
+
required: any;
|
|
48
|
+
prop: string | null;
|
|
49
|
+
modelValue: any;
|
|
50
|
+
disabled: any;
|
|
51
|
+
};
|
|
43
52
|
onInput(row: any, val: any, item: any): void;
|
|
44
53
|
onBlur(row: any, item: any): void;
|
|
45
54
|
onSelectionChange(selectedRows: any): void;
|
package/sub-table-plus/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/D9IFsT272.mjs";
|
|
2
2
|
export { e as default };
|
package/table-column/index.d.ts
CHANGED
|
@@ -56,7 +56,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
56
56
|
};
|
|
57
57
|
tooltipFormatter: FunctionConstructor;
|
|
58
58
|
property: StringConstructor;
|
|
59
|
-
showTooltipWhenOverflow: BooleanConstructor;
|
|
60
59
|
clickable: BooleanConstructor;
|
|
61
60
|
cellClick: FunctionConstructor;
|
|
62
61
|
dictType: StringConstructor;
|
|
@@ -69,6 +68,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
69
68
|
};
|
|
70
69
|
labelAsValue: BooleanConstructor;
|
|
71
70
|
maxWidth: StringConstructor;
|
|
71
|
+
allowSort: BooleanConstructor;
|
|
72
|
+
filterable: BooleanConstructor;
|
|
72
73
|
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
73
74
|
type: {
|
|
74
75
|
type: StringConstructor;
|
|
@@ -127,7 +128,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
127
128
|
};
|
|
128
129
|
tooltipFormatter: FunctionConstructor;
|
|
129
130
|
property: StringConstructor;
|
|
130
|
-
showTooltipWhenOverflow: BooleanConstructor;
|
|
131
131
|
clickable: BooleanConstructor;
|
|
132
132
|
cellClick: FunctionConstructor;
|
|
133
133
|
dictType: StringConstructor;
|
|
@@ -140,21 +140,24 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
140
140
|
};
|
|
141
141
|
labelAsValue: BooleanConstructor;
|
|
142
142
|
maxWidth: StringConstructor;
|
|
143
|
+
allowSort: BooleanConstructor;
|
|
144
|
+
filterable: BooleanConstructor;
|
|
143
145
|
}>> & Readonly<{}>, {
|
|
144
146
|
type: string;
|
|
145
147
|
treeDict: boolean;
|
|
146
148
|
idAsValue: boolean;
|
|
147
149
|
labelAsValue: boolean;
|
|
150
|
+
filterable: boolean;
|
|
148
151
|
align: string;
|
|
149
152
|
showOverflowTooltip: boolean | Record<string, any>;
|
|
153
|
+
clickable: boolean;
|
|
154
|
+
autoUpdate: boolean;
|
|
155
|
+
allowSort: boolean;
|
|
150
156
|
sortOrders: unknown[];
|
|
151
157
|
resizable: boolean;
|
|
152
158
|
headerAlign: string;
|
|
153
159
|
reserveSelection: boolean;
|
|
154
160
|
filterMultiple: boolean;
|
|
155
161
|
filteredValue: unknown[];
|
|
156
|
-
showTooltipWhenOverflow: boolean;
|
|
157
|
-
clickable: boolean;
|
|
158
|
-
autoUpdate: boolean;
|
|
159
162
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
160
163
|
export default _default;
|
package/table-column/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/CGDnQr1c.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -8,17 +8,18 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
8
8
|
treeDict: boolean;
|
|
9
9
|
idAsValue: boolean;
|
|
10
10
|
labelAsValue: boolean;
|
|
11
|
+
filterable: boolean;
|
|
11
12
|
align: string;
|
|
12
13
|
showOverflowTooltip: boolean | Record<string, any>;
|
|
14
|
+
clickable: boolean;
|
|
15
|
+
autoUpdate: boolean;
|
|
16
|
+
allowSort: boolean;
|
|
13
17
|
sortOrders: unknown[];
|
|
14
18
|
resizable: boolean;
|
|
15
19
|
headerAlign: string;
|
|
16
20
|
reserveSelection: boolean;
|
|
17
21
|
filterMultiple: boolean;
|
|
18
22
|
filteredValue: unknown[];
|
|
19
|
-
showTooltipWhenOverflow: boolean;
|
|
20
|
-
clickable: boolean;
|
|
21
|
-
autoUpdate: boolean;
|
|
22
23
|
label?: string | undefined;
|
|
23
24
|
filters?: unknown[] | undefined;
|
|
24
25
|
fixed?: string | boolean | undefined;
|
|
@@ -30,6 +31,9 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
30
31
|
formatter?: Function | undefined;
|
|
31
32
|
index?: number | Function | undefined;
|
|
32
33
|
tooltipFormatter?: Function | undefined;
|
|
34
|
+
property?: string | undefined;
|
|
35
|
+
cellClick?: Function | undefined;
|
|
36
|
+
maxWidth?: string | undefined;
|
|
33
37
|
columnKey?: string | undefined;
|
|
34
38
|
minWidth?: string | number | undefined;
|
|
35
39
|
renderHeader?: Function | undefined;
|
|
@@ -41,25 +45,23 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
41
45
|
selectable?: Function | undefined;
|
|
42
46
|
filterPlacement?: string | undefined;
|
|
43
47
|
filterClassName?: string | undefined;
|
|
44
|
-
property?: string | undefined;
|
|
45
|
-
cellClick?: Function | undefined;
|
|
46
|
-
maxWidth?: string | undefined;
|
|
47
48
|
$props: {
|
|
48
49
|
readonly type?: string | undefined;
|
|
49
50
|
readonly treeDict?: boolean | undefined;
|
|
50
51
|
readonly idAsValue?: boolean | undefined;
|
|
51
52
|
readonly labelAsValue?: boolean | undefined;
|
|
53
|
+
readonly filterable?: boolean | undefined;
|
|
52
54
|
readonly align?: string | undefined;
|
|
53
55
|
readonly showOverflowTooltip?: boolean | Record<string, any> | undefined;
|
|
56
|
+
readonly clickable?: boolean | undefined;
|
|
57
|
+
readonly autoUpdate?: boolean | undefined;
|
|
58
|
+
readonly allowSort?: boolean | undefined;
|
|
54
59
|
readonly sortOrders?: unknown[] | undefined;
|
|
55
60
|
readonly resizable?: boolean | undefined;
|
|
56
61
|
readonly headerAlign?: string | undefined;
|
|
57
62
|
readonly reserveSelection?: boolean | undefined;
|
|
58
63
|
readonly filterMultiple?: boolean | undefined;
|
|
59
64
|
readonly filteredValue?: unknown[] | undefined;
|
|
60
|
-
readonly showTooltipWhenOverflow?: boolean | undefined;
|
|
61
|
-
readonly clickable?: boolean | undefined;
|
|
62
|
-
readonly autoUpdate?: boolean | undefined;
|
|
63
65
|
readonly label?: string | undefined;
|
|
64
66
|
readonly filters?: unknown[] | undefined;
|
|
65
67
|
readonly fixed?: string | boolean | undefined;
|
|
@@ -71,6 +73,9 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
71
73
|
readonly formatter?: Function | undefined;
|
|
72
74
|
readonly index?: number | Function | undefined;
|
|
73
75
|
readonly tooltipFormatter?: Function | undefined;
|
|
76
|
+
readonly property?: string | undefined;
|
|
77
|
+
readonly cellClick?: Function | undefined;
|
|
78
|
+
readonly maxWidth?: string | undefined;
|
|
74
79
|
readonly columnKey?: string | undefined;
|
|
75
80
|
readonly minWidth?: string | number | undefined;
|
|
76
81
|
readonly renderHeader?: Function | undefined;
|
|
@@ -82,9 +87,6 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
82
87
|
readonly selectable?: Function | undefined;
|
|
83
88
|
readonly filterPlacement?: string | undefined;
|
|
84
89
|
readonly filterClassName?: string | undefined;
|
|
85
|
-
readonly property?: string | undefined;
|
|
86
|
-
readonly cellClick?: Function | undefined;
|
|
87
|
-
readonly maxWidth?: string | undefined;
|
|
88
90
|
};
|
|
89
91
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
90
92
|
type __VLS_TemplateResult = {
|