wyfe-ivue 1.2.0 → 1.3.0
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/dist/InlineForm-CxTe6iO6.js +144 -0
- package/dist/RowForm-BQYbuUxJ.js +2621 -0
- package/dist/index-DFfMMYDR.js +3043 -0
- package/dist/index.es.js +4 -1242
- package/dist/index.umd.cjs +31 -2
- package/dist/types/index.d.ts +1258 -0
- package/dist/useFormHook-BeAhqlIU.js +13188 -0
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Y as W, $, Z as q } from "./index-DFfMMYDR.js";
|
|
2
|
+
import { Y as L, Z as D, _ as O, q as T, $ as Y, a0 as Z, a1 as z } from "./useFormHook-BeAhqlIU.js";
|
|
3
|
+
import { defineComponent as A, computed as H, onMounted as j, createElementBlock as k, openBlock as n, normalizeStyle as d, createVNode as i, createElementVNode as G, withModifiers as J, withCtx as c, Fragment as X, renderList as x, unref as t, createBlock as s, createCommentVNode as f, withKeys as u, renderSlot as ee, createTextVNode as b, nextTick as oe } from "vue";
|
|
4
|
+
const le = { class: "btnWrapper" }, ae = /* @__PURE__ */ A({
|
|
5
|
+
__name: "InlineForm",
|
|
6
|
+
props: W,
|
|
7
|
+
emits: ["onQuery"],
|
|
8
|
+
setup(_, { expose: V, emit: P }) {
|
|
9
|
+
const p = _, m = P, w = H(
|
|
10
|
+
() => p.showBorberBottom ? "1px solid var(--el-border-color)" : ""
|
|
11
|
+
);
|
|
12
|
+
j(() => {
|
|
13
|
+
document.querySelectorAll(".el-select__input").forEach((o) => {
|
|
14
|
+
o.addEventListener(
|
|
15
|
+
"keydown",
|
|
16
|
+
(a) => {
|
|
17
|
+
a.key === "Enter" && a.stopImmediatePropagation();
|
|
18
|
+
},
|
|
19
|
+
!0
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const {
|
|
24
|
+
efRef: C,
|
|
25
|
+
cascaderRef: g,
|
|
26
|
+
formColumnsComputed: E,
|
|
27
|
+
selectOptions: M,
|
|
28
|
+
cascaderOptions: v,
|
|
29
|
+
dateFormatComputed: h,
|
|
30
|
+
transformFieldProps: I,
|
|
31
|
+
handleCascaderChange: B
|
|
32
|
+
} = L(p), r = async () => {
|
|
33
|
+
await oe(), m("onQuery", I(p.formColumns, p.formModel));
|
|
34
|
+
}, F = () => {
|
|
35
|
+
m("onQuery", {});
|
|
36
|
+
};
|
|
37
|
+
return V({ efRef: C, cascaderRef: g }), (o, a) => {
|
|
38
|
+
const U = T, S = Y, R = Z, K = z, N = O, Q = D, y = $;
|
|
39
|
+
return n(), k("div", {
|
|
40
|
+
class: "inline-form",
|
|
41
|
+
style: d({ borderBottom: w.value })
|
|
42
|
+
}, [
|
|
43
|
+
i(Q, {
|
|
44
|
+
ref_key: "efRef",
|
|
45
|
+
ref: C,
|
|
46
|
+
inline: "",
|
|
47
|
+
model: o.formModel,
|
|
48
|
+
"label-suffix": o.labelSuffix,
|
|
49
|
+
onSubmit: a[0] || (a[0] = J(() => {
|
|
50
|
+
}, ["prevent"]))
|
|
51
|
+
}, {
|
|
52
|
+
default: c(() => [
|
|
53
|
+
(n(!0), k(X, null, x(t(E), (e) => (n(), s(N, {
|
|
54
|
+
key: e.label,
|
|
55
|
+
label: e.label
|
|
56
|
+
}, {
|
|
57
|
+
default: c(() => [
|
|
58
|
+
e.inputConfig ? (n(), s(U, {
|
|
59
|
+
key: 0,
|
|
60
|
+
modelValue: o.formModel[e.prop],
|
|
61
|
+
"onUpdate:modelValue": (l) => o.formModel[e.prop] = l,
|
|
62
|
+
placeholder: e.inputConfig.placeholder || "请输入",
|
|
63
|
+
maxlength: e.inputConfig.maxlength || "",
|
|
64
|
+
"show-word-limit": !!e.inputConfig.maxlength,
|
|
65
|
+
style: d({ width: e.inputConfig.width || o.formItemWidth }),
|
|
66
|
+
clearable: e.inputConfig.clearable ?? !0,
|
|
67
|
+
onClear: r,
|
|
68
|
+
onKeyup: u(r, ["enter"])
|
|
69
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "style", "clearable"])) : f("", !0),
|
|
70
|
+
e.selectConfig ? (n(), s(S, {
|
|
71
|
+
key: 1,
|
|
72
|
+
modelValue: o.formModel[e.prop],
|
|
73
|
+
"onUpdate:modelValue": (l) => o.formModel[e.prop] = l,
|
|
74
|
+
options: t(M)(e),
|
|
75
|
+
props: e.selectConfig?.props || o.dictProps,
|
|
76
|
+
style: d({ width: e.selectConfig.width || o.formItemWidth }),
|
|
77
|
+
clearable: e.selectConfig.clearable ?? !0,
|
|
78
|
+
onClear: r,
|
|
79
|
+
onKeyup: u(r, ["enter"])
|
|
80
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "style", "clearable"])) : f("", !0),
|
|
81
|
+
e.cascaderConfig ? (n(), s(R, {
|
|
82
|
+
key: 2,
|
|
83
|
+
ref_for: !0,
|
|
84
|
+
ref_key: "cascaderRef",
|
|
85
|
+
ref: g,
|
|
86
|
+
modelValue: o.formModel[e.prop],
|
|
87
|
+
"onUpdate:modelValue": (l) => o.formModel[e.prop] = l,
|
|
88
|
+
options: t(v)(e),
|
|
89
|
+
props: e.cascaderConfig?.props || {},
|
|
90
|
+
style: d({ width: e.cascaderConfig.width || o.formItemWidth }),
|
|
91
|
+
clearable: e.cascaderConfig.clearable ?? !0,
|
|
92
|
+
onChange: (l) => t(B)(l, e),
|
|
93
|
+
onClear: r
|
|
94
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "style", "clearable", "onChange"])) : f("", !0),
|
|
95
|
+
e.datePickerConfig ? (n(), s(K, {
|
|
96
|
+
key: 3,
|
|
97
|
+
modelValue: o.formModel[e.prop],
|
|
98
|
+
"onUpdate:modelValue": (l) => o.formModel[e.prop] = l,
|
|
99
|
+
type: e.datePickerConfig.type || "date",
|
|
100
|
+
"range-separator": e.datePickerConfig.rangeSeparator || "至",
|
|
101
|
+
"start-placeholder": e.datePickerConfig.startPlaceholder || "开始日期",
|
|
102
|
+
"end-placeholder": e.datePickerConfig.endPlaceholder || "结束日期",
|
|
103
|
+
format: t(h)(e.datePickerConfig),
|
|
104
|
+
"value-format": t(h)(e.datePickerConfig),
|
|
105
|
+
clearable: e.datePickerConfig.clearable ?? !0,
|
|
106
|
+
"disabled-date": e.datePickerConfig.disabledDate,
|
|
107
|
+
placeholder: e.datePickerConfig.placeholder || "请选择",
|
|
108
|
+
style: d({ width: e.datePickerConfig.width ?? "100%" }),
|
|
109
|
+
onCalendarChange: e.datePickerConfig.onCalendarChange,
|
|
110
|
+
onClear: (l) => e.datePickerConfig?.onClear?.() || r,
|
|
111
|
+
onKeyup: u(r, ["enter"])
|
|
112
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "range-separator", "start-placeholder", "end-placeholder", "format", "value-format", "clearable", "disabled-date", "placeholder", "style", "onCalendarChange", "onClear"])) : f("", !0)
|
|
113
|
+
]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, 1032, ["label"]))), 128))
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["model", "label-suffix"]),
|
|
119
|
+
G("div", le, [
|
|
120
|
+
i(y, {
|
|
121
|
+
type: "primary",
|
|
122
|
+
loading: o.queryLoading,
|
|
123
|
+
onClick: r
|
|
124
|
+
}, {
|
|
125
|
+
default: c(() => [...a[1] || (a[1] = [
|
|
126
|
+
b(" 查询 ", -1)
|
|
127
|
+
])]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["loading"]),
|
|
130
|
+
i(y, { onClick: F }, {
|
|
131
|
+
default: c(() => [...a[2] || (a[2] = [
|
|
132
|
+
b("重置", -1)
|
|
133
|
+
])]),
|
|
134
|
+
_: 1
|
|
135
|
+
}),
|
|
136
|
+
ee(o.$slots, "formRight", {}, void 0, !0)
|
|
137
|
+
])
|
|
138
|
+
], 4);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}), de = /* @__PURE__ */ q(ae, [["__scopeId", "data-v-9920d7ae"]]);
|
|
142
|
+
export {
|
|
143
|
+
de as default
|
|
144
|
+
};
|