@web-utils/form-ui 1.0.0-beta52 → 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/{DitpKWMd.mjs → 9MExJqL-.mjs} +2 -2
- package/chunks/{DZJ-ShZA2.mjs → B3yVc-P62.mjs} +4 -4
- package/chunks/{DkXlFWjs.mjs → B6yWUT6z.mjs} +2 -2
- package/chunks/{CkjtCuMs.mjs → BEvOkSfB.mjs} +119 -118
- package/chunks/{D3mFJzGr.mjs → BHbMJZPp.mjs} +63 -62
- package/chunks/{BSU2FqMP2.mjs → BJYlobMz2.mjs} +2 -2
- package/chunks/{KuAMIZnG.mjs → BNXbI4OG.mjs} +1 -1
- package/chunks/{CzHaJsnD.mjs → BV-XUugQ.mjs} +3 -3
- package/chunks/{DcFllKOf2.mjs → BgTCTXs72.mjs} +4 -3
- package/chunks/{BshE3RnA.mjs → BjGlxyi6.mjs} +2 -2
- package/chunks/{BAw6wxW1.mjs → BqC_VU52.mjs} +2 -2
- package/chunks/{B1k8ydde.mjs → BqzJ6vY6.mjs} +2 -2
- package/chunks/{DhVmHzB7.mjs → ByTyNsWf.mjs} +1 -1
- package/chunks/{DVbw6xIr.mjs → CB9QUXUX.mjs} +2 -2
- package/chunks/{GMFHxPJq.mjs → CGuDBVCB.mjs} +4 -3
- package/chunks/{C7G-cAoI.mjs → CPvdsnRN.mjs} +1 -1
- package/chunks/{D2MB3CnR.mjs → CgN7m-1v.mjs} +4 -3
- package/chunks/{CtHmTtVP.mjs → D5EQJdPL.mjs} +3 -3
- package/chunks/{CGHcOyNC2.mjs → D7R9Or2m2.mjs} +3 -3
- package/chunks/D9IFsT272.mjs +513 -0
- package/chunks/{C6hLXCPk.mjs → DFFNxlqD.mjs} +3 -3
- package/chunks/{BWh6u1O0.mjs → DWMePN6q.mjs} +1 -1
- package/chunks/{CBFbSsTJ.mjs → DawYTjoT.mjs} +2 -2
- package/chunks/{JKFepPeL.mjs → DjnHvHXo.mjs} +2 -2
- package/chunks/{v-O82KSn.mjs → DwkOWXIR.mjs} +4 -4
- package/chunks/{BQyL45PF2.mjs → DyCO22Ia2.mjs} +1 -1
- package/chunks/{B75qfA0z.mjs → Dytof5EW.mjs} +2 -2
- package/chunks/{eBESsR-G.mjs → H70Z56YY.mjs} +9 -3
- package/chunks/{CVKPpQdS.mjs → XwerN1TU.mjs} +2 -2
- package/chunks/{BXVB-H8_.mjs → c0Niqotr.mjs} +2 -2
- package/chunks/{C2zgFLYO.mjs → oVFbZ6yk.mjs} +30 -30
- package/chunks/{DLgFBI_X.mjs → z5FJgzdc.mjs} +4 -3
- package/constants/index.d.ts +1 -0
- package/editable-tree/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.d.ts +2 -2
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-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-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +33 -33
- package/package.json +1 -1
- package/pageable-table/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-view/index.mjs +5 -5
- 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/CjRZ71IY2.mjs +0 -512
|
@@ -2,11 +2,11 @@ import { f as e } from "./DcTVYqeJ.mjs";
|
|
|
2
2
|
import { hasAuthority as t } from "../api/index.mjs";
|
|
3
3
|
import { toolbarContextKey as n } from "../constants/index.mjs";
|
|
4
4
|
import { isArray as r, isFunction as i } from "@web-utils/core";
|
|
5
|
-
import { computed as a, createVNode as o,
|
|
6
|
-
import { ElMessage as
|
|
7
|
-
import { ElButton as
|
|
5
|
+
import { computed as a, createVNode as o, getCurrentInstance as s, inject as c, mergeProps as l, ref as u } from "vue";
|
|
6
|
+
import { ElMessage as d, ElMessageBox as f } from "element-plus";
|
|
7
|
+
import { ElButton as p } from "element-plus/es";
|
|
8
8
|
//#region src/components/toolbar/button.ts
|
|
9
|
-
var
|
|
9
|
+
var m = {
|
|
10
10
|
size: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "default"
|
|
@@ -91,34 +91,49 @@ var h = {
|
|
|
91
91
|
title: String,
|
|
92
92
|
cancelButtonText: String,
|
|
93
93
|
confirmButtonText: String
|
|
94
|
-
},
|
|
94
|
+
}, h = {
|
|
95
95
|
icon: !0,
|
|
96
96
|
type: !0,
|
|
97
97
|
text: !0,
|
|
98
98
|
title: !0,
|
|
99
99
|
disabled: !0,
|
|
100
|
-
loading: !0
|
|
101
|
-
|
|
100
|
+
loading: !0,
|
|
101
|
+
label: !0,
|
|
102
|
+
loadable: !0,
|
|
103
|
+
footer: !0,
|
|
104
|
+
primary: !0,
|
|
105
|
+
warning: !0,
|
|
106
|
+
privilege: !0,
|
|
107
|
+
condition: !0,
|
|
108
|
+
conditionTips: !0,
|
|
109
|
+
confirm: !0,
|
|
110
|
+
confirmTips: !0,
|
|
111
|
+
beforeExecute: !0,
|
|
112
|
+
afterExecute: !0,
|
|
113
|
+
route: !0,
|
|
114
|
+
cancelButtonText: !0,
|
|
115
|
+
confirmButtonText: !0
|
|
116
|
+
}, g = (e) => h[e] !== !0, _ = {
|
|
102
117
|
name: "ToolbarButton",
|
|
103
118
|
inheritAttrs: !1,
|
|
104
|
-
props: { ...
|
|
105
|
-
setup(
|
|
106
|
-
let v =
|
|
119
|
+
props: { ...m },
|
|
120
|
+
setup(m, { attrs: h, slots: _ }) {
|
|
121
|
+
let v = s(), y = c(n, null), b = u(!1), x = a(() => m.privilege ? t(m.privilege) : !0), S = async (e) => {
|
|
107
122
|
try {
|
|
108
|
-
if (i(
|
|
109
|
-
if (
|
|
123
|
+
if (i(m.beforeExecute) && await m.beforeExecute() === !1) return;
|
|
124
|
+
if (m.conditionTips) {
|
|
110
125
|
let e;
|
|
111
|
-
if (e = r(
|
|
112
|
-
|
|
126
|
+
if (e = r(m.condition) ? m.condition.length <= 0 : i(m.condition) ? !m.condition() : !m.condition, e) {
|
|
127
|
+
d.warning(m.conditionTips);
|
|
113
128
|
return;
|
|
114
129
|
}
|
|
115
130
|
}
|
|
116
|
-
if (
|
|
117
|
-
await
|
|
131
|
+
if (m.confirm || m.confirmTips) try {
|
|
132
|
+
await f.confirm(m.confirmTips || "你确定要删除该记录吗?", "系统提示", {
|
|
118
133
|
type: "warning",
|
|
119
134
|
distinguishCancelAndClose: !0,
|
|
120
|
-
cancelButtonText:
|
|
121
|
-
confirmButtonText:
|
|
135
|
+
cancelButtonText: m.cancelButtonText,
|
|
136
|
+
confirmButtonText: m.confirmButtonText
|
|
122
137
|
});
|
|
123
138
|
} catch (e) {
|
|
124
139
|
if (e === "cancel") {
|
|
@@ -132,35 +147,35 @@ var h = {
|
|
|
132
147
|
}
|
|
133
148
|
b.value = !0;
|
|
134
149
|
let n;
|
|
135
|
-
if (
|
|
150
|
+
if (m.route) {
|
|
136
151
|
var t;
|
|
137
|
-
await ((t = v.proxy.$router) == null ? void 0 : t.push(
|
|
152
|
+
await ((t = v.proxy.$router) == null ? void 0 : t.push(m.route));
|
|
138
153
|
} else {
|
|
139
154
|
let { onClick: t } = h;
|
|
140
155
|
if (i(t)) try {
|
|
141
156
|
n = await t(e);
|
|
142
157
|
} catch {}
|
|
143
158
|
}
|
|
144
|
-
b.value = !1, i(
|
|
159
|
+
b.value = !1, i(m.afterExecute) && await m.afterExecute(n);
|
|
145
160
|
} catch {}
|
|
146
|
-
}, C = a(() =>
|
|
147
|
-
if (!C.value) return
|
|
148
|
-
}), T = e(
|
|
149
|
-
return () => x.value ? o(
|
|
150
|
-
title:
|
|
151
|
-
disabled:
|
|
152
|
-
loading:
|
|
161
|
+
}, C = a(() => m.text ? !0 : m.type === "text"), w = a(() => {
|
|
162
|
+
if (!C.value) return m.primary ? "primary" : m.warning ? "warning" : m.type;
|
|
163
|
+
}), T = e(m, g);
|
|
164
|
+
return () => x.value ? o(p, l(T.value, {
|
|
165
|
+
title: m.footer || y != null && y.footer ? null : m.title,
|
|
166
|
+
disabled: m.disabled || b.value,
|
|
167
|
+
loading: m.loadable ? b.value : !1,
|
|
153
168
|
type: w.value,
|
|
154
169
|
text: C.value,
|
|
155
170
|
class: h.class,
|
|
156
171
|
style: h.style,
|
|
157
172
|
onClick: S
|
|
158
173
|
}), {
|
|
159
|
-
default: !
|
|
160
|
-
loading:
|
|
161
|
-
icon:
|
|
174
|
+
default: !m.circle && (m.label || _.default) ? () => _.default ? _.default() : m.label : null,
|
|
175
|
+
loading: _.loading,
|
|
176
|
+
icon: _.icon ? _.icon : m.icon ? () => o("i", { class: m.icon }, null) : null
|
|
162
177
|
}) : null;
|
|
163
178
|
}
|
|
164
|
-
}
|
|
179
|
+
};
|
|
165
180
|
//#endregion
|
|
166
|
-
export {
|
|
181
|
+
export { _ as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { i as e, n as t } from "./BHbMJZPp.mjs";
|
|
2
|
+
import { n, t as r } from "./BNXbI4OG.mjs";
|
|
3
3
|
import i from "../x-input-tag/index.mjs";
|
|
4
4
|
import { createVNode as a, mergeProps as o } from "vue";
|
|
5
5
|
//#region src/components/form/props/input-tag.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as e } from "./DcTVYqeJ.mjs";
|
|
2
|
-
import { i as t, n } from "./
|
|
3
|
-
import { n as r, t as i } from "./
|
|
4
|
-
import { r as a } from "./
|
|
5
|
-
import { n as o, t as s } from "./
|
|
2
|
+
import { i as t, n } from "./BHbMJZPp.mjs";
|
|
3
|
+
import { n as r, t as i } from "./BNXbI4OG.mjs";
|
|
4
|
+
import { r as a } from "./DwkOWXIR.mjs";
|
|
5
|
+
import { n as o, t as s } from "./D9IFsT272.mjs";
|
|
6
6
|
import { isArray as c, isString as l, trace as u, warning as d } from "@web-utils/core";
|
|
7
7
|
import { computed as f, createVNode as p, getCurrentInstance as m, mergeProps as h, useModel as g, useTemplateRef as _ } from "vue";
|
|
8
8
|
import { useEventBus as v } from "@web-utils/vue/hooks/useEventBus";
|
|
@@ -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/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
|
|
5
5
|
function s(e) {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import { t as n } from "./
|
|
4
|
-
import {
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import {
|
|
7
|
-
import { t as o } from "./
|
|
8
|
-
import { t as s } from "./
|
|
9
|
-
import { t as c } from "./
|
|
10
|
-
import { t as l } from "./
|
|
11
|
-
import { t as u } from "./
|
|
12
|
-
import { t as d } from "./
|
|
13
|
-
import
|
|
14
|
-
import { t as p } from "./
|
|
15
|
-
import m from "
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { formContextKey as P, formItemContextKey as F } from "element-plus";
|
|
20
|
-
import { cloneDeep as I } from "@web-utils/integrations/lodash";
|
|
1
|
+
import { t as e } from "./DOZRzqlo.mjs";
|
|
2
|
+
import { t } from "./7GmKqdbC.mjs";
|
|
3
|
+
import { t as n } from "./CkOD-_VV.mjs";
|
|
4
|
+
import { n as r } from "./BHbMJZPp.mjs";
|
|
5
|
+
import { t as i } from "./CgN7m-1v.mjs";
|
|
6
|
+
import { t as a } from "./DwkOWXIR.mjs";
|
|
7
|
+
import { t as o } from "./BV-XUugQ.mjs";
|
|
8
|
+
import { t as s } from "./Dytof5EW.mjs";
|
|
9
|
+
import { t as c } from "./z5FJgzdc.mjs";
|
|
10
|
+
import { t as l } from "./B6yWUT6z.mjs";
|
|
11
|
+
import { t as u } from "./BjGlxyi6.mjs";
|
|
12
|
+
import { t as d } from "./ByTyNsWf.mjs";
|
|
13
|
+
import f from "../table-column-def/index.mjs";
|
|
14
|
+
import { t as p } from "./DFFNxlqD.mjs";
|
|
15
|
+
import { findTreeChildren as m, isFunction as h } from "@web-utils/core";
|
|
16
|
+
import { Fragment as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as S, createVNode as C, mergeProps as w, openBlock as T, renderList as E, renderSlot as D, resolveComponent as O, toDisplayString as k, withCtx as A, withModifiers as j } from "vue";
|
|
17
|
+
import { formContextKey as M, formItemContextKey as N } from "element-plus";
|
|
18
|
+
import { cloneDeep as P } from "@web-utils/integrations/lodash";
|
|
21
19
|
//#region src/components/table/sub-table.ts
|
|
22
|
-
var
|
|
20
|
+
var F = {
|
|
23
21
|
modelValue: Array,
|
|
24
22
|
columns: Array,
|
|
25
23
|
allowEmpty: Boolean,
|
|
@@ -53,23 +51,23 @@ var L = {
|
|
|
53
51
|
selectionWidth: String,
|
|
54
52
|
fetchApi: Function,
|
|
55
53
|
delApi: Function
|
|
56
|
-
},
|
|
54
|
+
}, I = {
|
|
57
55
|
name: "SubTable",
|
|
58
56
|
emits: {
|
|
59
|
-
...
|
|
57
|
+
...r,
|
|
60
58
|
"add-row": null
|
|
61
59
|
},
|
|
62
60
|
inject: {
|
|
63
61
|
elForm: {
|
|
64
|
-
from:
|
|
62
|
+
from: M,
|
|
65
63
|
default: ""
|
|
66
64
|
},
|
|
67
65
|
elFormItem: {
|
|
68
|
-
from:
|
|
66
|
+
from: N,
|
|
69
67
|
default: ""
|
|
70
68
|
}
|
|
71
69
|
},
|
|
72
|
-
props: { ...
|
|
70
|
+
props: { ...F },
|
|
73
71
|
data() {
|
|
74
72
|
return {
|
|
75
73
|
rows: [],
|
|
@@ -111,7 +109,7 @@ var L = {
|
|
|
111
109
|
},
|
|
112
110
|
methods: {
|
|
113
111
|
getCellType(e, t) {
|
|
114
|
-
return
|
|
112
|
+
return h(t.getType) ? t.getType(e, t) : t.type;
|
|
115
113
|
},
|
|
116
114
|
getInputAttr(e, t, n) {
|
|
117
115
|
var r;
|
|
@@ -136,7 +134,7 @@ var L = {
|
|
|
136
134
|
} catch {}
|
|
137
135
|
},
|
|
138
136
|
add(e, t) {
|
|
139
|
-
let n =
|
|
137
|
+
let n = P(this.rowProps);
|
|
140
138
|
this.rows.splice(t + 1, 0, n);
|
|
141
139
|
},
|
|
142
140
|
addRow() {
|
|
@@ -167,37 +165,37 @@ var L = {
|
|
|
167
165
|
if (r) return r.name;
|
|
168
166
|
}
|
|
169
167
|
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
170
|
-
let [r] =
|
|
168
|
+
let [r] = m(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
171
169
|
if (r) return r[n.attrs.valueKey || "label"];
|
|
172
170
|
}
|
|
173
171
|
return e[t.property];
|
|
174
172
|
}
|
|
175
173
|
}
|
|
176
|
-
},
|
|
174
|
+
}, L = {
|
|
177
175
|
key: 0,
|
|
178
176
|
class: "table-header"
|
|
179
|
-
},
|
|
177
|
+
}, R = {
|
|
180
178
|
key: 0,
|
|
181
179
|
style: { color: "#f56c6c" }
|
|
182
|
-
},
|
|
183
|
-
function
|
|
184
|
-
let
|
|
185
|
-
return
|
|
180
|
+
}, z = ["onClick"];
|
|
181
|
+
function B(n, r, m, h, M, N) {
|
|
182
|
+
let P = t, F = a, I = l, B = O("FormInputUser"), V = O("FormInputDepartment"), H = u, U = s, W = i, G = o, K = c, q = p, J = e, Y = f, X = d;
|
|
183
|
+
return T(), _(X, w({
|
|
186
184
|
ref: "table",
|
|
187
185
|
class: "sub-table",
|
|
188
186
|
"auto-height": "",
|
|
189
|
-
data:
|
|
190
|
-
api:
|
|
191
|
-
"show-summary":
|
|
192
|
-
"selection-width":
|
|
193
|
-
},
|
|
187
|
+
data: M.rows,
|
|
188
|
+
api: n.fetchApi,
|
|
189
|
+
"show-summary": n.showSummary,
|
|
190
|
+
"selection-width": n.selectionWidth
|
|
191
|
+
}, n.$attrs, {
|
|
194
192
|
"hide-on-single-page": "",
|
|
195
|
-
selection:
|
|
196
|
-
"row-db-click":
|
|
197
|
-
onSelectionChange:
|
|
198
|
-
}),
|
|
199
|
-
default:
|
|
200
|
-
|
|
193
|
+
selection: N.enabled,
|
|
194
|
+
"row-db-click": n.rowDbClick,
|
|
195
|
+
onSelectionChange: N.onSelectionChange
|
|
196
|
+
}), x({
|
|
197
|
+
default: A(() => [
|
|
198
|
+
D(n.$slots, "columns", { columns: n.columns }, () => [(T(!0), y(g, null, E(N.filteredColumns, (e) => (T(), _(Y, {
|
|
201
199
|
key: e.prop,
|
|
202
200
|
label: e.label,
|
|
203
201
|
width: e.width,
|
|
@@ -206,88 +204,88 @@ function H(i, a, g, _, P, F) {
|
|
|
206
204
|
align: e.align,
|
|
207
205
|
prop: e.prop,
|
|
208
206
|
options: e.options,
|
|
209
|
-
"show-overflow-tooltip": !
|
|
207
|
+
"show-overflow-tooltip": !N.available && e.showOverflowTooltip
|
|
210
208
|
}, {
|
|
211
|
-
header:
|
|
212
|
-
default:
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
header: A(() => [!n.disabled && e.required ? (T(), y("span", R, "*")) : v("v-if", !0), S(" " + k(e.label), 1)]),
|
|
210
|
+
default: A(({ row: t, column: r, $index: i }) => [
|
|
211
|
+
v("tag 插槽"),
|
|
212
|
+
D(n.$slots, "tag", {
|
|
215
213
|
row: t,
|
|
216
|
-
column:
|
|
217
|
-
index:
|
|
214
|
+
column: r,
|
|
215
|
+
index: i
|
|
218
216
|
}),
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
v("列默认插槽,名字和 prop 保持一致"),
|
|
218
|
+
D(n.$slots, e.prop, {
|
|
221
219
|
row: t,
|
|
222
|
-
column:
|
|
223
|
-
index:
|
|
220
|
+
column: r,
|
|
221
|
+
index: i
|
|
224
222
|
}, () => {
|
|
225
|
-
var
|
|
226
|
-
return [
|
|
223
|
+
var n;
|
|
224
|
+
return [N.available ? (T(), y(g, { key: 0 }, [N.getCellType(t, e) === "input" ? (T(), _(F, w({
|
|
227
225
|
key: 0,
|
|
228
226
|
ref_for: !0
|
|
229
|
-
},
|
|
227
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "inputPhoneNumber" ? (T(), _(I, w({
|
|
230
228
|
key: 1,
|
|
231
229
|
ref_for: !0
|
|
232
|
-
},
|
|
230
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "user" ? (T(), y(g, { key: 2 }, [e.single ? (T(), _(B, w({
|
|
233
231
|
key: 0,
|
|
234
232
|
ref_for: !0
|
|
235
|
-
},
|
|
233
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : (T(), _(B, w({
|
|
236
234
|
key: 1,
|
|
237
235
|
ref_for: !0
|
|
238
|
-
},
|
|
236
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"]))], 64)) : N.getCellType(t, e) === "department" ? (T(), y(g, { key: 3 }, [e.single ? (T(), _(V, w({
|
|
239
237
|
key: 0,
|
|
240
238
|
ref_for: !0
|
|
241
|
-
},
|
|
242
|
-
name: t[
|
|
243
|
-
"onUpdate:name": (e) => t[
|
|
244
|
-
onInput: (n) =>
|
|
239
|
+
}, N.getInputAttr(t, e, i), {
|
|
240
|
+
name: t[r.property],
|
|
241
|
+
"onUpdate:name": (e) => t[r.property] = e,
|
|
242
|
+
onInput: (n) => N.onInput(t, n, e)
|
|
245
243
|
}), null, 16, [
|
|
246
244
|
"name",
|
|
247
245
|
"onUpdate:name",
|
|
248
246
|
"onInput"
|
|
249
|
-
])) : (
|
|
247
|
+
])) : (T(), _(V, w({
|
|
250
248
|
key: 1,
|
|
251
249
|
ref_for: !0
|
|
252
|
-
},
|
|
253
|
-
disabled:
|
|
254
|
-
onInput: (n) =>
|
|
255
|
-
}), null, 16, ["disabled", "onInput"]))], 64)) :
|
|
250
|
+
}, N.getInputAttr(t, e, i), {
|
|
251
|
+
disabled: N.isInputDisabled(t, e),
|
|
252
|
+
onInput: (n) => N.onInput(t, n, e)
|
|
253
|
+
}), null, 16, ["disabled", "onInput"]))], 64)) : N.getCellType(t, e) === "select" ? (T(), _(H, w({
|
|
256
254
|
key: 4,
|
|
257
255
|
ref_for: !0
|
|
258
|
-
},
|
|
256
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "datePicker" ? (T(), _(U, w({
|
|
259
257
|
key: 5,
|
|
260
258
|
ref_for: !0
|
|
261
|
-
},
|
|
259
|
+
}, N.getInputAttr(t, e, i), {
|
|
262
260
|
start: t[e.start],
|
|
263
261
|
"onUpdate:start": (n) => t[e.start] = n,
|
|
264
262
|
end: t[e.end],
|
|
265
263
|
"onUpdate:end": (n) => t[e.end] = n,
|
|
266
|
-
onInput: (n) =>
|
|
264
|
+
onInput: (n) => N.onInput(t, n, e)
|
|
267
265
|
}), null, 16, [
|
|
268
266
|
"start",
|
|
269
267
|
"onUpdate:start",
|
|
270
268
|
"end",
|
|
271
269
|
"onUpdate:end",
|
|
272
270
|
"onInput"
|
|
273
|
-
])) :
|
|
271
|
+
])) : N.getCellType(t, e) === "cascader" ? (T(), _(W, w({
|
|
274
272
|
key: 6,
|
|
275
273
|
ref_for: !0
|
|
276
|
-
},
|
|
274
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "checkbox" ? (T(), _(G, w({
|
|
277
275
|
key: 7,
|
|
278
276
|
ref_for: !0
|
|
279
|
-
},
|
|
277
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "number" ? (T(), _(K, w({
|
|
280
278
|
key: 8,
|
|
281
279
|
ref_for: !0
|
|
282
|
-
},
|
|
280
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : N.getCellType(t, e) === "textarea" ? (T(), _(q, w({
|
|
283
281
|
key: 9,
|
|
284
282
|
ref_for: !0
|
|
285
|
-
},
|
|
283
|
+
}, N.getInputAttr(t, e, i), { onInput: (n) => N.onInput(t, n, e) }), null, 16, ["onInput"])) : (T(), y(g, { key: 10 }, [S(k(N.getVal(t, r, e)), 1)], 64))], 64)) : e.dicType || (n = e.options) != null && n.length ? (T(), _(J, {
|
|
286
284
|
key: 1,
|
|
287
285
|
"dict-type": e.dicType,
|
|
288
286
|
"id-as-value": e.idAsValue,
|
|
289
287
|
"label-as-value": e.labelAsValue,
|
|
290
|
-
column:
|
|
288
|
+
column: r,
|
|
291
289
|
row: t,
|
|
292
290
|
options: e.options
|
|
293
291
|
}, null, 8, [
|
|
@@ -297,7 +295,7 @@ function H(i, a, g, _, P, F) {
|
|
|
297
295
|
"column",
|
|
298
296
|
"row",
|
|
299
297
|
"options"
|
|
300
|
-
])) : (
|
|
298
|
+
])) : (T(), y(g, { key: 2 }, [S(k(N.getVal(t, r, e)), 1)], 64))];
|
|
301
299
|
})
|
|
302
300
|
]),
|
|
303
301
|
_: 2
|
|
@@ -311,13 +309,13 @@ function H(i, a, g, _, P, F) {
|
|
|
311
309
|
"options",
|
|
312
310
|
"show-overflow-tooltip"
|
|
313
311
|
]))), 128))]),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
add:
|
|
317
|
-
remove:
|
|
312
|
+
v(" 自定义操作列 "),
|
|
313
|
+
D(n.$slots, "handle", {
|
|
314
|
+
add: N.add,
|
|
315
|
+
remove: N.remove
|
|
318
316
|
}),
|
|
319
|
-
|
|
320
|
-
(!
|
|
317
|
+
v(" 操作列 "),
|
|
318
|
+
(!n.modelValue || n.modelValue.length < n.limit) && !n.disabled && N.enabled && n.editable && n.handleColumn ? (T(), _(Y, {
|
|
321
319
|
key: 0,
|
|
322
320
|
label: "操作",
|
|
323
321
|
fixed: "right",
|
|
@@ -325,11 +323,11 @@ function H(i, a, g, _, P, F) {
|
|
|
325
323
|
align: "center",
|
|
326
324
|
prop: "menu"
|
|
327
325
|
}, {
|
|
328
|
-
header:
|
|
326
|
+
header: A(({ column: e, $index: t }) => [D(n.$slots, "handle-column-header", {
|
|
329
327
|
column: e,
|
|
330
328
|
index: t
|
|
331
|
-
}, () => [
|
|
332
|
-
default:
|
|
329
|
+
}, () => [S(k(e.label), 1)])]),
|
|
330
|
+
default: A(({ row: e, $index: t }) => [n.showHandleColumnAddButton && n.modelValue.length < n.maxLimit ? (T(), y("i", {
|
|
333
331
|
key: 0,
|
|
334
332
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
335
333
|
style: {
|
|
@@ -338,8 +336,8 @@ function H(i, a, g, _, P, F) {
|
|
|
338
336
|
cursor: "pointer"
|
|
339
337
|
},
|
|
340
338
|
title: "添加",
|
|
341
|
-
onClick:
|
|
342
|
-
}, null, 8,
|
|
339
|
+
onClick: j((n) => N.add(e, t), ["stop"])
|
|
340
|
+
}, null, 8, z)) : v("v-if", !0), n.modelValue && n.modelValue.length > 1 || n.allowEmpty ? (T(), _(P, {
|
|
343
341
|
key: 1,
|
|
344
342
|
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
345
343
|
style: {
|
|
@@ -347,58 +345,61 @@ function H(i, a, g, _, P, F) {
|
|
|
347
345
|
cursor: "pointer"
|
|
348
346
|
},
|
|
349
347
|
title: "删除",
|
|
348
|
+
confirm: "",
|
|
349
|
+
text: "",
|
|
350
350
|
message: "您确定要删除该行吗?",
|
|
351
|
-
onClick:
|
|
352
|
-
}, null, 8, ["onClick"])) :
|
|
351
|
+
onClick: j((n) => N.remove(e, t), ["stop"])
|
|
352
|
+
}, null, 8, ["onClick"])) : v("v-if", !0)]),
|
|
353
353
|
_: 3
|
|
354
|
-
})) :
|
|
354
|
+
})) : v("v-if", !0)
|
|
355
355
|
]),
|
|
356
356
|
_: 2
|
|
357
|
-
}, [
|
|
357
|
+
}, [n.editable ? void 0 : {
|
|
358
358
|
name: "toolbar",
|
|
359
|
-
fn:
|
|
360
|
-
addRow:
|
|
361
|
-
delRow:
|
|
362
|
-
refresh:
|
|
363
|
-
}, () => [
|
|
359
|
+
fn: A(() => [N.enabled || n.fetchApi ? (T(), y("div", L, [D(n.$slots, "toolbar", {
|
|
360
|
+
addRow: N.addRow,
|
|
361
|
+
delRow: N.delRow,
|
|
362
|
+
refresh: N.refresh
|
|
363
|
+
}, () => [N.enabled ? (T(), y(g, { key: 0 }, [C(P, {
|
|
364
364
|
class: "table-header-button add",
|
|
365
365
|
icon: "el-icon-circle-plus",
|
|
366
366
|
type: "text",
|
|
367
|
-
onClick:
|
|
367
|
+
onClick: N.addRow
|
|
368
368
|
}, {
|
|
369
|
-
default:
|
|
369
|
+
default: A(() => [...r[1] || (r[1] = [S(" 添加 ", -1)])]),
|
|
370
370
|
_: 1
|
|
371
|
-
}, 8, ["onClick"]),
|
|
371
|
+
}, 8, ["onClick"]), C(P, {
|
|
372
372
|
class: "table-header-button remove",
|
|
373
|
+
confirm: "",
|
|
373
374
|
message: "您确定要删除选中的记录吗?",
|
|
374
375
|
icon: "el-icon-error",
|
|
375
|
-
|
|
376
|
-
onClick:
|
|
376
|
+
text: "",
|
|
377
|
+
onClick: N.delRow
|
|
377
378
|
}, {
|
|
378
|
-
default:
|
|
379
|
+
default: A(() => [...r[2] || (r[2] = [S(" 删除 ", -1)])]),
|
|
379
380
|
_: 1
|
|
380
|
-
}, 8, ["onClick"])], 64)) :
|
|
381
|
+
}, 8, ["onClick"])], 64)) : v("v-if", !0), n.fetchApi ? (T(), _(P, {
|
|
381
382
|
key: 1,
|
|
382
383
|
class: "table-header-button refresh",
|
|
383
384
|
icon: "el-icon-refresh-left",
|
|
384
|
-
|
|
385
|
+
text: "",
|
|
385
386
|
disabled: !1,
|
|
386
|
-
onClick:
|
|
387
|
+
onClick: N.refresh
|
|
387
388
|
}, {
|
|
388
|
-
default:
|
|
389
|
+
default: A(() => [...r[3] || (r[3] = [S(" 刷新 ", -1)])]),
|
|
389
390
|
_: 1
|
|
390
|
-
}, 8, ["onClick"])) :
|
|
391
|
+
}, 8, ["onClick"])) : v("v-if", !0)])])) : v("v-if", !0)]),
|
|
391
392
|
key: "0"
|
|
392
|
-
},
|
|
393
|
+
}, n.allowEmpty && !n.disabled && n.showEmptyAddButton ? {
|
|
393
394
|
name: "empty",
|
|
394
|
-
fn:
|
|
395
|
+
fn: A(() => [b("i", {
|
|
395
396
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
396
397
|
style: {
|
|
397
398
|
"font-size": "20px",
|
|
398
399
|
cursor: "pointer"
|
|
399
400
|
},
|
|
400
401
|
title: "添加",
|
|
401
|
-
onClick:
|
|
402
|
+
onClick: r[0] || (r[0] = j((e) => N.add(null, 0), ["stop"]))
|
|
402
403
|
})]),
|
|
403
404
|
key: "1"
|
|
404
405
|
} : void 0]), 1040, [
|
|
@@ -411,6 +412,6 @@ function H(i, a, g, _, P, F) {
|
|
|
411
412
|
"onSelectionChange"
|
|
412
413
|
]);
|
|
413
414
|
}
|
|
414
|
-
var
|
|
415
|
+
var V = /* @__PURE__ */ n(I, [["render", B]]);
|
|
415
416
|
//#endregion
|
|
416
|
-
export {
|
|
417
|
+
export { F as n, V as t };
|