UNPKG

yanzhen-design-vue

Version:

72 lines (71 loc) 2.74 kB
import { defineComponent, unref, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, createVNode, mergeProps, createSlots, withCtx, createTextVNode, toDisplayString } from "vue"; import { Progress, InputNumber, Input } from "ant-design-vue"; import "./input.vue.mjs"; import { inputNumberName, inputNumberProps, inputNumberEmits, inputNumberOptions } from "./input-number.mjs"; import { useInputNumber } from "./use-input-number.mjs"; import _sfc_main$1 from "./input.vue2.mjs"; const _sfc_main = /* @__PURE__ */ defineComponent({ ...{ name: inputNumberName }, __name: "input-number", props: inputNumberProps, emits: inputNumberEmits, setup(__props, { expose: __expose, emit: __emit }) { const { ns } = inputNumberOptions; const props = __props; const emit = __emit; const { _ref, propsRef, nativeRef, progressBarNum, showProgress, upperMoney } = useInputNumber( props, emit ); __expose({ ref: _ref }); return (_ctx, _cache) => { return unref(nativeRef) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([unref(ns).b()]) }, [ createElementVNode("div", { class: normalizeClass([unref(ns).e("input-wrapper")]) }, [ unref(showProgress) ? (openBlock(), createBlock(unref(Progress), { key: 0, percent: unref(progressBarNum), "show-info": false, "stroke-color": "#1890ff", class: normalizeClass([unref(ns).e("progress")]) }, null, 8, ["percent", "class"])) : createCommentVNode("", true), createVNode(unref(InputNumber), mergeProps({ ref_key: "_ref", ref: _ref }, unref(propsRef), { class: [unref(ns).e("input")] }), createSlots({ _: 2 }, [ unref(propsRef).suffix ? { name: "addonAfter", fn: withCtx(() => [ createTextVNode(toDisplayString(unref(propsRef).suffix), 1) ]), key: "0" } : void 0 ]), 1040, ["class"]) ], 2), props.showUppcase ? (openBlock(), createBlock(unref(Input), { key: 0, class: normalizeClass([unref(ns).e("input-money")]), disabled: true, placeholder: "大写金额", value: unref(upperMoney) }, null, 8, ["class", "value"])) : createCommentVNode("", true) ], 2)) : (openBlock(), createBlock(_sfc_main$1, mergeProps({ key: 1, ref_key: "_ref", ref: _ref, class: [unref(ns).b()] }, unref(propsRef)), null, 16, ["class"])); }; } }); export { _sfc_main as default };