@web-utils/form-ui 1.0.0-beta24 → 1.0.0-beta26
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/base.css +1 -1
- package/chunks/BAE_vglg.mjs +174 -0
- package/chunks/{Njpw648u.mjs → BPbmq_Fz.mjs} +1 -1
- package/chunks/CCc9Zjms.mjs +62 -0
- package/chunks/{Ce7JJ6Kh.mjs → D1G2MMMx.mjs} +1 -1
- package/chunks/DS8NSFKr.mjs +478 -0
- package/chunks/{DpBkGggC.mjs → lVzx0-GH.mjs} +5 -6
- package/chunks/{DL491cg2.mjs → qRpPD8iK.mjs} +5 -6
- package/chunks/{CQwLIAVn.mjs → tRXOz6_G.mjs} +5 -6
- package/element-dialog/index.d.ts +280 -2
- package/form-cascader/index.d.ts +193 -2
- package/form-check-box-group/index.d.ts +190 -1
- package/form-checkbox/index.d.ts +199 -1
- package/form-date-picker/index.d.ts +202 -2
- package/form-image/index.d.ts +203 -1
- package/form-input/index.d.ts +200 -2
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +203 -2
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +196 -0
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +196 -0
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +199 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +196 -0
- package/form-input-phone-number/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.d.ts +2 -2
- package/form-radio-group/index.d.ts +199 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +201 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +193 -2
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +201 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +201 -1
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +192 -1
- package/form-text/index.mjs +1 -1
- package/form-view/index.mjs +1 -1
- package/index.d.ts +2 -2
- package/index.mjs +23 -23
- package/month-calendar/index.d.ts +1 -1
- package/package.json +2 -1
- package/table-view/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.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 +1 -1
- package/year-calendar/index.mjs +2 -174
- package/year-calendar/style.css +1 -1
- package/chunks/C2hH5v6n.mjs +0 -73
- package/chunks/CKW6E1o4.mjs +0 -106
- package/chunks/gw2yFGP0.mjs +0 -53
- package/month-calendar/index.mjs +0 -312
- package/month-calendar/style.css +0 -1
- /package/chunks/{DgJWblJ-.mjs → BJP-5-0v.mjs} +0 -0
- /package/chunks/{DOl--Hf9.mjs → Bgny2wyC.mjs} +0 -0
- /package/chunks/{DETsVUo_.mjs → C9J3j0PX.mjs} +0 -0
- /package/chunks/{DJNXk_Cv.mjs → CkFapoKt.mjs} +0 -0
- /package/chunks/{B7x-U0mD.mjs → CotIhBXj.mjs} +0 -0
- /package/chunks/{CwnhyemQ.mjs → DGYsSu6t.mjs} +0 -0
- /package/chunks/{B7Fo7eih.mjs → DlFC9IZx.mjs} +0 -0
- /package/chunks/{5XleJ1q7.mjs → Dn79Y_Rb.mjs} +0 -0
- /package/chunks/{3o0tA4s6.mjs → ltggbLWM.mjs} +0 -0
- /package/chunks/{DIJ8AiAE.mjs → o5196FMX.mjs} +0 -0
- /package/chunks/{eR-FlUht.mjs → pxFLMMUm.mjs} +0 -0
package/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--el-disabled-text-color:#606266}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
|
|
1
|
+
:root{--el-disabled-text-color:#606266;--border-color:#d7dae0}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { i as e, n as t, t as n } from "./ADvOhGAW.mjs";
|
|
2
|
+
import { n as r, t as i } from "./mjEH6tHn.mjs";
|
|
3
|
+
import { validatePhoneNum as a } from "@web-utils/core";
|
|
4
|
+
import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
|
|
5
|
+
import { ElInput as u } from "element-plus/es";
|
|
6
|
+
//#region src/utils/form-validate.ts
|
|
7
|
+
var d = (e, t, n) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
|
|
8
|
+
function f(e, t, n) {
|
|
9
|
+
t && !/^[1-9][0-9]{5}(18|19|(2[0-9]))[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}[0-9Xx]$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/form/props/input.ts
|
|
13
|
+
var p = {
|
|
14
|
+
...r,
|
|
15
|
+
...i,
|
|
16
|
+
type: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "text"
|
|
19
|
+
},
|
|
20
|
+
modelValue: [String, Number],
|
|
21
|
+
modelModifiers: Object,
|
|
22
|
+
maxlength: [String, Number],
|
|
23
|
+
minlength: [String, Number],
|
|
24
|
+
showWordLimit: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
wordLimitPosition: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "inside"
|
|
31
|
+
},
|
|
32
|
+
placeholder: String,
|
|
33
|
+
clearable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
clearIcon: [String, Object],
|
|
38
|
+
formatter: Function,
|
|
39
|
+
parser: Function,
|
|
40
|
+
showPassword: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
size: String,
|
|
45
|
+
prefixIcon: [String, Object],
|
|
46
|
+
suffixIcon: [String, Object],
|
|
47
|
+
rows: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 2
|
|
50
|
+
},
|
|
51
|
+
autosize: [Boolean, Object],
|
|
52
|
+
autocomplete: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "off"
|
|
55
|
+
},
|
|
56
|
+
name: String,
|
|
57
|
+
readonly: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
max: [String, Number],
|
|
62
|
+
min: [String, Number],
|
|
63
|
+
step: [String, Number],
|
|
64
|
+
resize: String,
|
|
65
|
+
autofocus: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
},
|
|
69
|
+
form: String,
|
|
70
|
+
ariaLabel: String,
|
|
71
|
+
tabindex: [String, Number],
|
|
72
|
+
validateEvent: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !0
|
|
75
|
+
},
|
|
76
|
+
inputStyle: [String, Object],
|
|
77
|
+
label: String,
|
|
78
|
+
inputmode: String,
|
|
79
|
+
countGraphemes: Function,
|
|
80
|
+
prepend: String,
|
|
81
|
+
append: String,
|
|
82
|
+
prefix: String,
|
|
83
|
+
suffix: String,
|
|
84
|
+
picker: Boolean,
|
|
85
|
+
readonlyGrey: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: !0
|
|
88
|
+
}
|
|
89
|
+
}, m = {
|
|
90
|
+
readonly: !0,
|
|
91
|
+
prefixIcon: !0,
|
|
92
|
+
suffixIcon: !0,
|
|
93
|
+
placeholder: !0,
|
|
94
|
+
modelValue: !0,
|
|
95
|
+
readonlyGrey: !0,
|
|
96
|
+
picker: !0,
|
|
97
|
+
append: !0,
|
|
98
|
+
prefix: !0,
|
|
99
|
+
suffix: !0,
|
|
100
|
+
prepend: !0
|
|
101
|
+
}, h = [
|
|
102
|
+
"click",
|
|
103
|
+
"blur",
|
|
104
|
+
"focus",
|
|
105
|
+
"change",
|
|
106
|
+
"input",
|
|
107
|
+
"clear",
|
|
108
|
+
"keydown",
|
|
109
|
+
"mouseleave",
|
|
110
|
+
"mouseenter",
|
|
111
|
+
"compositionstart",
|
|
112
|
+
"compositionupdate",
|
|
113
|
+
"compositionend"
|
|
114
|
+
], g = (e) => r[e] === void 0 && m[e] !== !0, _ = {
|
|
115
|
+
name: "FormInput",
|
|
116
|
+
inheritAttrs: !1,
|
|
117
|
+
props: { ...p },
|
|
118
|
+
emits: {
|
|
119
|
+
...t,
|
|
120
|
+
click: null,
|
|
121
|
+
blur: null,
|
|
122
|
+
focus: null,
|
|
123
|
+
change: null,
|
|
124
|
+
input: null,
|
|
125
|
+
clear: null,
|
|
126
|
+
keydown: null,
|
|
127
|
+
mouseleave: null,
|
|
128
|
+
mouseenter: null,
|
|
129
|
+
compositionstart: null,
|
|
130
|
+
compositionupdate: null,
|
|
131
|
+
compositionend: null
|
|
132
|
+
},
|
|
133
|
+
setup(t, { emit: r, slots: i, attrs: p }) {
|
|
134
|
+
let m = l(t, "modelValue"), _ = `请输入正确的${t.label}!`, { render: v, placeholder: y, disabled: b, autoBind: x } = e(t, {
|
|
135
|
+
emit: r,
|
|
136
|
+
slots: i,
|
|
137
|
+
attrs: p,
|
|
138
|
+
rules: o(() => {
|
|
139
|
+
if (!t.type || t.type === "textarea") return null;
|
|
140
|
+
let e = {
|
|
141
|
+
message: _,
|
|
142
|
+
trigger: "blur"
|
|
143
|
+
};
|
|
144
|
+
if (t.type === "email") e.validator = d;
|
|
145
|
+
else if (t.type === "idcard") e.validator = f;
|
|
146
|
+
else if (t.type === "phone") e.validator = a;
|
|
147
|
+
else return null;
|
|
148
|
+
return [e];
|
|
149
|
+
}),
|
|
150
|
+
events: h,
|
|
151
|
+
predicate: g
|
|
152
|
+
});
|
|
153
|
+
return () => v({ vNodes: s(u, c({ class: ["form-input", {
|
|
154
|
+
"is-readonly": t.readonlyGrey && t.readonly && !t.picker,
|
|
155
|
+
"el-input-cursor-pointer": t.picker && !b.value
|
|
156
|
+
}] }, x.value, {
|
|
157
|
+
modelValue: m.value,
|
|
158
|
+
"onUpdate:modelValue": (e) => m.value = e,
|
|
159
|
+
disabled: b.value,
|
|
160
|
+
placeholder: y.value,
|
|
161
|
+
readonly: t.readonly || t.picker,
|
|
162
|
+
"prefix-icon": n({ icon: t.picker ? "el-icon-search" : t.prefixIcon }),
|
|
163
|
+
"suffix-icon": n({ icon: t.suffixIcon })
|
|
164
|
+
}), {
|
|
165
|
+
prefix: i.prefix || t.prefix ? () => t.prefix : null,
|
|
166
|
+
suffix: i.suffix || t.suffix ? () => t.suffix : null,
|
|
167
|
+
"password-icon": i["password-icon"],
|
|
168
|
+
prepend: i.prepend || t.prepend ? () => t.prepend : null,
|
|
169
|
+
append: i.append || t.append ? () => t.append : null
|
|
170
|
+
}) });
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
//#endregion
|
|
174
|
+
export { p as n, _ as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e } from "./BVLgLg_s.mjs";
|
|
2
2
|
import { hasAuthority as t } from "../api/index.mjs";
|
|
3
3
|
import { toolbarContextKey as n } from "../constants/index.mjs";
|
|
4
|
-
import { t as r } from "./
|
|
4
|
+
import { t as r } from "./Bgny2wyC.mjs";
|
|
5
5
|
import { NOOP as i, capitalize as a } from "@web-utils/core";
|
|
6
6
|
import { Comment as o, createVNode as s } from "vue";
|
|
7
7
|
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { i as e, n as t } from "./ADvOhGAW.mjs";
|
|
2
|
+
import { n, t as r } from "./mjEH6tHn.mjs";
|
|
3
|
+
import { t as i } from "./D1G2MMMx.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o, ref as s } from "vue";
|
|
5
|
+
import { ElInput as c, ElPopover as l } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/input-cron.ts
|
|
7
|
+
var u = {
|
|
8
|
+
...n,
|
|
9
|
+
...r,
|
|
10
|
+
modelValue: [String, Number]
|
|
11
|
+
}, d = {
|
|
12
|
+
readonly: !0,
|
|
13
|
+
placeholder: !0,
|
|
14
|
+
modelValue: !0,
|
|
15
|
+
prefix: !0,
|
|
16
|
+
suffix: !0
|
|
17
|
+
}, f = [
|
|
18
|
+
"click",
|
|
19
|
+
"blur",
|
|
20
|
+
"focus",
|
|
21
|
+
"change"
|
|
22
|
+
], p = (e) => n[e] === void 0 && d[e] !== !0, m = {
|
|
23
|
+
name: "FormInputCronExpression",
|
|
24
|
+
props: { ...u },
|
|
25
|
+
emits: { ...t },
|
|
26
|
+
setup(t, { emit: n, slots: r, attrs: u }) {
|
|
27
|
+
let d = s(!1), { emitInput: m, render: h, placeholder: g, disabled: _, autoBind: v } = e(t, {
|
|
28
|
+
emit: n,
|
|
29
|
+
slots: r,
|
|
30
|
+
attrs: u,
|
|
31
|
+
events: f,
|
|
32
|
+
predicate: p
|
|
33
|
+
}), y = () => {
|
|
34
|
+
d.value = !0;
|
|
35
|
+
}, b = () => {
|
|
36
|
+
d.value = !1;
|
|
37
|
+
};
|
|
38
|
+
return () => h({ vNodes: a("div", { class: "cron" }, [a(l, {
|
|
39
|
+
placement: "bottom-start",
|
|
40
|
+
disabled: _.value,
|
|
41
|
+
modelValue: d.value,
|
|
42
|
+
"onUpdate:modelValue": (e) => d.value = e,
|
|
43
|
+
"popper-class": "cron-popover"
|
|
44
|
+
}, {
|
|
45
|
+
default: () => a(i, o(v.value, {
|
|
46
|
+
i18n: "cn",
|
|
47
|
+
expression: t.modelValue,
|
|
48
|
+
onChange: m,
|
|
49
|
+
onClose: b
|
|
50
|
+
}), null),
|
|
51
|
+
reference: () => a(c, {
|
|
52
|
+
modelValue: t.modelValue,
|
|
53
|
+
readonly: !0,
|
|
54
|
+
disabled: _.value,
|
|
55
|
+
placeholder: g.value,
|
|
56
|
+
onClick: y
|
|
57
|
+
}, null)
|
|
58
|
+
})]) });
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { m as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
1
|
+
import { t as e } from "./CkFapoKt.mjs";
|
|
2
2
|
import { copy as t } from "@web-utils/core";
|
|
3
3
|
import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, openBlock as l, renderList as u, toDisplayString as d, withCtx as f } from "vue";
|
|
4
4
|
import { ElButton as p, ElInputNumber as m, ElOption as h, ElRadio as g, ElRadioGroup as _, ElSelect as ee, ElTabPane as v, ElTabs as y } from "element-plus/es";
|