UNPKG

hongluan-ui

Version:
67 lines (62 loc) 2.54 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); require('../../../hooks/index.js'); var timelineItem = require('./timeline-item2.js'); var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js'); var index = require('../../../hooks/use-namespace/index.js'); const _sfc_main = vue.defineComponent({ name: "TimelineItem", props: timelineItem.timelineItemProps, setup(props) { const { namespace } = index.useNamespace("timeline-item"); const { hasIcon, props: parentProps } = vue.inject("timeline"); props.icon && (hasIcon.value = true); return { namespace, parentProps }; } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("li", { class: vue.normalizeClass([ _ctx.namespace, _ctx.dir ? _ctx.dir : "", _ctx.type ? _ctx.type : "", _ctx.active ? "is-active" : "" ]), style: vue.normalizeStyle([ _ctx.color ? "--timeline-icon-color:" + _ctx.color : "", _ctx.gap ? "--timeline-item-gap:" + _ctx.gap : "" ]) }, [ _ctx.parentProps.center || _ctx.$slots.label ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: "item-left" }, [ _ctx.$slots.label ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("div", { class: "item-center" }, [ vue.createElementVNode("div", { class: "dot-wrap" }, [ _ctx.$slots.icon && !_ctx.color && !_ctx.$slots.dot ? vue.renderSlot(_ctx.$slots, "icon", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("div", { key: 1, class: "icon-dot" })), _ctx.$slots.dot ? vue.renderSlot(_ctx.$slots, "dot", { key: 2 }) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("div", { class: "item-right" }, [ vue.createElementVNode("div", { class: "item-title" }, [ vue.renderSlot(_ctx.$slots, "default") ]), !_ctx.hideTimestamp ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: "item-time" }, vue.toDisplayString(_ctx.timestamp), 1)) : vue.createCommentVNode("v-if", true) ]) ], 6); } var TimelineItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]); exports["default"] = TimelineItem; //# sourceMappingURL=timeline-item.js.map