vue-material/src/components/mdTable/mdTableCell.vue
2016-11-23 04:21:40 -02:00

31 lines
548 B
Vue

<template>
<td class="md-table-cell" :class="classes">
<div class="md-table-cell-container">
<slot></slot>
</div>
</td>
</template>
<script>
export default {
props: {
mdNumeric: Boolean
},
data: () => ({
hasAction: false
}),
computed: {
classes() {
return {
'md-numeric': this.mdNumeric,
'md-has-action': this.hasAction
};
}
},
mounted() {
if (this.$children.length > 0) {
this.hasAction = true;
}
}
};
</script>