@web-utils/form-ui 1.0.0-beta83 → 1.0.0-beta85
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/{BiY3yiiP2.mjs → 3nLaRSbR2.mjs} +1 -1
- package/chunks/{DpspbJVm2.mjs → 61ccpSFj2.mjs} +9 -9
- package/chunks/{BtNMd8g52.mjs → 8zYlq-t92.mjs} +3 -3
- package/chunks/{LivIWUWt.mjs → BIy6bO4j.mjs} +1 -1
- package/chunks/{BOHHK03q2.mjs → BMei9UHN2.mjs} +9 -9
- package/chunks/{FZqu01np2.mjs → BTGrh7dw2.mjs} +107 -107
- package/chunks/{CnkvV3PU2.mjs → BYu4QaK72.mjs} +2 -2
- package/chunks/BhHMGhJ8.mjs +109 -0
- package/chunks/{DNaB9zOb2.mjs → BxcsELcB2.mjs} +2 -2
- package/chunks/BxuM-fgJ.mjs +61 -0
- package/chunks/{B9JhKxrE2.mjs → By-W0XXn2.mjs} +1 -1
- package/chunks/{CrFP0Lhs.mjs → C28bnMcw.mjs} +1 -1
- package/chunks/{fh36J3y1.mjs → CCpKg0cM.mjs} +2 -2
- package/chunks/{D3SYExuc.mjs → CET31mBi.mjs} +1 -1
- package/chunks/{ZCIAKVNm2.mjs → CTFV8OFH2.mjs} +2 -2
- package/chunks/{CI0pkCeM.mjs → CjCNtCWd.mjs} +1 -1
- package/chunks/{DLOrxYRD2.mjs → CkHQY4ME2.mjs} +1 -1
- package/chunks/{DgH_4qOn2.mjs → CpsHWpwH2.mjs} +43 -23
- package/chunks/{CaY7oZQ3.mjs → DJlgX5ty.mjs} +1 -1
- package/chunks/{CvncYLo32.mjs → DSTNXl142.mjs} +2 -2
- package/chunks/{D3xCUp_E.mjs → DVF9q3oX.mjs} +2 -2
- package/chunks/{CDZvVLNL.mjs → Dst9_BmZ.mjs} +2 -2
- package/chunks/{B7vR8-_Y2.mjs → SWO35fS42.mjs} +1 -1
- package/chunks/{DIMxdcyy2.mjs → Tq3_dajC2.mjs} +1 -1
- package/chunks/{mm9J6HEd2.mjs → XQwnPkab2.mjs} +1 -1
- package/chunks/{DzCIClcZ.mjs → b0ve2YgF.mjs} +1 -1
- package/chunks/{BK88Er_k.mjs → ofu8wJKp.mjs} +1 -1
- package/chunks/{BXnK2ccC.mjs → saZ_qJOT.mjs} +1 -1
- package/chunks/{CHdaMU5-.mjs → vHsAJZRT.mjs} +2 -2
- package/chunks/{BQ7zKN-6.mjs → vebd58-O.mjs} +1 -1
- package/chunks/{DK4GzYEk2.mjs → y1Q66LEa2.mjs} +1 -1
- 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/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/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/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +1 -1
- package/helper/input.mjs +1 -1
- package/index.mjs +31 -31
- package/package.json +1 -1
- package/resolver/components.d.ts +2 -0
- package/resolver/components.mjs +2 -2
- package/resolver/vite-optimize-deps-plugin.d.ts +9 -0
- package/resolver/vite-optimize-deps-plugin.mjs +13 -0
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-view/index.mjs +2 -2
- package/toolbar/index.d.ts +6 -1
- package/toolbar/index.mjs +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/web-types.json +1 -1
- package/chunks/Bsu6--Di.mjs +0 -63
- package/chunks/CumZF9e-.mjs +0 -111
package/chunks/Bsu6--Di.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { allProps as e, predicate as t } from "../props/date.mjs";
|
|
2
|
-
import { n, o as r } from "./DzCIClcZ.mjs";
|
|
3
|
-
import { ElDatePicker as i, useLocale as a } from "element-plus/es";
|
|
4
|
-
import "element-plus/es/components/base/style/css";
|
|
5
|
-
import { computed as o, createVNode as s, mergeProps as c } from "vue";
|
|
6
|
-
import "element-plus/es/components/date-picker/style/css";
|
|
7
|
-
import { toDate as l } from "@web-utils/integrations/dayjs";
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/components/form/FormDatePicker.vue
|
|
10
|
-
var u = {
|
|
11
|
-
name: "FormDatePicker",
|
|
12
|
-
inheritAttrs: !1,
|
|
13
|
-
props: { ...e },
|
|
14
|
-
emits: {
|
|
15
|
-
...n,
|
|
16
|
-
"update:startDate": null,
|
|
17
|
-
"update:endDate": null
|
|
18
|
-
},
|
|
19
|
-
setup(e, { emit: n, slots: u, attrs: d }) {
|
|
20
|
-
let { emitInput: f, render: p, placeholder: m, disabled: h, listeners: g, inputProps: _ } = r(e, {
|
|
21
|
-
emit: n,
|
|
22
|
-
slots: u,
|
|
23
|
-
attrs: d,
|
|
24
|
-
predicate: t,
|
|
25
|
-
messagePrefix: "请选择"
|
|
26
|
-
}), v = a();
|
|
27
|
-
console.log(v.locale.value.el);
|
|
28
|
-
let y = o(() => e.dateTimeRange || e.dateRange || e.monthRange), b = o(() => e.year ? "YYYY" : e.month || e.monthRange ? "YYYY-MM" : e.week ? "YYYY 第 WW 周" : e.dateTime || e.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), x = o(() => e.year ? "year" : e.month ? "month" : e.dates ? "dates" : e.week ? "week" : e.dateTime ? "datetime" : e.dateTimeRange ? "datetimerange" : e.dateRange ? "daterange" : e.monthRange ? "monthrange" : "date"), S = o(() => {
|
|
29
|
-
if (e.miniDate) {
|
|
30
|
-
let t = l(e.miniDate);
|
|
31
|
-
return t.setDate(t.getDate() - 1), t;
|
|
32
|
-
} else return null;
|
|
33
|
-
}), C = o(() => e.maxDate ? l(e.maxDate) : null), w = (e) => {
|
|
34
|
-
if (!S.value && !C.value) return !1;
|
|
35
|
-
let t = e.getTime();
|
|
36
|
-
return S.value && !C.value ? t <= S.value.getTime() : !S.value && C.value ? t >= C.value.getTime() : S.value && C.value ? !(t > S.value.getTime() && t <= C.value.getTime()) : !1;
|
|
37
|
-
}, T = (e, t) => {
|
|
38
|
-
n("update:startDate", e), n("update:endDate", t);
|
|
39
|
-
}, E = (t) => {
|
|
40
|
-
y.value && e.split ? t ? T(t[0], t[1]) : T(null, null) : f(t);
|
|
41
|
-
}, D = o(() => y.value && e.split ? [e.startDate, e.endDate] : e.modelValue), O = o(() => e.week ? "YYYY-MM-DD" : e.valueFormat || b.value), k = o(() => e.format || b.value);
|
|
42
|
-
return () => p({ vNodes: s(i, c(g.value, _.value, {
|
|
43
|
-
style: "width: 100%",
|
|
44
|
-
type: x.value,
|
|
45
|
-
modelValue: D.value,
|
|
46
|
-
disabled: h.value,
|
|
47
|
-
placeholder: m.value,
|
|
48
|
-
format: k.value,
|
|
49
|
-
disabledDate: w,
|
|
50
|
-
"value-format": O.value,
|
|
51
|
-
"onUpdate:modelValue": E
|
|
52
|
-
}), {
|
|
53
|
-
default: u.default,
|
|
54
|
-
"range-separator": u["range-separator"],
|
|
55
|
-
"pre-month": u["pre-month"],
|
|
56
|
-
"next-month": u["next-month"],
|
|
57
|
-
"pre-year": u["pre-year"],
|
|
58
|
-
"next-year": u["next-year"]
|
|
59
|
-
}) });
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
//#endregion
|
|
63
|
-
export { u as t };
|
package/chunks/CumZF9e-.mjs
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { m as e } from "./ClVh1Lek.mjs";
|
|
2
|
-
import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
|
-
import { allProps as r, predicate as i } from "../props/form.mjs";
|
|
4
|
-
import a from "../form-advice/index.mjs";
|
|
5
|
-
import o from "../form-red-table/index.mjs";
|
|
6
|
-
import { ElForm as s, ElRow as c, useLocale as l } from "element-plus/es";
|
|
7
|
-
import "element-plus/es/components/base/style/css";
|
|
8
|
-
import { computed as u, createVNode as d, inject as f, mergeProps as p, nextTick as m, provide as h, reactive as g, toRef as _, useTemplateRef as v } from "vue";
|
|
9
|
-
import { animate as y } from "@web-utils/core";
|
|
10
|
-
import "element-plus/es/components/row/style/css";
|
|
11
|
-
import "element-plus/es/components/form/style/css";
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/components/form/FormHolder.vue
|
|
14
|
-
var b = {
|
|
15
|
-
name: "FormHolder",
|
|
16
|
-
inheritAttrs: !1,
|
|
17
|
-
props: { ...r },
|
|
18
|
-
emits: {},
|
|
19
|
-
setup(r, { slots: b, expose: x, attrs: S }) {
|
|
20
|
-
let { autoBindProps: C, listeners: w } = e(r, { predicate: i }), T = l();
|
|
21
|
-
console.log(T.locale.value.el);
|
|
22
|
-
let E = f(n, null), D = v("form"), O = u(() => r.notTableForm === void 0 ? (E == null ? void 0 : E.tableForm) === void 0 ? !1 : E == null ? void 0 : E.tableForm : !r.notTableForm), k = u(() => O.value ? !1 : r.showMessage), A = u(() => {
|
|
23
|
-
let e = {};
|
|
24
|
-
return r.disabledFields && r.disabledFields.forEach((t) => {
|
|
25
|
-
e[t] = !0;
|
|
26
|
-
}), e;
|
|
27
|
-
}), j = u(() => {
|
|
28
|
-
let e = {};
|
|
29
|
-
return r.enabledFields && r.enabledFields.length && r.enabledFields.forEach((t) => {
|
|
30
|
-
e[t] = !0;
|
|
31
|
-
}), e;
|
|
32
|
-
}), M = u(() => {
|
|
33
|
-
let e = {};
|
|
34
|
-
return r.requiredFields && r.requiredFields.length && r.requiredFields.forEach((t) => {
|
|
35
|
-
e[t] = !0;
|
|
36
|
-
}), e;
|
|
37
|
-
}), N = u(() => r.disabled === !0 ? !0 : r.disabled), P = _(() => r.enabledFields), F = _(() => r.requiredFields), I = _(() => r.disabledFields), L = async () => {
|
|
38
|
-
await m();
|
|
39
|
-
let e = D.value.$el.querySelector(".el-form-item.is-error");
|
|
40
|
-
e && e.scrollIntoView({
|
|
41
|
-
block: "center",
|
|
42
|
-
inline: "center",
|
|
43
|
-
behavior: "smooth"
|
|
44
|
-
});
|
|
45
|
-
}, R = g({
|
|
46
|
-
tableForm: O,
|
|
47
|
-
disabled: N,
|
|
48
|
-
enabledFields: P,
|
|
49
|
-
requiredFields: F,
|
|
50
|
-
enabledFieldsMap: j,
|
|
51
|
-
disabledFieldsMap: A,
|
|
52
|
-
requiredFieldsMap: M,
|
|
53
|
-
disabledFields: I,
|
|
54
|
-
scrollIntoRequiredField: L,
|
|
55
|
-
formRef: D,
|
|
56
|
-
validate: async () => {
|
|
57
|
-
try {
|
|
58
|
-
return await D.value.validate();
|
|
59
|
-
} catch {
|
|
60
|
-
throw await L(), D.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
61
|
-
y(e, "breathe-animation");
|
|
62
|
-
}), Error("表单验证不通过!");
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
validateField: (e) => D.value.validateField(e),
|
|
66
|
-
resetFields: (e) => D.value.resetFields(e),
|
|
67
|
-
scrollToField: (e) => D.value.scrollToField(e),
|
|
68
|
-
clearValidate: (e) => D.value.clearValidate(e),
|
|
69
|
-
getField: () => D.value.getField(),
|
|
70
|
-
setInitialValues: (e) => D.value.setInitialValues(e),
|
|
71
|
-
getFields: () => D.value.fields
|
|
72
|
-
});
|
|
73
|
-
return h(t, R), x(R), () => d(s, p(w.value, C.value, S, {
|
|
74
|
-
ref: "form",
|
|
75
|
-
class: [
|
|
76
|
-
"form-holder",
|
|
77
|
-
"clear-fix",
|
|
78
|
-
{ "red-form": O }
|
|
79
|
-
],
|
|
80
|
-
"show-message": k.value
|
|
81
|
-
}), { default: () => {
|
|
82
|
-
if (O.value) {
|
|
83
|
-
var e, t, n;
|
|
84
|
-
return [
|
|
85
|
-
(e = b.top) == null ? void 0 : e.call(b),
|
|
86
|
-
d(o, {
|
|
87
|
-
class: { "hide-error-message": O.value },
|
|
88
|
-
columns: r.columns,
|
|
89
|
-
"col-count": r.colCount
|
|
90
|
-
}, { default: () => {
|
|
91
|
-
var e;
|
|
92
|
-
return [(e = b.default) == null ? void 0 : e.call(b), r.showAdvice ? d(a, {
|
|
93
|
-
"label-colspan": r.commentLabelColspan,
|
|
94
|
-
"value-colspan": r.commentValueColspan
|
|
95
|
-
}, null) : null];
|
|
96
|
-
} }),
|
|
97
|
-
(t = b.bottom) == null ? void 0 : t.call(b),
|
|
98
|
-
d("div", { class: "red-form-footer" }, [(n = b.footer) == null ? void 0 : n.call(b)])
|
|
99
|
-
];
|
|
100
|
-
} else {
|
|
101
|
-
var i;
|
|
102
|
-
return r.wrapRow ? d(c, null, { default: () => {
|
|
103
|
-
var e;
|
|
104
|
-
return [(e = b.default) == null ? void 0 : e.call(b)];
|
|
105
|
-
} }) : (i = b.default) == null ? void 0 : i.call(b);
|
|
106
|
-
}
|
|
107
|
-
} });
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
//#endregion
|
|
111
|
-
export { b as t };
|