diff --git a/src/components/treetable/TreeTable.d.ts b/src/components/treetable/TreeTable.d.ts index 590504ab4..50a6b46ad 100755 --- a/src/components/treetable/TreeTable.d.ts +++ b/src/components/treetable/TreeTable.d.ts @@ -34,6 +34,7 @@ export declare class TreeTable extends Vue { filterLocale?: string; resizableColumns?: boolean; columnResizeMode?: string; + indentation?: number; $emit(eventName: 'page', event: Event): this; $emit(eventName: 'sort', event: Event): this; $emit(eventName: 'filter', event: Event): this; diff --git a/src/components/treetable/TreeTable.vue b/src/components/treetable/TreeTable.vue index 075e67468..a57a63f09 100755 --- a/src/components/treetable/TreeTable.vue +++ b/src/components/treetable/TreeTable.vue @@ -47,7 +47,7 @@ @@ -206,6 +206,10 @@ export default { columnResizeMode: { type: String, default: 'fit' + }, + indentation: { + type: Number, + default: 1 } }, documentColumnResizeListener: null, diff --git a/src/components/treetable/TreeTableRow.vue b/src/components/treetable/TreeTableRow.vue index a7c30999e..c41c19049 100755 --- a/src/components/treetable/TreeTableRow.vue +++ b/src/components/treetable/TreeTableRow.vue @@ -18,7 +18,7 @@ @@ -59,6 +59,10 @@ export default { level: { type: Number, default: 0 + }, + indentation: { + type: Number, + default: 1 } }, data() { @@ -261,7 +265,7 @@ export default { }, togglerStyle() { return { - marginLeft: this.level * 16 + 'px', + marginLeft: this.level * this.indentation + 'rem', visibility: this.leaf ? 'hidden' : 'visible' }; }, diff --git a/src/views/treetable/TreeTableDoc.vue b/src/views/treetable/TreeTableDoc.vue index b9529ce19..a53475886 100755 --- a/src/views/treetable/TreeTableDoc.vue +++ b/src/views/treetable/TreeTableDoc.vue @@ -1485,6 +1485,12 @@ export default { string fit Defines whether the overall table width should change on column resize,
valid values are "fit" and "expand". + + + indentation + number + 1 + Indentation factor as rem value for children nodes. Defaults to 1rem.