UNPKG

yanzhen-design-vue

Version:

58 lines (57 loc) 2.41 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 progressTxt = require("./progress-txt.cjs"); const index = require("../../../hooks/use-progress/index.cjs"); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: progressTxt.progressTxtName }, __name: "progress-txt", props: progressTxt.progressTxtProps, setup(__props) { const { ns } = progressTxt.progressTxtOptions; const props = __props; const { progressBarNum, showProgress } = index.useProgress(props); return (_ctx, _cache) => { return !props.showTooltip ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: vue.normalizeClass([vue.unref(ns).b()]) }, [ vue.unref(showProgress) ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Progress), { key: 0, percent: vue.unref(progressBarNum), "show-info": false, "stroke-color": "#1890ff", class: vue.normalizeClass([vue.unref(ns).e("progress")]) }, null, 8, ["percent", "class"])) : vue.createCommentVNode("", true), vue.createElementVNode("span", { class: vue.normalizeClass([vue.unref(ns).e("text")]) }, vue.toDisplayString(_ctx.value), 3) ], 2)) : (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Tooltip), { key: 1, title: _ctx.value, placement: "top" }, { default: vue.withCtx(() => [ vue.createElementVNode("div", { class: vue.normalizeClass([vue.unref(ns).b()]) }, [ vue.unref(showProgress) ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Progress), { key: 0, percent: vue.unref(progressBarNum), "show-info": false, "stroke-color": "#1890ff", class: vue.normalizeClass([vue.unref(ns).e("progress")]) }, null, 8, ["percent", "class"])) : vue.createCommentVNode("", true), vue.createElementVNode("span", { class: vue.normalizeClass([vue.unref(ns).e("text")]) }, vue.toDisplayString(props.value), 3) ], 2) ]), _: 1 }, 8, ["title"])); }; } }); exports.default = _sfc_main;