@vuesax-alpha/nightly
Version:
A Component Library for Vue 3
44 lines (41 loc) • 1.28 kB
JavaScript
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from 'vue';
import '../../../hooks/index.mjs';
import { tableTdProps, tableTdEmits } from './td.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
const __default__ = defineComponent({
name: "VsTd"
});
const _sfc_main = defineComponent({
...__default__,
props: tableTdProps,
emits: tableTdEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("table");
const tdKls = computed(() => [
ns.b("td"),
ns.is("has-checkbox", props.checkbox),
ns.is("edit", props.edit)
]);
const onClick = (e) => {
emit("click", e);
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock(
"td",
{
class: normalizeClass(tdKls.value),
onClick
},
[
renderSlot(_ctx.$slots, "default")
],
2
);
};
}
});
var Td = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/vuesax-alpha/vuesax-alpha/packages/components/table/src/td.vue"]]);
export { Td as default };
//# sourceMappingURL=td2.mjs.map