UNPKG

birdpaper-ui

Version:

一个通用的 vue3 UI组件库。A common vue3 UI component library.

54 lines (53 loc) 2.25 kB
import _sfc_main from "./table-cloumn.vue2.js"; import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, createBlock, withCtx, toDisplayString, createCommentVNode, renderSlot } from "vue"; import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js"; const _hoisted_1 = { class: "bp-table-td-content" }; const _hoisted_2 = { class: "text-ellipsis" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_bp_tooltip = resolveComponent("bp-tooltip"); return openBlock(), createElementBlock("td", { class: normalizeClass(_ctx.tdClass) }, [ createElementVNode("span", _hoisted_1, [ !_ctx.hasCustomCell ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ _ctx.tooltip ? (openBlock(), createBlock(_component_bp_tooltip, { key: 0, content: _ctx.record[_ctx.dataIndex] }, { default: withCtx(() => [ createElementVNode("span", _hoisted_2, toDisplayString(_ctx.record[_ctx.dataIndex]), 1) ]), _: 1 }, 8, ["content"])) : !_ctx.tooltip ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass([{ "text-ellipsis": _ctx.ellipsis }]) }, toDisplayString(_ctx.record[_ctx.dataIndex]), 3)) : createCommentVNode("", true) ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ _ctx.tooltip ? (openBlock(), createBlock(_component_bp_tooltip, { key: 0, content: _ctx.record[_ctx.dataIndex] }, { default: withCtx(() => [ createElementVNode("span", { class: normalizeClass([{ "text-ellipsis": _ctx.ellipsis }]) }, [ renderSlot(_ctx.$slots, "cell", { record: _ctx.record, rowIndex: _ctx.rowIndex }) ], 2) ]), _: 3 }, 8, ["content"])) : renderSlot(_ctx.$slots, "cell", { key: 1, record: _ctx.record, rowIndex: _ctx.rowIndex }) ], 64)) ]) ], 2); } const _tableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { _tableColumn as default };