hongluan-business-ui
Version:
Hongluan Business Component Library for Vue 3
83 lines (78 loc) • 2.37 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var hongluanUi = require('hongluan-ui');
var util = require('../../../utils/util.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
const _sfc_main = vue.defineComponent({
name: "DataCollect",
components: {
HlGroup: hongluanUi.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 } = util.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 = vue.resolveComponent("hl-group");
return vue.openBlock(), vue.createBlock(_component_hl_group, {
class: vue.normalizeClass([
_ctx.prefix + "-data-collect"
]),
style: vue.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: vue.withCtx(() => [
_ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 0 }) : vue.createCommentVNode("v-if", true),
_ctx.title || _ctx.subTitle ? (vue.openBlock(), vue.createBlock(_component_hl_group, {
key: 1,
dir: "vertical"
}, {
default: vue.withCtx(() => [
vue.createElementVNode("h2", _hoisted_1, vue.toDisplayString(_ctx.title), 1),
vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(_ctx.subTitle), 1)
]),
_: 1
})) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
]),
_: 3
}, 8, ["class", "style"]);
}
var DataCollect = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
exports["default"] = DataCollect;
//# sourceMappingURL=index.js.map