line_push/node_modules/vuetify/lib/components/VDataTable/VSimpleTable.js
2022-07-21 03:28:35 +00:00

43 lines
1.1 KiB
JavaScript

import "../../../src/components/VDataTable/VSimpleTable.sass";
import { convertToUnit } from '../../util/helpers';
import Themeable from '../../mixins/themeable';
import mixins from '../../util/mixins';
export default mixins(Themeable).extend({
name: 'v-simple-table',
props: {
dense: Boolean,
fixedHeader: Boolean,
height: [Number, String]
},
computed: {
classes() {
return {
'v-data-table--dense': this.dense,
'v-data-table--fixed-height': !!this.height && !this.fixedHeader,
'v-data-table--fixed-header': this.fixedHeader,
...this.themeClasses
};
}
},
methods: {
genWrapper() {
return this.$slots.wrapper || this.$createElement('div', {
staticClass: 'v-data-table__wrapper',
style: {
height: convertToUnit(this.height)
}
}, [this.$createElement('table', this.$slots.default)]);
}
},
render(h) {
return h('div', {
staticClass: 'v-data-table',
class: this.classes
}, [this.$slots.top, this.genWrapper(), this.$slots.bottom]);
}
});
//# sourceMappingURL=VSimpleTable.js.map