@web-utils/form-ui 1.0.0-beta3 → 1.0.0-beta31
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/base.css +1 -1
- package/chunks/4ZuVpQf6.mjs +478 -0
- package/chunks/B99alfW4.mjs +207 -0
- package/chunks/BQ77eAb3.mjs +71 -0
- package/chunks/BV_N8p9t.mjs +83 -0
- package/chunks/BV_P9a8o.mjs +100 -0
- package/chunks/BgDYHgyH.mjs +189 -0
- package/chunks/Bm5eiSmT.mjs +79 -0
- package/chunks/BmZieBZW.mjs +88 -0
- package/chunks/Br4i8stg.mjs +222 -0
- package/chunks/C3a15Ful.mjs +95 -0
- package/chunks/C44-CFi-.mjs +636 -0
- package/chunks/C4bM8miy.mjs +174 -0
- package/chunks/C9J3j0PX.mjs +93 -0
- package/chunks/Cby3mvvZ.mjs +216 -0
- package/chunks/Cc3EJjbV.mjs +25 -0
- package/chunks/Cgl-hCE5.mjs +25 -0
- package/chunks/Ci1XxmdE.mjs +51 -0
- package/chunks/CkFapoKt.mjs +8 -0
- package/chunks/CsfgUCe9.mjs +17 -0
- package/chunks/CugRu2Ka.mjs +42 -0
- package/chunks/Cy-4nmyC.mjs +106 -0
- package/chunks/D1EOkWJ7.mjs +25 -0
- package/chunks/D1G2MMMx.mjs +1360 -0
- package/chunks/DO8dVGef.mjs +98 -0
- package/chunks/DazglPJZ.mjs +180 -0
- package/chunks/Dt6gY213.mjs +62 -0
- package/chunks/DtAYXPvz.mjs +108 -0
- package/chunks/JhyiXnbd.mjs +76 -0
- package/chunks/S64sNmuR.mjs +226 -0
- package/chunks/bnRb5PUB.mjs +108 -0
- package/chunks/dM-icPM8.mjs +107 -0
- package/chunks/pxFLMMUm.mjs +110 -0
- package/chunks/q1SlJP1y.mjs +171 -0
- package/confirm-button/index.d.ts +113 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +84 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +42 -0
- package/constants/index.mjs +4 -0
- package/dict-render/index.d.ts +28 -0
- package/element-dialog/index.d.ts +374 -0
- package/element-dialog/index.mjs +2 -91
- package/empty-view/index.d.ts +29 -0
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +22 -0
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.d.ts +9 -0
- package/form-advice/index.mjs +13 -12
- package/form-button/index.d.ts +114 -0
- package/form-button/index.mjs +36 -0
- package/form-cascader/index.d.ts +486 -0
- package/form-cascader/index.mjs +2 -0
- package/form-cell/index.d.ts +25 -0
- package/form-check-box-group/index.d.ts +295 -0
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +273 -0
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +423 -0
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +166 -0
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +226 -0
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +389 -0
- package/form-input/index.mjs +1 -1
- package/form-input/style.css +1 -0
- package/form-input-cron-expression/index.d.ts +217 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +363 -0
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +363 -0
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +327 -0
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +363 -0
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +2 -0
- package/form-input-time/index.d.ts +2 -0
- package/form-item-config-provider/index.d.ts +22 -0
- package/form-item-config-provider/index.mjs +24 -0
- package/form-item-group/index.d.ts +94 -0
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.d.ts +184 -0
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -0
- package/form-radio-group/index.d.ts +283 -0
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +321 -0
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.d.ts +21 -0
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +11 -0
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +542 -0
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +350 -0
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +339 -0
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +229 -0
- package/form-text/index.mjs +1 -1
- package/form-view/index.d.ts +2 -0
- package/form-view/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/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -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 +51 -0
- package/index.mjs +51 -37
- package/month-calendar/index.d.ts +80 -0
- package/package.json +12 -7
- package/pageable-table/index.d.ts +436 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/resize-observer/index.d.ts +8 -0
- package/resize-observer/index.mjs +40 -0
- package/resize-observer/style.css +1 -0
- package/resolver/index.d.ts +9 -0
- package/resolver/index.mjs +29 -0
- package/table-column/index.d.ts +160 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +85 -0
- package/table-column-def/index.mjs +11 -0
- package/table-column-filter/index.d.ts +11 -0
- package/table-column-filterable/index.d.ts +10 -0
- package/table-view/index.d.ts +2 -0
- package/table-view/index.mjs +1 -1
- package/toolbar/index.d.ts +129 -0
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +77 -0
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +226 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/B4M_TFeR.mjs +0 -152
- package/chunks/B5BIQCcK.mjs +0 -149
- package/chunks/BHNKrW1j.mjs +0 -61
- package/chunks/BO9jWhBl.mjs +0 -46
- package/chunks/BZ8aOa78.mjs +0 -35
- package/chunks/Bsz7y4Xp.mjs +0 -73
- package/chunks/Bxj372sF.mjs +0 -53
- package/chunks/C33EmJN8.mjs +0 -32
- package/chunks/C6Li3-l7.mjs +0 -28
- package/chunks/CBcdalMX.mjs +0 -35
- package/chunks/CdRsyF0n.mjs +0 -43
- package/chunks/ClNahmiU.mjs +0 -23
- package/chunks/CstztYMu.mjs +0 -28
- package/chunks/DC9b53M6.mjs +0 -32
- package/chunks/DDVAgRED.mjs +0 -36
- package/chunks/DpJQABVD.mjs +0 -91
- package/chunks/ZsLNWI9x.mjs +0 -46
- package/chunks/jn_iQrVZ.mjs +0 -28
- package/constants.mjs +0 -4
- package/input/style.css +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { isFunction as e } from "@web-utils/core";
|
|
2
|
+
import { defineComponent as t, h as n, resolveComponent as r } from "vue";
|
|
3
|
+
import { ElLoading as i, ElMessageBox as a } from "element-plus";
|
|
4
|
+
//#region src/components/button/confirmable-mixin.ts
|
|
5
|
+
async function o(t, n, r) {
|
|
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 } = r;
|
|
9
|
+
if (e(g)) try {
|
|
10
|
+
let n = !0;
|
|
11
|
+
if (e(h) && (n = await h(t)), !n) return;
|
|
12
|
+
d && await a.confirm(c || p, {
|
|
13
|
+
type: f,
|
|
14
|
+
title: m
|
|
15
|
+
});
|
|
16
|
+
let r;
|
|
17
|
+
l && (r = i.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 && (r == null || r.close()), e(v) && await v(t, o);
|
|
26
|
+
} catch (t) {
|
|
27
|
+
e(_) && await _(t);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var s = t({
|
|
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 = r(this.tag), { text: t, ...i } = this.$props, { onClick: a, ...s } = this.$attrs;
|
|
71
|
+
return n(e, {
|
|
72
|
+
...s,
|
|
73
|
+
...i,
|
|
74
|
+
onClick: (e) => o(e, this.$props, this.$attrs)
|
|
75
|
+
}, { default: this.$slots.default || (() => t) });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { s as t };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Br4i8stg.mjs";
|
|
2
|
+
import { n } from "./CsfgUCe9.mjs";
|
|
3
|
+
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
|
+
import { ElRate as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/rate.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
modelValue: Number,
|
|
9
|
+
max: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 5
|
|
12
|
+
},
|
|
13
|
+
size: String,
|
|
14
|
+
allowHalf: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
lowThreshold: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 2
|
|
21
|
+
},
|
|
22
|
+
highThreshold: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 4
|
|
25
|
+
},
|
|
26
|
+
colors: [Array, Object],
|
|
27
|
+
voidColor: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "#c6d1de"
|
|
30
|
+
},
|
|
31
|
+
disabledVoidColor: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "#eff2f7"
|
|
34
|
+
},
|
|
35
|
+
icons: [Array, Object],
|
|
36
|
+
voidIcon: [String, Object],
|
|
37
|
+
disabledVoidIcon: [String, Object],
|
|
38
|
+
showText: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
showScore: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
textColor: String,
|
|
47
|
+
texts: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default: () => [
|
|
50
|
+
"Extremely bad",
|
|
51
|
+
"Disappointed",
|
|
52
|
+
"Fair",
|
|
53
|
+
"Satisfied",
|
|
54
|
+
"Surprise"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
scoreTemplate: String,
|
|
58
|
+
clearable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
id: String,
|
|
63
|
+
ariaLabel: String
|
|
64
|
+
}, c = { modelValue: !0 }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
|
|
65
|
+
name: "FormRate",
|
|
66
|
+
inheritAttrs: !1,
|
|
67
|
+
props: { ...s },
|
|
68
|
+
emits: {
|
|
69
|
+
...t,
|
|
70
|
+
change: null
|
|
71
|
+
},
|
|
72
|
+
setup(t, { emit: n, slots: s, attrs: c }) {
|
|
73
|
+
let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
|
|
74
|
+
emit: n,
|
|
75
|
+
slots: s,
|
|
76
|
+
attrs: c,
|
|
77
|
+
events: l,
|
|
78
|
+
predicate: u
|
|
79
|
+
});
|
|
80
|
+
return () => f({ vNodes: r(o, i(m.value, {
|
|
81
|
+
modelValue: d.value,
|
|
82
|
+
"onUpdate:modelValue": (e) => d.value = e,
|
|
83
|
+
disabled: p.value
|
|
84
|
+
}), null) });
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { d as t };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { r as e } from "./BQ77eAb3.mjs";
|
|
2
|
+
import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
|
|
3
|
+
import { computed as i, createVNode as a, h as o, inject as s, mergeProps as c, nextTick as l, unref as u, useTemplateRef as d } from "vue";
|
|
4
|
+
import { ElCol as f, rowContextKey as p } from "element-plus";
|
|
5
|
+
import { ElCol as m, ElFormItem as h, ElTooltip as g } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/form-item.ts
|
|
7
|
+
var _ = {
|
|
8
|
+
prop: [String, Array],
|
|
9
|
+
label: String,
|
|
10
|
+
labelPosition: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
labelWidth: [String, Number],
|
|
15
|
+
required: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
rules: Object,
|
|
20
|
+
error: String,
|
|
21
|
+
showMessage: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
inlineMessage: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
size: String,
|
|
30
|
+
for: String,
|
|
31
|
+
validateStatus: String,
|
|
32
|
+
messagePrefix: String,
|
|
33
|
+
message: String,
|
|
34
|
+
wrapCol: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !0
|
|
37
|
+
},
|
|
38
|
+
fixedSpan: Number,
|
|
39
|
+
block: Boolean,
|
|
40
|
+
unwrap: Boolean,
|
|
41
|
+
half: Boolean,
|
|
42
|
+
formItemClass: String,
|
|
43
|
+
hideLabel: Boolean,
|
|
44
|
+
tips: { type: String },
|
|
45
|
+
tipsAfterLabel: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
labelColspan: [Number, String],
|
|
50
|
+
inputColspan: [Number, String],
|
|
51
|
+
labelRowspan: [Number, String],
|
|
52
|
+
inputRowspan: [Number, String]
|
|
53
|
+
}, v = {
|
|
54
|
+
required: !0,
|
|
55
|
+
rules: !0,
|
|
56
|
+
messagePrefix: !0,
|
|
57
|
+
message: !0,
|
|
58
|
+
wrapCol: !0,
|
|
59
|
+
fixedSpan: !0,
|
|
60
|
+
block: !0,
|
|
61
|
+
unwrap: !0,
|
|
62
|
+
half: !0,
|
|
63
|
+
formItemClass: !0,
|
|
64
|
+
hideLabel: !0,
|
|
65
|
+
tips: !0,
|
|
66
|
+
tipsAfterLabel: !0,
|
|
67
|
+
labelColspan: !0,
|
|
68
|
+
inputColspan: !0,
|
|
69
|
+
labelRowspan: !0,
|
|
70
|
+
inputRowspan: !0
|
|
71
|
+
}, y = (e) => _[e] !== void 0 && v[e] !== !0, b = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), x = {
|
|
72
|
+
span: {
|
|
73
|
+
type: Number,
|
|
74
|
+
default: 12
|
|
75
|
+
},
|
|
76
|
+
offset: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: 0
|
|
79
|
+
},
|
|
80
|
+
push: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 0
|
|
83
|
+
},
|
|
84
|
+
pull: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 0
|
|
87
|
+
},
|
|
88
|
+
xs: { type: [Number, Object] },
|
|
89
|
+
sm: { type: [Number, Object] },
|
|
90
|
+
md: { type: [Number, Object] },
|
|
91
|
+
lg: { type: [Number, Object] },
|
|
92
|
+
xl: { type: [Number, Object] },
|
|
93
|
+
tag: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: "div"
|
|
96
|
+
}
|
|
97
|
+
}, S = { span: !0 }, C = (e) => x[e] !== void 0 && S[e] !== !0, w = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), T = (e) => {
|
|
98
|
+
let n = s(t, null);
|
|
99
|
+
return i(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
|
|
100
|
+
}, E = (e, { rules: t, attrs: n, messagePrefix: r, message: a } = {}) => {
|
|
101
|
+
let o = T(e);
|
|
102
|
+
return i(() => {
|
|
103
|
+
let i = { message: a }, s = u(t);
|
|
104
|
+
return Object.keys({
|
|
105
|
+
..._,
|
|
106
|
+
...x
|
|
107
|
+
}).forEach((t) => {
|
|
108
|
+
t === "rules" ? e[t] && s ? i[t] = [...e[t], ...s] : e[t] ? i[t] = e[t] : s && (i[t] = s) : t === "messagePrefix" ? i[t] = e.messagePrefix || r : i[t] = e[t];
|
|
109
|
+
}), i.required = o.value, i.class = n == null ? void 0 : n.class, i.style = n == null ? void 0 : n.style, i;
|
|
110
|
+
});
|
|
111
|
+
}, D = {
|
|
112
|
+
name: "FormItemX",
|
|
113
|
+
inheritAttrs: !1,
|
|
114
|
+
props: {
|
|
115
|
+
..._,
|
|
116
|
+
...x
|
|
117
|
+
},
|
|
118
|
+
setup(e, { attrs: r, slots: o, expose: u }) {
|
|
119
|
+
let f = s(p, null), _ = s(n, null), v = s(t, null), x = r.embed ? i(() => r.disabled) : k(e), S = b(e, { predicate: y }), E = w(e, { predicate: C }), D = i(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && e.fixedSpan === void 0 && !e.half), O = T(e), A = d("formItem"), j = i(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!f && e.wrapCol), M = i(() => v != null && v.tableForm ? "" : _ != null && _.block ? "100%" : e.half && j.value ? `calc(50% - ${f.gutter.value / 2}px)` : ""), N = i(() => (_ == null ? void 0 : _.block) === !0 || e.block || e.half ? 24 : e.span), P = i(() => {
|
|
120
|
+
if (x.value) return [];
|
|
121
|
+
if (O.value) {
|
|
122
|
+
let t = {
|
|
123
|
+
required: !0,
|
|
124
|
+
message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
|
|
125
|
+
};
|
|
126
|
+
return e.rules ? [...e.rules, t] : [t];
|
|
127
|
+
}
|
|
128
|
+
return e.rules;
|
|
129
|
+
});
|
|
130
|
+
return u({
|
|
131
|
+
clearValidate: async () => {
|
|
132
|
+
var e;
|
|
133
|
+
await l(), (e = A.value) == null || e.clearValidate();
|
|
134
|
+
},
|
|
135
|
+
validate: async () => {
|
|
136
|
+
var e;
|
|
137
|
+
await l(), (e = A.value) == null || e.validate();
|
|
138
|
+
}
|
|
139
|
+
}), () => {
|
|
140
|
+
var t;
|
|
141
|
+
let n = o.tips || e.tips, r = n ? a(g, {
|
|
142
|
+
effect: "light",
|
|
143
|
+
content: e.tips,
|
|
144
|
+
offset: 4
|
|
145
|
+
}, {
|
|
146
|
+
default: () => a("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
147
|
+
content: o.tips ? o.tips : null
|
|
148
|
+
}) : null, i = a(h, c(S.value, {
|
|
149
|
+
ref: "formItem",
|
|
150
|
+
style: { width: M.value },
|
|
151
|
+
class: [
|
|
152
|
+
"form-item",
|
|
153
|
+
e.formItemClass,
|
|
154
|
+
{
|
|
155
|
+
"form-item-hide-label": e.hideLabel,
|
|
156
|
+
"with-tips": !e.tipsAfterLabel && n,
|
|
157
|
+
required: x.value === !1 && O.value
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
rules: P.value
|
|
161
|
+
}), {
|
|
162
|
+
...o,
|
|
163
|
+
default: () => {
|
|
164
|
+
var t;
|
|
165
|
+
return [(t = o.default) == null ? void 0 : t.call(o, {
|
|
166
|
+
disabled: x.value,
|
|
167
|
+
required: O.value
|
|
168
|
+
}), n && !e.tipsAfterLabel ? r : null];
|
|
169
|
+
},
|
|
170
|
+
label: () => [o.label ? o.label() : e.label, e.tipsAfterLabel ? r : null]
|
|
171
|
+
}), s = [i, (t = o.below) == null ? void 0 : t.call(o)];
|
|
172
|
+
return e.unwrap ? s : j.value ? a(m, c(E.value, D.value ? {
|
|
173
|
+
xs: 24,
|
|
174
|
+
sm: 12,
|
|
175
|
+
md: 12,
|
|
176
|
+
lg: 8,
|
|
177
|
+
xl: 6
|
|
178
|
+
} : {}, { span: N.value }), { default: () => s }) : i;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}, O = "update:modelValue", k = (e) => {
|
|
182
|
+
let n = s(t, null), a = s(r, null);
|
|
183
|
+
return i(() => {
|
|
184
|
+
if (e.disabled !== void 0) return e.disabled;
|
|
185
|
+
if (n) {
|
|
186
|
+
if (n.requiredFieldsMap[e.prop] === !0 || n.enabledFieldsMap[e.prop] === !0) return !1;
|
|
187
|
+
if (n.disabledFieldsMap[e.prop] === !0) return !0;
|
|
188
|
+
}
|
|
189
|
+
return (a == null ? void 0 : a.enabled) === !0 ? !1 : (a == null ? void 0 : a.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
|
|
190
|
+
});
|
|
191
|
+
}, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? o(D, {
|
|
192
|
+
...n.value,
|
|
193
|
+
embed: !0,
|
|
194
|
+
disabled: i == null ? void 0 : i.value
|
|
195
|
+
}, {
|
|
196
|
+
default: () => t,
|
|
197
|
+
label: r.label,
|
|
198
|
+
error: r.error,
|
|
199
|
+
tips: r.tips,
|
|
200
|
+
below: r.below
|
|
201
|
+
}) : t, N = (t, { emit: n, slots: r, attrs: a, rules: s, events: c, predicate: l, messagePrefix: u = "请输入" }) => {
|
|
202
|
+
let d = k(t), p = i(() => d.value ? "" : `${u}${t.label}`), m = E(t, {
|
|
203
|
+
rules: s,
|
|
204
|
+
attrs: a,
|
|
205
|
+
message: p.value
|
|
206
|
+
}), h = (e) => j(n, e), g = (e) => t.col ? o(f, { span: t.block ? 24 : t.span }, { default: () => e }) : e;
|
|
207
|
+
return {
|
|
208
|
+
emitInput: h,
|
|
209
|
+
render: ({ vNodes: e }) => M(t, {
|
|
210
|
+
vNodes: g(e),
|
|
211
|
+
formItemProps: m,
|
|
212
|
+
slots: r,
|
|
213
|
+
disabled: d
|
|
214
|
+
}),
|
|
215
|
+
placeholder: p,
|
|
216
|
+
disabled: d,
|
|
217
|
+
formItemProps: m,
|
|
218
|
+
autoBind: i(() => e(t, l, c, n))
|
|
219
|
+
};
|
|
220
|
+
}, P = (e) => e.icon ? o("i", { class: e.icon }) : null;
|
|
221
|
+
//#endregion
|
|
222
|
+
export { D as a, _ as c, N as i, A as n, E as o, M as r, x as s, P as t };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Br4i8stg.mjs";
|
|
2
|
+
import { n } from "./CsfgUCe9.mjs";
|
|
3
|
+
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
|
+
import { ElSlider as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/slide.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
modelValue: [Number, Array],
|
|
9
|
+
min: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 0
|
|
12
|
+
},
|
|
13
|
+
max: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 100
|
|
16
|
+
},
|
|
17
|
+
step: [Number, String],
|
|
18
|
+
showInput: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
showInputControls: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "default"
|
|
29
|
+
},
|
|
30
|
+
inputSize: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "default"
|
|
33
|
+
},
|
|
34
|
+
showStops: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
showTooltip: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !0
|
|
41
|
+
},
|
|
42
|
+
formatTooltip: Function,
|
|
43
|
+
range: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
vertical: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
height: String,
|
|
52
|
+
ariaLabel: String,
|
|
53
|
+
rangeStartLabel: String,
|
|
54
|
+
rangeEndLabel: String,
|
|
55
|
+
formatValueText: Function,
|
|
56
|
+
tooltipClass: String,
|
|
57
|
+
placement: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "top"
|
|
60
|
+
},
|
|
61
|
+
marks: Object,
|
|
62
|
+
validateEvent: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
persistent: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
}
|
|
70
|
+
}, c = { modelValue: !0 }, l = ["change", "input"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
|
|
71
|
+
name: "FormSlider",
|
|
72
|
+
inheritAttrs: !1,
|
|
73
|
+
props: { ...s },
|
|
74
|
+
emits: {
|
|
75
|
+
...t,
|
|
76
|
+
change: null,
|
|
77
|
+
input: null
|
|
78
|
+
},
|
|
79
|
+
setup(t, { emit: n, slots: s, attrs: c }) {
|
|
80
|
+
let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
|
|
81
|
+
emit: n,
|
|
82
|
+
slots: s,
|
|
83
|
+
events: l,
|
|
84
|
+
predicate: u,
|
|
85
|
+
attrs: c
|
|
86
|
+
});
|
|
87
|
+
return () => f({ vNodes: r(o, i(m.value, {
|
|
88
|
+
modelValue: d.value,
|
|
89
|
+
"onUpdate:modelValue": (e) => d.value = e,
|
|
90
|
+
disabled: p.value
|
|
91
|
+
}), null) });
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
export { d as t };
|