@wetspace/pro-components
Version:
::: tip 基本介绍
49 lines (48 loc) • 1.59 kB
JavaScript
import { defineComponent as c, computed as u, openBlock as e, createBlock as o, unref as t, normalizeProps as p, guardReactiveProps as s, withCtx as f, mergeProps as i } from "vue";
import "../../delete-button/index.mjs";
import "../../count-down-button/index.mjs";
import "../../ellipsis/index.mjs";
import { WetDigitRange as d } from "../index.mjs";
import { WetProFormItem as h } from "../../pro-form/index.mjs";
import "../../pro-table/index.mjs";
import "../../pro-descriptions/index.mjs";
import "../../pro-list/index.mjs";
import "../../layout/index.mjs";
import "../../page/index.mjs";
import "../../guide/index.mjs";
import "../../notice-menu/index.mjs";
import "../../state/index.mjs";
import { ElInputNumber as P } from "element-plus";
import { wetProFormItemProps as _ } from "../../pro-form/src/types.mjs";
const O = /* @__PURE__ */ c({
name: "WetFormNumber",
__name: "number",
props: {
..._,
placeholder: String,
formInputProps: {
type: Object
}
},
setup(a) {
const r = a, m = u(() => r.placeholder ? r.placeholder : `请输入${r.label}`);
return (b, g) => (e(), o(t(h), p(s(r)), {
default: f(({ inputProps: l }) => {
var n;
return [
((n = r.formInputProps) == null ? void 0 : n.type) === "numberrange" ? (e(), o(t(d), p(i({ key: 0 }, {
placeholder: m.value,
...l
})), null, 16)) : (e(), o(t(P), p(i({ key: 1 }, {
...l,
placeholder: m.value
})), null, 16))
];
}),
_: 1
}, 16));
}
});
export {
O as default
};