@web-utils/form-ui 1.0.0-beta21 → 1.0.0-beta23
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/api/index.d.ts +60 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/chunks/{Bv-Gn_Jd.mjs → 3VI058Yv.mjs} +6 -6
- package/chunks/{D4v0MyB_.mjs → B-Y8YSMp.mjs} +6 -6
- package/chunks/BIm5rmJm.mjs +222 -0
- package/chunks/{CI4RZnNc.mjs → BcMgzZyZ.mjs} +3 -3
- package/chunks/{iWlTrkaC.mjs → Bw1QPGNc.mjs} +6 -6
- package/chunks/{C4MTLHn4.mjs → BwuQhCIf.mjs} +3 -3
- package/chunks/BzMaCcUd.mjs +53 -0
- package/chunks/{wfL1FAwc.mjs → C2RhdxHB.mjs} +354 -354
- package/chunks/{BI2XOQW3.mjs → CH7m94ce.mjs} +7 -7
- package/chunks/{BNpqILFO.mjs → CJv6Sn_v.mjs} +6 -6
- package/chunks/{Dq3yxEPg.mjs → Cnmu4eY-.mjs} +1 -1
- package/chunks/{BbrVRWUo.mjs → CozfnlhM.mjs} +7 -7
- package/chunks/{CnsFNU2A.mjs → Cp9FIjnh.mjs} +1 -1
- package/chunks/{1chbbDUh.mjs → CwjQbaXJ.mjs} +15 -15
- package/chunks/Cxvr9Z1r.mjs +208 -0
- package/chunks/{Bd1I-R29.mjs → D4Pknq4r.mjs} +10 -10
- package/chunks/{DGhMkri0.mjs → DBL23JPA.mjs} +6 -6
- package/chunks/DETsVUo_.mjs +93 -0
- package/chunks/DOl--Hf9.mjs +107 -0
- package/chunks/{B5B9au3z.mjs → DP1YukLf.mjs} +25 -25
- package/chunks/{DRDj0e_k.mjs → DbBdLuvW.mjs} +8 -8
- package/chunks/DpH8CVbN.mjs +79 -0
- package/chunks/{5HLN3g1u.mjs → ENc67_lM.mjs} +9 -9
- package/chunks/{Dy5-h_Tx.mjs → INlqdzng.mjs} +15 -15
- package/chunks/{DOI7ju3i.mjs → dDAvzX4k.mjs} +6 -6
- package/chunks/eR-FlUht.mjs +110 -0
- package/chunks/{BLpnMrum.mjs → rkRnszQn.mjs} +18 -18
- package/chunks/{RcygoTkQ.mjs → tIzKZ11j.mjs} +3 -3
- package/chunks/y8u4cMEF.mjs +216 -0
- package/confirm-button/index.d.ts +71 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +42 -0
- package/confirmable/index.mjs +8 -0
- package/{constants.mjs → constants/index.mjs} +1 -1
- package/element-dialog/index.d.ts +5 -5
- package/element-dialog/index.mjs +1 -1
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.mjs +1 -1
- package/form-button/index.d.ts +72 -0
- package/form-button/index.mjs +36 -0
- package/form-cascader/index.d.ts +483 -1
- package/form-cascader/index.mjs +2 -10
- package/form-check-box-group/index.d.ts +17 -17
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +22 -22
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +26 -26
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +3 -3
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +14 -14
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +19 -19
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +14 -14
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +18 -18
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +18 -18
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +17 -17
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +18 -18
- package/form-input-phone-number/index.mjs +1 -1
- package/form-item-config-provider/index.d.ts +3 -3
- package/form-item-config-provider/index.mjs +1 -1
- package/form-item-group/index.d.ts +5 -3
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.d.ts +12 -12
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +19 -19
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +15 -15
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +13 -13
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +33 -33
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +17 -17
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +23 -23
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +15 -15
- package/form-text/index.mjs +1 -1
- package/helper/dictionary.d.ts +15 -0
- package/helper/dictionary.mjs +97 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/index.d.ts +6 -1
- package/index.mjs +45 -40
- package/month-calendar/index.d.ts +2 -2
- package/month-calendar/index.mjs +1 -1
- package/package.json +1 -1
- package/{resolver.mjs → resolver/index.mjs} +2 -2
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +76 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +2 -2
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/year-calendar/index.d.ts +2 -2
- package/year-calendar/index.mjs +1 -1
- package/chunks/Bb43eI1f.mjs +0 -93
- package/chunks/Bh_CMUlo.mjs +0 -12
- package/chunks/Cw8pz9hK.mjs +0 -222
- package/chunks/lTFu0zgR.mjs +0 -106
- /package/chunks/{D9GcEl6r.mjs → DJNXk_Cv.mjs} +0 -0
- /package/{constants.d.ts → constants/index.d.ts} +0 -0
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as e } from "./BzMaCcUd.mjs";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, useTemplateRef as _, withCtx as v, withModifiers as y } from "vue";
|
|
3
|
+
import { ElDialog as b } from "element-plus/es";
|
|
4
4
|
//#region src/components/dialog/props.js
|
|
5
5
|
var x = {
|
|
6
6
|
modelValue: {
|
|
@@ -110,14 +110,14 @@ var x = {
|
|
|
110
110
|
"close-auto-focus"
|
|
111
111
|
], w = (e) => S[e] !== !0, T = { class: "dialog-title" }, E = { class: "dialog-header-buttons" }, D = {
|
|
112
112
|
__name: "ElementDialog",
|
|
113
|
-
props: /* @__PURE__ */
|
|
113
|
+
props: /* @__PURE__ */ c({ ...x }, {
|
|
114
114
|
modelValue: {
|
|
115
115
|
type: Boolean,
|
|
116
116
|
default: !1
|
|
117
117
|
},
|
|
118
118
|
modelModifiers: {}
|
|
119
119
|
}),
|
|
120
|
-
emits: /* @__PURE__ */
|
|
120
|
+
emits: /* @__PURE__ */ c({
|
|
121
121
|
open: null,
|
|
122
122
|
opened: null,
|
|
123
123
|
close: null,
|
|
@@ -126,47 +126,47 @@ var x = {
|
|
|
126
126
|
"close-auto-focus": null,
|
|
127
127
|
"toggle-fullscreen": null
|
|
128
128
|
}, ["update:modelValue"]),
|
|
129
|
-
setup(
|
|
130
|
-
let D =
|
|
129
|
+
setup(c, { expose: x, emit: S }) {
|
|
130
|
+
let D = g(c, "modelValue"), O = c, k = S, A = e(O, {
|
|
131
131
|
emit: k,
|
|
132
132
|
events: C,
|
|
133
133
|
predicate: w
|
|
134
|
-
}), j =
|
|
134
|
+
}), j = _("dialog"), M = f(O.fullscreen), N = () => {
|
|
135
135
|
M.value = !M.value, k("toggle-fullscreen", M.value);
|
|
136
|
-
}, P =
|
|
136
|
+
}, P = t(() => M.value ? "100%" : O.height), F = s(), I = () => {
|
|
137
137
|
O.embed ? (F.parent.emit("update:visible", !1), F.parent.emit("update:modelValue", !1)) : j.value.handleClose();
|
|
138
138
|
};
|
|
139
139
|
return x({
|
|
140
140
|
close: I,
|
|
141
141
|
hide: I
|
|
142
|
-
}), (e,
|
|
143
|
-
let
|
|
144
|
-
return
|
|
142
|
+
}), (e, t) => {
|
|
143
|
+
let s = b;
|
|
144
|
+
return d(), n(s, l({
|
|
145
145
|
ref: "dialog",
|
|
146
146
|
modelValue: D.value,
|
|
147
|
-
"onUpdate:modelValue":
|
|
148
|
-
},
|
|
147
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => D.value = e)
|
|
148
|
+
}, h(A), {
|
|
149
149
|
"show-close": !1,
|
|
150
|
-
fullscreen:
|
|
151
|
-
style: { "--dialog-body-height":
|
|
152
|
-
}),
|
|
153
|
-
header:
|
|
150
|
+
fullscreen: h(M),
|
|
151
|
+
style: { "--dialog-body-height": h(P) }
|
|
152
|
+
}), o({
|
|
153
|
+
header: v(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
|
|
154
154
|
key: 0,
|
|
155
|
-
class:
|
|
155
|
+
class: u(["dialog-header-button", {
|
|
156
156
|
"el-icon-full-screen": !e.fullscreen,
|
|
157
157
|
"el-icon-copy-document": e.fullscreen
|
|
158
158
|
}]),
|
|
159
|
-
onClick:
|
|
160
|
-
}, null, 2)) :
|
|
159
|
+
onClick: y(N, ["stop"])
|
|
160
|
+
}, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
|
|
161
161
|
key: 1,
|
|
162
162
|
class: "dialog-header-button el-icon-close",
|
|
163
|
-
onClick:
|
|
164
|
-
})) :
|
|
165
|
-
default:
|
|
163
|
+
onClick: y(I, ["stop"])
|
|
164
|
+
})) : r("v-if", !0)])])]),
|
|
165
|
+
default: v(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
|
|
166
166
|
_: 2
|
|
167
167
|
}, [e.$slots.footer ? {
|
|
168
168
|
name: "footer",
|
|
169
|
-
fn:
|
|
169
|
+
fn: v(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: I })]),
|
|
170
170
|
key: "0"
|
|
171
171
|
} : void 0]), 1040, [
|
|
172
172
|
"modelValue",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { i as e, n as t } from "./BIm5rmJm.mjs";
|
|
2
|
+
import { n } from "./Cp9FIjnh.mjs";
|
|
3
|
+
import { computed as r, createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElDatePicker as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/date.js
|
|
6
6
|
var s = {
|
|
7
7
|
...n,
|
|
@@ -137,7 +137,7 @@ var s = {
|
|
|
137
137
|
events: l,
|
|
138
138
|
predicate: u,
|
|
139
139
|
messagePrefix: "请选择"
|
|
140
|
-
}), g =
|
|
140
|
+
}), g = r(() => {
|
|
141
141
|
switch (t.type) {
|
|
142
142
|
case "date":
|
|
143
143
|
case "daterange": return "YYYY-MM-DD";
|
|
@@ -145,12 +145,12 @@ var s = {
|
|
|
145
145
|
case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
|
|
146
146
|
default: return "";
|
|
147
147
|
}
|
|
148
|
-
}), _ =
|
|
148
|
+
}), _ = r(() => t.split && t.type.indexOf("range") > -1), v = (e, t) => {
|
|
149
149
|
n("update:startDate", e), n("update:endDate", t);
|
|
150
150
|
}, y = (e) => {
|
|
151
151
|
_.value ? e ? v(e[0], e[1]) : v(null, null) : d(e);
|
|
152
|
-
}, b =
|
|
153
|
-
return () => f({ vNodes:
|
|
152
|
+
}, b = r(() => _.value ? [t.startDate, t.endDate] : t.modelValue);
|
|
153
|
+
return () => f({ vNodes: i(o, a({ style: "width: 100%" }, h.value, {
|
|
154
154
|
modelValue: b.value,
|
|
155
155
|
disabled: m.value,
|
|
156
156
|
placeholder: p.value,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { isFunction as e } from "@web-utils/core";
|
|
2
|
+
import { h as t, resolveComponent as n } from "vue";
|
|
3
|
+
import { ElLoading as r, ElMessageBox as i } from "element-plus";
|
|
4
|
+
//#region src/components/button/confirmable-mixin.js
|
|
5
|
+
async function a(t, n, a) {
|
|
6
|
+
let { stop: o, prevent: s, message: c, loadable: l, loadingText: u, confirmable: d, confirmType: f, confirmText: p, confirmTitle: m } = n;
|
|
7
|
+
o && t.stopPropagation(), s && t.preventDefault();
|
|
8
|
+
let { onBefore: h, onClick: g, onCancel: _, onAfter: v } = a;
|
|
9
|
+
if (e(g)) try {
|
|
10
|
+
let n = !0;
|
|
11
|
+
if (e(h) && (n = await h(t)), n === !1) return;
|
|
12
|
+
d && await i.confirm(c || p, {
|
|
13
|
+
type: f,
|
|
14
|
+
title: m
|
|
15
|
+
});
|
|
16
|
+
let a;
|
|
17
|
+
l && (a = r.service({
|
|
18
|
+
background: "rgba(0,0,0,0.3)",
|
|
19
|
+
text: u
|
|
20
|
+
}));
|
|
21
|
+
let o;
|
|
22
|
+
try {
|
|
23
|
+
o = await g(t);
|
|
24
|
+
} catch {}
|
|
25
|
+
l && a.close(), e(v) && await v(t, o);
|
|
26
|
+
} catch (t) {
|
|
27
|
+
e(_) && await _(t);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var o = {
|
|
31
|
+
inheritAttrs: !1,
|
|
32
|
+
props: {
|
|
33
|
+
stop: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
prevent: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !0
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
message: String,
|
|
46
|
+
confirmable: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
confirmText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "你确定要删除该记录吗?"
|
|
53
|
+
},
|
|
54
|
+
confirmType: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "warning"
|
|
57
|
+
},
|
|
58
|
+
confirmTitle: String,
|
|
59
|
+
loadable: Boolean,
|
|
60
|
+
loadingText: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "正在处理中请稍候..."
|
|
63
|
+
},
|
|
64
|
+
tag: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "i"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
render() {
|
|
70
|
+
let e = n(this.tag), { text: r, ...i } = this.$props, { onClick: o, ...s } = this.$attrs;
|
|
71
|
+
return t(e, {
|
|
72
|
+
...s,
|
|
73
|
+
...i,
|
|
74
|
+
onClick: (e) => a(e, this.$props, this.$attrs)
|
|
75
|
+
}, { default: this.$slots.default || (() => r) });
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { o as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as t, r as n } from "./
|
|
3
|
-
import { n as r } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { a as e } from "./BzMaCcUd.mjs";
|
|
2
|
+
import { o as t, r as n } from "./BIm5rmJm.mjs";
|
|
3
|
+
import { n as r } from "./Cp9FIjnh.mjs";
|
|
4
|
+
import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
|
|
5
|
+
import { ElImage as s } from "element-plus/es";
|
|
6
6
|
//#region src/components/form/props/image.js
|
|
7
7
|
var c = {
|
|
8
8
|
...r,
|
|
@@ -19,7 +19,7 @@ var c = {
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
|
|
21
21
|
function f(e) {
|
|
22
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
22
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/components/form/FormImage.vue
|
|
@@ -34,16 +34,16 @@ var p = {
|
|
|
34
34
|
close: null,
|
|
35
35
|
show: null
|
|
36
36
|
},
|
|
37
|
-
setup(r, { slots:
|
|
37
|
+
setup(r, { slots: a, attrs: c, emit: l }) {
|
|
38
38
|
let p = t(r, { attrs: c }), m = e(r, {
|
|
39
39
|
events: u,
|
|
40
40
|
predicate: d,
|
|
41
41
|
emit: l
|
|
42
42
|
});
|
|
43
43
|
return () => n(r, {
|
|
44
|
-
vNodes:
|
|
44
|
+
vNodes: i(s, o(m.value, c, { "preview-src-list": [r.src] }), f(a) ? a : { default: () => [a] }),
|
|
45
45
|
formItemProps: p,
|
|
46
|
-
slots:
|
|
46
|
+
slots: a
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { i as e, n as t } from "./BIm5rmJm.mjs";
|
|
2
|
+
import { n } from "./Cp9FIjnh.mjs";
|
|
3
|
+
import { computed as r, createVNode as i, isVNode as a, mergeProps as o } from "vue";
|
|
4
|
+
import { ElCheckbox as s, ElCheckboxButton as c, ElCheckboxGroup as l } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/checkbox-group.js
|
|
6
6
|
var u = {
|
|
7
7
|
...n,
|
|
@@ -56,7 +56,7 @@ var u = {
|
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/form/FormCheckBoxGroup.vue?vue&type=script&lang.jsx
|
|
58
58
|
function m(e) {
|
|
59
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
59
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/components/form/FormCheckBoxGroup.vue
|
|
@@ -68,37 +68,37 @@ var h = {
|
|
|
68
68
|
...t,
|
|
69
69
|
change: null
|
|
70
70
|
},
|
|
71
|
-
setup(t, { emit: n, slots:
|
|
71
|
+
setup(t, { emit: n, slots: a, attrs: u }) {
|
|
72
72
|
let { emitInput: d, render: h, disabled: g, autoBind: _ } = e(t, {
|
|
73
73
|
emit: n,
|
|
74
|
-
slots:
|
|
74
|
+
slots: a,
|
|
75
75
|
attrs: u,
|
|
76
76
|
events: f,
|
|
77
77
|
predicate: p,
|
|
78
78
|
messagePrefix: "请选择"
|
|
79
|
-
}), v = (e) => d(t.stringMode ? e.join(t.delimiter) : e), y =
|
|
79
|
+
}), v = (e) => d(t.stringMode ? e.join(t.delimiter) : e), y = r(() => {
|
|
80
80
|
if (t.stringMode) {
|
|
81
81
|
var e;
|
|
82
82
|
return Array.isArray(t.modelValue) ? t.modelValue.filter((e) => e) : ((e = t.modelValue) == null ? void 0 : e.split(t.delimiter).filter((e) => e)) ?? [];
|
|
83
83
|
}
|
|
84
84
|
return t.modelValue || [];
|
|
85
85
|
});
|
|
86
|
-
return () => h({ vNodes:
|
|
86
|
+
return () => h({ vNodes: i(l, o(_.value, {
|
|
87
87
|
modelValue: y.value,
|
|
88
88
|
disabled: g.value,
|
|
89
89
|
"onUpdate:modelValue": v
|
|
90
90
|
}), {
|
|
91
|
-
...
|
|
92
|
-
default:
|
|
91
|
+
...a,
|
|
92
|
+
default: a.default || (() => {
|
|
93
93
|
var e;
|
|
94
|
-
return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled:
|
|
94
|
+
return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" ? i(c, {
|
|
95
95
|
key: e,
|
|
96
96
|
value: e,
|
|
97
|
-
disabled:
|
|
98
|
-
}, m(n) ? n : { default: () => [n] }) : s
|
|
97
|
+
disabled: r
|
|
98
|
+
}, m(n) ? n : { default: () => [n] }) : i(s, {
|
|
99
99
|
key: e,
|
|
100
100
|
value: e,
|
|
101
|
-
disabled:
|
|
101
|
+
disabled: r
|
|
102
102
|
}, m(n) ? n : { default: () => [n] }));
|
|
103
103
|
})
|
|
104
104
|
}) });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n, t as r } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { i as e, n as t } from "./BIm5rmJm.mjs";
|
|
2
|
+
import { n, t as r } from "./Cp9FIjnh.mjs";
|
|
3
|
+
import { isString as i } from "@web-utils/core";
|
|
4
4
|
import { computed as a, createVNode as o, mergeProps as s } from "vue";
|
|
5
|
-
import {
|
|
5
|
+
import { ElInputNumber as c } from "element-plus/es";
|
|
6
6
|
//#region src/components/form/props/input-number.js
|
|
7
7
|
var l = {
|
|
8
8
|
...n,
|
|
@@ -90,8 +90,8 @@ var l = {
|
|
|
90
90
|
attrs: l,
|
|
91
91
|
events: d,
|
|
92
92
|
predicate: f
|
|
93
|
-
}), _ = a(() =>
|
|
94
|
-
return () => p({ vNodes: o(
|
|
93
|
+
}), _ = a(() => i(t.modelValue) ? Number(t.modelValue) : t.modelValue);
|
|
94
|
+
return () => p({ vNodes: o(c, s({ style: "width: 100%" }, g.value, {
|
|
95
95
|
modelValue: _.value,
|
|
96
96
|
disabled: h.value,
|
|
97
97
|
"onUpdate:modelValue": u,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from "../empty-view/index.mjs";
|
|
2
|
+
import { formItemGroupContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
|
+
import { Fragment as r, computed as i, createTextVNode as a, createVNode as o, h as s, inject as c, isVNode as l, onBeforeUnmount as u, onMounted as d, provide as f, reactive as p, ref as m, toRef as h, useTemplateRef as g, vShow as _, watchEffect as v, withDirectives as y } from "vue";
|
|
4
|
+
import { ElCol as b, ElCollapseTransition as x } from "element-plus";
|
|
5
|
+
import { ElRow as S } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
|
|
7
|
+
function C(e) {
|
|
8
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/components/form/FormItemGroup.vue
|
|
12
|
+
var w = {
|
|
13
|
+
name: "FormItemGroup",
|
|
14
|
+
props: {
|
|
15
|
+
blockTitle: String,
|
|
16
|
+
size: String,
|
|
17
|
+
tips: String,
|
|
18
|
+
active: Boolean,
|
|
19
|
+
enabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
tag: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "ElCol"
|
|
30
|
+
},
|
|
31
|
+
span: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 24
|
|
34
|
+
},
|
|
35
|
+
block: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
wrapRow: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
gutter: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 20
|
|
46
|
+
},
|
|
47
|
+
collapse: Boolean,
|
|
48
|
+
showTitle: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
notDispatch: Boolean
|
|
53
|
+
},
|
|
54
|
+
setup(l, { expose: w, slots: T }) {
|
|
55
|
+
let E = c(n, null), D = g("root"), O = m(!0), k = h(() => l.enabled), A = h(() => l.disabled), j = i(() => l.enabled === !0 ? !1 : l.disabled === !0), M = i(() => l.tag === "ElCol"), N = () => O.value = !O.value, P = p({
|
|
56
|
+
el: i(() => M.value ? D.value.$el : D.value),
|
|
57
|
+
disabled: A,
|
|
58
|
+
enabled: k,
|
|
59
|
+
isDisabled: j,
|
|
60
|
+
size: h(() => l.size)
|
|
61
|
+
});
|
|
62
|
+
return v(() => {
|
|
63
|
+
O.value = !l.collapse;
|
|
64
|
+
}), f(t, P), d(() => {
|
|
65
|
+
if (!l.notDispatch) {
|
|
66
|
+
var e;
|
|
67
|
+
E == null || (e = E.addGroup) == null || e.call(E, this);
|
|
68
|
+
}
|
|
69
|
+
}), u(() => {
|
|
70
|
+
if (!l.notDispatch) {
|
|
71
|
+
var e;
|
|
72
|
+
E == null || (e = E.removeGroup) == null || e.call(E, this);
|
|
73
|
+
}
|
|
74
|
+
}), w(P), () => {
|
|
75
|
+
let t = () => {
|
|
76
|
+
var t;
|
|
77
|
+
return o(r, null, [y(o("div", {
|
|
78
|
+
class: "form-item-group-title",
|
|
79
|
+
onClick: N
|
|
80
|
+
}, [o("span", {
|
|
81
|
+
class: "flex-item",
|
|
82
|
+
style: "flex: 1"
|
|
83
|
+
}, [
|
|
84
|
+
T.title ? T.title() : l.blockTitle,
|
|
85
|
+
T.tips || l.tips ? o("span", { style: "color: #ff0000; font-size: 14px" }, [
|
|
86
|
+
a("("),
|
|
87
|
+
T.tips ? T.tips() : l.tips,
|
|
88
|
+
a(")")
|
|
89
|
+
]) : null,
|
|
90
|
+
(t = T["title-right"]) == null ? void 0 : t.call(T)
|
|
91
|
+
]), o("i", { class: O.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[_, l.showTitle]]), o(x, null, { default: () => {
|
|
92
|
+
let t;
|
|
93
|
+
return T.default ? l.wrapRow ? y(o(S, { gutter: l.gutter }, C(t = T.default()) ? t : { default: () => [t] }), [[_, O.value]]) : y(o("div", null, [T.default()]), [[_, O.value]]) : y(o(e, {
|
|
94
|
+
"font-size": "14px",
|
|
95
|
+
"empty-tips": "暂无信息"
|
|
96
|
+
}, null), [[_, O.value]]);
|
|
97
|
+
} })]);
|
|
98
|
+
}, n = {
|
|
99
|
+
ref: "root",
|
|
100
|
+
class: ["form-item-group", {
|
|
101
|
+
"default-active": l.active,
|
|
102
|
+
"is-disabled": j.value
|
|
103
|
+
}]
|
|
104
|
+
};
|
|
105
|
+
return M.value && (n.span = l.block ? 24 : l.span), s(M.value ? b : "div", n, M.value ? t : t());
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { w as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n } from "
|
|
1
|
+
import { a as e } from "./BzMaCcUd.mjs";
|
|
2
|
+
import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
3
|
import r from "../form-advice/index.mjs";
|
|
4
4
|
import i from "../form-red-table/index.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { computed as
|
|
7
|
-
import {
|
|
5
|
+
import { animate as a } from "@web-utils/core";
|
|
6
|
+
import { computed as o, createVNode as s, inject as c, mergeProps as l, nextTick as u, provide as d, reactive as f, toRef as p, useTemplateRef as m } from "vue";
|
|
7
|
+
import { ElForm as h, ElRow as g } from "element-plus/es";
|
|
8
8
|
//#region src/components/form/props/form.js
|
|
9
9
|
var _ = {
|
|
10
10
|
model: Object,
|
|
@@ -97,34 +97,34 @@ var _ = {
|
|
|
97
97
|
props: { ..._ },
|
|
98
98
|
emits: { validate: null },
|
|
99
99
|
setup(_, { slots: v, expose: x, emit: S }) {
|
|
100
|
-
let C =
|
|
100
|
+
let C = e(_, {
|
|
101
101
|
emit: S,
|
|
102
102
|
events: y,
|
|
103
103
|
predicate: b
|
|
104
|
-
}), w =
|
|
104
|
+
}), w = c(n, null), T = m("form"), E = o(() => _.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !_.notTableForm), D = o(() => E.value ? !1 : _.showMessage), O = o(() => {
|
|
105
105
|
let e = {};
|
|
106
106
|
return _.disabledFields && _.disabledFields.forEach((t) => {
|
|
107
107
|
e[t] = !0;
|
|
108
108
|
}), e;
|
|
109
|
-
}), k =
|
|
109
|
+
}), k = o(() => {
|
|
110
110
|
let e = {};
|
|
111
111
|
return _.enabledFields && _.enabledFields.length && _.enabledFields.forEach((t) => {
|
|
112
112
|
e[t] = !0;
|
|
113
113
|
}), e;
|
|
114
|
-
}), A =
|
|
114
|
+
}), A = o(() => {
|
|
115
115
|
let e = {};
|
|
116
116
|
return _.requiredFields && _.requiredFields.length && _.requiredFields.forEach((t) => {
|
|
117
117
|
e[t] = !0;
|
|
118
118
|
}), e;
|
|
119
|
-
}), j =
|
|
120
|
-
await
|
|
119
|
+
}), j = o(() => _.disabled === !0 ? !0 : _.disabled), M = p(() => _.enabledFields), N = p(() => _.requiredFields), P = p(() => _.disabledFields), F = async () => {
|
|
120
|
+
await u();
|
|
121
121
|
let e = T.value.$el.querySelector(".el-form-item.is-error");
|
|
122
122
|
e && e.scrollIntoView({
|
|
123
123
|
block: "center",
|
|
124
124
|
inline: "center",
|
|
125
125
|
behavior: "smooth"
|
|
126
126
|
});
|
|
127
|
-
}, I =
|
|
127
|
+
}, I = f({
|
|
128
128
|
tableForm: E,
|
|
129
129
|
disabled: j,
|
|
130
130
|
enabledFields: M,
|
|
@@ -140,7 +140,7 @@ var _ = {
|
|
|
140
140
|
return await T.value.validate();
|
|
141
141
|
} catch {
|
|
142
142
|
throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
143
|
-
|
|
143
|
+
a(e, "breathe-animation");
|
|
144
144
|
}), Error("表单验证不通过!");
|
|
145
145
|
}
|
|
146
146
|
},
|
|
@@ -152,7 +152,7 @@ var _ = {
|
|
|
152
152
|
setInitialValues: (e) => T.value.setInitialValues(e),
|
|
153
153
|
getFields: () => T.value.fields
|
|
154
154
|
});
|
|
155
|
-
return
|
|
155
|
+
return d(t, I), x(I), () => s(h, l({
|
|
156
156
|
ref: "form",
|
|
157
157
|
class: "form-holder",
|
|
158
158
|
"show-message": D.value
|
|
@@ -161,23 +161,23 @@ var _ = {
|
|
|
161
161
|
var e, t, n;
|
|
162
162
|
return [
|
|
163
163
|
(e = v.top) == null ? void 0 : e.call(v),
|
|
164
|
-
|
|
164
|
+
s(i, {
|
|
165
165
|
class: { "hide-error-message": E.value },
|
|
166
166
|
columns: _.columns,
|
|
167
167
|
"col-count": _.colCount
|
|
168
168
|
}, { default: () => {
|
|
169
169
|
var e;
|
|
170
|
-
return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ?
|
|
170
|
+
return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ? s(r, {
|
|
171
171
|
"label-colspan": _.commentLabelColspan,
|
|
172
172
|
"value-colspan": _.commentValueColspan
|
|
173
173
|
}, null) : null];
|
|
174
174
|
} }),
|
|
175
175
|
(t = v.bottom) == null ? void 0 : t.call(v),
|
|
176
|
-
|
|
176
|
+
s("div", { class: "red-form-footer" }, [(n = v.footer) == null ? void 0 : n.call(v)])
|
|
177
177
|
];
|
|
178
178
|
} else {
|
|
179
179
|
var a;
|
|
180
|
-
return _.wrapRow ?
|
|
180
|
+
return _.wrapRow ? s(g, null, { default: () => {
|
|
181
181
|
var e;
|
|
182
182
|
return [(e = v.default) == null ? void 0 : e.call(v)];
|
|
183
183
|
} }) : (a = v.default) == null ? void 0 : a.call(v);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as n } from "./
|
|
1
|
+
import { n as e } from "./BIm5rmJm.mjs";
|
|
2
|
+
import { t } from "./CozfnlhM.mjs";
|
|
3
|
+
import { t as n } from "./Cnmu4eY-.mjs";
|
|
4
4
|
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
5
5
|
//#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
|
|
6
6
|
function s(e) {
|