mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-13 09:43:15 +00:00
31 lines
548 B
Vue
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>
|