2023-06-05 07:34:19 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import TreeTableStyle from 'primevue/treetable/style';
|
2023-06-05 07:34:19 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseTreeTable',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
2023-12-19 13:23:53 +00:00
|
|
|
dataKey: {
|
|
|
|
type: [String, Function],
|
|
|
|
default: 'key'
|
|
|
|
},
|
2023-06-05 07:34:19 +00:00
|
|
|
expandedKeys: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
selectionKeys: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
selectionMode: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
metaKeySelection: {
|
|
|
|
type: Boolean,
|
2023-12-20 10:28:13 +00:00
|
|
|
default: false
|
2023-06-05 07:34:19 +00:00
|
|
|
},
|
|
|
|
rows: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
first: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
totalRecords: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
paginator: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
paginatorPosition: {
|
|
|
|
type: String,
|
|
|
|
default: 'bottom'
|
|
|
|
},
|
|
|
|
alwaysShowPaginator: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
paginatorTemplate: {
|
|
|
|
type: String,
|
|
|
|
default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown'
|
|
|
|
},
|
|
|
|
pageLinkSize: {
|
|
|
|
type: Number,
|
|
|
|
default: 5
|
|
|
|
},
|
|
|
|
rowsPerPageOptions: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
currentPageReportTemplate: {
|
|
|
|
type: String,
|
|
|
|
default: '({currentPage} of {totalPages})'
|
|
|
|
},
|
|
|
|
lazy: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
loading: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
loadingIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
2023-11-28 08:46:39 +00:00
|
|
|
loadingMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'mask'
|
|
|
|
},
|
2023-06-05 07:34:19 +00:00
|
|
|
rowHover: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
autoLayout: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
sortField: {
|
|
|
|
type: [String, Function],
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
sortOrder: {
|
|
|
|
type: Number,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
defaultSortOrder: {
|
|
|
|
type: Number,
|
|
|
|
default: 1
|
|
|
|
},
|
|
|
|
multiSortMeta: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
sortMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'single'
|
|
|
|
},
|
|
|
|
removableSort: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
filters: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
filterMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'lenient'
|
|
|
|
},
|
|
|
|
filterLocale: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
resizableColumns: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
columnResizeMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'fit'
|
|
|
|
},
|
|
|
|
indentation: {
|
|
|
|
type: Number,
|
|
|
|
default: 1
|
|
|
|
},
|
|
|
|
showGridlines: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
scrollable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
scrollDirection: {
|
|
|
|
type: String,
|
|
|
|
default: 'vertical'
|
|
|
|
},
|
|
|
|
scrollHeight: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
responsiveLayout: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
2023-07-19 12:01:49 +00:00
|
|
|
size: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
2023-06-05 07:34:19 +00:00
|
|
|
tableProps: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: TreeTableStyle,
|
2023-06-05 07:34:19 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|