Refactor #3924 - For TreeTable

This commit is contained in:
Tuğçe Küçükoğlu 2023-05-11 11:11:49 +03:00
parent 6b9c617700
commit f541096d33
9 changed files with 284 additions and 38 deletions

View file

@ -1,15 +1,17 @@
<template>
<td :style="containerStyle" :class="containerClass">
<td :style="containerStyle" :class="containerClass" role="cell" v-bind="{ ...getColumnPTOptions('root'), ...getColumnPTOptions('footerCell') }">
<component v-if="column.children && column.children.footer" :is="column.children.footer" :column="column" />
{{ columnProp('footer') }}
</td>
</template>
<script>
import BaseComponent from 'primevue/basecomponent';
import { DomHandler, ObjectUtils } from 'primevue/utils';
export default {
name: 'FooterCell',
extends: BaseComponent,
props: {
column: {
type: Object,
@ -35,6 +37,18 @@ export default {
columnProp(prop) {
return ObjectUtils.getVNodeProp(this.column, prop);
},
getColumnPTOptions(key) {
return this.ptmo(this.getColumnProp(), key, {
props: this.column.props,
parent: {
props: this.$props,
state: this.$data
}
});
},
getColumnProp() {
return this.column.props && this.column.props.pt ? this.column.props.pt : undefined;
},
updateStickyPosition() {
if (this.columnProp('frozen')) {
let align = this.columnProp('alignFrozen');