diff --git a/src/components/tree/TreeNode.vue b/src/components/tree/TreeNode.vue index ef4767ce5..d36dcc1f4 100755 --- a/src/components/tree/TreeNode.vue +++ b/src/components/tree/TreeNode.vue @@ -273,10 +273,7 @@ export default { return ['p-treenode-icon', this.node.icon]; }, toggleIcon() { - return ['p-tree-toggler-icon pi pi-fw', { - 'pi-chevron-down': this.expanded, - 'pi-chevron-right': !this.expanded - }]; + return ['p-tree-toggler-icon pi pi-fw', this.expanded ? this.node.expandedIcon || 'pi-chevron-down' : this.node.collapsedIcon || 'pi-chevron-right']; }, checkboxClass() { return ['p-checkbox-box', {'p-highlight': this.checked, 'p-indeterminate': this.partialChecked}]; diff --git a/src/views/tree/TreeDoc.vue b/src/views/tree/TreeDoc.vue index 1583b1081..24324afe2 100755 --- a/src/views/tree/TreeDoc.vue +++ b/src/views/tree/TreeDoc.vue @@ -57,6 +57,18 @@ import Tree from 'primevue/tree';