UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

51 lines (50 loc) 1.43 kB
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createCommentVNode, normalizeStyle } from "vue"; const _sfc_main = defineComponent({ name: "CardItem", props: { /** 数据 */ item: Object, /** 是否选中 */ checked: Boolean, /** 是否禁用 */ disabled: Boolean, /** 是否显示边框 */ bordered: Boolean, /** 是否需要选中箭头 */ arrow: Boolean, /** 选中箭头样式 */ arrowStyle: Object } }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { class: normalizeClass([ "ele-check-card", { "is-bordered": _ctx.bordered }, { "is-checked": _ctx.checked }, { "is-disabled": _ctx.disabled } ]) }, [ renderSlot(_ctx.$slots, "default", { item: _ctx.item, checked: _ctx.checked, disabled: _ctx.disabled }), _ctx.arrow ? (openBlock(), createElementBlock("div", { key: 0, class: "ele-check-card-arrow", style: normalizeStyle(_ctx.arrowStyle) }, null, 4)) : createCommentVNode("", true) ], 2); } const cardItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { cardItem as default };