UNPKG

ll-package

Version:

2 lines (1 loc) 984 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../@babel/runtime/helpers/esm/extends.js"),c=require("../../vc-util/devWarning.js"),f=require("./useSelection.js"),v=require("../../vc-table/constant.js"),C=require("../../_util/vnode.js");function u(i,t){const r=t.value;return i.map(l=>{var s;if(l===f.SELECTION_COLUMN||l===v.EXPAND_COLUMN)return l;const e=a.default({},l),{slots:o={}}=e;return e.__originColumn__=l,c.default(!("slots"in e),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(o).forEach(n=>{const d=o[n];e[n]===void 0&&r[d]&&(e[n]=r[d])}),t.value.headerCell&&!(!((s=l.slots)===null||s===void 0)&&s.title)&&(e.title=C.customRenderSlot(t.value,"headerCell",{title:l.title,column:l},()=>[l.title])),"children"in e&&Array.isArray(e.children)&&(e.children=u(e.children,t)),e})}function _(i){return[r=>u(r,i)]}exports.default=_;