@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
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { s as e } from "./DcTVYqeJ.mjs";
|
|
2
|
+
import { t } from "./DOZRzqlo.mjs";
|
|
3
|
+
import { cellClickHandlerContextKey as n } from "../constants/index.mjs";
|
|
4
|
+
import { t as r } from "./7GmKqdbC.mjs";
|
|
5
|
+
import { t as i } from "./CkOD-_VV.mjs";
|
|
6
|
+
import { n as a } from "./BHbMJZPp.mjs";
|
|
7
|
+
import { t as o } from "./CgN7m-1v.mjs";
|
|
8
|
+
import { t as ee } from "./H70Z56YY.mjs";
|
|
9
|
+
import { t as s } from "./DwkOWXIR.mjs";
|
|
10
|
+
import { t as c } from "./BV-XUugQ.mjs";
|
|
11
|
+
import { t as l } from "./Dytof5EW.mjs";
|
|
12
|
+
import { t as u } from "./z5FJgzdc.mjs";
|
|
13
|
+
import { t as d } from "./B6yWUT6z.mjs";
|
|
14
|
+
import { t as f } from "./BjGlxyi6.mjs";
|
|
15
|
+
import { t as p } from "./ByTyNsWf.mjs";
|
|
16
|
+
import m from "../table-column-def/index.mjs";
|
|
17
|
+
import { findTreeChildren as h, isFunction as g } from "@web-utils/core";
|
|
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 { formContextKey as F, formItemContextKey as I } from "element-plus";
|
|
20
|
+
import { cloneDeep as L } from "@web-utils/integrations/lodash";
|
|
21
|
+
//#region src/components/table/sub-table-plus.ts
|
|
22
|
+
var R = {
|
|
23
|
+
modelValue: Array,
|
|
24
|
+
prop: String,
|
|
25
|
+
columns: Array,
|
|
26
|
+
descs: Array,
|
|
27
|
+
ascs: Array,
|
|
28
|
+
limit: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: Infinity
|
|
31
|
+
},
|
|
32
|
+
disabled: Boolean,
|
|
33
|
+
showSummary: Boolean,
|
|
34
|
+
selection: Boolean,
|
|
35
|
+
index: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
selectionWidth: String,
|
|
40
|
+
toolbarMenus: Array,
|
|
41
|
+
handleMenus: Array,
|
|
42
|
+
fetchApi: Function,
|
|
43
|
+
delApi: Function,
|
|
44
|
+
bottomAddButton: Boolean,
|
|
45
|
+
initRow: Function,
|
|
46
|
+
onRowDbClick: Function,
|
|
47
|
+
showMessage: Boolean,
|
|
48
|
+
pageSize: Number
|
|
49
|
+
}, z = {
|
|
50
|
+
name: "SubTablePlus",
|
|
51
|
+
inject: {
|
|
52
|
+
elForm: {
|
|
53
|
+
from: F,
|
|
54
|
+
default: ""
|
|
55
|
+
},
|
|
56
|
+
elFormItem: {
|
|
57
|
+
from: I,
|
|
58
|
+
default: ""
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
provide() {
|
|
62
|
+
return { [n]: this.rowDbClick };
|
|
63
|
+
},
|
|
64
|
+
props: { ...R },
|
|
65
|
+
emits: {
|
|
66
|
+
...a,
|
|
67
|
+
"add-row": null
|
|
68
|
+
},
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
rows: [],
|
|
72
|
+
selectedRows: []
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
enabled() {
|
|
77
|
+
return !this.disabled;
|
|
78
|
+
},
|
|
79
|
+
hasToolBarMenu() {
|
|
80
|
+
var e;
|
|
81
|
+
return (e = this.toolbarMenus) == null ? void 0 : e.length;
|
|
82
|
+
},
|
|
83
|
+
hasHandleMenus() {
|
|
84
|
+
var e;
|
|
85
|
+
return (e = this.handleMenus) == null ? void 0 : e.length;
|
|
86
|
+
},
|
|
87
|
+
rowProps() {
|
|
88
|
+
let e = {};
|
|
89
|
+
return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
|
|
90
|
+
e[t] = null;
|
|
91
|
+
}), e;
|
|
92
|
+
},
|
|
93
|
+
listeners() {
|
|
94
|
+
return e(this.$attrs);
|
|
95
|
+
},
|
|
96
|
+
filteredColumns() {
|
|
97
|
+
return this.columns.filter((e) => e.label && !e.hide && !e.slot);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
watch: {
|
|
101
|
+
modelValue: {
|
|
102
|
+
deep: !0,
|
|
103
|
+
immediate: !0,
|
|
104
|
+
handler(e) {
|
|
105
|
+
this.rows = e || [];
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
rows: {
|
|
109
|
+
deep: !0,
|
|
110
|
+
immediate: !0,
|
|
111
|
+
handler(e) {
|
|
112
|
+
this.$emit("update:modelValue", e);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
getCellType(e, t) {
|
|
118
|
+
return g(t.getType) ? t.getType(e, t) : t.type;
|
|
119
|
+
},
|
|
120
|
+
getInputAttr(e, t, n) {
|
|
121
|
+
var r;
|
|
122
|
+
let i = {};
|
|
123
|
+
return t.attrs && t.getAttrs ? i = {
|
|
124
|
+
...t.attrs,
|
|
125
|
+
...t.getAttrs(e)
|
|
126
|
+
} : t.attrs ? i = { ...t.attrs } : t.getAttrs && (i = t.getAttrs(e)), i.wrapCol = !1, i.label = t.label, i.ouType = t.ouType, i.labelKey = t.labelKey, i.valueKey = t.valueKey, i.required = t.required, i.prop = this.prop ? `${this.prop}[${n}].${t.prop}` : null, i.modelValue = e[t.prop], i.disabled = (r = t.isDisabled) == null ? void 0 : r.call(t, e), i;
|
|
127
|
+
},
|
|
128
|
+
onInput(e, t, n) {
|
|
129
|
+
n.setValue ? n.setValue(e, t, n, this.rows) : n.setVal !== !1 && (e[n.prop] = t);
|
|
130
|
+
},
|
|
131
|
+
onBlur(e, t) {
|
|
132
|
+
t.onBlur && t.onBlur(e, t, this.rows);
|
|
133
|
+
},
|
|
134
|
+
onSelectionChange(e) {
|
|
135
|
+
this.selectedRows = e;
|
|
136
|
+
},
|
|
137
|
+
async remove(e, t) {
|
|
138
|
+
try {
|
|
139
|
+
if (this.delApi) try {
|
|
140
|
+
await this.delApi([e.id]), this.$message.success("删除成功!"), this.refresh();
|
|
141
|
+
} catch {
|
|
142
|
+
this.$message.error("删除失败!");
|
|
143
|
+
}
|
|
144
|
+
else this.rows.splice(t, 1);
|
|
145
|
+
} catch {}
|
|
146
|
+
},
|
|
147
|
+
async add(e, t) {
|
|
148
|
+
if (this.fetchApi) this.addRow();
|
|
149
|
+
else {
|
|
150
|
+
var n;
|
|
151
|
+
let e = L(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
|
|
152
|
+
t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
addRow() {
|
|
156
|
+
this.$emit("add-row");
|
|
157
|
+
},
|
|
158
|
+
async delRow() {
|
|
159
|
+
if (!this.selectedRows.length) {
|
|
160
|
+
this.$message.warning("请选择要删除的记录!");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
if (this.delApi) try {
|
|
165
|
+
await this.delApi(this.selectedRows.map((e) => e.id)), this.$message.success("删除成功!"), this.refresh();
|
|
166
|
+
} catch {
|
|
167
|
+
this.$message.error("删除失败!");
|
|
168
|
+
}
|
|
169
|
+
else this.$emit("update:modelValue", this.rows.filter((e) => !this.selectedRows.includes(e)));
|
|
170
|
+
} catch {}
|
|
171
|
+
},
|
|
172
|
+
refresh() {
|
|
173
|
+
this.$refs.table.getPage();
|
|
174
|
+
},
|
|
175
|
+
getVal(e, t, n) {
|
|
176
|
+
var r, i;
|
|
177
|
+
if (g(n.getVal)) return n.getVal(e, t, n);
|
|
178
|
+
if (n.type === "select" && (r = n.attrs) != null && r.options) {
|
|
179
|
+
let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
|
|
180
|
+
if (r) return r.label || r.name;
|
|
181
|
+
}
|
|
182
|
+
if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
|
|
183
|
+
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
184
|
+
let [r] = h(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
185
|
+
if (r) return r[n.attrs.valueKey || "label"];
|
|
186
|
+
}
|
|
187
|
+
return e[t.property];
|
|
188
|
+
},
|
|
189
|
+
reloadTable() {
|
|
190
|
+
var e;
|
|
191
|
+
(e = this.$refs.table) == null || e.reload();
|
|
192
|
+
},
|
|
193
|
+
async refreshTable() {
|
|
194
|
+
var e;
|
|
195
|
+
await ((e = this.$refs.table) == null ? void 0 : e.getPage());
|
|
196
|
+
},
|
|
197
|
+
removeSelectedRows() {
|
|
198
|
+
this.$emit("update:modelValue", this.modelValue.filter((e) => !this.selectedRows.includes(e)));
|
|
199
|
+
},
|
|
200
|
+
rowDbClick(...e) {
|
|
201
|
+
var t;
|
|
202
|
+
(t = this.onRowDbClick) == null || t.call(this, ...e);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}, B = { class: "table-header flex-row" }, V = { class: "flex-item" }, H = { class: "flex-not-shrink" }, U = {
|
|
206
|
+
key: 0,
|
|
207
|
+
style: { color: "#f56c6c" }
|
|
208
|
+
}, W = ["title"], G = ["onClick"], K = {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "flex-row vertical-center horizon-center",
|
|
211
|
+
style: {
|
|
212
|
+
padding: "10px",
|
|
213
|
+
border: "1px solid #ebeef5",
|
|
214
|
+
"border-top": "none"
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
function q(e, n, i, a, h, g) {
|
|
218
|
+
var F, I;
|
|
219
|
+
let L = r, R = s, z = ee, q = d, J = A("FormInputUser"), Y = A("FormInputDepartment"), X = f, Z = l, Q = o, te = c, ne = u, re = t, $ = m, ie = p;
|
|
220
|
+
return D(), b("div", { class: E(["sub-table-plus", { "hide-message": !e.showMessage }]) }, [
|
|
221
|
+
w(ie, T(e.$attrs, {
|
|
222
|
+
ref: "table",
|
|
223
|
+
"auto-height": "",
|
|
224
|
+
data: e.fetchApi ? null : h.rows,
|
|
225
|
+
api: e.fetchApi,
|
|
226
|
+
"payload-style": "body",
|
|
227
|
+
"show-summary": e.showSummary,
|
|
228
|
+
descs: e.descs,
|
|
229
|
+
ascs: e.ascs,
|
|
230
|
+
"page-size": e.pageSize,
|
|
231
|
+
"selection-width": e.selectionWidth,
|
|
232
|
+
"hide-on-single-page": "",
|
|
233
|
+
selection: e.selection,
|
|
234
|
+
index: e.index,
|
|
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
|
+
key: t.prop,
|
|
241
|
+
label: t.label,
|
|
242
|
+
width: t.width,
|
|
243
|
+
"dict-type": t.dictType,
|
|
244
|
+
clickable: t.clickable,
|
|
245
|
+
align: t.align,
|
|
246
|
+
prop: t.prop,
|
|
247
|
+
options: t.options,
|
|
248
|
+
"show-overflow-tooltip": !t.editable && t.showOverflowTooltip
|
|
249
|
+
}, {
|
|
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
|
+
row: n,
|
|
255
|
+
column: r,
|
|
256
|
+
index: i
|
|
257
|
+
}),
|
|
258
|
+
y("列默认插槽,名字和 prop 保持一致"),
|
|
259
|
+
k(e.$slots, t.prop, {
|
|
260
|
+
row: n,
|
|
261
|
+
column: r,
|
|
262
|
+
wrapCol: !1,
|
|
263
|
+
index: i,
|
|
264
|
+
prop: e.prop ? `${e.prop}[${i}].${t.prop}` : null,
|
|
265
|
+
required: t.required,
|
|
266
|
+
editable: t.editable
|
|
267
|
+
}, () => {
|
|
268
|
+
var e;
|
|
269
|
+
return [g.enabled && t.editable === !0 ? (D(), b(_, { key: 0 }, [g.getCellType(n, t) === "input" ? (D(), v(R, T({
|
|
270
|
+
key: 0,
|
|
271
|
+
ref_for: !0
|
|
272
|
+
}, g.getInputAttr(n, t, i), {
|
|
273
|
+
onBlur: () => g.onBlur(n, t),
|
|
274
|
+
onInput: (e) => g.onInput(n, e, t)
|
|
275
|
+
}), null, 16, ["onBlur", "onInput"])) : g.getCellType(n, t) === "checkbox1" ? (D(), v(z, T({
|
|
276
|
+
key: 1,
|
|
277
|
+
ref_for: !0
|
|
278
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : g.getCellType(n, t) === "inputPhoneNumber" ? (D(), v(q, T({
|
|
279
|
+
key: 2,
|
|
280
|
+
ref_for: !0
|
|
281
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : g.getCellType(n, t) === "user" ? (D(), b(_, { key: 3 }, [t.single ? (D(), v(J, T({
|
|
282
|
+
key: 0,
|
|
283
|
+
ref_for: !0
|
|
284
|
+
}, g.getInputAttr(n, t, i), {
|
|
285
|
+
id: n[r.idProp || `${r.property}Id`],
|
|
286
|
+
"onUpdate:id": (e) => n[r.idProp || `${r.property}Id`] = e,
|
|
287
|
+
name: n[r.property],
|
|
288
|
+
"onUpdate:name": (e) => n[r.property] = e,
|
|
289
|
+
onInput: (e) => g.onInput(n, e, t)
|
|
290
|
+
}), null, 16, [
|
|
291
|
+
"id",
|
|
292
|
+
"onUpdate:id",
|
|
293
|
+
"name",
|
|
294
|
+
"onUpdate:name",
|
|
295
|
+
"onInput"
|
|
296
|
+
])) : (D(), v(J, T({
|
|
297
|
+
key: 1,
|
|
298
|
+
ref_for: !0
|
|
299
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"]))], 64)) : g.getCellType(n, t) === "department" ? (D(), b(_, { key: 4 }, [t.single ? (D(), v(Y, T({
|
|
300
|
+
key: 0,
|
|
301
|
+
ref_for: !0
|
|
302
|
+
}, g.getInputAttr(n, t, i), {
|
|
303
|
+
name: n[r.property],
|
|
304
|
+
"onUpdate:name": (e) => n[r.property] = e,
|
|
305
|
+
onInput: (e) => g.onInput(n, e, t)
|
|
306
|
+
}), null, 16, [
|
|
307
|
+
"name",
|
|
308
|
+
"onUpdate:name",
|
|
309
|
+
"onInput"
|
|
310
|
+
])) : (D(), v(Y, T({
|
|
311
|
+
key: 1,
|
|
312
|
+
ref_for: !0
|
|
313
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"]))], 64)) : g.getCellType(n, t) === "select" ? (D(), v(X, T({
|
|
314
|
+
key: 5,
|
|
315
|
+
ref_for: !0
|
|
316
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : g.getCellType(n, t) === "datePicker" ? (D(), v(Z, T({
|
|
317
|
+
key: 6,
|
|
318
|
+
ref_for: !0
|
|
319
|
+
}, g.getInputAttr(n, t, i), {
|
|
320
|
+
start: n[t.start],
|
|
321
|
+
"onUpdate:start": (e) => n[t.start] = e,
|
|
322
|
+
end: n[t.end],
|
|
323
|
+
"onUpdate:end": (e) => n[t.end] = e,
|
|
324
|
+
onInput: (e) => g.onInput(n, e, t)
|
|
325
|
+
}), null, 16, [
|
|
326
|
+
"start",
|
|
327
|
+
"onUpdate:start",
|
|
328
|
+
"end",
|
|
329
|
+
"onUpdate:end",
|
|
330
|
+
"onInput"
|
|
331
|
+
])) : g.getCellType(n, t) === "cascader" ? (D(), v(Q, T({
|
|
332
|
+
key: 7,
|
|
333
|
+
ref_for: !0
|
|
334
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : g.getCellType(n, t) === "checkbox" ? (D(), v(te, T({
|
|
335
|
+
key: 8,
|
|
336
|
+
ref_for: !0
|
|
337
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : g.getCellType(n, t) === "number" ? (D(), v(ne, T({
|
|
338
|
+
key: 9,
|
|
339
|
+
ref_for: !0
|
|
340
|
+
}, g.getInputAttr(n, t, i), { onInput: (e) => g.onInput(n, e, t) }), null, 16, ["onInput"])) : (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
|
+
key: 1,
|
|
342
|
+
"dict-type": t.dictType,
|
|
343
|
+
"id-as-value": t.idAsValue,
|
|
344
|
+
"label-as-value": t.labelAsValue,
|
|
345
|
+
column: r,
|
|
346
|
+
row: n,
|
|
347
|
+
options: t.options
|
|
348
|
+
}, null, 8, [
|
|
349
|
+
"dict-type",
|
|
350
|
+
"id-as-value",
|
|
351
|
+
"label-as-value",
|
|
352
|
+
"column",
|
|
353
|
+
"row",
|
|
354
|
+
"options"
|
|
355
|
+
])) : (D(), b(_, { key: 2 }, [C(j(g.getVal(n, r, t)), 1)], 64))];
|
|
356
|
+
})
|
|
357
|
+
]),
|
|
358
|
+
_: 2
|
|
359
|
+
}, 1032, [
|
|
360
|
+
"label",
|
|
361
|
+
"width",
|
|
362
|
+
"dict-type",
|
|
363
|
+
"clickable",
|
|
364
|
+
"align",
|
|
365
|
+
"prop",
|
|
366
|
+
"options",
|
|
367
|
+
"show-overflow-tooltip"
|
|
368
|
+
]))), 128))]),
|
|
369
|
+
k(e.$slots, "handle", {
|
|
370
|
+
add: g.add,
|
|
371
|
+
remove: g.remove
|
|
372
|
+
}),
|
|
373
|
+
!e.disabled && g.hasHandleMenus ? (D(), v($, {
|
|
374
|
+
key: 0,
|
|
375
|
+
label: "操作",
|
|
376
|
+
width: "80",
|
|
377
|
+
align: "center",
|
|
378
|
+
prop: "menu"
|
|
379
|
+
}, {
|
|
380
|
+
header: N(({ column: t, $index: n }) => [k(e.$slots, "handle-column-header", {
|
|
381
|
+
column: t,
|
|
382
|
+
index: n
|
|
383
|
+
}, () => [C(j(t.label), 1)])]),
|
|
384
|
+
default: N(({ row: t, $index: n }) => {
|
|
385
|
+
var r, i, a;
|
|
386
|
+
return [(r = e.handleMenus) != null && r.includes("add") && ((i = e.modelValue) == null ? void 0 : i.length) < e.limit ? (D(), b("i", {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
389
|
+
style: {
|
|
390
|
+
"margin-right": "5px",
|
|
391
|
+
"font-size": "20px",
|
|
392
|
+
cursor: "pointer"
|
|
393
|
+
},
|
|
394
|
+
title: "添加",
|
|
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
|
+
key: 1,
|
|
398
|
+
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
399
|
+
confirm: "",
|
|
400
|
+
text: "",
|
|
401
|
+
title: "删除",
|
|
402
|
+
message: "您确定要删除该行吗?",
|
|
403
|
+
onClick: P((e) => g.remove(t, n), ["stop"])
|
|
404
|
+
}, null, 8, ["onClick"])) : y("v-if", !0)];
|
|
405
|
+
}),
|
|
406
|
+
_: 3
|
|
407
|
+
})) : y("v-if", !0)
|
|
408
|
+
]),
|
|
409
|
+
_: 2
|
|
410
|
+
}, [!e.disabled || g.hasToolBarMenu ? {
|
|
411
|
+
name: "toolbar",
|
|
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
|
+
}, () => {
|
|
421
|
+
var t, r, i;
|
|
422
|
+
return [
|
|
423
|
+
(t = e.toolbarMenus) != null && t.includes("add") ? (D(), v(L, {
|
|
424
|
+
key: 0,
|
|
425
|
+
class: "table-header-button add",
|
|
426
|
+
icon: "el-icon-circle-plus",
|
|
427
|
+
type: "text",
|
|
428
|
+
onClick: g.addRow
|
|
429
|
+
}, {
|
|
430
|
+
default: N(() => [...n[2] || (n[2] = [C(" 添加 ", -1)])]),
|
|
431
|
+
_: 1
|
|
432
|
+
}, 8, ["onClick"])) : y("v-if", !0),
|
|
433
|
+
(r = e.toolbarMenus) != null && r.includes("delete") ? (D(), v(L, {
|
|
434
|
+
key: 1,
|
|
435
|
+
disabled: h.selectedRows.length <= 0,
|
|
436
|
+
class: "table-header-button remove",
|
|
437
|
+
confirm: "",
|
|
438
|
+
message: "您确定要删除选中的记录吗?",
|
|
439
|
+
icon: "el-icon-error",
|
|
440
|
+
text: "",
|
|
441
|
+
onClick: g.delRow
|
|
442
|
+
}, {
|
|
443
|
+
default: N(() => [...n[3] || (n[3] = [C(" 删除 ", -1)])]),
|
|
444
|
+
_: 1
|
|
445
|
+
}, 8, ["disabled", "onClick"])) : y("v-if", !0),
|
|
446
|
+
(i = e.toolbarMenus) != null && i.includes("refresh") ? (D(), v(L, {
|
|
447
|
+
key: 2,
|
|
448
|
+
class: "table-header-button refresh",
|
|
449
|
+
icon: "el-icon-refresh-left",
|
|
450
|
+
text: "",
|
|
451
|
+
disabled: !1,
|
|
452
|
+
onClick: g.refresh
|
|
453
|
+
}, {
|
|
454
|
+
default: N(() => [...n[4] || (n[4] = [C(" 刷新 ", -1)])]),
|
|
455
|
+
_: 1
|
|
456
|
+
}, 8, ["onClick"])) : y("v-if", !0)
|
|
457
|
+
];
|
|
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
|
+
})])])])]),
|
|
466
|
+
key: "0"
|
|
467
|
+
} : void 0, e.bottomAddButton ? {
|
|
468
|
+
name: "empty",
|
|
469
|
+
fn: N(() => [x("i", {
|
|
470
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
471
|
+
style: {
|
|
472
|
+
"font-size": "20px",
|
|
473
|
+
cursor: "pointer"
|
|
474
|
+
},
|
|
475
|
+
title: "添加",
|
|
476
|
+
onClick: n[0] || (n[0] = P((t) => {
|
|
477
|
+
var n;
|
|
478
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
479
|
+
}, ["stop"]))
|
|
480
|
+
})]),
|
|
481
|
+
key: "1"
|
|
482
|
+
} : void 0]), 1040, [
|
|
483
|
+
"data",
|
|
484
|
+
"api",
|
|
485
|
+
"show-summary",
|
|
486
|
+
"descs",
|
|
487
|
+
"ascs",
|
|
488
|
+
"page-size",
|
|
489
|
+
"selection-width",
|
|
490
|
+
"selection",
|
|
491
|
+
"index",
|
|
492
|
+
"row-db-click",
|
|
493
|
+
"onRowDblclick",
|
|
494
|
+
"onSelectionChange"
|
|
495
|
+
]),
|
|
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
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
499
|
+
style: {
|
|
500
|
+
"font-size": "20px",
|
|
501
|
+
cursor: "pointer"
|
|
502
|
+
},
|
|
503
|
+
title: "添加",
|
|
504
|
+
onClick: n[1] || (n[1] = P((t) => {
|
|
505
|
+
var n;
|
|
506
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
507
|
+
}, ["stop"]))
|
|
508
|
+
})])) : y("v-if", !0)
|
|
509
|
+
], 2);
|
|
510
|
+
}
|
|
511
|
+
var J = /* @__PURE__ */ i(z, [["render", q]]);
|
|
512
|
+
//#endregion
|
|
513
|
+
export { R as n, J as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import { n as t, t as n } from "./
|
|
3
|
-
import { t as r } from "./
|
|
1
|
+
import { n as e } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n as t, t as n } from "./BNXbI4OG.mjs";
|
|
3
|
+
import { t as r } from "./DwkOWXIR.mjs";
|
|
4
4
|
import { createVNode as i, isVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
5
5
|
//#region src/components/form/props/textarea.ts
|
|
6
6
|
var c = {
|
|
@@ -78,25 +78,14 @@ function l(e) {
|
|
|
78
78
|
var u = {
|
|
79
79
|
name: "FormTextarea",
|
|
80
80
|
inheritAttrs: !1,
|
|
81
|
-
props: {
|
|
82
|
-
...c,
|
|
83
|
-
maxlength: {
|
|
84
|
-
type: [String, Number],
|
|
85
|
-
default: 800
|
|
86
|
-
},
|
|
87
|
-
block: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: !0
|
|
90
|
-
}
|
|
91
|
-
},
|
|
81
|
+
props: { ...c },
|
|
92
82
|
emits: { ...e },
|
|
93
83
|
setup(e, { slots: t, attrs: n }) {
|
|
94
84
|
let a = s(e, "modelValue");
|
|
95
85
|
return () => i(r, o(e, n, {
|
|
96
|
-
maxlength: e.maxlength,
|
|
97
|
-
block: e.block,
|
|
98
86
|
modelValue: a.value,
|
|
99
87
|
"onUpdate:modelValue": (e) => a.value = e,
|
|
88
|
+
block: e.block === void 0 ? !0 : e.block,
|
|
100
89
|
type: "textarea"
|
|
101
90
|
}), l(t) ? t : { default: () => [t] });
|
|
102
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as e, t } from "./DcTVYqeJ.mjs";
|
|
2
|
-
import { t as n } from "./
|
|
2
|
+
import { t as n } from "./7GmKqdbC.mjs";
|
|
3
3
|
import { t as r } from "./CkOD-_VV.mjs";
|
|
4
4
|
import { computePosition as i, delay as a, fastClone as o, findTreeChildren as s, hasOwn as c, isFunction as l, isNotEmpty as u, isPlainObject as d, isUndefined as f, isVerticalScrollbarVisible as p, patch as m, scrollbarWidth as h } from "@web-utils/core";
|
|
5
5
|
import { Fragment as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, mergeProps as C, normalizeClass as w, normalizeStyle as T, openBlock as E, renderSlot as D, toDisplayString as O, toHandlers as k, vShow as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import { n as t, t as n } from "./
|
|
1
|
+
import { n as e } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n as t, t as n } from "./DwkOWXIR.mjs";
|
|
3
3
|
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
4
4
|
//#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
|
|
5
5
|
function s(e) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as e } from "./DcTVYqeJ.mjs";
|
|
2
|
-
import { o as t, r as n } from "./
|
|
3
|
-
import { n as r } from "./
|
|
2
|
+
import { o as t, r as n } from "./BHbMJZPp.mjs";
|
|
3
|
+
import { n as r } from "./BNXbI4OG.mjs";
|
|
4
4
|
import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
|
|
5
5
|
import { ElImage as s } from "element-plus/es";
|
|
6
6
|
//#region src/components/form/props/image.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t, t as n } from "./
|
|
2
|
-
import { n as r, t as i } from "./
|
|
1
|
+
import { i as e, n as t, t as n } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n as r, t as i } from "./BNXbI4OG.mjs";
|
|
3
3
|
import { validatePhoneNum as a } from "@web-utils/core";
|
|
4
4
|
import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
|
|
5
5
|
import { ElInput as u } from "element-plus/es";
|
|
@@ -33,7 +33,7 @@ var m = {
|
|
|
33
33
|
minlength: [String, Number],
|
|
34
34
|
showWordLimit: {
|
|
35
35
|
type: Boolean,
|
|
36
|
-
default: !
|
|
36
|
+
default: !1
|
|
37
37
|
},
|
|
38
38
|
wordLimitPosition: {
|
|
39
39
|
type: String,
|
|
@@ -102,6 +102,7 @@ var m = {
|
|
|
102
102
|
suffixIcon: !0,
|
|
103
103
|
placeholder: !0,
|
|
104
104
|
modelValue: !0,
|
|
105
|
+
block: !0,
|
|
105
106
|
readonlyGrey: !0,
|
|
106
107
|
picker: !0,
|
|
107
108
|
append: !0,
|
|
@@ -114,7 +115,7 @@ var m = {
|
|
|
114
115
|
props: { ...m },
|
|
115
116
|
emits: { ...t },
|
|
116
117
|
setup(t, { emit: r, slots: i, attrs: p }) {
|
|
117
|
-
let m = l(t, "modelValue"), h = `请输入正确的${t.label}!`, { render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = e(t, {
|
|
118
|
+
let m = l(t, "modelValue"), h = `请输入正确的${t.label}!`, { render: _, placeholder: v, disabled: y, listeners: b, inputProps: x, printing: S } = e(t, {
|
|
118
119
|
emit: r,
|
|
119
120
|
slots: i,
|
|
120
121
|
attrs: p,
|
|
@@ -132,7 +133,7 @@ var m = {
|
|
|
132
133
|
}),
|
|
133
134
|
predicate: g
|
|
134
135
|
});
|
|
135
|
-
return () => _({ vNodes: s(u, c(b.value, x.value, {
|
|
136
|
+
return () => _({ vNodes: S.value ? t.modelValue : s(u, c(b.value, x.value, {
|
|
136
137
|
class: ["form-input", {
|
|
137
138
|
"is-readonly": t.readonlyGrey && t.readonly && !t.picker,
|
|
138
139
|
"el-input-cursor-pointer": t.picker && !y.value
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as e } from "./DcTVYqeJ.mjs";
|
|
2
2
|
import { goBack as t, hasAuthority as n } from "../api/index.mjs";
|
|
3
3
|
import { toolbarContextKey as r } from "../constants/index.mjs";
|
|
4
|
-
import { t as i } from "./
|
|
4
|
+
import { t as i } from "./7GmKqdbC.mjs";
|
|
5
5
|
import { NOOP as a, capitalize as o } from "@web-utils/core";
|
|
6
6
|
import { Comment as s, createVNode as c } from "vue";
|
|
7
7
|
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n } from "./BNXbI4OG.mjs";
|
|
3
3
|
import { computed as r, createVNode as i, mergeProps as a } from "vue";
|
|
4
4
|
import { ElDatePicker as o } from "element-plus/es";
|
|
5
5
|
import { toDate as s } from "@web-utils/integrations/dayjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n } from "./BNXbI4OG.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElCheckbox as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/checkbox.ts
|
|
@@ -64,7 +64,11 @@ var s = {
|
|
|
64
64
|
}, c = {
|
|
65
65
|
modelValue: !0,
|
|
66
66
|
disabled: !0,
|
|
67
|
-
labelValue: !0
|
|
67
|
+
labelValue: !0,
|
|
68
|
+
trueLabel: !0,
|
|
69
|
+
falseLabel: !0,
|
|
70
|
+
trueValue: !0,
|
|
71
|
+
falseValue: !0
|
|
68
72
|
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
69
73
|
name: "FormCheckbox",
|
|
70
74
|
inheritAttrs: !1,
|
|
@@ -81,6 +85,8 @@ var s = {
|
|
|
81
85
|
label: t.labelValue,
|
|
82
86
|
modelValue: u.value,
|
|
83
87
|
"onUpdate:modelValue": (e) => u.value = e,
|
|
88
|
+
trueValue: t.trueLabel ?? t.trueValue,
|
|
89
|
+
falseValue: t.falseLabel ?? t.falseValue,
|
|
84
90
|
disabled: f.value
|
|
85
91
|
}), { default: s.default }) });
|
|
86
92
|
}
|