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ED,aAAO,CAAC,CAAC,IAAD,EAAO;AACb,QAAA,KAAK,iBAAU,MAAM,CAAC,KAAP,IAAgB,OAA1B;AADQ,OAAP,EAEL,QAFK,CAAR;AAGD,KAnBwB,CAAzB;AAqBA,WAAO,CAAC,CAAC,IAAD,EAAO,IAAP,EAAa,OAAb,CAAR;AACD;AApCuB,CAAX,C","sourcesContent":["// Types\nimport Vue, { VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\nimport { TableHeader } from './mixins/header'\n\n// Utils\nimport { getObjectValueByPath } from '../../util/helpers'\n\nexport default Vue.extend({\n name: 'row',\n\n functional: true,\n\n props: {\n headers: Array as PropValidator<TableHeader[]>,\n item: Object,\n rtl: Boolean,\n },\n\n render (h, { props, slots, data }): VNode {\n const computedSlots = slots()\n\n const columns: VNode[] = props.headers.map((header: TableHeader) => {\n const children = []\n const value = getObjectValueByPath(props.item, header.value)\n\n const slotName = header.value\n const scopedSlot = data.scopedSlots && data.scopedSlots[slotName]\n const regularSlot = computedSlots[slotName]\n\n if (scopedSlot) {\n children.push(scopedSlot({ item: props.item, header, value }))\n } else if (regularSlot) {\n children.push(regularSlot)\n } else {\n children.push(value)\n }\n\n return h('td', {\n class: `text-${header.align || 'start'}`,\n }, children)\n })\n\n return h('tr', data, columns)\n },\n})\n"],"sourceRoot":"","file":"Row.js"} |