vue-material/src/components/mdTable/mdTableCell.vue

32 lines
548 B
Vue
Raw Normal View History

2016-10-27 05:52:58 +00:00
<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
}),
2016-10-27 05:52:58 +00:00
computed: {
classes() {
return {
'md-numeric': this.mdNumeric,
'md-has-action': this.hasAction
2016-10-27 05:52:58 +00:00
};
}
},
mounted() {
if (this.$children.length > 0) {
this.hasAction = true;
}
2016-10-27 05:52:58 +00:00
}
};
</script>