@web-utils/form-ui 1.0.0-beta53 → 1.0.0-beta55
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/{B3yVc-P62.mjs → 5KomemiE2.mjs} +20 -20
- package/chunks/{H70Z56YY.mjs → 6GcIyEQV.mjs} +8 -8
- package/chunks/{DjnHvHXo.mjs → 8c9TEVNY.mjs} +3 -2
- package/chunks/AAZfNtly.mjs +119 -0
- package/chunks/{ByTyNsWf.mjs → B3A-CnYr.mjs} +2 -2
- package/chunks/{D5EQJdPL.mjs → BKlMENhV.mjs} +8 -8
- package/chunks/{9MExJqL-.mjs → BNVYEWWW.mjs} +7 -7
- package/chunks/{c0Niqotr.mjs → BTuzBfTA.mjs} +18 -18
- package/chunks/{DawYTjoT.mjs → BpCiVuKL.mjs} +2 -2
- package/chunks/{D7R9Or2m2.mjs → Bq62m7IR2.mjs} +13 -13
- package/chunks/BvKUeniN.mjs +127 -0
- package/chunks/{CGuDBVCB.mjs → C3MF_-bN.mjs} +11 -11
- package/chunks/{BNXbI4OG.mjs → C6Dq9Dgb.mjs} +1 -1
- package/chunks/{DwkOWXIR.mjs → C6u76g6o.mjs} +21 -21
- package/chunks/{B6yWUT6z.mjs → C7Mak2La.mjs} +2 -2
- package/chunks/{BV-XUugQ.mjs → CLO5X9Lb.mjs} +34 -34
- package/chunks/{DFFNxlqD.mjs → CNK4mfga.mjs} +3 -3
- package/chunks/{BEvOkSfB.mjs → CauzhVSa2.mjs} +10 -10
- package/chunks/{BJYlobMz2.mjs → CdoiMj7L2.mjs} +3 -2
- package/chunks/{CgN7m-1v.mjs → Czz_49pC.mjs} +22 -22
- package/chunks/{XwerN1TU.mjs → D0kIhzQo.mjs} +5 -5
- package/chunks/{CGDnQr1c.mjs → D2B9Y3oT.mjs} +1 -1
- package/chunks/{oVFbZ6yk.mjs → DTVTvvq-.mjs} +5 -1
- package/chunks/{BjGlxyi6.mjs → DWE67l1f.mjs} +47 -47
- package/chunks/{BqC_VU52.mjs → DZrQmH9Y.mjs} +5 -5
- package/chunks/{BgTCTXs72.mjs → D_L1p3vm2.mjs} +6 -6
- package/chunks/{BqzJ6vY6.mjs → Dluor05A.mjs} +2 -2
- package/chunks/{z5FJgzdc.mjs → Dy_5vPdP.mjs} +8 -8
- package/chunks/{Dytof5EW.mjs → Goee5Y-H.mjs} +13 -13
- package/chunks/{CB9QUXUX.mjs → ecpQ-ODX.mjs} +5 -5
- package/chunks/{D9IFsT272.mjs → g8MIBMw92.mjs} +10 -10
- package/form-cascader/index.mjs +1 -1
- 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-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/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/helper/form-item.d.ts +10 -0
- package/helper/form-item.mjs +2 -0
- package/helper/input.d.ts +44 -0
- package/helper/input.mjs +2 -0
- package/index.mjs +34 -34
- 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-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +3 -3
- package/toolbar/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/year-calendar/index.mjs +1 -1
- package/chunks/BHbMJZPp.mjs +0 -237
- /package/chunks/{B_RAcbs_.mjs → BNqVEHk_.mjs} +0 -0
- /package/chunks/{DOP3aBxf.mjs → BlxLaWcU.mjs} +0 -0
- /package/chunks/{CPvdsnRN.mjs → BoJgSMkL.mjs} +0 -0
- /package/chunks/{GI8krYU82.mjs → Dg4R65aG2.mjs} +0 -0
- /package/chunks/{DyCO22Ia2.mjs → Dt_s96gL2.mjs} +0 -0
- /package/chunks/{XoImEoke.mjs → xq_LR6R2.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as r, t as i } from "./
|
|
1
|
+
import { n as e, o as t, t as n } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n as r, t as i } from "./C6Dq9Dgb.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";
|
|
@@ -113,44 +113,44 @@ var m = {
|
|
|
113
113
|
name: "FormInput",
|
|
114
114
|
inheritAttrs: !1,
|
|
115
115
|
props: { ...m },
|
|
116
|
-
emits: { ...
|
|
117
|
-
setup(
|
|
118
|
-
let m = l(
|
|
116
|
+
emits: { ...e },
|
|
117
|
+
setup(e, { emit: r, slots: i, attrs: p }) {
|
|
118
|
+
let m = l(e, "modelValue"), h = `请输入正确的${e.label}!`, { render: _, placeholder: v, disabled: y, listeners: b, inputProps: x, printing: S } = t(e, {
|
|
119
119
|
emit: r,
|
|
120
120
|
slots: i,
|
|
121
121
|
attrs: p,
|
|
122
122
|
rules: o(() => {
|
|
123
|
-
if (!
|
|
124
|
-
let
|
|
123
|
+
if (!e.type || e.type === "textarea") return null;
|
|
124
|
+
let t = {
|
|
125
125
|
message: h,
|
|
126
126
|
trigger: "blur"
|
|
127
127
|
};
|
|
128
|
-
if (
|
|
129
|
-
else if (
|
|
130
|
-
else if (
|
|
128
|
+
if (e.type === "email") t.validator = d;
|
|
129
|
+
else if (e.type === "idcard") t.validator = f;
|
|
130
|
+
else if (e.type === "phone") t.validator = a;
|
|
131
131
|
else return null;
|
|
132
|
-
return [
|
|
132
|
+
return [t];
|
|
133
133
|
}),
|
|
134
134
|
predicate: g
|
|
135
135
|
});
|
|
136
|
-
return () => _({ vNodes: S.value ?
|
|
136
|
+
return () => _({ vNodes: S.value ? e.modelValue : s(u, c(b.value, x.value, {
|
|
137
137
|
class: ["form-input", {
|
|
138
|
-
"is-readonly":
|
|
139
|
-
"el-input-cursor-pointer":
|
|
138
|
+
"is-readonly": e.readonlyGrey && e.readonly && !e.picker,
|
|
139
|
+
"el-input-cursor-pointer": e.picker && !y.value
|
|
140
140
|
}],
|
|
141
141
|
modelValue: m.value,
|
|
142
142
|
"onUpdate:modelValue": (e) => m.value = e,
|
|
143
143
|
disabled: y.value,
|
|
144
144
|
placeholder: v.value,
|
|
145
|
-
readonly:
|
|
146
|
-
"prefix-icon": n({ icon:
|
|
147
|
-
"suffix-icon": n({ icon:
|
|
145
|
+
readonly: e.readonly || e.picker,
|
|
146
|
+
"prefix-icon": n({ icon: e.picker ? "el-icon-search" : e.prefixIcon }),
|
|
147
|
+
"suffix-icon": n({ icon: e.suffixIcon })
|
|
148
148
|
}), {
|
|
149
|
-
prefix: i.prefix ||
|
|
150
|
-
suffix: i.suffix ||
|
|
149
|
+
prefix: i.prefix || e.prefix ? () => e.prefix : null,
|
|
150
|
+
suffix: i.suffix || e.suffix ? () => e.suffix : null,
|
|
151
151
|
"password-icon": i["password-icon"],
|
|
152
|
-
prepend: i.prepend ||
|
|
153
|
-
append: i.append ||
|
|
152
|
+
prepend: i.prepend || e.prepend ? () => e.prepend : null,
|
|
153
|
+
append: i.append || e.append ? () => e.append : null
|
|
154
154
|
}) });
|
|
155
155
|
}
|
|
156
156
|
};
|
|
@@ -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 "./BvKUeniN.mjs";
|
|
2
|
+
import { n as t, t as n } from "./C6u76g6o.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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
|
-
import { t as i } from "./
|
|
4
|
+
import { t as i } from "./C6u76g6o.mjs";
|
|
5
5
|
import { computed as a, createVNode as o, defineComponent as s, isVNode as c, mergeProps as l, useModel as u } from "vue";
|
|
6
6
|
import { ElCheckbox as d, ElCheckboxButton as f, ElCheckboxGroup as p } from "element-plus/es";
|
|
7
7
|
//#region src/components/form/props/checkbox-group.ts
|
|
@@ -96,43 +96,43 @@ var v = /* @__PURE__ */ s({
|
|
|
96
96
|
inheritAttrs: !1,
|
|
97
97
|
props: { ...m },
|
|
98
98
|
emits: {
|
|
99
|
-
...
|
|
99
|
+
...e,
|
|
100
100
|
"update:other": null
|
|
101
101
|
},
|
|
102
|
-
setup(
|
|
103
|
-
let m = u(
|
|
102
|
+
setup(e, { emit: n, slots: s, attrs: c }) {
|
|
103
|
+
let m = u(e, "other"), { emitInput: h, render: v, disabled: y, listeners: b, inputProps: x } = t(e, {
|
|
104
104
|
emit: n,
|
|
105
105
|
slots: s,
|
|
106
106
|
attrs: c,
|
|
107
107
|
predicate: g,
|
|
108
108
|
messagePrefix: "请选择",
|
|
109
109
|
class: a(() => ["form-checkbox-group", {
|
|
110
|
-
"form-checkbox-group-row":
|
|
111
|
-
"form-checkbox-group-row-break-word":
|
|
112
|
-
"form-checkbox-group-row-ellipsis":
|
|
110
|
+
"form-checkbox-group-row": e.fillRow,
|
|
111
|
+
"form-checkbox-group-row-break-word": e.fillRow,
|
|
112
|
+
"form-checkbox-group-row-ellipsis": e.ellipsis
|
|
113
113
|
}])
|
|
114
|
-
}), S = (
|
|
115
|
-
let n =
|
|
116
|
-
|
|
114
|
+
}), S = (t) => {
|
|
115
|
+
let n = t;
|
|
116
|
+
e.sort && (n = t.sort()), e.stringMode || e.split ? h(n.join(",")) : h(n);
|
|
117
117
|
}, C = a(() => {
|
|
118
|
-
if (
|
|
119
|
-
var
|
|
120
|
-
return Array.isArray(
|
|
118
|
+
if (e.stringMode || e.split) {
|
|
119
|
+
var t;
|
|
120
|
+
return Array.isArray(e.modelValue) ? e.modelValue.filter((e) => e) : ((t = e.modelValue) == null ? void 0 : t.split(e.delimiter).filter((e) => e)) ?? [];
|
|
121
121
|
}
|
|
122
|
-
return
|
|
123
|
-
}), w = a(() =>
|
|
122
|
+
return e.modelValue || [];
|
|
123
|
+
}), w = a(() => e.classic ? "label" : e.labelProp), T = a(() => e.classic ? "value" : e.valueProp), { dictItems: E } = r(e), D = a(() => e.dictType ? E.value : e.gender ? [{
|
|
124
124
|
[w.value]: "男",
|
|
125
125
|
[T.value]: "男"
|
|
126
126
|
}, {
|
|
127
127
|
[w.value]: "女",
|
|
128
128
|
[T.value]: "女"
|
|
129
|
-
}] :
|
|
129
|
+
}] : e.confirm ? [{
|
|
130
130
|
[w.value]: "是",
|
|
131
131
|
[T.value]: "是"
|
|
132
132
|
}, {
|
|
133
133
|
[w.value]: "否",
|
|
134
134
|
[T.value]: "否"
|
|
135
|
-
}] :
|
|
135
|
+
}] : e.options);
|
|
136
136
|
return () => v({ vNodes: [o(p, l(b.value, x.value, {
|
|
137
137
|
modelValue: C.value,
|
|
138
138
|
disabled: y.value,
|
|
@@ -140,35 +140,35 @@ var v = /* @__PURE__ */ s({
|
|
|
140
140
|
}), {
|
|
141
141
|
...s,
|
|
142
142
|
default: s.default || (() => {
|
|
143
|
-
var
|
|
144
|
-
return (
|
|
145
|
-
key:
|
|
146
|
-
value:
|
|
143
|
+
var t;
|
|
144
|
+
return (t = D.value) == null ? void 0 : t.map(({ value: t, label: n, disabled: r }) => e.type === "button" ? o(f, {
|
|
145
|
+
key: t,
|
|
146
|
+
value: t,
|
|
147
147
|
disabled: r
|
|
148
148
|
}, _(n) ? n : { default: () => [n] }) : o(d, {
|
|
149
|
-
key:
|
|
150
|
-
value:
|
|
149
|
+
key: t,
|
|
150
|
+
value: t,
|
|
151
151
|
disabled: r
|
|
152
152
|
}, _(n) ? n : { default: () => [n] }));
|
|
153
153
|
})
|
|
154
|
-
}), C.value.includes(
|
|
154
|
+
}), C.value.includes(e.otherVal) ? o(i, {
|
|
155
155
|
"wrap-col": !1,
|
|
156
156
|
class: "form-checkbox-group-other",
|
|
157
157
|
"hide-label": !0,
|
|
158
158
|
"label-width": "0",
|
|
159
|
-
prop:
|
|
159
|
+
prop: e.otherProp,
|
|
160
160
|
disabled: y.value,
|
|
161
|
-
required: !!
|
|
162
|
-
placeholder:
|
|
163
|
-
label:
|
|
164
|
-
"show-message": !!
|
|
165
|
-
style:
|
|
161
|
+
required: !!e.otherProp,
|
|
162
|
+
placeholder: e.otherPlaceholder,
|
|
163
|
+
label: e.otherLabel,
|
|
164
|
+
"show-message": !!e.otherLabel,
|
|
165
|
+
style: e.otherLabel ? { width: e.otherWidth } : {
|
|
166
166
|
marginBottom: 0,
|
|
167
|
-
width:
|
|
167
|
+
width: e.otherWidth
|
|
168
168
|
},
|
|
169
169
|
modelValue: m.value,
|
|
170
170
|
"onUpdate:modelValue": (e) => m.value = e,
|
|
171
|
-
"max-length":
|
|
171
|
+
"max-length": e.otherMaxLength
|
|
172
172
|
}, null) : null] });
|
|
173
173
|
}
|
|
174
174
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import { n as t, t as n } from "./
|
|
3
|
-
import { t as r } from "./
|
|
1
|
+
import { n as e } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n as t, t as n } from "./C6Dq9Dgb.mjs";
|
|
3
|
+
import { t as r } from "./C6u76g6o.mjs";
|
|
4
4
|
import { createVNode as i, isVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
5
5
|
//#region src/components/form/props/textarea.ts
|
|
6
6
|
var c = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as e } from "./DOZRzqlo.mjs";
|
|
2
2
|
import { t } from "./7GmKqdbC.mjs";
|
|
3
3
|
import { t as n } from "./CkOD-_VV.mjs";
|
|
4
|
-
import { n as r } from "./
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import { t as a } from "./
|
|
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 "./
|
|
4
|
+
import { n as r } from "./BvKUeniN.mjs";
|
|
5
|
+
import { t as i } from "./Czz_49pC.mjs";
|
|
6
|
+
import { t as a } from "./C6u76g6o.mjs";
|
|
7
|
+
import { t as o } from "./CLO5X9Lb.mjs";
|
|
8
|
+
import { t as s } from "./Goee5Y-H.mjs";
|
|
9
|
+
import { t as c } from "./Dy_5vPdP.mjs";
|
|
10
|
+
import { t as l } from "./C7Mak2La.mjs";
|
|
11
|
+
import { t as u } from "./DWE67l1f.mjs";
|
|
12
|
+
import { t as d } from "./B3A-CnYr.mjs";
|
|
13
13
|
import f from "../table-column-def/index.mjs";
|
|
14
|
-
import { t as p } from "./
|
|
14
|
+
import { t as p } from "./CNK4mfga.mjs";
|
|
15
15
|
import { findTreeChildren as m, isFunction as h } from "@web-utils/core";
|
|
16
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
17
|
import { formContextKey as M, formItemContextKey as N } from "element-plus";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { f as e } from "./DcTVYqeJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { t } from "./AAZfNtly.mjs";
|
|
3
|
+
import { r as n } from "./BvKUeniN.mjs";
|
|
4
|
+
import { n as r } from "./C6Dq9Dgb.mjs";
|
|
4
5
|
import { createVNode as i, mergeProps as a } from "vue";
|
|
5
6
|
import { ElText as o } from "element-plus/es";
|
|
6
7
|
//#region src/components/form/props/text.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n, t as r } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { useDictionary as i } from "../hook/useDictionary.mjs";
|
|
4
4
|
import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
|
|
5
5
|
import { computed as l, createVNode as u, mergeProps as d } from "vue";
|
|
@@ -149,40 +149,40 @@ var m = {
|
|
|
149
149
|
}, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
|
|
150
150
|
name: "FormCascader",
|
|
151
151
|
props: { ...m },
|
|
152
|
-
emits: { ...
|
|
153
|
-
setup(
|
|
154
|
-
let { emitInput: h, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = e
|
|
152
|
+
emits: { ...e },
|
|
153
|
+
setup(e, { emit: n, slots: r, attrs: m }) {
|
|
154
|
+
let { emitInput: h, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = t(e, {
|
|
155
155
|
emit: n,
|
|
156
156
|
slots: r,
|
|
157
157
|
attrs: m,
|
|
158
158
|
predicate: g
|
|
159
|
-
}), { dictItems: S } = i(
|
|
160
|
-
if (
|
|
161
|
-
if (
|
|
162
|
-
let
|
|
163
|
-
return
|
|
159
|
+
}), { dictItems: S } = i(e), C = l(() => {
|
|
160
|
+
if (e.dictType) return S.value;
|
|
161
|
+
if (e.options) {
|
|
162
|
+
let t = f(e.options);
|
|
163
|
+
return e.last && c(t), t;
|
|
164
164
|
} else return [];
|
|
165
165
|
}), w = l(() => {
|
|
166
|
-
if (
|
|
167
|
-
if (
|
|
168
|
-
let [
|
|
169
|
-
for (;
|
|
166
|
+
if (e.join) return o(e.modelValue) ? e.modelValue : s(e.modelValue) ? e.modelValue.split(e.separator) : [];
|
|
167
|
+
if (e.last) {
|
|
168
|
+
let [t] = a(C.value, (t) => t[e.valueKey] === e.modelValue), n = [];
|
|
169
|
+
for (; t;) n.push(t[e.valueKey]), t = t.parent;
|
|
170
170
|
return n.reverse();
|
|
171
171
|
}
|
|
172
|
-
return
|
|
173
|
-
}), T = (
|
|
174
|
-
|
|
172
|
+
return e.modelValue;
|
|
173
|
+
}), T = (t) => {
|
|
174
|
+
e.join && o(t) ? h(t.join(e.separator)) : h(e.last ? t[t.length - 1] : t);
|
|
175
175
|
};
|
|
176
176
|
return () => _({ vNodes: u(p, d(b.value, x.value, {
|
|
177
177
|
style: "width: 100%",
|
|
178
|
-
class: { "is-readonly":
|
|
178
|
+
class: { "is-readonly": e.readonly },
|
|
179
179
|
"model-value": w.value,
|
|
180
180
|
options: C.value,
|
|
181
181
|
props: {
|
|
182
|
-
checkStrictly:
|
|
183
|
-
label:
|
|
184
|
-
value:
|
|
185
|
-
emitPath:
|
|
182
|
+
checkStrictly: e.checkStrictly,
|
|
183
|
+
label: e.labelKey,
|
|
184
|
+
value: e.valueKey,
|
|
185
|
+
emitPath: e.emitPath,
|
|
186
186
|
expandTrigger: "hover"
|
|
187
187
|
},
|
|
188
188
|
disabled: y.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElRate as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/rate.ts
|
|
@@ -68,9 +68,9 @@ var s = {
|
|
|
68
68
|
name: "FormRate",
|
|
69
69
|
inheritAttrs: !1,
|
|
70
70
|
props: { ...s },
|
|
71
|
-
emits: { ...
|
|
72
|
-
setup(
|
|
73
|
-
let u = a(
|
|
71
|
+
emits: { ...e },
|
|
72
|
+
setup(e, { emit: n, slots: s, attrs: c }) {
|
|
73
|
+
let u = a(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
|
|
74
74
|
emit: n,
|
|
75
75
|
slots: s,
|
|
76
76
|
attrs: c,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, f as t } from "./DcTVYqeJ.mjs";
|
|
2
2
|
import { t as n } from "./DOZRzqlo.mjs";
|
|
3
3
|
import { cellClickHandlerContextKey as r } from "../constants/index.mjs";
|
|
4
|
-
import { n as i, t as a } from "./
|
|
4
|
+
import { n as i, t as a } from "./xq_LR6R2.mjs";
|
|
5
5
|
import { createVNode as o, inject as s, mergeProps as c } from "vue";
|
|
6
6
|
import { ElTableColumn as l } from "element-plus/es";
|
|
7
7
|
//#region src/components/table/TableColumn.vue?vue&type=script&lang.jsx
|
|
@@ -150,7 +150,11 @@ var _ = {
|
|
|
150
150
|
});
|
|
151
151
|
return d(t, I), b(I), () => s(h, l(C.value, S.value, x, {
|
|
152
152
|
ref: "form",
|
|
153
|
-
class:
|
|
153
|
+
class: [
|
|
154
|
+
"form-holder",
|
|
155
|
+
"clear-fix",
|
|
156
|
+
{ "red-form": E }
|
|
157
|
+
],
|
|
154
158
|
"show-message": D.value
|
|
155
159
|
}), { default: () => {
|
|
156
160
|
if (E.value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
4
|
import { isNumber as i, isPlainObject as a, isString as o } from "@web-utils/core";
|
|
5
5
|
import { computed as s, createVNode as c, mergeProps as l, ref as u, watchEffect as d } from "vue";
|
|
@@ -222,9 +222,9 @@ var m = {
|
|
|
222
222
|
name: "FormSelect",
|
|
223
223
|
inheritAttrs: !1,
|
|
224
224
|
props: { ...m },
|
|
225
|
-
emits: { ...
|
|
226
|
-
setup(
|
|
227
|
-
let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = e
|
|
225
|
+
emits: { ...e },
|
|
226
|
+
setup(e, { emit: n, slots: m, attrs: h }) {
|
|
227
|
+
let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = t(e, {
|
|
228
228
|
emit: n,
|
|
229
229
|
slots: m,
|
|
230
230
|
attrs: h,
|
|
@@ -232,70 +232,70 @@ var m = {
|
|
|
232
232
|
messagePrefix: "请选择"
|
|
233
233
|
}), C = u(null), w = u(!1);
|
|
234
234
|
d(() => {
|
|
235
|
-
if (
|
|
236
|
-
var
|
|
237
|
-
C.value = (
|
|
238
|
-
} else C.value =
|
|
235
|
+
if (e.multiple && e.multipleStringMode) {
|
|
236
|
+
var t;
|
|
237
|
+
C.value = (t = e.modelValue) == null ? void 0 : t.split(",").filter((e) => e);
|
|
238
|
+
} else C.value = e.modelValue;
|
|
239
239
|
});
|
|
240
|
-
let T = (
|
|
241
|
-
if (
|
|
242
|
-
let r = O.value.find((n) => n[
|
|
243
|
-
i !==
|
|
240
|
+
let T = (t) => {
|
|
241
|
+
if (e.multiple && e.multipleStringMode ? _(t.join(e.multipleStringSeparator)) : _(t), e.emitLabel) {
|
|
242
|
+
let r = O.value.find((n) => n[e.props.value] === t), i = r == null ? void 0 : r[e.props.label];
|
|
243
|
+
i !== e.optionLabel && n("update:optionLabel", i);
|
|
244
244
|
}
|
|
245
|
-
}, { dictItems: E } = r(
|
|
246
|
-
if (
|
|
247
|
-
if (
|
|
248
|
-
if (
|
|
249
|
-
[
|
|
250
|
-
[
|
|
245
|
+
}, { dictItems: E } = r(e), D = u([]), O = s(() => {
|
|
246
|
+
if (e.dictType) return E.value;
|
|
247
|
+
if (e.remote) return D.value;
|
|
248
|
+
if (e.gender) return [{
|
|
249
|
+
[e.props.label]: "男",
|
|
250
|
+
[e.props.value]: e.chinese ? "男" : e.typing ? 1 : "1"
|
|
251
251
|
}, {
|
|
252
|
-
[
|
|
253
|
-
[
|
|
252
|
+
[e.props.label]: "女",
|
|
253
|
+
[e.props.value]: e.chinese ? "女" : e.typing ? 2 : "2"
|
|
254
254
|
}];
|
|
255
|
-
if (
|
|
256
|
-
[
|
|
257
|
-
[
|
|
255
|
+
if (e.confirm) return [{
|
|
256
|
+
[e.props.label]: "是",
|
|
257
|
+
[e.props.value]: e.chinese ? "是" : e.english ? "Y" : e.typing ? 1 : "1"
|
|
258
258
|
}, {
|
|
259
|
-
[
|
|
260
|
-
[
|
|
259
|
+
[e.props.label]: "否",
|
|
260
|
+
[e.props.value]: e.chinese ? "否" : e.english ? "N" : e.typing ? 0 : "0"
|
|
261
261
|
}];
|
|
262
|
-
if (
|
|
263
|
-
[
|
|
264
|
-
[
|
|
265
|
-
}, ...
|
|
266
|
-
if (
|
|
267
|
-
[
|
|
268
|
-
[
|
|
262
|
+
if (e.all) return [{
|
|
263
|
+
[e.props.value]: "",
|
|
264
|
+
[e.props.label]: "全部"
|
|
265
|
+
}, ...e.options];
|
|
266
|
+
if (e.start && e.end) return Array(e.end - e.start + 1).fill(1).map((t, n) => ({
|
|
267
|
+
[e.props.label]: e.start + n,
|
|
268
|
+
[e.props.value]: e.start + n
|
|
269
269
|
}));
|
|
270
|
-
if (
|
|
271
|
-
let
|
|
272
|
-
i(
|
|
270
|
+
if (e.year) {
|
|
271
|
+
let t = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
|
|
272
|
+
i(e.year) && (r = e.year);
|
|
273
273
|
for (let i = -r; i <= r; i++) {
|
|
274
|
-
let r =
|
|
274
|
+
let r = t + i;
|
|
275
275
|
n.push({
|
|
276
|
-
[
|
|
277
|
-
[
|
|
276
|
+
[e.props.label]: r,
|
|
277
|
+
[e.props.value]: r
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
return n;
|
|
281
281
|
}
|
|
282
|
-
return
|
|
283
|
-
}), k = async (
|
|
282
|
+
return e.options ? e.options.map((t) => (t[e.props.value] = t[e.props.value] ?? t[e.props.label], t)) : [];
|
|
283
|
+
}), k = async (t) => {
|
|
284
284
|
try {
|
|
285
285
|
var n;
|
|
286
286
|
w.value = !0;
|
|
287
|
-
let r = await
|
|
288
|
-
((n = r.data.data) == null ? void 0 : n.length) >= 0 ? o(r.data.data[0]) ? D.value = r.data.data.map((
|
|
289
|
-
[
|
|
290
|
-
[
|
|
287
|
+
let r = await e.remoteMethod(t, e.prop);
|
|
288
|
+
((n = r.data.data) == null ? void 0 : n.length) >= 0 ? o(r.data.data[0]) ? D.value = r.data.data.map((t) => ({
|
|
289
|
+
[e.props.value]: t,
|
|
290
|
+
[e.props.label]: t
|
|
291
291
|
})) : a(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
|
|
292
292
|
} catch {}
|
|
293
293
|
w.value = !1;
|
|
294
294
|
};
|
|
295
295
|
return d(() => {
|
|
296
|
-
|
|
296
|
+
e.remote && k();
|
|
297
297
|
}), () => v({ vNodes: c(p, l(x.value, S.value, {
|
|
298
|
-
offset:
|
|
298
|
+
offset: e.dropDownOffset,
|
|
299
299
|
"model-value": C.value,
|
|
300
300
|
"onUpdate:modelValue": T,
|
|
301
301
|
disabled: b.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElSlider as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/slide.ts
|
|
@@ -74,9 +74,9 @@ var s = {
|
|
|
74
74
|
name: "FormSlider",
|
|
75
75
|
inheritAttrs: !1,
|
|
76
76
|
props: { ...s },
|
|
77
|
-
emits: { ...
|
|
78
|
-
setup(
|
|
79
|
-
let u = a(
|
|
77
|
+
emits: { ...e },
|
|
78
|
+
setup(e, { emit: n, slots: s, attrs: c }) {
|
|
79
|
+
let u = a(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
|
|
80
80
|
emit: n,
|
|
81
81
|
slots: s,
|
|
82
82
|
predicate: l,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n, t as r } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
4
|
import { ElTimeSelect as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/time-select.ts
|
|
@@ -69,9 +69,9 @@ var s = {
|
|
|
69
69
|
name: "FormTimeSelect",
|
|
70
70
|
inheritAttrs: !1,
|
|
71
71
|
props: { ...s },
|
|
72
|
-
emits: { ...
|
|
73
|
-
setup(
|
|
74
|
-
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e
|
|
72
|
+
emits: { ...e },
|
|
73
|
+
setup(e, { emit: n, slots: r, attrs: s }) {
|
|
74
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = t(e, {
|
|
75
75
|
emit: n,
|
|
76
76
|
slots: r,
|
|
77
77
|
attrs: s,
|
|
@@ -79,7 +79,7 @@ var s = {
|
|
|
79
79
|
});
|
|
80
80
|
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
81
81
|
style: "width: 100%",
|
|
82
|
-
modelValue:
|
|
82
|
+
modelValue: e.modelValue,
|
|
83
83
|
disabled: f.value,
|
|
84
84
|
"onUpdate:modelValue": c,
|
|
85
85
|
placeholder: d.value
|
|
@@ -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 "./BvKUeniN.mjs";
|
|
2
|
+
import { n as t, t as n } from "./C6u76g6o.mjs";
|
|
3
3
|
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
4
4
|
//#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
|
|
5
5
|
function s(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
+
import { n, t as r } from "./C6Dq9Dgb.mjs";
|
|
3
3
|
import { isString as i } from "@web-utils/core";
|
|
4
4
|
import { computed as a, createVNode as o, mergeProps as s } from "vue";
|
|
5
5
|
import { ElInputNumber as c } from "element-plus/es";
|
|
@@ -75,14 +75,14 @@ var l = {
|
|
|
75
75
|
name: "FormInputNumber",
|
|
76
76
|
inheritAttrs: !1,
|
|
77
77
|
props: { ...l },
|
|
78
|
-
emits: { ...
|
|
79
|
-
setup(
|
|
80
|
-
let { emitInput: u, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = e
|
|
78
|
+
emits: { ...e },
|
|
79
|
+
setup(e, { emit: n, slots: r, attrs: l }) {
|
|
80
|
+
let { emitInput: u, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = t(e, {
|
|
81
81
|
emit: n,
|
|
82
82
|
slots: r,
|
|
83
83
|
attrs: l,
|
|
84
84
|
predicate: d
|
|
85
|
-
}), _ = a(() => i(
|
|
85
|
+
}), _ = a(() => i(e.modelValue) ? Number(e.modelValue) : e.modelValue);
|
|
86
86
|
return () => f({ vNodes: o(c, s(h.value, g.value, {
|
|
87
87
|
style: "width: 100%",
|
|
88
88
|
modelValue: _.value,
|
|
@@ -90,8 +90,8 @@ var l = {
|
|
|
90
90
|
"onUpdate:modelValue": u,
|
|
91
91
|
placeholder: p.value
|
|
92
92
|
}), {
|
|
93
|
-
prefix: r.prefix ||
|
|
94
|
-
suffix: r.suffix ||
|
|
93
|
+
prefix: r.prefix || e.prefix ? () => e.prefix : null,
|
|
94
|
+
suffix: r.suffix || e.suffix ? () => e.suffix : e.append,
|
|
95
95
|
"decrease-icon": r["decrease-icon"],
|
|
96
96
|
"increase-icon": r["increase-icon"]
|
|
97
97
|
}) });
|