pull/4377/head
Tuğçe Küçükoğlu 2023-09-01 11:54:34 +03:00
parent 50da6cf0ea
commit 16fdf8fb17
4 changed files with 10 additions and 20 deletions

View File

@ -470,7 +470,7 @@ export default {
self, self,
globalPT, globalPT,
key !== 'transition' && { key !== 'transition' && {
...(key === 'root' && this.$.type.name === this.$options.hostName && { [`${datasetPrefix}name`]: ObjectUtils.toFlatCase(this.$.type.name) }), ...(key === 'root' && { [`${datasetPrefix}name`]: ObjectUtils.toFlatCase(this.$.type.name) }),
[`${datasetPrefix}section`]: ObjectUtils.toFlatCase(key) [`${datasetPrefix}section`]: ObjectUtils.toFlatCase(key)
} }
); );

View File

@ -10,7 +10,7 @@
role="row" role="row"
v-bind="ptm('rowGroupHeader')" v-bind="ptm('rowGroupHeader')"
> >
<td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }" data-pc-section="bodycell"> <td :colspan="columnsLength - 1" v-bind="ptm('rowGroupHeaderCell')">
<button v-if="expandableRowGroups" :class="cx('rowGroupToggler')" @click="onRowGroupToggle($event, rowData)" type="button" v-bind="ptm('rowGroupToggler')"> <button v-if="expandableRowGroups" :class="cx('rowGroupToggler')" @click="onRowGroupToggle($event, rowData)" type="button" v-bind="ptm('rowGroupToggler')">
<component v-if="templates['rowgrouptogglericon']" :is="templates['rowgrouptogglericon']" :expanded="isRowGroupExpanded(rowData)" /> <component v-if="templates['rowgrouptogglericon']" :is="templates['rowgrouptogglericon']" :expanded="isRowGroupExpanded(rowData)" />
<template v-else> <template v-else>
@ -91,7 +91,7 @@
role="row" role="row"
v-bind="ptm('rowExpansion')" v-bind="ptm('rowExpansion')"
> >
<td :colspan="columnsLength" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }"> <td :colspan="columnsLength" v-bind="ptm('rowExpansionCell')">
<component :is="templates['expansion']" :data="rowData" :index="getRowIndex(index)" /> <component :is="templates['expansion']" :data="rowData" :index="getRowIndex(index)" />
</td> </td>
</tr> </tr>
@ -102,14 +102,14 @@
role="row" role="row"
v-bind="ptm('rowGroupFooter')" v-bind="ptm('rowGroupFooter')"
> >
<td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('footerCell') }" data-pc-section="footercell"> <td :colspan="columnsLength - 1" v-bind="ptm('rowGroupFooterCell')">
<component :is="templates['groupfooter']" :data="rowData" :index="getRowIndex(index)" /> <component :is="templates['groupfooter']" :data="rowData" :index="getRowIndex(index)" />
</td> </td>
</tr> </tr>
</template> </template>
</template> </template>
<tr v-else :class="cx('emptyMessage')" role="row" v-bind="ptm('emptyMessage')"> <tr v-else :class="cx('emptyMessage')" role="row" v-bind="ptm('emptyMessage')">
<td :colspan="columnsLength" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }"> <td :colspan="columnsLength" v-bind="ptm('emptyMessageCell')">
<component v-if="templates.empty" :is="templates.empty" /> <component v-if="templates.empty" :is="templates.empty" />
</td> </td>
</tr> </tr>
@ -121,7 +121,6 @@ import BaseComponent from 'primevue/basecomponent';
import ChevronDownIcon from 'primevue/icons/chevrondown'; import ChevronDownIcon from 'primevue/icons/chevrondown';
import ChevronRightIcon from 'primevue/icons/chevronright'; import ChevronRightIcon from 'primevue/icons/chevronright';
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils'; import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
import { mergeProps } from 'vue';
import BodyCell from './BodyCell.vue'; import BodyCell from './BodyCell.vue';
export default { export default {
@ -307,16 +306,6 @@ export default {
columnProp(col, prop) { columnProp(col, prop) {
return ObjectUtils.getVNodeProp(col, prop); return ObjectUtils.getVNodeProp(col, prop);
}, },
getColumnPT(key) {
const columnMetaData = {
parent: {
props: this.$props,
state: this.$data
}
};
return mergeProps(this.ptm(`column.${key}`, { column: columnMetaData }), this.ptm(`column.${key}`, columnMetaData), this.ptmo(this.getColumnProp({}), key, columnMetaData));
},
getColumnProp(column) { getColumnProp(column) {
return column.props && column.props.pt ? column.props.pt : undefined; //@todo return column.props && column.props.pt ? column.props.pt : undefined; //@todo
}, },

View File

@ -8,14 +8,15 @@
<Column field="name" header="Name"></Column> <Column field="name" header="Name"></Column>
<Column field="category" header="Category"></Column> <Column field="category" header="Category"></Column>
<Column field="quantity" header="Quantity"></Column> <Column field="quantity" header="Quantity"></Column>
<template #empty>
<p>Empty DataTable</p>
</template>
</DataTable> </DataTable>
</div> </div>
<DocSectionCode :code="code" :service="['ProductService']" /> <DocSectionCode :code="code" :service="['ProductService']" />
</template> </template>
<script> <script>
import { ProductService } from '@/service/ProductService';
export default { export default {
data() { data() {
return { return {
@ -93,7 +94,7 @@ const products = ref();
}; };
}, },
mounted() { mounted() {
ProductService.getProductsMini().then((data) => (this.products = data)); // ProductService.getProductsMini().then((data) => (this.products = data));
} }
}; };
</script> </script>

View File

@ -39,7 +39,7 @@ const CustomTailwind = usePassThrough(
}, },
{ {
mergeSections: true, mergeSections: true,
useMergeProps: false mergeProps: false
} }
); );