UNPKG

comic-plus

Version:

<p align="center"> <img width="200px" src="./logo.png"/> </p>

79 lines (78 loc) 3.15 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); require("../../../icons/index.js"); require("../style/tag.css"); const complex_props = require("./complex.props.js"); const components = require("../../../icons/components/components.js"); const _hoisted_1 = { class: "cu-tag-content" }; const _hoisted_2 = { class: "cu-tag-content" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: "CuTagComplex" }, __name: "complex", props: complex_props.tagComplexProps, emits: complex_props.tagComplexEmits, setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; function handleClose() { emit("close"); } const handleVNodeMounted = (vnode) => { vnode.component.subTree.component.bum = null; }; return (_ctx, _cache) => { return !_ctx.transition ? (vue.openBlock(), vue.createElementBlock("span", { key: 0, class: vue.normalizeClass(["cu-tag-complex", [_ctx.type ? "cu-tag--" + _ctx.type : void 0, { "is-round": _ctx.round }]]), style: vue.normalizeStyle({ "--tag-size": _ctx.size + "px", borderColor: props.color }) }, [ vue.createElementVNode("span", _hoisted_1, [ vue.renderSlot(_ctx.$slots, "default") ]), vue.createElementVNode("span", { class: "complex-content", style: vue.normalizeStyle({ background: props.color }) }, [ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1), _ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(components.CloseOne), { key: 0, class: "closeicon", onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close")) })) : vue.createCommentVNode("", true) ], 4) ], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, { key: 1, name: "cu-zoom-x", appear: "", onVnodeMounted: handleVNodeMounted }, { default: vue.withCtx(() => [ vue.createElementVNode("span", { class: vue.normalizeClass(["cu-tag-complex", [_ctx.type ? "cu-tag--" + _ctx.type : void 0, { "is-round": _ctx.round }]]), style: vue.normalizeStyle({ "--tag-size": _ctx.size + "px", borderColor: props.color }) }, [ vue.createElementVNode("span", _hoisted_2, [ vue.renderSlot(_ctx.$slots, "default") ]), vue.createElementVNode("span", { class: "complex-content", style: vue.normalizeStyle({ background: props.color }) }, [ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1), _ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(components.CloseOne), { key: 0, class: "closeicon", onClick: handleClose })) : vue.createCommentVNode("", true) ], 4) ], 6) ]), _: 3 }, 512)); }; } }); exports.default = _sfc_main;