UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

61 lines (60 loc) 2.02 kB
"use strict"; const vue = require("vue"); const props = require("./props"); const _sfc_main = vue.defineComponent({ name: "EleDashboard", props: props.dashboardProps, setup(props2) { const rootStyle = vue.computed(() => { const style = {}; if (props2.size != null) { if (typeof props2.size === "number") { style.width = `${props2.size}px`; style.height = `${props2.size}px`; } else { style.width = props2.size; style.height = props2.size; } } if (props2.space != null) { style["--ele-dashboard-space"] = typeof props2.space === "number" ? `${props2.space}px` : props2.space; } if (props2.color) { style["--ele-dashboard-color"] = props2.color; } return style; }); return { rootStyle }; } }); const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; const _hoisted_1 = { class: "ele-dashboard-inner" }; const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "ele-dashboard-outer" }, [ /* @__PURE__ */ vue.createElementVNode("div", { class: "ele-dashboard-bg" }), /* @__PURE__ */ vue.createElementVNode("div", { class: "ele-dashboard-bg" }), /* @__PURE__ */ vue.createElementVNode("div", { class: "ele-dashboard-bg" }) ], -1); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass([ "ele-dashboard", { "is-success": _ctx.type === "success" }, { "is-warning": _ctx.type === "warning" }, { "is-danger": _ctx.type === "danger" } ]), style: vue.normalizeStyle(_ctx.rootStyle) }, [ vue.createElementVNode("div", _hoisted_1, [ vue.renderSlot(_ctx.$slots, "default") ]), _hoisted_2 ], 6); } const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); module.exports = index;