@web-utils/form-ui 1.0.0-beta19 → 1.0.0-beta20

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.
@@ -0,0 +1,189 @@
1
+ import { formHolderContextKey as e, formViewContextKey as t } from "../constants.mjs";
2
+ import { n } from "./Bh_CMUlo.mjs";
3
+ import r from "../form-advice/index.mjs";
4
+ import i from "../form-red-table/index.mjs";
5
+ import { ElForm as a, ElRow as o } from "element-plus/es";
6
+ import { computed as s, createVNode as c, inject as l, mergeProps as u, nextTick as d, provide as f, reactive as p, toRef as m, useTemplateRef as h } from "vue";
7
+ import { animate as g } from "@web-utils/core";
8
+ //#region src/components/form/props/form.js
9
+ var _ = {
10
+ model: Object,
11
+ rules: Object,
12
+ inline: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ labelPosition: {
17
+ type: String,
18
+ default: "right"
19
+ },
20
+ labelWidth: {
21
+ type: [String, Number],
22
+ default: "auto"
23
+ },
24
+ labelSuffix: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ hideRequiredAsterisk: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ requireAsteriskPosition: {
33
+ type: String,
34
+ default: "left"
35
+ },
36
+ showMessage: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ inlineMessage: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ statusIcon: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ validateOnRuleChange: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ size: String,
53
+ disabled: {
54
+ type: Boolean,
55
+ default: void 0
56
+ },
57
+ scrollToError: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ scrollIntoViewOptions: [Object, Boolean],
62
+ requiredFields: Array,
63
+ disabledFields: Array,
64
+ enabledFields: Array,
65
+ showAdvice: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ columns: [Array, Object],
70
+ colCount: Number,
71
+ notTableForm: {
72
+ type: Boolean,
73
+ default: void 0
74
+ },
75
+ commentValueColspan: Number,
76
+ commentLabelColspan: Number,
77
+ wrapRow: {
78
+ type: Boolean,
79
+ default: !0
80
+ }
81
+ }, v = {
82
+ showMessage: !0,
83
+ required: !0,
84
+ requiredFields: !0,
85
+ disabledFields: !0,
86
+ enabledFields: !0,
87
+ showAdvice: !0,
88
+ columns: !0,
89
+ colCount: !0,
90
+ notTableForm: !0,
91
+ commentValueColspan: !0,
92
+ commentLabelColspan: !0,
93
+ wrapRow: !0
94
+ }, y = ["validate"], b = (e) => v[e] !== !0, x = {
95
+ name: "FormHolder",
96
+ inheritAttrs: !1,
97
+ props: { ..._ },
98
+ emits: { validate: null },
99
+ setup(_, { slots: v, expose: x, emit: S }) {
100
+ let C = n(_, {
101
+ emit: S,
102
+ events: y,
103
+ predicate: b
104
+ }), w = l(t, null), T = h("form"), E = s(() => _.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !_.notTableForm), D = s(() => E.value ? !1 : _.showMessage), O = s(() => {
105
+ let e = {};
106
+ return _.disabledFields && _.disabledFields.forEach((t) => {
107
+ e[t] = !0;
108
+ }), e;
109
+ }), k = s(() => {
110
+ let e = {};
111
+ return _.enabledFields && _.enabledFields.length && _.enabledFields.forEach((t) => {
112
+ e[t] = !0;
113
+ }), e;
114
+ }), A = s(() => {
115
+ let e = {};
116
+ return _.requiredFields && _.requiredFields.length && _.requiredFields.forEach((t) => {
117
+ e[t] = !0;
118
+ }), e;
119
+ }), j = s(() => _.disabled === !0 ? !0 : _.disabled), M = m(() => _.enabledFields), N = m(() => _.requiredFields), P = m(() => _.disabledFields), F = async () => {
120
+ await d();
121
+ let e = T.value.$el.querySelector(".el-form-item.is-error");
122
+ e && e.scrollIntoView({
123
+ block: "center",
124
+ inline: "center",
125
+ behavior: "smooth"
126
+ });
127
+ }, I = p({
128
+ tableForm: E,
129
+ disabled: j,
130
+ enabledFields: M,
131
+ requiredFields: N,
132
+ enabledFieldsMap: k,
133
+ disabledFieldsMap: O,
134
+ requiredFieldsMap: A,
135
+ disabledFields: P,
136
+ scrollIntoRequiredField: F,
137
+ formRef: T,
138
+ validate: async () => {
139
+ try {
140
+ return await T.value.validate();
141
+ } catch {
142
+ throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
143
+ g(e, "breathe-animation");
144
+ }), Error("表单验证不通过!");
145
+ }
146
+ },
147
+ validateField: (e) => T.value.validateField(e),
148
+ resetFields: (e) => T.value.resetFields(e),
149
+ scrollToField: (e) => T.value.scrollToField(e),
150
+ clearValidate: (e) => T.value.clearValidate(e),
151
+ getField: () => T.value.getField(),
152
+ setInitialValues: (e) => T.value.setInitialValues(e),
153
+ getFields: () => T.value.fields
154
+ });
155
+ return f(e, I), x(I), () => c(a, u({
156
+ ref: "form",
157
+ class: "form-holder",
158
+ "show-message": D.value
159
+ }, C.value), { default: () => {
160
+ if (E.value) {
161
+ var e, t, n;
162
+ return [
163
+ (e = v.top) == null ? void 0 : e.call(v),
164
+ c(i, {
165
+ class: { "hide-error-message": E.value },
166
+ columns: _.columns,
167
+ "col-count": _.colCount
168
+ }, { default: () => {
169
+ var e;
170
+ return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ? c(r, {
171
+ "label-colspan": _.commentLabelColspan,
172
+ "value-colspan": _.commentValueColspan
173
+ }, null) : null];
174
+ } }),
175
+ (t = v.bottom) == null ? void 0 : t.call(v),
176
+ c("div", { class: "red-form-footer" }, [(n = v.footer) == null ? void 0 : n.call(v)])
177
+ ];
178
+ } else {
179
+ var a;
180
+ return _.wrapRow ? c(o, null, { default: () => {
181
+ var e;
182
+ return [(e = v.default) == null ? void 0 : e.call(v)];
183
+ } }) : (a = v.default) == null ? void 0 : a.call(v);
184
+ }
185
+ } });
186
+ }
187
+ };
188
+ //#endregion
189
+ export { x as t };
@@ -0,0 +1,93 @@
1
+ import { columnSizeContextKey as e, setColumnSizeContextKey as t } from "../constants.mjs";
2
+ import n from "../form-cell/index.mjs";
3
+ import { ElTooltip as r } from "element-plus/es";
4
+ import { Comment as i, Fragment as a, Text as o, createVNode as s, inject as c, isVNode as l } from "vue";
5
+ import { camelize as u, isDef as d, isString as f } from "@web-utils/core";
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]" && !l(e);
9
+ }
10
+ var m = (e) => {
11
+ let t = Object.keys({});
12
+ for (let n in e) t[u(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 !== i);
17
+ let n = [], c = e.length === 1;
18
+ for (let i = 0; i < e.length; i++) {
19
+ let v = e[i], { name: y } = v.type;
20
+ if (v.type === o) n.push({
21
+ tag: y,
22
+ type: "text",
23
+ content: v,
24
+ colspan: c ? t : 0
25
+ });
26
+ else if (v.type === a) n.push(...h(v.children, { columnSize: t }));
27
+ else if (f(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 l, u;
39
+ let { label: e, hideLabel: i, labelColspan: a, inputColspan: o, labelRowspan: f, inputRowspan: h, tipsAfterLabel: b, tips: x } = m(v.props);
40
+ if (!d(i)) {
41
+ var p, g, _;
42
+ let t = (p = v.children) == null ? void 0 : p.tips, i = t || x ? s(r, {
43
+ effect: "light",
44
+ content: x,
45
+ offset: 4
46
+ }, {
47
+ default: () => s("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: a,
54
+ rowspan: f,
55
+ content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? i : null]
56
+ });
57
+ }
58
+ let S;
59
+ S = c && d(i) ? t : d(o) ? o : c ? t - 1 : 0, n.push({
60
+ tag: y,
61
+ type: "input",
62
+ colspan: S,
63
+ rowspan: h,
64
+ content: [v, (l = v.children) == null || (u = l.below) == null ? void 0 : u.call(l)]
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 = c(t, null), o = c(e, null);
77
+ return () => {
78
+ var e;
79
+ let t = (e = i.default) == null ? void 0 : e.call(i), c = [];
80
+ return c.push(...h(t, { columnSize: (o == null ? void 0 : o.value) ?? 0 })), ((o == null ? void 0 : o.value) ?? 0) < c.length && (a == null || a(c.length)), s("tr", null, [c.map(({ tag: e, type: t, colspan: i, rowspan: a, content: o }) => e === "td" || t === "FormCell" ? o : t === "text" ? s(n, {
81
+ isLabel: r.isLabel,
82
+ alignCenter: r.alignCenter,
83
+ colspan: i
84
+ }, p(o) ? o : { default: () => [o] }) : s("td", {
85
+ class: t,
86
+ colspan: i,
87
+ rowspan: a
88
+ }, [o]))]);
89
+ };
90
+ }
91
+ };
92
+ //#endregion
93
+ export { g as t };
@@ -0,0 +1,106 @@
1
+ import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants.mjs";
2
+ import n from "../empty-view/index.mjs";
3
+ import { ElRow as r } from "element-plus/es";
4
+ import { Fragment as i, computed as a, createTextVNode as o, createVNode as s, h as c, inject as l, isVNode as u, onBeforeUnmount as d, onMounted as f, provide as p, reactive as m, ref as h, toRef as g, vShow as _, watchEffect as v, withDirectives as y } from "vue";
5
+ import { ElCol as b, ElCollapseTransition as x } from "element-plus";
6
+ //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
+ function S(e) {
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
9
+ }
10
+ //#endregion
11
+ //#region src/components/form/FormItemGroup.vue
12
+ var C = {
13
+ name: "FormItemGroup",
14
+ props: {
15
+ blockTitle: String,
16
+ size: String,
17
+ tips: String,
18
+ active: Boolean,
19
+ enabled: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ tag: {
28
+ type: String,
29
+ default: "ElCol"
30
+ },
31
+ span: {
32
+ type: Number,
33
+ default: 24
34
+ },
35
+ block: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ wrapRow: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ gutter: {
44
+ type: Number,
45
+ default: 20
46
+ },
47
+ collapse: Boolean,
48
+ showTitle: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ notDispatch: Boolean
53
+ },
54
+ setup(u, { expose: C, slots: w }) {
55
+ let T = l(t, null), E = h(!0), D = g(() => u.enabled), O = g(() => u.disabled), k = a(() => u.enabled === !0 ? !1 : u.disabled === !0), A = () => E.value = !E.value, j = m({
56
+ disabled: O,
57
+ enabled: D,
58
+ isDisabled: k,
59
+ size: g(() => u.size)
60
+ });
61
+ return v(() => {
62
+ E.value = !u.collapse;
63
+ }), p(e, j), f(() => {
64
+ if (!u.notDispatch) {
65
+ var e;
66
+ T == null || (e = T.addGroup) == null || e.call(T, this);
67
+ }
68
+ }), d(() => {
69
+ if (!u.notDispatch) {
70
+ var e;
71
+ T == null || (e = T.removeGroup) == null || e.call(T, this);
72
+ }
73
+ }), C(j), () => {
74
+ let e = () => {
75
+ var e;
76
+ return s(i, null, [y(s("div", {
77
+ class: "form-item-group-title",
78
+ onClick: A
79
+ }, [s("span", {
80
+ class: "flex-item",
81
+ style: "flex: 1"
82
+ }, [
83
+ w.title ? w.title() : u.blockTitle,
84
+ w.tips || u.tips ? s("span", { style: "color: #ff0000; font-size: 14px" }, [
85
+ o("("),
86
+ w.tips ? w.tips() : u.tips,
87
+ o(")")
88
+ ]) : null,
89
+ (e = w["title-right"]) == null ? void 0 : e.call(w)
90
+ ]), s("i", { class: E.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[_, u.showTitle]]), s(x, null, { default: () => {
91
+ let e;
92
+ return w.default ? u.wrapRow ? y(s(r, { gutter: u.gutter }, S(e = w.default()) ? e : { default: () => [e] }), [[_, E.value]]) : y(s("div", null, [w.default()]), [[_, E.value]]) : y(s(n, {
93
+ "font-size": "14px",
94
+ "empty-tips": "暂无信息"
95
+ }, null), [[_, E.value]]);
96
+ } })]);
97
+ }, t = { class: ["form-item-group", {
98
+ "default-active": u.active,
99
+ "is-disabled": k.value
100
+ }] };
101
+ return u.tag !== "div" && (t.span = u.block ? 24 : u.span), c(u.tag === "div" ? "div" : b, t, e);
102
+ };
103
+ }
104
+ };
105
+ //#endregion
106
+ export { C as t };
package/constants.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/components/constants.ts
2
- var e = Symbol("formHolder"), t = Symbol("formItemGroup"), n = Symbol("formItemConfigProvider"), r = Symbol("formView"), i = Symbol("formEntity"), a = Symbol("formItemConfig"), o = Symbol("flow"), s = Symbol("toolbar"), c = Symbol("tableView"), l = Symbol("pageableTable"), u = Symbol("columnSize"), d = Symbol("columns"), f = Symbol("setColumnSize");
2
+ var e = Symbol("formHolder"), t = Symbol("formItemGroup"), n = Symbol("formItemConfigProvider"), r = Symbol("formView"), i = Symbol("formEntity"), a = Symbol("formItemConfig"), o = Symbol("flowContext"), s = Symbol("toolbar"), c = Symbol("tableView"), l = Symbol("pageableTable"), u = Symbol("columnSize"), d = Symbol("columns"), f = Symbol("setColumnSize");
3
3
  //#endregion
4
4
  export { u as columnSizeContextKey, d as columnsContextKey, o as flowContextKey, i as formEntityContextKey, e as formHolderContextKey, a as formItemConfigContextKey, n as formItemConfigProviderContextKey, t as formItemGroupContextKey, r as formViewContextKey, l as pageableTableContextKey, f as setColumnSizeContextKey, c as tableViewContextKey, s as toolbarContextKey };
@@ -1,28 +1,29 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, inject as o, openBlock as s, renderList as c, toDisplayString as l, unref as u } from "vue";
1
+ import { columnSizeContextKey as e, flowContextKey as t } from "../constants.mjs";
2
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, inject as c, openBlock as l, renderList as u, toDisplayString as d, unref as f } from "vue";
2
3
  //#region src/components/red-form/FormAdvice.vue
3
- var d = ["colspan"], f = ["colspan"], p = { style: { "text-align": "right" } }, m = { style: { "margin-left": "20px" } }, h = /* @__PURE__ */ Object.assign({ name: "FormAdvice" }, {
4
+ var p = ["colspan"], m = ["colspan"], h = { style: { "text-align": "right" } }, g = { style: { "margin-left": "20px" } }, _ = /* @__PURE__ */ Object.assign({ name: "FormAdvice" }, {
4
5
  __name: "FormAdvice",
5
6
  props: {
6
7
  valueColspan: Number,
7
8
  labelColspan: Number
8
9
  },
9
- setup(h) {
10
- let g = h, _ = o("columnSize", 0), v = o("flowContext", null), y = t(() => g.labelColspan && g.valueColspan || g.labelColspan && !g.valueColspan ? g.labelColspan : !g.labelColspan && g.valueColspan && _.value ? _.value - g.valueColspan : 0), b = t(() => g.labelColspan && g.valueColspan ? g.valueColspan : g.labelColspan && !g.valueColspan ? _.value ? _.value - g.labelColspan : 0 : !g.labelColspan && g.valueColspan ? g.valueColspan : _.value ? _.value - 1 : 0);
11
- return (t, o) => {
12
- var h;
13
- return s(), r("tbody", null, [(s(!0), r(e, null, c((h = u(v)) == null ? void 0 : h.formComments, (t) => (s(), r(e, null, [t.comments.length ? (s(), r("tr", { key: t.id }, [i("td", {
10
+ setup(_) {
11
+ let v = _, y = c(e, 0), b = c(t, null), x = r(() => v.labelColspan && v.valueColspan || v.labelColspan && !v.valueColspan ? v.labelColspan : !v.labelColspan && v.valueColspan && y.value ? y.value - v.valueColspan : 0), S = r(() => v.labelColspan && v.valueColspan ? v.valueColspan : v.labelColspan && !v.valueColspan ? y.value ? y.value - v.labelColspan : 0 : !v.labelColspan && v.valueColspan ? v.valueColspan : y.value ? y.value - 1 : 0);
12
+ return (e, t) => {
13
+ var r;
14
+ return l(), a("tbody", null, [(l(!0), a(n, null, u((r = f(b)) == null ? void 0 : r.formComments, (e) => (l(), a(n, null, [e.comments.length ? (l(), a("tr", { key: e.id }, [o("td", {
14
15
  class: "label",
15
16
  style: {
16
17
  height: "100px",
17
18
  "line-height": "24px"
18
19
  },
19
- colspan: y.value
20
- }, l(t.name), 9, d), i("td", {
20
+ colspan: x.value
21
+ }, d(e.name), 9, p), o("td", {
21
22
  class: "input",
22
- colspan: b.value
23
- }, [i("ul", null, [(s(!0), r(e, null, c(t.comments, (e) => (s(), r("li", { key: e.id }, [i("p", null, l(e.message), 1), i("p", p, [a(l(e.personalName) + " ", 1), i("span", m, l(e.time.substring(0, 10)), 1)])]))), 128))])], 8, f)])) : n("v-if", !0)], 64))), 256))]);
23
+ colspan: S.value
24
+ }, [o("ul", null, [(l(!0), a(n, null, u(e.comments, (e) => (l(), a("li", { key: e.id }, [o("p", null, d(e.message), 1), o("p", h, [s(d(e.personalName) + " ", 1), o("span", g, d(e.time.substring(0, 10)), 1)])]))), 128))])], 8, m)])) : i("v-if", !0)], 64))), 256))]);
24
25
  };
25
26
  }
26
27
  });
27
28
  //#endregion
28
- export { h as default };
29
+ export { _ as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/nJ1-P9vh.mjs";
1
+ import { t as e } from "../chunks/BLpnMrum.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CNtf2MHr.mjs";
1
+ import { t as e } from "../chunks/lTFu0zgR.mjs";
2
2
  export { e as default };
@@ -1,34 +1,35 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, normalizeStyle as a, openBlock as o, provide as s, ref as c, renderList as l, renderSlot as u, watch as d } from "vue";
2
- import { isPlainObject as f, isString as p } from "@web-utils/core";
1
+ import { columnSizeContextKey as e, columnsContextKey as t, setColumnSizeContextKey as n } from "../constants.mjs";
2
+ import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, normalizeStyle as c, openBlock as l, provide as u, ref as d, renderList as f, renderSlot as p, watch as m } from "vue";
3
+ import { isPlainObject as h, isString as g } from "@web-utils/core";
3
4
  //#region src/components/red-form/FormRedTable.vue
4
- var m = {
5
+ var _ = {
5
6
  key: 0,
6
7
  class: "red-table"
7
- }, h = /* @__PURE__ */ Object.assign({ name: "FormRedTable" }, {
8
+ }, v = /* @__PURE__ */ Object.assign({ name: "FormRedTable" }, {
8
9
  __name: "FormRedTable",
9
10
  props: {
10
11
  columns: [Array, Object],
11
12
  colCount: Number
12
13
  },
13
- setup(h) {
14
- let g = h, _ = t(() => {
14
+ setup(v) {
15
+ let y = v, b = i(() => {
15
16
  var e;
16
- if (f(g.columns)) {
17
- let { colCount: e } = g.columns;
18
- e = e || g.colCount;
17
+ if (h(y.columns)) {
18
+ let { colCount: e } = y.columns;
19
+ e = e || y.colCount;
19
20
  let t = [];
20
21
  for (let n = 0; n < e; n++) {
21
- let e = g.columns[n];
22
- f(e) ? t.push(e) : p(e) ? t.push({ width: e }) : t.push({});
22
+ let e = y.columns[n];
23
+ h(e) ? t.push(e) : g(e) ? t.push({ width: e }) : t.push({});
23
24
  }
24
25
  return t;
25
26
  }
26
- return (e = g.columns) != null && e.length ? g.columns : g.colCount === 2 ? [{ width: "40%" }, { width: "60%" }] : g.colCount === 4 ? [
27
+ return (e = y.columns) != null && e.length ? y.columns : y.colCount === 2 ? [{ width: "40%" }, { width: "60%" }] : y.colCount === 4 ? [
27
28
  { width: "20%" },
28
29
  { width: "30%" },
29
30
  { width: "20%" },
30
31
  { width: "30%" }
31
- ] : g.colCount === 6 ? [
32
+ ] : y.colCount === 6 ? [
32
33
  { width: "11%" },
33
34
  { width: "30%" },
34
35
  { width: "11%" },
@@ -41,24 +42,24 @@ var m = {
41
42
  { width: "20%" },
42
43
  { width: "30%" }
43
44
  ];
44
- }), v = c(_.value.length);
45
- s("columns", _), s("columnSize", v);
46
- let y = (e) => {
47
- v.value = e;
45
+ }), x = d(b.value.length);
46
+ u(t, b), u(e, x);
47
+ let S = (e) => {
48
+ x.value = e;
48
49
  };
49
- return s("setColumnSize", y), d(_, () => {
50
- y(_.value.length);
51
- }), (t, s) => {
52
- var c;
53
- return (c = _.value) != null && c.length ? (o(), r("table", m, [i("colgroup", null, [(o(!0), r(e, null, l(_.value, (e, t) => (o(), r("col", {
50
+ return u(n, S), m(b, () => {
51
+ S(b.value.length);
52
+ }), (e, t) => {
53
+ var n;
54
+ return (n = b.value) != null && n.length ? (l(), o("table", _, [s("colgroup", null, [(l(!0), o(r, null, f(b.value, (e, t) => (l(), o("col", {
54
55
  key: t,
55
- style: a({ width: `${e.width}` })
56
- }, null, 4))), 128)), (o(!0), r(e, null, l(v.value - _.value.length, (e) => (o(), r("col", {
56
+ style: c({ width: `${e.width}` })
57
+ }, null, 4))), 128)), (l(!0), o(r, null, f(x.value - b.value.length, (e) => (l(), o("col", {
57
58
  key: `${e}-ex`,
58
59
  style: { width: "20%" }
59
- }))), 128))]), u(t.$slots, "default")])) : n("v-if", !0);
60
+ }))), 128))]), p(e.$slots, "default")])) : a("v-if", !0);
60
61
  };
61
62
  }
62
63
  });
63
64
  //#endregion
64
- export { h as default };
65
+ export { v as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DdDv8RSI.mjs";
1
+ import { t as e } from "../chunks/Bb43eI1f.mjs";
2
2
  export { e as default };
package/index.mjs CHANGED
@@ -9,7 +9,7 @@ import { t as s } from "./chunks/BVzpe2oN.mjs";
9
9
  import { t as c } from "./chunks/8ORg8rrN.mjs";
10
10
  import { t as l } from "./chunks/Bk3PtIYo.mjs";
11
11
  import u from "./form-red-table/index.mjs";
12
- import { t as d } from "./chunks/nJ1-P9vh.mjs";
12
+ import { t as d } from "./chunks/BLpnMrum.mjs";
13
13
  import { t as f } from "./chunks/DgbDpRQg.mjs";
14
14
  import { t as p } from "./chunks/CJeq96R0.mjs";
15
15
  import { t as m } from "./chunks/wfL1FAwc.mjs";
@@ -21,10 +21,10 @@ import { t as y } from "./chunks/CPE8fqJc.mjs";
21
21
  import b from "./form-input-tag/index.mjs";
22
22
  import x from "./form-input-time/index.mjs";
23
23
  import S from "./form-item-config-provider/index.mjs";
24
- import { t as C } from "./chunks/CNtf2MHr.mjs";
24
+ import { t as C } from "./chunks/lTFu0zgR.mjs";
25
25
  import { t as w } from "./chunks/D7hrSVVl.mjs";
26
26
  import { t as T } from "./chunks/B7fKv2-x.mjs";
27
- import { t as E } from "./chunks/DdDv8RSI.mjs";
27
+ import { t as E } from "./chunks/Bb43eI1f.mjs";
28
28
  import { t as D } from "./chunks/BAm_wcwz.mjs";
29
29
  import { t as O } from "./chunks/BJObhbQz.mjs";
30
30
  import { t as k } from "./chunks/Be_E_4G0.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/form-ui",
3
3
  "description": "form-ui",
4
- "version": "1.0.0-beta19",
4
+ "version": "1.0.0-beta20",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",