@web-utils/form-ui 1.0.0-beta46 → 1.0.0-beta48
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/{C9dGL28n.mjs → 6yfBZFOB.mjs} +2 -2
- package/chunks/B-zqRAXo.mjs +69 -0
- package/chunks/{CXvGoZKJ.mjs → B1IPSTA6.mjs} +2 -2
- package/chunks/B3pkJUCx2.mjs +146 -0
- package/chunks/{Ct5bDJ50.mjs → B9gA65rt2.mjs} +3 -3
- package/chunks/{C1AgOUe_.mjs → BA2KEptL.mjs} +2 -2
- package/chunks/BRRcYOud.mjs +613 -0
- package/chunks/{Bm5eiSmT.mjs → BUGCiCnl.mjs} +11 -7
- package/chunks/{DiJyms_r.mjs → BbSPWDDZ.mjs} +2 -2
- package/chunks/{BH_JJ8Xh.mjs → BfxDxIg0.mjs} +2 -2
- package/chunks/{C3Uo82-I.mjs → BqWvBF14.mjs} +3 -3
- package/chunks/BsZgAJX_2.mjs +81 -0
- package/chunks/{DXYgAmil.mjs → BtcjAHE6.mjs} +2 -2
- package/chunks/{DhtHh0jk.mjs → ByHz4mmh.mjs} +2 -2
- package/chunks/C-D7jeLT2.mjs +568 -0
- package/chunks/{BufIRDd0.mjs → C2zgFLYO.mjs} +1 -1
- package/chunks/{XCGWTz41.mjs → CAd1zK9Q.mjs} +2 -2
- package/chunks/{CSyJ-vEx.mjs → CJdkjadi.mjs} +1 -1
- package/chunks/{CFOGMFgo.mjs → CabldOLo.mjs} +17 -10
- package/chunks/{Bd1UFJic.mjs → Cln3RBAD.mjs} +21 -21
- package/chunks/{CTKmEf2M.mjs → CqoVAnxC2.mjs} +2 -2
- package/chunks/{DF9fJMQS.mjs → CuAoMR3n.mjs} +3 -3
- package/chunks/{XqRTtFfp.mjs → CxTg0r4n.mjs} +1 -1
- package/chunks/{pdwFQpA8.mjs → D0Zg2CV0.mjs} +3 -3
- package/chunks/{BsCS7SB5.mjs → DA7oGHSX.mjs} +2 -2
- package/chunks/DOZRzqlo.mjs +37 -0
- package/chunks/{Cj59E77g.mjs → D_qiRmiE.mjs} +5 -5
- package/chunks/{cmuHpsX6.mjs → DcTVYqeJ.mjs} +29 -25
- package/chunks/{B3ajWLh3.mjs → Dkd5BC98.mjs} +2 -2
- package/chunks/{ChmDDqoZ2.mjs → GI8krYU82.mjs} +1 -1
- package/chunks/{D8UVq1t1.mjs → V2p-PCpL.mjs} +6 -6
- package/chunks/{taicx2sd.mjs → bFbPPcdq.mjs} +2 -2
- package/chunks/{TvNHGVAP.mjs → eae6huQB.mjs} +2 -2
- package/chunks/gCeDFHo1.mjs +32 -0
- package/chunks/{Cab-ZjRx.mjs → gLPy4Sus.mjs} +3 -3
- package/chunks/{o6VhYAN52.mjs → hzaYr6Ud2.mjs} +2 -2
- package/chunks/{CqTcEefA.mjs → pIzhYsBe.mjs} +2 -2
- package/chunks/{CWfUPCtS.mjs → vXQf89tS.mjs} +274 -273
- package/chunks/{BWBHzD5N.mjs → wXeqV-_7.mjs} +2 -2
- package/confirm-button/index.d.ts +2 -0
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.d.ts +2 -0
- package/confirmable/index.mjs +1 -1
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +2 -2
- package/element-dialog/index.mjs +1 -1
- package/{resize-observer → element-resize-observer}/index.mjs +3 -3
- package/form-button/index.d.ts +2 -0
- package/form-card/index.mjs +2 -2
- package/form-cascader/index.d.ts +3 -3
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +2 -0
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/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-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +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.d.ts +269 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/helper/dictionary.mjs +7 -7
- package/iframe-window/index.mjs +1 -1
- package/index.css +1 -1
- package/index.d.ts +8 -3
- package/index.mjs +55 -50
- package/package.json +1 -1
- package/pageable-table/index.d.ts +7 -7
- package/pageable-table/index.mjs +1 -1
- package/sub-table/index.d.ts +100 -0
- package/sub-table/index.mjs +472 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +97 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.d.ts +18 -8
- package/table-column-def/index.mjs +3 -3
- package/table-view/index.mjs +107 -106
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.d.ts +2 -2
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +52 -51
- package/year-calendar/index.mjs +1 -1
- package/chunks/CLPSCSsy.mjs +0 -603
- package/chunks/CuG2Q-PM.mjs +0 -100
- package/form-check-box-group/index.mjs +0 -2
- package/chunks/{Ds_Tpa_M.mjs → BBERmTup.mjs} +0 -0
- package/chunks/{B1MSrc6f.mjs → CkOD-_VV.mjs} +0 -0
- package/chunks/{DDmQcNm6.mjs → DOP3aBxf.mjs} +0 -0
- package/chunks/{DJe97Fgi.mjs → hlha6Bhc.mjs} +0 -0
- package/{resize-observer → element-resize-observer}/index.d.ts +0 -0
- package/{resize-observer → element-resize-observer}/style.css +0 -0
- package/{form-check-box-group → form-checkbox-group}/index.d.ts +1 -1
- /package/{form-check-box-group → form-checkbox-group}/style.css +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import n from "../sub-table/index.mjs";
|
|
3
|
+
import { n as r, t as i } from "./gCeDFHo1.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o, ref as s, useModel as c } from "vue";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/form/FormTable.vue
|
|
7
|
+
var l = {
|
|
8
|
+
name: "FormTable",
|
|
9
|
+
props: { ...i },
|
|
10
|
+
emits: {
|
|
11
|
+
...t,
|
|
12
|
+
"add-row": null
|
|
13
|
+
},
|
|
14
|
+
setup(t, { emit: i, attrs: l, slots: u }) {
|
|
15
|
+
let d = c(t, "modelValue"), f = s([]), p = (e) => {
|
|
16
|
+
f.value = e;
|
|
17
|
+
}, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = e(t, {
|
|
18
|
+
emit: i,
|
|
19
|
+
slots: u,
|
|
20
|
+
attrs: l,
|
|
21
|
+
predicate: r
|
|
22
|
+
});
|
|
23
|
+
return () => {
|
|
24
|
+
var e;
|
|
25
|
+
let r = {};
|
|
26
|
+
for (let n = 0; n < (((e = t.columns) == null ? void 0 : e.length) ?? 0); n++) {
|
|
27
|
+
let e = t.columns[n];
|
|
28
|
+
r[e.prop] = (t, n, r) => {
|
|
29
|
+
var i;
|
|
30
|
+
return (i = u[e.prop]) == null ? void 0 : i.call(u, t, n, r);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return m({ vNodes: a(n, o(_.value, v.value, {
|
|
34
|
+
prop: t.prop,
|
|
35
|
+
disabled: g.value,
|
|
36
|
+
modelValue: d.value,
|
|
37
|
+
"onUpdate:modelValue": (e) => d.value = e,
|
|
38
|
+
placeholder: h.value,
|
|
39
|
+
onSelectionChange: p
|
|
40
|
+
}), {
|
|
41
|
+
...r,
|
|
42
|
+
columns: ({ columns: e }) => {
|
|
43
|
+
var t;
|
|
44
|
+
return (t = u.columns) == null ? void 0 : t.call(u, { columns: e });
|
|
45
|
+
},
|
|
46
|
+
handle: ({ add: e, remove: t }) => {
|
|
47
|
+
var n;
|
|
48
|
+
return (n = u.handle) == null ? void 0 : n.call(u, {
|
|
49
|
+
add: e,
|
|
50
|
+
remove: t
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
tag: ({ column: e, row: t, $index: n }) => {
|
|
54
|
+
var r;
|
|
55
|
+
return (r = u.tag) == null ? void 0 : r.call(u, {
|
|
56
|
+
column: e,
|
|
57
|
+
row: t,
|
|
58
|
+
$index: n
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
"handle-column-header": ({ column: e, $index: t }) => {
|
|
62
|
+
var n;
|
|
63
|
+
return (n = u["handle-column-header"]) == null ? void 0 : n.call(u, {
|
|
64
|
+
column: e,
|
|
65
|
+
index: t
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
toolbar: ({ addRow: e, delRow: t, refresh: n }) => {
|
|
69
|
+
var r;
|
|
70
|
+
return (r = u.toolbar) == null ? void 0 : r.call(u, {
|
|
71
|
+
addRow: e,
|
|
72
|
+
delRow: t,
|
|
73
|
+
refresh: n
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}) });
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { l as t };
|
|
@@ -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 "./D_qiRmiE.mjs";
|
|
2
|
+
import { n } from "./CJdkjadi.mjs";
|
|
3
3
|
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
4
|
import { isNumber as i, isPlainObject as a, isString as o } from "@web-utils/core";
|
|
5
5
|
import { computed as s, createVNode as c, mergeProps as l, ref as u, watchEffect as d } from "vue";
|
|
@@ -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 "./D_qiRmiE.mjs";
|
|
2
|
+
import { n } from "./CJdkjadi.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElRate as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/rate.ts
|
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
import e from "../confirmable/index.mjs";
|
|
2
|
+
import t from "../confirm-button/index.mjs";
|
|
3
|
+
import { s as n } from "./DcTVYqeJ.mjs";
|
|
4
|
+
import { t as r } from "./DOZRzqlo.mjs";
|
|
5
|
+
import { t as i } from "./CxTg0r4n.mjs";
|
|
6
|
+
import { t as a } from "./CkOD-_VV.mjs";
|
|
7
|
+
import { n as o } from "./D_qiRmiE.mjs";
|
|
8
|
+
import { t as s } from "./Dkd5BC98.mjs";
|
|
9
|
+
import { t as c } from "./wXeqV-_7.mjs";
|
|
10
|
+
import { t as l } from "./CabldOLo.mjs";
|
|
11
|
+
import { t as u } from "./V2p-PCpL.mjs";
|
|
12
|
+
import { t as d } from "./B1IPSTA6.mjs";
|
|
13
|
+
import { t as f } from "./BbSPWDDZ.mjs";
|
|
14
|
+
import { t as p } from "./bFbPPcdq.mjs";
|
|
15
|
+
import { t as ee } from "./BtcjAHE6.mjs";
|
|
16
|
+
import { t as m } from "./BRRcYOud.mjs";
|
|
17
|
+
import h from "../table-column-def/index.mjs";
|
|
18
|
+
import { findTreeChildren as g, isFunction as _ } from "@web-utils/core";
|
|
19
|
+
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, normalizeClass as D, openBlock as O, renderList as k, renderSlot as A, toDisplayString as j, toHandlers as M, withCtx as N, withModifiers as P } from "vue";
|
|
20
|
+
import { formContextKey as F, formItemContextKey as I } from "element-plus";
|
|
21
|
+
import { cloneDeep as L } from "@web-utils/integrations/lodash";
|
|
22
|
+
//#region src/components/table/sub-table-plus.ts
|
|
23
|
+
var R = {
|
|
24
|
+
modelValue: Array,
|
|
25
|
+
prop: String,
|
|
26
|
+
columns: Array,
|
|
27
|
+
descs: Array,
|
|
28
|
+
ascs: Array,
|
|
29
|
+
limit: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: Infinity
|
|
32
|
+
},
|
|
33
|
+
disabled: Boolean,
|
|
34
|
+
showSummary: Boolean,
|
|
35
|
+
selection: Boolean,
|
|
36
|
+
index: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !0
|
|
39
|
+
},
|
|
40
|
+
selectionWidth: String,
|
|
41
|
+
toolbarMenus: Array,
|
|
42
|
+
handleMenus: Array,
|
|
43
|
+
fetchApi: Function,
|
|
44
|
+
delApi: Function,
|
|
45
|
+
bottomAddButton: Boolean,
|
|
46
|
+
initRow: Function,
|
|
47
|
+
onRowDbClick: Function,
|
|
48
|
+
showMessage: Boolean,
|
|
49
|
+
pageSize: Number
|
|
50
|
+
}, z = {
|
|
51
|
+
name: "SubTablePlus",
|
|
52
|
+
inject: {
|
|
53
|
+
elForm: {
|
|
54
|
+
from: F,
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
57
|
+
elFormItem: {
|
|
58
|
+
from: I,
|
|
59
|
+
default: ""
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
props: { ...R },
|
|
63
|
+
emits: {
|
|
64
|
+
...o,
|
|
65
|
+
"add-row": null
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
rows: [],
|
|
70
|
+
selectedRows: []
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
computed: {
|
|
74
|
+
enabled() {
|
|
75
|
+
return !this.disabled;
|
|
76
|
+
},
|
|
77
|
+
hasToolBarMenu() {
|
|
78
|
+
var e;
|
|
79
|
+
return (e = this.toolbarMenus) == null ? void 0 : e.length;
|
|
80
|
+
},
|
|
81
|
+
hasHandleMenus() {
|
|
82
|
+
var e;
|
|
83
|
+
return (e = this.handleMenus) == null ? void 0 : e.length;
|
|
84
|
+
},
|
|
85
|
+
rowProps() {
|
|
86
|
+
let e = {};
|
|
87
|
+
return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
|
|
88
|
+
e[t] = null;
|
|
89
|
+
}), e;
|
|
90
|
+
},
|
|
91
|
+
listeners() {
|
|
92
|
+
return n(this.$attrs);
|
|
93
|
+
},
|
|
94
|
+
filteredColumns() {
|
|
95
|
+
return this.columns.filter((e) => e.label && !e.hide && !e.slot);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
watch: {
|
|
99
|
+
modelValue: {
|
|
100
|
+
deep: !0,
|
|
101
|
+
immediate: !0,
|
|
102
|
+
handler(e) {
|
|
103
|
+
this.rows = e || [];
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
rows: {
|
|
107
|
+
deep: !0,
|
|
108
|
+
immediate: !0,
|
|
109
|
+
handler(e) {
|
|
110
|
+
this.$emit("update:modelValue", e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
methods: {
|
|
115
|
+
getCellType(e, t) {
|
|
116
|
+
return _(t.getType) ? t.getType(e, t) : t.type;
|
|
117
|
+
},
|
|
118
|
+
getInputAttr(e, t) {
|
|
119
|
+
return t.attrs && t.getAttrs ? {
|
|
120
|
+
...t.attrs,
|
|
121
|
+
...t.getAttrs(e)
|
|
122
|
+
} : t.attrs ? t.attrs : t.getAttrs ? t.getAttrs(e) : {};
|
|
123
|
+
},
|
|
124
|
+
isInputDisabled(e, t) {
|
|
125
|
+
var n;
|
|
126
|
+
return (n = t.isDisabled) == null ? void 0 : n.call(t, e);
|
|
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 (n.type === "select" && (r = n.attrs) != null && r.options) {
|
|
178
|
+
let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
|
|
179
|
+
if (r) return r.label || r.name;
|
|
180
|
+
}
|
|
181
|
+
if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
|
|
182
|
+
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
183
|
+
let [r] = g(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
184
|
+
if (r) return r[n.attrs.valueKey || "label"];
|
|
185
|
+
}
|
|
186
|
+
return e[t.property];
|
|
187
|
+
},
|
|
188
|
+
reloadTable() {
|
|
189
|
+
var e;
|
|
190
|
+
(e = this.$refs.table) == null || e.reload();
|
|
191
|
+
},
|
|
192
|
+
async refreshTable() {
|
|
193
|
+
var e;
|
|
194
|
+
await ((e = this.$refs.table) == null ? void 0 : e.getPage());
|
|
195
|
+
},
|
|
196
|
+
removeSelectedRows() {
|
|
197
|
+
this.$emit("update:modelValue", this.modelValue.filter((e) => !this.selectedRows.includes(e)));
|
|
198
|
+
},
|
|
199
|
+
rowDbClick(...e) {
|
|
200
|
+
var t;
|
|
201
|
+
(t = this.onRowDbClick) == null || t.call(this, ...e);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}, B = { class: "table-header flex-row" }, V = { class: "flex-item" }, H = { class: "flex-not-shrink" }, U = {
|
|
205
|
+
key: 0,
|
|
206
|
+
style: { color: "#f56c6c" }
|
|
207
|
+
}, W = ["title"], G = ["onClick"], K = {
|
|
208
|
+
key: 0,
|
|
209
|
+
class: "flex-row vertical-center horizon-center",
|
|
210
|
+
style: {
|
|
211
|
+
padding: "10px",
|
|
212
|
+
border: "1px solid #ebeef5",
|
|
213
|
+
"border-top": "none"
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
function q(n, a, o, g, _, F) {
|
|
217
|
+
var I, L;
|
|
218
|
+
let R = i, z = t, q = l, J = c, Y = p, X = ee, Z = d, Q = s, te = u, ne = f, re = r, $ = h, ie = e, ae = m;
|
|
219
|
+
return O(), x("div", { class: D(["sub-table-plus", { "hide-message": !n.showMessage }]) }, [
|
|
220
|
+
T(ae, E(n.$attrs, {
|
|
221
|
+
ref: "table",
|
|
222
|
+
"auto-height": "",
|
|
223
|
+
data: n.fetchApi ? null : _.rows,
|
|
224
|
+
api: n.fetchApi,
|
|
225
|
+
"payload-style": "body",
|
|
226
|
+
"show-summary": n.showSummary,
|
|
227
|
+
descs: n.descs,
|
|
228
|
+
ascs: n.ascs,
|
|
229
|
+
"page-size": n.pageSize,
|
|
230
|
+
"selection-width": n.selectionWidth,
|
|
231
|
+
"hide-on-single-page": "",
|
|
232
|
+
selection: n.selection,
|
|
233
|
+
index: n.index
|
|
234
|
+
}, M(F.listeners), { onSelectionChange: F.onSelectionChange }), C({
|
|
235
|
+
default: N(() => [
|
|
236
|
+
A(n.$slots, "columns", { columns: n.columns }, () => [(O(!0), x(v, null, k(F.filteredColumns, (e) => (O(), y($, {
|
|
237
|
+
key: `${e.prop}-${F.enabled}${e.type ? `-${e.type}` : ""}${e.required ? `-${e.required}` : ""}`,
|
|
238
|
+
label: e.label,
|
|
239
|
+
width: e.width,
|
|
240
|
+
"dict-type": e.dictType,
|
|
241
|
+
clickable: e.clickable,
|
|
242
|
+
align: e.align,
|
|
243
|
+
prop: e.prop,
|
|
244
|
+
options: e.options,
|
|
245
|
+
"show-overflow-tooltip": !e.editable && e.showOverflowTooltip
|
|
246
|
+
}, {
|
|
247
|
+
header: N(() => [!n.disabled && e.required ? (O(), x("span", U, "*")) : b("v-if", !0), S("span", { title: e.label }, j(e.label), 9, W)]),
|
|
248
|
+
default: N(({ row: t, column: r, $index: i }) => [
|
|
249
|
+
b("tag 插槽"),
|
|
250
|
+
A(n.$slots, "tag", {
|
|
251
|
+
row: t,
|
|
252
|
+
column: r,
|
|
253
|
+
index: i
|
|
254
|
+
}),
|
|
255
|
+
b("列默认插槽,名字和 prop 保持一致"),
|
|
256
|
+
A(n.$slots, e.prop, {
|
|
257
|
+
row: t,
|
|
258
|
+
column: r,
|
|
259
|
+
wrapCol: !1,
|
|
260
|
+
index: i,
|
|
261
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
262
|
+
required: e.required,
|
|
263
|
+
editable: e.editable
|
|
264
|
+
}, () => {
|
|
265
|
+
var a;
|
|
266
|
+
return [F.enabled && e.editable === !0 ? (O(), x(v, { key: 0 }, [F.getCellType(t, e) === "input" ? (O(), y(q, E({
|
|
267
|
+
key: 0,
|
|
268
|
+
"wrap-col": !1,
|
|
269
|
+
"model-value": t[r.property]
|
|
270
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
271
|
+
disabled: F.isInputDisabled(t, e),
|
|
272
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
273
|
+
required: e.required,
|
|
274
|
+
onBlur: () => F.onBlur(t, e),
|
|
275
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
276
|
+
}), null, 16, [
|
|
277
|
+
"model-value",
|
|
278
|
+
"disabled",
|
|
279
|
+
"prop",
|
|
280
|
+
"required",
|
|
281
|
+
"onBlur",
|
|
282
|
+
"onInput"
|
|
283
|
+
])) : F.getCellType(t, e) === "checkbox1" ? (O(), y(J, E({
|
|
284
|
+
key: 1,
|
|
285
|
+
"wrap-col": !1,
|
|
286
|
+
"model-value": t[r.property]
|
|
287
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
288
|
+
disabled: F.isInputDisabled(t, e),
|
|
289
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
290
|
+
required: e.required,
|
|
291
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
292
|
+
}), null, 16, [
|
|
293
|
+
"model-value",
|
|
294
|
+
"disabled",
|
|
295
|
+
"prop",
|
|
296
|
+
"required",
|
|
297
|
+
"onInput"
|
|
298
|
+
])) : F.getCellType(t, e) === "inputPhoneNumber" ? (O(), y(Y, E({
|
|
299
|
+
key: 2,
|
|
300
|
+
"wrap-col": !1,
|
|
301
|
+
"model-value": t[r.property]
|
|
302
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
303
|
+
disabled: F.isInputDisabled(t, e),
|
|
304
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
305
|
+
required: e.required,
|
|
306
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
307
|
+
}), null, 16, [
|
|
308
|
+
"model-value",
|
|
309
|
+
"disabled",
|
|
310
|
+
"prop",
|
|
311
|
+
"required",
|
|
312
|
+
"onInput"
|
|
313
|
+
])) : F.getCellType(t, e) === "select" ? (O(), x(v, { key: 3 }, [b(" <template v-else-if=\"getCellType(row, item) === 'user'\">\n <FormInputUser\n v-if=\"item.single\"\n v-model:id=\"row[column.idProp || `${column.property}Id`]\"\n v-model:name=\"row[column.property]\"\n :wrap-col=\"false\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n <FormInputUser\n v-else\n :wrap-col=\"false\"\n :model-value=\"row[column.property]\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n </template>\n <template v-else-if=\"getCellType(row, item) === 'department'\">\n <FormInputDepartment\n v-if=\"item.single\"\n v-model:name=\"row[column.property]\"\n :wrap-col=\"false\"\n :ou-type=\"item.ouType\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n <FormInputDepartment\n v-else\n :wrap-col=\"false\"\n :model-value=\"row[column.property]\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n </template>"), T(X, E({
|
|
314
|
+
"wrap-col": !1,
|
|
315
|
+
"model-value": t[r.property]
|
|
316
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
317
|
+
disabled: F.isInputDisabled(t, e),
|
|
318
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
319
|
+
required: e.required,
|
|
320
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
321
|
+
}), null, 16, [
|
|
322
|
+
"model-value",
|
|
323
|
+
"disabled",
|
|
324
|
+
"prop",
|
|
325
|
+
"required",
|
|
326
|
+
"onInput"
|
|
327
|
+
])], 64)) : F.getCellType(t, e) === "datePicker" ? (O(), y(Z, E({
|
|
328
|
+
key: 4,
|
|
329
|
+
ref_for: !0
|
|
330
|
+
}, F.getInputAttr(t, e), {
|
|
331
|
+
start: t[e.start],
|
|
332
|
+
"onUpdate:start": (n) => t[e.start] = n,
|
|
333
|
+
end: t[e.end],
|
|
334
|
+
"onUpdate:end": (n) => t[e.end] = n,
|
|
335
|
+
"wrap-col": !1,
|
|
336
|
+
"model-value": t[r.property],
|
|
337
|
+
disabled: F.isInputDisabled(t, e),
|
|
338
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
339
|
+
required: e.required,
|
|
340
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
341
|
+
}), null, 16, [
|
|
342
|
+
"start",
|
|
343
|
+
"onUpdate:start",
|
|
344
|
+
"end",
|
|
345
|
+
"onUpdate:end",
|
|
346
|
+
"model-value",
|
|
347
|
+
"disabled",
|
|
348
|
+
"prop",
|
|
349
|
+
"required",
|
|
350
|
+
"onInput"
|
|
351
|
+
])) : F.getCellType(t, e) === "cascader" ? (O(), y(Q, E({
|
|
352
|
+
key: 5,
|
|
353
|
+
"wrap-col": !1,
|
|
354
|
+
"model-value": t[r.property]
|
|
355
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
356
|
+
disabled: F.isInputDisabled(t, e),
|
|
357
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
358
|
+
required: e.required,
|
|
359
|
+
"label-key": e.labelKey,
|
|
360
|
+
"value-key": e.valueKey,
|
|
361
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
362
|
+
}), null, 16, [
|
|
363
|
+
"model-value",
|
|
364
|
+
"disabled",
|
|
365
|
+
"prop",
|
|
366
|
+
"required",
|
|
367
|
+
"label-key",
|
|
368
|
+
"value-key",
|
|
369
|
+
"onInput"
|
|
370
|
+
])) : F.getCellType(t, e) === "checkbox" ? (O(), y(te, E({
|
|
371
|
+
key: 6,
|
|
372
|
+
"wrap-col": !1,
|
|
373
|
+
"model-value": t[r.property]
|
|
374
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
375
|
+
disabled: F.isInputDisabled(t, e),
|
|
376
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
377
|
+
required: e.required,
|
|
378
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
379
|
+
}), null, 16, [
|
|
380
|
+
"model-value",
|
|
381
|
+
"disabled",
|
|
382
|
+
"prop",
|
|
383
|
+
"required",
|
|
384
|
+
"onInput"
|
|
385
|
+
])) : F.getCellType(t, e) === "number" ? (O(), y(ne, E({
|
|
386
|
+
key: 7,
|
|
387
|
+
"wrap-col": !1,
|
|
388
|
+
"model-value": t[r.property]
|
|
389
|
+
}, { ref_for: !0 }, F.getInputAttr(t, e), {
|
|
390
|
+
disabled: F.isInputDisabled(t, e),
|
|
391
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
392
|
+
required: e.required,
|
|
393
|
+
onInput: (n) => F.onInput(t, n, e)
|
|
394
|
+
}), null, 16, [
|
|
395
|
+
"model-value",
|
|
396
|
+
"disabled",
|
|
397
|
+
"prop",
|
|
398
|
+
"required",
|
|
399
|
+
"onInput"
|
|
400
|
+
])) : b("v-if", !0)], 64)) : e.dictType || (a = e.options) != null && a.length ? (O(), y(re, {
|
|
401
|
+
key: 1,
|
|
402
|
+
"dict-type": e.dictType,
|
|
403
|
+
"id-as-value": e.idAsValue,
|
|
404
|
+
"label-as-value": e.labelAsValue,
|
|
405
|
+
column: r,
|
|
406
|
+
row: t,
|
|
407
|
+
options: e.options
|
|
408
|
+
}, null, 8, [
|
|
409
|
+
"dict-type",
|
|
410
|
+
"id-as-value",
|
|
411
|
+
"label-as-value",
|
|
412
|
+
"column",
|
|
413
|
+
"row",
|
|
414
|
+
"options"
|
|
415
|
+
])) : (O(), x(v, { key: 2 }, [w(j(F.getVal(t, r, e)), 1)], 64))];
|
|
416
|
+
})
|
|
417
|
+
]),
|
|
418
|
+
_: 2
|
|
419
|
+
}, 1032, [
|
|
420
|
+
"label",
|
|
421
|
+
"width",
|
|
422
|
+
"dict-type",
|
|
423
|
+
"clickable",
|
|
424
|
+
"align",
|
|
425
|
+
"prop",
|
|
426
|
+
"options",
|
|
427
|
+
"show-overflow-tooltip"
|
|
428
|
+
]))), 128))]),
|
|
429
|
+
A(n.$slots, "handle", {
|
|
430
|
+
add: F.add,
|
|
431
|
+
remove: F.remove
|
|
432
|
+
}),
|
|
433
|
+
!n.disabled && F.hasHandleMenus ? (O(), y($, {
|
|
434
|
+
key: 0,
|
|
435
|
+
label: "操作",
|
|
436
|
+
width: "80",
|
|
437
|
+
align: "center",
|
|
438
|
+
prop: "menu"
|
|
439
|
+
}, {
|
|
440
|
+
header: N(({ column: e, $index: t }) => [A(n.$slots, "handle-column-header", {
|
|
441
|
+
column: e,
|
|
442
|
+
index: t
|
|
443
|
+
}, () => [w(j(e.label), 1)])]),
|
|
444
|
+
default: N(({ row: e, $index: t }) => {
|
|
445
|
+
var r, i, a;
|
|
446
|
+
return [(r = n.handleMenus) != null && r.includes("add") && ((i = n.modelValue) == null ? void 0 : i.length) < n.limit ? (O(), x("i", {
|
|
447
|
+
key: 0,
|
|
448
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
449
|
+
style: {
|
|
450
|
+
"margin-right": "5px",
|
|
451
|
+
"font-size": "20px",
|
|
452
|
+
cursor: "pointer"
|
|
453
|
+
},
|
|
454
|
+
title: "添加",
|
|
455
|
+
onClick: P((n) => F.add(e, t), ["stop"])
|
|
456
|
+
}, null, 8, G)) : b("v-if", !0), (a = n.handleMenus) != null && a.includes("delete") ? (O(), y(ie, {
|
|
457
|
+
key: 1,
|
|
458
|
+
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
459
|
+
title: "删除",
|
|
460
|
+
message: "您确定要删除该行吗?",
|
|
461
|
+
onClick: P((n) => F.remove(e, t), ["stop"])
|
|
462
|
+
}, null, 8, ["onClick"])) : b("v-if", !0)];
|
|
463
|
+
}),
|
|
464
|
+
_: 3
|
|
465
|
+
})) : b("v-if", !0)
|
|
466
|
+
]),
|
|
467
|
+
_: 2
|
|
468
|
+
}, [!n.disabled || F.hasToolBarMenu ? {
|
|
469
|
+
name: "toolbar",
|
|
470
|
+
fn: N(() => [S("div", B, [A(n.$slots, "toolbar", {
|
|
471
|
+
addRow: F.addRow,
|
|
472
|
+
delRow: F.delRow,
|
|
473
|
+
refresh: F.refresh
|
|
474
|
+
}, () => [S("div", V, [A(n.$slots, "toolbar-left", {
|
|
475
|
+
addRow: F.addRow,
|
|
476
|
+
delRow: F.delRow,
|
|
477
|
+
refresh: F.refresh
|
|
478
|
+
}, () => {
|
|
479
|
+
var e, t, r;
|
|
480
|
+
return [
|
|
481
|
+
(e = n.toolbarMenus) != null && e.includes("add") ? (O(), y(R, {
|
|
482
|
+
key: 0,
|
|
483
|
+
class: "table-header-button add",
|
|
484
|
+
icon: "el-icon-circle-plus",
|
|
485
|
+
type: "text",
|
|
486
|
+
onClick: F.addRow
|
|
487
|
+
}, {
|
|
488
|
+
default: N(() => [...a[2] || (a[2] = [w(" 添加 ", -1)])]),
|
|
489
|
+
_: 1
|
|
490
|
+
}, 8, ["onClick"])) : b("v-if", !0),
|
|
491
|
+
(t = n.toolbarMenus) != null && t.includes("delete") ? (O(), y(z, {
|
|
492
|
+
key: 1,
|
|
493
|
+
disabled: _.selectedRows.length <= 0,
|
|
494
|
+
class: "table-header-button remove",
|
|
495
|
+
message: "您确定要删除选中的记录吗?",
|
|
496
|
+
icon: "el-icon-error",
|
|
497
|
+
type: "text",
|
|
498
|
+
onClick: F.delRow
|
|
499
|
+
}, {
|
|
500
|
+
default: N(() => [...a[3] || (a[3] = [w(" 删除 ", -1)])]),
|
|
501
|
+
_: 1
|
|
502
|
+
}, 8, ["disabled", "onClick"])) : b("v-if", !0),
|
|
503
|
+
(r = n.toolbarMenus) != null && r.includes("refresh") ? (O(), y(R, {
|
|
504
|
+
key: 2,
|
|
505
|
+
class: "table-header-button refresh",
|
|
506
|
+
icon: "el-icon-refresh-left",
|
|
507
|
+
type: "text",
|
|
508
|
+
disabled: !1,
|
|
509
|
+
onClick: F.refresh
|
|
510
|
+
}, {
|
|
511
|
+
default: N(() => [...a[4] || (a[4] = [w(" 刷新 ", -1)])]),
|
|
512
|
+
_: 1
|
|
513
|
+
}, 8, ["onClick"])) : b("v-if", !0)
|
|
514
|
+
];
|
|
515
|
+
}), A(n.$slots, "toolbar-left-append", {
|
|
516
|
+
addRow: F.addRow,
|
|
517
|
+
delRow: F.delRow,
|
|
518
|
+
refresh: F.refresh
|
|
519
|
+
})]), S("div", H, [A(n.$slots, "toolbar-right", {
|
|
520
|
+
removeSelectedRows: F.removeSelectedRows,
|
|
521
|
+
selectedRows: _.selectedRows
|
|
522
|
+
})])])])]),
|
|
523
|
+
key: "0"
|
|
524
|
+
} : void 0, n.bottomAddButton ? {
|
|
525
|
+
name: "empty",
|
|
526
|
+
fn: N(() => [S("i", {
|
|
527
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
528
|
+
style: {
|
|
529
|
+
"font-size": "20px",
|
|
530
|
+
cursor: "pointer"
|
|
531
|
+
},
|
|
532
|
+
title: "添加",
|
|
533
|
+
onClick: a[0] || (a[0] = P((e) => {
|
|
534
|
+
var t;
|
|
535
|
+
return F.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
|
|
536
|
+
}, ["stop"]))
|
|
537
|
+
})]),
|
|
538
|
+
key: "1"
|
|
539
|
+
} : void 0]), 1040, [
|
|
540
|
+
"data",
|
|
541
|
+
"api",
|
|
542
|
+
"show-summary",
|
|
543
|
+
"descs",
|
|
544
|
+
"ascs",
|
|
545
|
+
"page-size",
|
|
546
|
+
"selection-width",
|
|
547
|
+
"selection",
|
|
548
|
+
"index",
|
|
549
|
+
"onSelectionChange"
|
|
550
|
+
]),
|
|
551
|
+
b("底部添加按钮"),
|
|
552
|
+
!n.disabled && n.bottomAddButton && ((I = n.modelValue) == null ? void 0 : I.length) < n.limit && ((L = n.modelValue) == null ? void 0 : L.length) > 0 ? (O(), x("div", K, [S("i", {
|
|
553
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
554
|
+
style: {
|
|
555
|
+
"font-size": "20px",
|
|
556
|
+
cursor: "pointer"
|
|
557
|
+
},
|
|
558
|
+
title: "添加",
|
|
559
|
+
onClick: a[1] || (a[1] = P((e) => {
|
|
560
|
+
var t;
|
|
561
|
+
return F.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
|
|
562
|
+
}, ["stop"]))
|
|
563
|
+
})])) : b("v-if", !0)
|
|
564
|
+
], 2);
|
|
565
|
+
}
|
|
566
|
+
var J = /* @__PURE__ */ a(z, [["render", q]]);
|
|
567
|
+
//#endregion
|
|
568
|
+
export { R as n, J as t };
|
|
@@ -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 "./D_qiRmiE.mjs";
|
|
2
|
+
import { n as t, t as n } from "./CabldOLo.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) {
|