UNPKG

yanzhen-design-vue

Version:

57 lines (56 loc) 2.25 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); const antDesignVue = require("ant-design-vue"); require("../../../hooks/index.cjs"); const lodashEs = require("lodash-es"); const formula = require("./formula.cjs"); const index = require("../../../hooks/use-progress/index.cjs"); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: formula.formulaName }, __name: "formula", props: formula.formulaProps, setup(__props) { const { ns } = formula.formulaOptions; const props = __props; const { convertSuffix, showProgress } = index.useProgress(props); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass([vue.unref(ns).b()]) }, [ vue.unref(showProgress) ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Progress), { key: 0, percent: vue.unref(lodashEs.toNumber)(_ctx.value), "show-info": false, "stroke-color": "#1890ff", class: vue.normalizeClass([vue.unref(ns).e("progress")]) }, null, 8, ["percent", "class"])) : vue.createCommentVNode("", true), !_ctx.isDetail ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.InputNumber), { key: 1, size: _ctx.size, suffix: vue.unref(convertSuffix), value: _ctx.value, disabled: "", placeholder: "" }, vue.createSlots({ _: 2 }, [ vue.unref(convertSuffix) ? { name: "addonAfter", fn: vue.withCtx(() => [ vue.createTextVNode(vue.toDisplayString(vue.unref(convertSuffix)), 1) ]), key: "0" } : void 0 ]), 1032, ["size", "suffix", "value"])) : (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Tooltip), { key: 2 }, { title: vue.withCtx(() => [ vue.createTextVNode(vue.toDisplayString(_ctx.value), 1) ]), default: vue.withCtx(() => [ vue.createTextVNode(" " + vue.toDisplayString(_ctx.value), 1) ]), _: 1 })) ], 2); }; } }); exports.default = _sfc_main;