UNPKG

@zhsz/cool-design-dv

Version:

28 lines (27 loc) 884 B
import { defineComponent, openBlock, createElementBlock, Fragment, renderList, unref } from "vue"; import { uid } from "../../utils/util.mjs"; const _hoisted_1 = ["name", "width"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "ColGroup", props: { columns: Array, defaultWidth: Number }, setup(__props) { const _uid = uid(); return (_ctx, _cache) => { return openBlock(), createElementBlock("colgroup", null, [ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col, index) => { return openBlock(), createElementBlock("col", { key: `list_${unref(_uid)}_col_${index}`, name: `my-dv-list_col_${index}`, width: col.width || __props.defaultWidth }, null, 8, _hoisted_1); }), 128)) ]); }; } }); export { _sfc_main as default };