Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 8x 8x 6x 6x 8x 8x 6x 6x | <script>
function getItem(props, option) {
return option.scopedSlots ?
option.scopedSlots({
data: props.data,
index: props.index,
active: props.active,
matchedMedia: props.matchedMedia
}) :
props.data[option.name]
}
function isEmpty(item) {
return Array.isArray(item) ? item.every(isEmpty) : item.isComment
}
export default {
name: 'tb-row-hidden',
functional: true,
props: {
data: {
type: Object,
required: true
},
hiddenOptions: {
type: Array,
required: true
},
index: {
type: Number,
required: true
},
active: {
type: Boolean,
default: false
},
matchedMedia: Array,
},
render(h, ctx) {
const { props } = ctx
const items = props.hiddenOptions
.map( option => getItem(props, option) )
.filter( item => ! isEmpty(item) )
return h('ul', { staticClass: 'int-table__hidden-items' }, items.map( (item, i) => {
return h('li', { staticClass: 'int-table__hidden-item', key: i }, item)
})
)
}
}
</script> |