UNPKG

hongluan-business-ui

Version:
79 lines (76 loc) 2.33 kB
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, renderSlot, createCommentVNode, createElementVNode, toDisplayString } from 'vue'; import { HlGroup } from 'hongluan-ui'; import { usePrefix } from '../../../utils/util.mjs'; import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs'; const _sfc_main = defineComponent({ name: "DataCollect", components: { HlGroup }, props: { title: { type: String, default: "" }, subTitle: { type: String, default: "" }, padding: { type: String, default: "" }, paddingX: { type: String, default: "" }, paddingY: { type: String, default: "" }, radius: { type: String, default: "" } }, setup() { const { prefix } = usePrefix(); return { prefix }; } }); const _hoisted_1 = { class: "title" }; const _hoisted_2 = { class: "sub-title" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_hl_group = resolveComponent("hl-group"); return openBlock(), createBlock(_component_hl_group, { class: normalizeClass([ _ctx.prefix + "-data-collect" ]), style: normalizeStyle([ _ctx.padding ? `--data-collect-padding: ${_ctx.padding}` : "", _ctx.paddingX ? `--data-collect-padding-x: ${_ctx.paddingX}` : "", _ctx.paddingY ? `--data-collect-padding-y: ${_ctx.paddingY}` : "", _ctx.radius ? `--data-collect-radius: ${_ctx.radius}` : "" ]) }, { default: withCtx(() => [ _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : createCommentVNode("v-if", true), _ctx.title || _ctx.subTitle ? (openBlock(), createBlock(_component_hl_group, { key: 1, dir: "vertical" }, { default: withCtx(() => [ createElementVNode("h2", _hoisted_1, toDisplayString(_ctx.title), 1), createElementVNode("span", _hoisted_2, toDisplayString(_ctx.subTitle), 1) ]), _: 1 })) : renderSlot(_ctx.$slots, "default", { key: 2 }) ]), _: 3 }, 8, ["class", "style"]); } var DataCollect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { DataCollect as default }; //# sourceMappingURL=index.mjs.map