comic-plus
Version:
<p align="center"> <img width="200px" src="./logo.png"/> </p>
57 lines (56 loc) • 2.5 kB
JavaScript
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const item_props = require("./item.props.js");
const type = require("./type.js");
require("../../../utils/config.js");
const typescript = require("../../../utils/typescript.js");
require("@vueuse/core");
const _hoisted_1 = { class: "cu-timeline__axle" };
const _hoisted_2 = {
key: 0,
class: "cu-timeline__timestamp"
};
const _hoisted_3 = {
key: 1,
class: "cu-timeline__timestamp"
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...{
name: "CuTimelineItem"
},
__name: "item",
props: item_props.timelineItemProps,
setup(__props) {
const { props: injectProps } = vue.inject(type.TIMELINE_PROVIDE);
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("li", {
class: vue.normalizeClass(["cu-timeline-item", { "is-reverse": vue.unref(injectProps).cross && _ctx.reverse }])
}, [
vue.createElementVNode("div", _hoisted_1, [
vue.renderSlot(_ctx.$slots, "dot", {}, () => [
vue.unref(typescript.isVueComponent)(_ctx.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), {
key: 0,
style: vue.normalizeStyle({ color: _ctx.color })
}, null, 8, ["style"])) : (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass(["cu-timeline__dot", { fill: _ctx.fill }]),
style: vue.normalizeStyle({ "--cu-timeline-dotcolor": _ctx.color })
}, null, 6))
]),
vue.createElementVNode("div", {
class: vue.normalizeClass(["cu-timeline__line", { dashed: _ctx.dashedLine }])
}, null, 2)
]),
vue.createElementVNode("div", {
class: vue.normalizeClass(["cu-timeline__content", vue.unref(injectProps).timePosition])
}, [
vue.unref(injectProps).timePosition === "top" && _ctx.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, vue.toDisplayString(_ctx.time), 1)) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "default"),
vue.unref(injectProps).timePosition === "bottom" && _ctx.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, vue.toDisplayString(_ctx.time), 1)) : vue.createCommentVNode("", true)
], 2)
], 2);
};
}
});
exports.default = _sfc_main;