asp-smart-ui-plus-test
Version:
A Component Library for Vue 3
51 lines (48 loc) • 1.89 kB
JavaScript
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList } from 'vue';
import tableColumn from './table-column.mjs';
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.mjs';
const _sfc_main = defineComponent({
__name: "table-column-parent",
props: {
col: {
type: Object,
default: () => ({})
}
},
emits: ["input"],
setup(__props, { emit }) {
const input = ({ index, row }) => {
emit("input", {
index,
row
});
};
return (_ctx, _cache) => {
const _component_table_column_parent = resolveComponent("table-column-parent", true);
const _component_asp_table_column = resolveComponent("asp-table-column");
return openBlock(), createBlock(_component_asp_table_column, {
label: __props.col.label,
"render-header": __props.col.renderHeader
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.col.children, (item, i) => {
return openBlock(), createElementBlock(Fragment, null, [
__props.col.isParent ? (openBlock(), createBlock(_component_table_column_parent, {
key: "parent" + i,
col: item,
onInput: input
}, null, 8, ["col"])) : (openBlock(), createBlock(tableColumn, {
key: "children" + i,
col: item,
onInput: input
}, null, 8, ["col"]))
], 64);
}), 256))
]),
_: 1
}, 8, ["label", "render-header"]);
};
}
});
var tableColumnParent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\code\\SmartUIPlus\\asp-packages\\components\\pc\\advanced\\table-list\\src\\table-column-parent.vue"]]);
export { tableColumnParent as default };