@web-utils/form-ui 1.0.0-beta3 → 1.0.0-beta30
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/C4bM8miy.mjs +174 -0
- package/chunks/C9J3j0PX.mjs +93 -0
- package/chunks/CKErj8Ax.mjs +637 -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,93 @@
|
|
|
1
|
+
import { columnSizeContextKey as e, setColumnSizeContextKey as t } from "../constants/index.mjs";
|
|
2
|
+
import n from "../form-cell/index.mjs";
|
|
3
|
+
import { camelize as r, isDef as i, isString as a } from "@web-utils/core";
|
|
4
|
+
import { Comment as o, Fragment as s, Text as c, createVNode as l, inject as u, isVNode as d } from "vue";
|
|
5
|
+
import { ElTooltip as f } from "element-plus/es";
|
|
6
|
+
//#region src/components/red-form/FormRow.vue?vue&type=script&lang.jsx
|
|
7
|
+
function p(e) {
|
|
8
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
|
|
9
|
+
}
|
|
10
|
+
var m = (e) => {
|
|
11
|
+
let t = Object.keys({});
|
|
12
|
+
for (let n in e) t[r(n)] = e[n];
|
|
13
|
+
return t;
|
|
14
|
+
}, h = (e, { columnSize: t }) => {
|
|
15
|
+
if (!e || !e.length) return null;
|
|
16
|
+
e = e.filter((e) => e.type !== o);
|
|
17
|
+
let n = [], r = e.length === 1;
|
|
18
|
+
for (let o = 0; o < e.length; o++) {
|
|
19
|
+
let v = e[o], { name: y } = v.type;
|
|
20
|
+
if (v.type === c) n.push({
|
|
21
|
+
tag: y,
|
|
22
|
+
type: "text",
|
|
23
|
+
content: v,
|
|
24
|
+
colspan: r ? t : 0
|
|
25
|
+
});
|
|
26
|
+
else if (v.type === s) n.push(...h(v.children, { columnSize: t }));
|
|
27
|
+
else if (a(v.type) && v.type === "td") n.push({
|
|
28
|
+
tag: v.type,
|
|
29
|
+
type: "td",
|
|
30
|
+
content: v
|
|
31
|
+
});
|
|
32
|
+
else if (y === "FormCell") n.push({
|
|
33
|
+
tag: y,
|
|
34
|
+
type: "FormCell",
|
|
35
|
+
content: v
|
|
36
|
+
});
|
|
37
|
+
else if (typeof v.type == "object") {
|
|
38
|
+
var u, d;
|
|
39
|
+
let { label: e, hideLabel: a, labelColspan: o, inputColspan: s, labelRowspan: c, inputRowspan: h, tipsAfterLabel: b, tips: x } = m(v.props);
|
|
40
|
+
if (!i(a)) {
|
|
41
|
+
var p, g, _;
|
|
42
|
+
let t = (p = v.children) == null ? void 0 : p.tips, r = t || x ? l(f, {
|
|
43
|
+
effect: "light",
|
|
44
|
+
content: x,
|
|
45
|
+
offset: 4
|
|
46
|
+
}, {
|
|
47
|
+
default: () => l("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
48
|
+
content: t || null
|
|
49
|
+
}) : null;
|
|
50
|
+
n.push({
|
|
51
|
+
tag: y,
|
|
52
|
+
type: "label",
|
|
53
|
+
colspan: o,
|
|
54
|
+
rowspan: c,
|
|
55
|
+
content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? r : null]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
let S;
|
|
59
|
+
S = r && i(a) ? t : i(s) ? s : r ? t - 1 : 0, n.push({
|
|
60
|
+
tag: y,
|
|
61
|
+
type: "input",
|
|
62
|
+
colspan: S,
|
|
63
|
+
rowspan: h,
|
|
64
|
+
content: [v, (u = v.children) == null || (d = u.below) == null ? void 0 : d.call(u)]
|
|
65
|
+
});
|
|
66
|
+
} else console.error("未知节点");
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}, g = {
|
|
70
|
+
name: "FormRow",
|
|
71
|
+
props: {
|
|
72
|
+
isLabel: Boolean,
|
|
73
|
+
alignCenter: Boolean
|
|
74
|
+
},
|
|
75
|
+
setup(r, { slots: i }) {
|
|
76
|
+
let a = u(t, null), o = u(e, null);
|
|
77
|
+
return () => {
|
|
78
|
+
var e;
|
|
79
|
+
let t = (e = i.default) == null ? void 0 : e.call(i), s = [];
|
|
80
|
+
return s.push(...h(t, { columnSize: (o == null ? void 0 : o.value) ?? 0 })), ((o == null ? void 0 : o.value) ?? 0) < s.length && (a == null || a(s.length)), l("tr", null, [s.map(({ tag: e, type: t, colspan: i, rowspan: a, content: o }) => e === "td" || t === "FormCell" ? o : t === "text" ? l(n, {
|
|
81
|
+
isLabel: r.isLabel,
|
|
82
|
+
alignCenter: r.alignCenter,
|
|
83
|
+
colspan: i
|
|
84
|
+
}, p(o) ? o : { default: () => [o] }) : l("td", {
|
|
85
|
+
class: t,
|
|
86
|
+
colspan: i,
|
|
87
|
+
rowspan: a
|
|
88
|
+
}, [o]))]);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { g as t };
|