@pit-front-end/components
Version:
湖南创智艾泰克科技有限公司
40 lines (39 loc) • 1.32 kB
JavaScript
import { defineComponent as m, resolveComponent as p, createBlock as a, openBlock as d, unref as c, isRef as f } from "vue";
import { inputNumberEmits as h, inputNumberProps as b } from "./input-number.js";
import { useInputNumber as _ } from "./use-input-number.js";
const x = /* @__PURE__ */ m({
name: "PitInputNumber",
inheritAttrs: !1,
__name: "input-number",
props: b,
emits: h,
setup(l, { emit: i }) {
const n = l, { modelValue: o } = _(n), t = {
handleInput(e) {
e ? i("input", e) : (o.value = n.min, i("input", n.min));
},
handleChange(e) {
e ? i("change", e) : (o.value = n.min, i("change", n.min));
}
};
return (e, s) => {
const r = p("el-input-number");
return d(), a(r, {
modelValue: c(o),
"onUpdate:modelValue": s[0] || (s[0] = (u) => f(o) ? o.value = u : null),
disabled: n.disabled,
size: n.size,
min: n.min,
max: n.max,
readonly: n.readonly,
precision: n.precision,
"controls-position": n.controlsPosition,
onInput: t.handleInput,
onChange: t.handleChange
}, null, 8, ["modelValue", "disabled", "size", "min", "max", "readonly", "precision", "controls-position", "onInput", "onChange"]);
};
}
});
export {
x as default
};