UNPKG

yanzhen-design-vue

Version:

34 lines (33 loc) 1.43 kB
import { defineComponent, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, createElementBlock, Fragment, renderSlot, normalizeProps } from "vue"; import { Column } from "vxe-table"; import { useVxeTableColumn } from "./use-vxe-table-column.mjs"; import { vxeTableColumnName, vxeTableColumnProps, vxeTableColumnEmits } from "./vxe-table-column.mjs"; const _sfc_main = /* @__PURE__ */ defineComponent({ ...{ name: vxeTableColumnName }, __name: "vxe-table-column", props: vxeTableColumnProps, emits: vxeTableColumnEmits, setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; const { ctx: { type, $slots, vxeColumnProps }, methods: { isHiddenByRow } } = useVxeTableColumn(props, emit); return (_ctx, _cache) => { return openBlock(), createBlock(unref(Column), mergeProps({ type: unref(type) }, unref(vxeColumnProps), { style: { "height": "100%" } }), createSlots({ _: 2 }, [ renderList(Object.keys(unref($slots)), (name2) => { return { name: name2, fn: withCtx((record) => [ unref(isHiddenByRow)(record, name2) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [], 64)) : renderSlot(_ctx.$slots, name2, normalizeProps(mergeProps({ key: 1 }, record))) ]) }; }) ]), 1040, ["type"]); }; } }); export { _sfc_main as default };