@web-utils/form-ui 1.0.0-beta47 → 1.0.0-beta48
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/{C9dGL28n.mjs → 6yfBZFOB.mjs} +2 -2
- package/chunks/B-zqRAXo.mjs +69 -0
- package/chunks/{CXvGoZKJ.mjs → B1IPSTA6.mjs} +2 -2
- package/chunks/B3pkJUCx2.mjs +146 -0
- package/chunks/{Ct5bDJ50.mjs → B9gA65rt2.mjs} +3 -3
- package/chunks/{C1AgOUe_.mjs → BA2KEptL.mjs} +2 -2
- package/chunks/BRRcYOud.mjs +613 -0
- package/chunks/{Bm5eiSmT.mjs → BUGCiCnl.mjs} +11 -7
- package/chunks/{DiJyms_r.mjs → BbSPWDDZ.mjs} +2 -2
- package/chunks/{BH_JJ8Xh.mjs → BfxDxIg0.mjs} +2 -2
- package/chunks/{C3Uo82-I.mjs → BqWvBF14.mjs} +3 -3
- package/chunks/BsZgAJX_2.mjs +81 -0
- package/chunks/{DXYgAmil.mjs → BtcjAHE6.mjs} +2 -2
- package/chunks/{DhtHh0jk.mjs → ByHz4mmh.mjs} +2 -2
- package/chunks/C-D7jeLT2.mjs +568 -0
- package/chunks/{BufIRDd0.mjs → C2zgFLYO.mjs} +1 -1
- package/chunks/{XCGWTz41.mjs → CAd1zK9Q.mjs} +2 -2
- package/chunks/{CSyJ-vEx.mjs → CJdkjadi.mjs} +1 -1
- package/chunks/{CFOGMFgo.mjs → CabldOLo.mjs} +17 -10
- package/chunks/{Bd1UFJic.mjs → Cln3RBAD.mjs} +21 -21
- package/chunks/{CTKmEf2M.mjs → CqoVAnxC2.mjs} +2 -2
- package/chunks/{DF9fJMQS.mjs → CuAoMR3n.mjs} +3 -3
- package/chunks/{XqRTtFfp.mjs → CxTg0r4n.mjs} +1 -1
- package/chunks/{pdwFQpA8.mjs → D0Zg2CV0.mjs} +3 -3
- package/chunks/{BsCS7SB5.mjs → DA7oGHSX.mjs} +2 -2
- package/chunks/DOZRzqlo.mjs +37 -0
- package/chunks/{Cj59E77g.mjs → D_qiRmiE.mjs} +5 -5
- package/chunks/{cmuHpsX6.mjs → DcTVYqeJ.mjs} +29 -25
- package/chunks/{B3ajWLh3.mjs → Dkd5BC98.mjs} +2 -2
- package/chunks/{ChmDDqoZ2.mjs → GI8krYU82.mjs} +1 -1
- package/chunks/{D8UVq1t1.mjs → V2p-PCpL.mjs} +6 -6
- package/chunks/{taicx2sd.mjs → bFbPPcdq.mjs} +2 -2
- package/chunks/{TvNHGVAP.mjs → eae6huQB.mjs} +2 -2
- package/chunks/gCeDFHo1.mjs +32 -0
- package/chunks/{BvA0aMEE.mjs → gLPy4Sus.mjs} +1 -1
- package/chunks/{o6VhYAN52.mjs → hzaYr6Ud2.mjs} +2 -2
- package/chunks/{CqTcEefA.mjs → pIzhYsBe.mjs} +2 -2
- package/chunks/{CWfUPCtS.mjs → vXQf89tS.mjs} +274 -273
- package/chunks/{BWBHzD5N.mjs → wXeqV-_7.mjs} +2 -2
- package/confirm-button/index.d.ts +2 -0
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.d.ts +2 -0
- package/confirmable/index.mjs +1 -1
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +2 -2
- package/element-dialog/index.mjs +1 -1
- package/{resize-observer → element-resize-observer}/index.mjs +3 -3
- package/form-button/index.d.ts +2 -0
- package/form-cascader/index.d.ts +3 -3
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +2 -0
- 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.d.ts +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.d.ts +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.d.ts +269 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/helper/dictionary.mjs +7 -7
- package/iframe-window/index.mjs +1 -1
- package/index.css +1 -1
- package/index.d.ts +8 -3
- package/index.mjs +55 -50
- package/package.json +1 -1
- package/pageable-table/index.d.ts +7 -7
- package/pageable-table/index.mjs +1 -1
- package/sub-table/index.d.ts +100 -0
- package/sub-table/index.mjs +472 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +97 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.d.ts +18 -8
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +107 -106
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.d.ts +2 -2
- 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.mjs +52 -51
- package/year-calendar/index.mjs +1 -1
- package/chunks/CLPSCSsy.mjs +0 -603
- package/chunks/CuG2Q-PM.mjs +0 -100
- package/form-check-box-group/index.mjs +0 -2
- package/chunks/{Ds_Tpa_M.mjs → BBERmTup.mjs} +0 -0
- package/chunks/{B1MSrc6f.mjs → CkOD-_VV.mjs} +0 -0
- package/chunks/{DDmQcNm6.mjs → DOP3aBxf.mjs} +0 -0
- package/chunks/{DJe97Fgi.mjs → hlha6Bhc.mjs} +0 -0
- package/{resize-observer → element-resize-observer}/index.d.ts +0 -0
- package/{resize-observer → element-resize-observer}/style.css +0 -0
- package/{form-check-box-group → form-checkbox-group}/index.d.ts +1 -1
- /package/{form-check-box-group → form-checkbox-group}/style.css +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n, t as r } from "./CJdkjadi.mjs";
|
|
3
3
|
import i from "../x-input-tag/index.mjs";
|
|
4
4
|
import { createVNode as a, mergeProps as o } from "vue";
|
|
5
5
|
//#region src/components/form/props/input-tag.ts
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { a as e } from "./DcTVYqeJ.mjs";
|
|
2
|
+
import { t } from "./DOZRzqlo.mjs";
|
|
3
|
+
import { tableViewContextKey as n } from "../constants/index.mjs";
|
|
4
|
+
import { t as r } from "./BBERmTup.mjs";
|
|
5
|
+
import { createVNode as i, inject as a, mergeProps as o } from "vue";
|
|
6
|
+
import { ElTableColumn as s } from "element-plus/es";
|
|
7
|
+
//#region src/components/table/TableColumn.vue?vue&type=script&lang.jsx
|
|
8
|
+
var c = {
|
|
9
|
+
selection: !0,
|
|
10
|
+
"single-selection": !0,
|
|
11
|
+
index: !0,
|
|
12
|
+
expand: !0
|
|
13
|
+
}, l = (e, t, n, r, i) => {
|
|
14
|
+
var a;
|
|
15
|
+
let o = (e == null || (a = e.$parent) == null ? void 0 : a.rowDbClick) || (e == null ? void 0 : e.rowDbClick);
|
|
16
|
+
o == null || o(t, n, r, i);
|
|
17
|
+
}, u = (e) => {
|
|
18
|
+
let t = e.target;
|
|
19
|
+
for (; t && t.tagName.toUpperCase() !== "HTML";) {
|
|
20
|
+
if (t.tagName.toUpperCase() === "TD") return t;
|
|
21
|
+
t = t.parentNode;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}, d = () => {}, f = (t) => !e(t).length, p = {
|
|
25
|
+
name: "TableColumn",
|
|
26
|
+
props: { ...r },
|
|
27
|
+
setup(e, { slots: r, attrs: p }) {
|
|
28
|
+
let m = a(n, null);
|
|
29
|
+
return () => {
|
|
30
|
+
let { clickable: n, cellClick: a, ...h } = e, g, _ = c[e.type];
|
|
31
|
+
if (!_) {
|
|
32
|
+
let o = n || p.onClick || a;
|
|
33
|
+
(o || e.dictType || e.options) && (g = (n) => {
|
|
34
|
+
var s;
|
|
35
|
+
let { row: c, column: h } = n, g = o ? (e) => {
|
|
36
|
+
let t = u(e);
|
|
37
|
+
if (p.onClick || a) {
|
|
38
|
+
var n;
|
|
39
|
+
(n = p.onClick) == null || n.call(p, c, h, c, h, t, e), a == null || a(c, h, c, h, t, e);
|
|
40
|
+
} else l(m, c, h, t, e);
|
|
41
|
+
} : d, _ = r == null || (s = r.default) == null ? void 0 : s.call(r, n);
|
|
42
|
+
return f(_) && (_ = null), (e.dictType || e.options) && !_ ? i(t, {
|
|
43
|
+
class: { "is-clickable": o },
|
|
44
|
+
onClick: g,
|
|
45
|
+
row: c,
|
|
46
|
+
column: h,
|
|
47
|
+
dictType: e.dictType,
|
|
48
|
+
treeDict: e.treeDict,
|
|
49
|
+
idAsValue: e.idAsValue,
|
|
50
|
+
labelAsValue: e.labelAsValue,
|
|
51
|
+
options: e.options
|
|
52
|
+
}, null) : o ? i("span", {
|
|
53
|
+
class: "is-clickable",
|
|
54
|
+
onClick: g
|
|
55
|
+
}, [_ || (c == null ? void 0 : c[h == null ? void 0 : h.property])]) : _;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return i(s, o(h, {
|
|
59
|
+
key: p.filterable,
|
|
60
|
+
showOverflowTooltip: _ ? !1 : h.showOverflowTooltip
|
|
61
|
+
}), {
|
|
62
|
+
...r,
|
|
63
|
+
default: g || r.default
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { p as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n } from "./CJdkjadi.mjs";
|
|
3
3
|
import { computed as r, createVNode as i, mergeProps as a } from "vue";
|
|
4
4
|
import { ElDatePicker as o } from "element-plus/es";
|
|
5
5
|
import { toDate as s } from "@web-utils/integrations/dayjs";
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { i as e } from "./DcTVYqeJ.mjs";
|
|
2
|
+
import { i as t, n } from "./D_qiRmiE.mjs";
|
|
3
|
+
import { n as r, t as i } from "./CJdkjadi.mjs";
|
|
4
|
+
import { r as a } from "./CabldOLo.mjs";
|
|
5
|
+
import { n as o } from "./gCeDFHo1.mjs";
|
|
6
|
+
import { n as s, t as c } from "./C-D7jeLT2.mjs";
|
|
7
|
+
import { isArray as l, isString as u, trace as d, warning as f } from "@web-utils/core";
|
|
8
|
+
import { computed as p, createVNode as m, getCurrentInstance as h, mergeProps as g, useModel as _, useTemplateRef as v } from "vue";
|
|
9
|
+
import { useEventBus as y } from "@web-utils/vue/hooks/useEventBus";
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/components/form/FormTablePlus.vue
|
|
12
|
+
var b = {
|
|
13
|
+
name: "FormTablePlus",
|
|
14
|
+
props: {
|
|
15
|
+
...r,
|
|
16
|
+
...i,
|
|
17
|
+
...s,
|
|
18
|
+
rowDbClick: Function,
|
|
19
|
+
viewId: [String, Array],
|
|
20
|
+
block: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
formPath: [String, Function]
|
|
25
|
+
},
|
|
26
|
+
emits: { ...n },
|
|
27
|
+
setup(n, { emit: r, slots: i, attrs: s, expose: b }) {
|
|
28
|
+
let x = _(n, "modelValue"), S = v("table"), C = [];
|
|
29
|
+
n.viewId && C.push(n.viewId);
|
|
30
|
+
let w = h();
|
|
31
|
+
C.includes(w.parent.proxy.$options.name) || C.push(w.parent.proxy.$options.name);
|
|
32
|
+
let T = () => {
|
|
33
|
+
var e;
|
|
34
|
+
return (e = S.value.table) == null ? void 0 : e.reloadTable();
|
|
35
|
+
}, E = async () => {
|
|
36
|
+
var e;
|
|
37
|
+
return await ((e = S.value.table) == null ? void 0 : e.refreshTable());
|
|
38
|
+
};
|
|
39
|
+
y("reloadTableView", (e) => {
|
|
40
|
+
if (C) if (u(e) || l(e)) {
|
|
41
|
+
let t = e;
|
|
42
|
+
u(t) && (t = t.split(",")), C.some((e) => t.includes(e)) && (d.call(w.parent.proxy || {}, "reloadTableView"), T());
|
|
43
|
+
} else f.call(w.parent.proxy || {}, "`viewId`的类型必须是字符串或数组");
|
|
44
|
+
});
|
|
45
|
+
let D = (...t) => {
|
|
46
|
+
n.rowDbClick ? n.rowDbClick(...t) : w.proxy.$router.push(e(n.formPath, t[0]));
|
|
47
|
+
}, O = () => {
|
|
48
|
+
w.proxy.$router.push(e(n.formPath));
|
|
49
|
+
}, { render: k, placeholder: A, disabled: j, listeners: M, inputProps: N } = t(n, {
|
|
50
|
+
rules: p(() => [n.fetchApi ? {
|
|
51
|
+
required: !0,
|
|
52
|
+
validator: a
|
|
53
|
+
} : { required: !0 }]),
|
|
54
|
+
emit: r,
|
|
55
|
+
slots: i,
|
|
56
|
+
attrs: s,
|
|
57
|
+
predicate: o
|
|
58
|
+
});
|
|
59
|
+
return b({
|
|
60
|
+
reloadTable: T,
|
|
61
|
+
refreshTable: E
|
|
62
|
+
}), () => {
|
|
63
|
+
var e;
|
|
64
|
+
let t = {};
|
|
65
|
+
for (let r = 0; r < (((e = n.columns) == null ? void 0 : e.length) ?? 0); r++) {
|
|
66
|
+
let e = n.columns[r];
|
|
67
|
+
t[e.prop] = ({ row: t, column: n, index: r, prop: a, required: o }) => {
|
|
68
|
+
var s;
|
|
69
|
+
return (s = i[e.prop]) == null ? void 0 : s.call(i, {
|
|
70
|
+
row: t,
|
|
71
|
+
column: n,
|
|
72
|
+
index: r,
|
|
73
|
+
prop: a,
|
|
74
|
+
required: o
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return k({ vNodes: m(c, g({ ref: "table" }, M.value, N.value, {
|
|
79
|
+
prop: n.prop,
|
|
80
|
+
disabled: j.value,
|
|
81
|
+
"on-row-db-click": D,
|
|
82
|
+
modelValue: x.value,
|
|
83
|
+
"onUpdate:modelValue": (e) => x.value = e,
|
|
84
|
+
placeholder: A.value,
|
|
85
|
+
onAddRow: O
|
|
86
|
+
}), {
|
|
87
|
+
...t,
|
|
88
|
+
columns: ({ columns: e }) => {
|
|
89
|
+
var t;
|
|
90
|
+
return (t = i.columns) == null ? void 0 : t.call(i, { columns: e });
|
|
91
|
+
},
|
|
92
|
+
handle: ({ add: e, remove: t }) => {
|
|
93
|
+
var n;
|
|
94
|
+
return (n = i.handle) == null ? void 0 : n.call(i, {
|
|
95
|
+
add: e,
|
|
96
|
+
remove: t
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
tag: ({ column: e, row: t, $index: n }) => {
|
|
100
|
+
var r;
|
|
101
|
+
return (r = i.tag) == null ? void 0 : r.call(i, {
|
|
102
|
+
column: e,
|
|
103
|
+
row: t,
|
|
104
|
+
index: n
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
"handle-column-header": ({ column: e, $index: t }) => {
|
|
108
|
+
var n;
|
|
109
|
+
return (n = i["handle-column-header"]) == null ? void 0 : n.call(i, {
|
|
110
|
+
column: e,
|
|
111
|
+
index: t
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
toolbar: () => {
|
|
115
|
+
var e;
|
|
116
|
+
return (e = i.toolbar) == null ? void 0 : e.call(i);
|
|
117
|
+
},
|
|
118
|
+
"toolbar-left": ({ addRow: e, delRow: t, refresh: n }) => {
|
|
119
|
+
var r;
|
|
120
|
+
return (r = i["toolbar-left"]) == null ? void 0 : r.call(i, {
|
|
121
|
+
addRow: e,
|
|
122
|
+
delRow: t,
|
|
123
|
+
refresh: n
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
"toolbar-left-append": ({ addRow: e, delRow: t, refresh: n }) => {
|
|
127
|
+
var r;
|
|
128
|
+
return (r = i["toolbar-left-append"]) == null ? void 0 : r.call(i, {
|
|
129
|
+
addRow: e,
|
|
130
|
+
delRow: t,
|
|
131
|
+
refresh: n
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
"toolbar-right": ({ selectedRows: e, removeSelectedRows: t }) => {
|
|
135
|
+
var n;
|
|
136
|
+
return (n = i["toolbar-right"]) == null ? void 0 : n.call(i, {
|
|
137
|
+
selectedRows: e,
|
|
138
|
+
removeSelectedRows: t
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}) });
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
//#endregion
|
|
146
|
+
export { b as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as t, r as n } from "./
|
|
3
|
-
import { n as r } from "./
|
|
1
|
+
import { f as e } from "./DcTVYqeJ.mjs";
|
|
2
|
+
import { o as t, r as n } from "./D_qiRmiE.mjs";
|
|
3
|
+
import { n as r } from "./CJdkjadi.mjs";
|
|
4
4
|
import { createVNode as i, mergeProps as a } from "vue";
|
|
5
5
|
import { ElText as o } from "element-plus/es";
|
|
6
6
|
//#region src/components/form/props/text.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n, t as r } from "./CJdkjadi.mjs";
|
|
3
3
|
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
4
|
import { ElTimePicker as o } from "element-plus/es";
|
|
5
5
|
//#region src/components/form/props/time.ts
|