@web-utils/form-ui 1.0.0-beta36 → 1.0.0-beta38
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/{BLWwTutr.mjs → B3ajWLh3.mjs} +15 -33
- package/chunks/{Cr1vBYne.mjs → BH_JJ8Xh.mjs} +15 -15
- package/chunks/{DistOy_O.mjs → BWBHzD5N.mjs} +28 -19
- package/chunks/{DQJyNm1V.mjs → Bd1UFJic.mjs} +135 -131
- package/chunks/{DcbnHU8K.mjs → BsCS7SB5.mjs} +19 -23
- package/chunks/{BTS_zTkz.mjs → BufIRDd0.mjs} +35 -39
- package/chunks/C1AgOUe_.mjs +172 -0
- package/chunks/C3Uo82-I.mjs +35 -0
- package/chunks/C9dGL28n.mjs +56 -0
- package/chunks/{A3sHIRQ_.mjs → CFOGMFgo.mjs} +22 -45
- package/chunks/{ZXCLnZFa.mjs → CLPSCSsy.mjs} +111 -144
- package/chunks/{D7hD-ppq.mjs → CSyJ-vEx.mjs} +1 -1
- package/chunks/CTKmEf2M.mjs +93 -0
- package/chunks/{DFsI7Y6h.mjs → CXvGoZKJ.mjs} +12 -11
- package/chunks/{Dgyjc3LT.mjs → Cab-ZjRx.mjs} +29 -45
- package/chunks/Cj59E77g.mjs +230 -0
- package/chunks/Cj5h2Wda.mjs +32 -0
- package/chunks/{iWQD3xvX.mjs → CqTcEefA.mjs} +14 -16
- package/chunks/{axr9InkL.mjs → Ct5bDJ50.mjs} +9 -13
- package/chunks/{D5_ctQqL.mjs → CuG2Q-PM.mjs} +2 -2
- package/chunks/{CLn0r4lV.mjs → D8UVq1t1.mjs} +16 -17
- package/chunks/{BYAy19s4.mjs → DJe97Fgi.mjs} +2 -8
- package/chunks/{Buc52aVh.mjs → DXYgAmil.mjs} +12 -29
- package/chunks/{DQxPzCsy.mjs → DhtHh0jk.mjs} +14 -15
- package/chunks/{CGJkMYZ4.mjs → DiJyms_r.mjs} +12 -20
- package/chunks/{1cDNhlSV.mjs → TvNHGVAP.mjs} +2 -2
- package/chunks/{CNskrN5I.mjs → XCGWTz41.mjs} +2 -2
- package/chunks/{DQKi5eEl.mjs → XqRTtFfp.mjs} +2 -2
- package/chunks/{BX-cVxlK.mjs → cmuHpsX6.mjs} +21 -14
- package/chunks/{DJKE5P39.mjs → o6VhYAN52.mjs} +2 -2
- package/chunks/{BwdWZEjT.mjs → pdwFQpA8.mjs} +13 -18
- package/chunks/{_dm2lLNL.mjs → taicx2sd.mjs} +2 -2
- package/constants/index.d.ts +16 -5
- package/editable-tree/index.d.ts +1 -1
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +1 -1
- package/element-dialog/index.mjs +1 -1
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +0 -14
- package/form-cascader/index.mjs +1 -1
- package/form-check-box-group/index.d.ts +0 -2
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +36 -10
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +2 -6
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +2 -14
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +9 -26
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +9 -2
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +9 -2
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +0 -6
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +9 -2
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +0 -2
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +0 -2
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +0 -14
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +1 -5
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +0 -2
- package/form-switch/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +370 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/helper/dictionary.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/index.d.ts +4 -1
- package/index.mjs +46 -43
- package/package.json +1 -1
- package/pageable-table/index.d.ts +0 -38
- package/pageable-table/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +6 -6
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +4 -3
- package/year-calendar/index.mjs +1 -1
- package/chunks/BLRY0zkF.mjs +0 -51
- package/chunks/BvsmTC3G.mjs +0 -229
- /package/chunks/{CnAEuI_c.mjs → ChmDDqoZ2.mjs} +0 -0
- /package/chunks/{BW6iY7Q7.mjs → DDmQcNm6.mjs} +0 -0
- /package/chunks/{DiE4GJtU.mjs → Ds_Tpa_M.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as e } from "./
|
|
1
|
+
import { u as e } from "./cmuHpsX6.mjs";
|
|
2
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";
|
|
@@ -91,78 +91,74 @@ var _ = {
|
|
|
91
91
|
commentValueColspan: !0,
|
|
92
92
|
commentLabelColspan: !0,
|
|
93
93
|
wrapRow: !0
|
|
94
|
-
}, y =
|
|
94
|
+
}, y = (e) => v[e] !== !0, b = {
|
|
95
95
|
name: "FormHolder",
|
|
96
96
|
inheritAttrs: !1,
|
|
97
97
|
props: { ..._ },
|
|
98
|
-
emits: {
|
|
99
|
-
setup(_, { slots: v, expose:
|
|
100
|
-
let
|
|
101
|
-
emit: S,
|
|
102
|
-
events: y,
|
|
103
|
-
predicate: b
|
|
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(() => {
|
|
98
|
+
emits: {},
|
|
99
|
+
setup(_, { slots: v, expose: b }) {
|
|
100
|
+
let { autoBindProps: x, listeners: S } = e(_, { predicate: y }), C = c(n, null), w = m("form"), T = o(() => _.notTableForm === void 0 ? (C == null ? void 0 : C.tableForm) === void 0 ? !1 : C == null ? void 0 : C.tableForm : !_.notTableForm), E = o(() => T.value ? !1 : _.showMessage), D = o(() => {
|
|
105
101
|
let e = {};
|
|
106
102
|
return _.disabledFields && _.disabledFields.forEach((t) => {
|
|
107
103
|
e[t] = !0;
|
|
108
104
|
}), e;
|
|
109
|
-
}),
|
|
105
|
+
}), O = o(() => {
|
|
110
106
|
let e = {};
|
|
111
107
|
return _.enabledFields && _.enabledFields.length && _.enabledFields.forEach((t) => {
|
|
112
108
|
e[t] = !0;
|
|
113
109
|
}), e;
|
|
114
|
-
}),
|
|
110
|
+
}), k = o(() => {
|
|
115
111
|
let e = {};
|
|
116
112
|
return _.requiredFields && _.requiredFields.length && _.requiredFields.forEach((t) => {
|
|
117
113
|
e[t] = !0;
|
|
118
114
|
}), e;
|
|
119
|
-
}),
|
|
115
|
+
}), A = o(() => _.disabled === !0 ? !0 : _.disabled), j = p(() => _.enabledFields), M = p(() => _.requiredFields), N = p(() => _.disabledFields), P = async () => {
|
|
120
116
|
await u();
|
|
121
|
-
let e =
|
|
117
|
+
let e = w.value.$el.querySelector(".el-form-item.is-error");
|
|
122
118
|
e && e.scrollIntoView({
|
|
123
119
|
block: "center",
|
|
124
120
|
inline: "center",
|
|
125
121
|
behavior: "smooth"
|
|
126
122
|
});
|
|
127
|
-
},
|
|
128
|
-
tableForm:
|
|
129
|
-
disabled:
|
|
130
|
-
enabledFields:
|
|
131
|
-
requiredFields:
|
|
132
|
-
enabledFieldsMap:
|
|
133
|
-
disabledFieldsMap:
|
|
134
|
-
requiredFieldsMap:
|
|
135
|
-
disabledFields:
|
|
136
|
-
scrollIntoRequiredField:
|
|
137
|
-
formRef:
|
|
123
|
+
}, F = f({
|
|
124
|
+
tableForm: T,
|
|
125
|
+
disabled: A,
|
|
126
|
+
enabledFields: j,
|
|
127
|
+
requiredFields: M,
|
|
128
|
+
enabledFieldsMap: O,
|
|
129
|
+
disabledFieldsMap: D,
|
|
130
|
+
requiredFieldsMap: k,
|
|
131
|
+
disabledFields: N,
|
|
132
|
+
scrollIntoRequiredField: P,
|
|
133
|
+
formRef: w,
|
|
138
134
|
validate: async () => {
|
|
139
135
|
try {
|
|
140
|
-
return await
|
|
136
|
+
return await w.value.validate();
|
|
141
137
|
} catch {
|
|
142
|
-
throw await
|
|
138
|
+
throw await P(), w.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
143
139
|
a(e, "breathe-animation");
|
|
144
140
|
}), Error("表单验证不通过!");
|
|
145
141
|
}
|
|
146
142
|
},
|
|
147
|
-
validateField: (e) =>
|
|
148
|
-
resetFields: (e) =>
|
|
149
|
-
scrollToField: (e) =>
|
|
150
|
-
clearValidate: (e) =>
|
|
151
|
-
getField: () =>
|
|
152
|
-
setInitialValues: (e) =>
|
|
153
|
-
getFields: () =>
|
|
143
|
+
validateField: (e) => w.value.validateField(e),
|
|
144
|
+
resetFields: (e) => w.value.resetFields(e),
|
|
145
|
+
scrollToField: (e) => w.value.scrollToField(e),
|
|
146
|
+
clearValidate: (e) => w.value.clearValidate(e),
|
|
147
|
+
getField: () => w.value.getField(),
|
|
148
|
+
setInitialValues: (e) => w.value.setInitialValues(e),
|
|
149
|
+
getFields: () => w.value.fields
|
|
154
150
|
});
|
|
155
|
-
return d(t,
|
|
151
|
+
return d(t, F), b(F), () => s(h, l(S.value, x.value, {
|
|
156
152
|
ref: "form",
|
|
157
153
|
class: "form-holder",
|
|
158
|
-
"show-message":
|
|
159
|
-
}
|
|
160
|
-
if (
|
|
154
|
+
"show-message": E.value
|
|
155
|
+
}), { default: () => {
|
|
156
|
+
if (T.value) {
|
|
161
157
|
var e, t, n;
|
|
162
158
|
return [
|
|
163
159
|
(e = v.top) == null ? void 0 : e.call(v),
|
|
164
160
|
s(i, {
|
|
165
|
-
class: { "hide-error-message":
|
|
161
|
+
class: { "hide-error-message": T.value },
|
|
166
162
|
columns: _.columns,
|
|
167
163
|
"col-count": _.colCount
|
|
168
164
|
}, { default: () => {
|
|
@@ -186,4 +182,4 @@ var _ = {
|
|
|
186
182
|
}
|
|
187
183
|
};
|
|
188
184
|
//#endregion
|
|
189
|
-
export {
|
|
185
|
+
export { b as t };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElTimePicker as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/time.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: [
|
|
10
|
+
Number,
|
|
11
|
+
String,
|
|
12
|
+
Object
|
|
13
|
+
],
|
|
14
|
+
readonly: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
editable: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
clearable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
size: String,
|
|
31
|
+
placeholder: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
startPlaceholder: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "开始时间"
|
|
38
|
+
},
|
|
39
|
+
endPlaceholder: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "结束时间"
|
|
42
|
+
},
|
|
43
|
+
isRange: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
arrowControl: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
popperClass: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
popperStyle: [String, Object],
|
|
56
|
+
popperOptions: Object,
|
|
57
|
+
fallbackPlacements: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => [
|
|
60
|
+
"bottom",
|
|
61
|
+
"top",
|
|
62
|
+
"right",
|
|
63
|
+
"left"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
placement: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "bottom-start"
|
|
69
|
+
},
|
|
70
|
+
rangeSeparator: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "-"
|
|
73
|
+
},
|
|
74
|
+
format: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "HH:mm:ss"
|
|
77
|
+
},
|
|
78
|
+
defaultValue: [Date, Array],
|
|
79
|
+
valueFormat: String,
|
|
80
|
+
id: [String, Array],
|
|
81
|
+
name: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: ""
|
|
84
|
+
},
|
|
85
|
+
ariaLabel: String,
|
|
86
|
+
prefixIcon: [String, Object],
|
|
87
|
+
clearIcon: [String, Object],
|
|
88
|
+
disabledHours: Function,
|
|
89
|
+
disabledMinutes: Function,
|
|
90
|
+
disabledSeconds: Function,
|
|
91
|
+
teleported: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !0
|
|
94
|
+
},
|
|
95
|
+
tabindex: [String, Number],
|
|
96
|
+
emptyValues: Array,
|
|
97
|
+
valueOnClear: [
|
|
98
|
+
String,
|
|
99
|
+
Number,
|
|
100
|
+
Boolean,
|
|
101
|
+
Function
|
|
102
|
+
],
|
|
103
|
+
saveOnBlur: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !0
|
|
106
|
+
},
|
|
107
|
+
range: Boolean,
|
|
108
|
+
start: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: "09:00"
|
|
111
|
+
},
|
|
112
|
+
end: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: "18:00"
|
|
115
|
+
},
|
|
116
|
+
step: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: "00:30"
|
|
119
|
+
},
|
|
120
|
+
minTime: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: "00:00"
|
|
123
|
+
},
|
|
124
|
+
maxTime: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: ""
|
|
127
|
+
},
|
|
128
|
+
selectableRange: String
|
|
129
|
+
}, c = {
|
|
130
|
+
disabled: !0,
|
|
131
|
+
modelValue: !0,
|
|
132
|
+
isRange: !0,
|
|
133
|
+
range: !0,
|
|
134
|
+
placement: !0,
|
|
135
|
+
popperOptions: !0,
|
|
136
|
+
start: !0,
|
|
137
|
+
end: !0,
|
|
138
|
+
step: !0,
|
|
139
|
+
minTime: !0,
|
|
140
|
+
maxTime: !0,
|
|
141
|
+
selectableRange: !0
|
|
142
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
143
|
+
name: "FormInputTime",
|
|
144
|
+
inheritAttrs: !1,
|
|
145
|
+
props: { ...s },
|
|
146
|
+
emits: { ...t },
|
|
147
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
148
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
149
|
+
emit: n,
|
|
150
|
+
slots: r,
|
|
151
|
+
attrs: s,
|
|
152
|
+
predicate: l
|
|
153
|
+
}), h = { modifiers: [{
|
|
154
|
+
name: "arrow",
|
|
155
|
+
options: { padding: ({ popper: e, reference: t, placement: n }) => e.width / 2 }
|
|
156
|
+
}] };
|
|
157
|
+
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
158
|
+
"popper-options": t.popperOptions || h,
|
|
159
|
+
style: "width: 100%",
|
|
160
|
+
placement: t.placement || "left",
|
|
161
|
+
"is-range": t.isRange || t.range,
|
|
162
|
+
format: t.format,
|
|
163
|
+
"value-format": t.valueFormat || t.format,
|
|
164
|
+
modelValue: t.modelValue,
|
|
165
|
+
disabled: f.value,
|
|
166
|
+
"onUpdate:modelValue": c,
|
|
167
|
+
placeholder: d.value
|
|
168
|
+
}), null) });
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
//#endregion
|
|
172
|
+
export { u as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { d as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { o as t, r as n } from "./Cj59E77g.mjs";
|
|
3
|
+
import { n as r } from "./CSyJ-vEx.mjs";
|
|
4
|
+
import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
|
|
5
|
+
import { ElImage as s } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/image.ts
|
|
7
|
+
var c = {
|
|
8
|
+
...r,
|
|
9
|
+
src: String,
|
|
10
|
+
fit: String,
|
|
11
|
+
hideOnClickModal: Boolean
|
|
12
|
+
}, l = { modelValue: !0 }, u = (e) => r[e] === void 0 && l[e] !== !0;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
|
|
15
|
+
function d(e) {
|
|
16
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/form/FormImage.vue
|
|
20
|
+
var f = {
|
|
21
|
+
name: "FormImage",
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
props: { ...c },
|
|
24
|
+
emits: {},
|
|
25
|
+
setup(r, { slots: a, attrs: c }) {
|
|
26
|
+
let l = t(r, { attrs: c }), f = e(r, u);
|
|
27
|
+
return () => n(r, {
|
|
28
|
+
vNodes: i(s, o(f.value, c, { "preview-src-list": [r.src] }), d(a) ? a : { default: () => [a] }),
|
|
29
|
+
formItemProps: l,
|
|
30
|
+
slots: a
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { f as t };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import i from "../x-input-tag/index.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o } from "vue";
|
|
5
|
+
//#region src/components/form/props/input-tag.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: [Array, String],
|
|
10
|
+
arrayMode: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
objectMode: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
separator: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ","
|
|
21
|
+
},
|
|
22
|
+
boundarySelector: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ".form-scroller"
|
|
25
|
+
},
|
|
26
|
+
query: Function,
|
|
27
|
+
type: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "标签"
|
|
30
|
+
}
|
|
31
|
+
}, c = {
|
|
32
|
+
disabled: !0,
|
|
33
|
+
modelValue: !0
|
|
34
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
35
|
+
name: "FormInputTag",
|
|
36
|
+
inheritAttrs: !1,
|
|
37
|
+
props: { ...s },
|
|
38
|
+
emits: { ...t },
|
|
39
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
40
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
41
|
+
emit: n,
|
|
42
|
+
slots: r,
|
|
43
|
+
attrs: s,
|
|
44
|
+
predicate: l
|
|
45
|
+
});
|
|
46
|
+
return () => u({ vNodes: a(i, o(p.value, m.value, {
|
|
47
|
+
style: "width: 100%",
|
|
48
|
+
modelValue: t.modelValue,
|
|
49
|
+
disabled: f.value,
|
|
50
|
+
"onUpdate:modelValue": c,
|
|
51
|
+
placeholder: d.value
|
|
52
|
+
}), null) });
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { u as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t, t as n } from "./
|
|
2
|
-
import { n as r, t as i } from "./
|
|
1
|
+
import { i as e, n as t, t as n } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n as r, t as i } from "./CSyJ-vEx.mjs";
|
|
3
3
|
import { validatePhoneNum as a } from "@web-utils/core";
|
|
4
4
|
import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
|
|
5
5
|
import { ElInput as u } from "element-plus/es";
|
|
@@ -19,11 +19,14 @@ var p = {
|
|
|
19
19
|
},
|
|
20
20
|
modelValue: [String, Number],
|
|
21
21
|
modelModifiers: Object,
|
|
22
|
-
maxlength:
|
|
22
|
+
maxlength: {
|
|
23
|
+
type: [String, Number],
|
|
24
|
+
default: 255
|
|
25
|
+
},
|
|
23
26
|
minlength: [String, Number],
|
|
24
27
|
showWordLimit: {
|
|
25
28
|
type: Boolean,
|
|
26
|
-
default: !
|
|
29
|
+
default: !0
|
|
27
30
|
},
|
|
28
31
|
wordLimitPosition: {
|
|
29
32
|
type: String,
|
|
@@ -46,7 +49,7 @@ var p = {
|
|
|
46
49
|
suffixIcon: [String, Object],
|
|
47
50
|
rows: {
|
|
48
51
|
type: Number,
|
|
49
|
-
default:
|
|
52
|
+
default: 4
|
|
50
53
|
},
|
|
51
54
|
autosize: [Boolean, Object],
|
|
52
55
|
autocomplete: {
|
|
@@ -88,6 +91,7 @@ var p = {
|
|
|
88
91
|
}, m = {
|
|
89
92
|
readonly: !0,
|
|
90
93
|
prefixIcon: !0,
|
|
94
|
+
disabled: !0,
|
|
91
95
|
suffixIcon: !0,
|
|
92
96
|
placeholder: !0,
|
|
93
97
|
modelValue: !0,
|
|
@@ -97,47 +101,20 @@ var p = {
|
|
|
97
101
|
prefix: !0,
|
|
98
102
|
suffix: !0,
|
|
99
103
|
prepend: !0
|
|
100
|
-
}, h = [
|
|
101
|
-
"click",
|
|
102
|
-
"blur",
|
|
103
|
-
"focus",
|
|
104
|
-
"change",
|
|
105
|
-
"input",
|
|
106
|
-
"clear",
|
|
107
|
-
"keydown",
|
|
108
|
-
"mouseleave",
|
|
109
|
-
"mouseenter",
|
|
110
|
-
"compositionstart",
|
|
111
|
-
"compositionupdate",
|
|
112
|
-
"compositionend"
|
|
113
|
-
], g = (e) => r[e] === void 0 && m[e] !== !0, _ = {
|
|
104
|
+
}, h = (e) => r[e] === void 0 && m[e] !== !0, g = {
|
|
114
105
|
name: "FormInput",
|
|
115
106
|
inheritAttrs: !1,
|
|
116
107
|
props: { ...p },
|
|
117
|
-
emits: {
|
|
118
|
-
...t,
|
|
119
|
-
click: null,
|
|
120
|
-
blur: null,
|
|
121
|
-
focus: null,
|
|
122
|
-
change: null,
|
|
123
|
-
input: null,
|
|
124
|
-
clear: null,
|
|
125
|
-
keydown: null,
|
|
126
|
-
mouseleave: null,
|
|
127
|
-
mouseenter: null,
|
|
128
|
-
compositionstart: null,
|
|
129
|
-
compositionupdate: null,
|
|
130
|
-
compositionend: null
|
|
131
|
-
},
|
|
108
|
+
emits: { ...t },
|
|
132
109
|
setup(t, { emit: r, slots: i, attrs: p }) {
|
|
133
|
-
let m = l(t, "modelValue"),
|
|
110
|
+
let m = l(t, "modelValue"), g = `请输入正确的${t.label}!`, { render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = e(t, {
|
|
134
111
|
emit: r,
|
|
135
112
|
slots: i,
|
|
136
113
|
attrs: p,
|
|
137
114
|
rules: o(() => {
|
|
138
115
|
if (!t.type || t.type === "textarea") return null;
|
|
139
116
|
let e = {
|
|
140
|
-
message:
|
|
117
|
+
message: g,
|
|
141
118
|
trigger: "blur"
|
|
142
119
|
};
|
|
143
120
|
if (t.type === "email") e.validator = d;
|
|
@@ -146,17 +123,17 @@ var p = {
|
|
|
146
123
|
else return null;
|
|
147
124
|
return [e];
|
|
148
125
|
}),
|
|
149
|
-
|
|
150
|
-
predicate: g
|
|
126
|
+
predicate: h
|
|
151
127
|
});
|
|
152
|
-
return () =>
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
128
|
+
return () => _({ vNodes: s(u, c(b.value, x.value, {
|
|
129
|
+
class: ["form-input", {
|
|
130
|
+
"is-readonly": t.readonlyGrey && t.readonly && !t.picker,
|
|
131
|
+
"el-input-cursor-pointer": t.picker && !y.value
|
|
132
|
+
}],
|
|
156
133
|
modelValue: m.value,
|
|
157
134
|
"onUpdate:modelValue": (e) => m.value = e,
|
|
158
|
-
disabled:
|
|
159
|
-
placeholder:
|
|
135
|
+
disabled: y.value,
|
|
136
|
+
placeholder: v.value,
|
|
160
137
|
readonly: t.readonly || t.picker,
|
|
161
138
|
"prefix-icon": n({ icon: t.picker ? "el-icon-search" : t.prefixIcon }),
|
|
162
139
|
"suffix-icon": n({ icon: t.suffixIcon })
|
|
@@ -170,4 +147,4 @@ var p = {
|
|
|
170
147
|
}
|
|
171
148
|
};
|
|
172
149
|
//#endregion
|
|
173
|
-
export { p as n,
|
|
150
|
+
export { p as n, g as t };
|