From 31dde8355a200c0519a4a07fe76b1814c77f5c67 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Wed, 13 Mar 2024 13:10:35 +0000 Subject: [PATCH] Update API doc --- components/lib/tree/Tree.spec.js | 10 +++++----- components/lib/tree/TreeNode.vue | 4 ++-- doc/common/apidoc/index.json | 13 +++++++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/components/lib/tree/Tree.spec.js b/components/lib/tree/Tree.spec.js index 2e685e9fe..e9cacca40 100644 --- a/components/lib/tree/Tree.spec.js +++ b/components/lib/tree/Tree.spec.js @@ -55,12 +55,12 @@ describe('Tree.vue', () => { expect(wrapper.emitted('filter')).toBeTruthy(); }); - it('should render icon', ({expect})=>{ + it('should render icon', ({ expect }) => { expect(wrapper.find('span.pi-inbox').exists()).toBeTruthy(); - expect(wrapper.find('span.pi-inbox').classes('p-treenode-icon')).toBeTruthy() - }) + expect(wrapper.find('span.pi-inbox').classes('p-treenode-icon')).toBeTruthy(); + }); - it('should render icon slot', ({expect})=>{ + it('should render icon slot', ({ expect }) => { let wrapper = mount(Tree, { slots: { nodeIcon: `` @@ -80,5 +80,5 @@ describe('Tree.vue', () => { const nodeIcon = wrapper.find('i[data-node-icon]'); expect(nodeIcon.exists()).toBeTruthy(); - }) + }); }); diff --git a/components/lib/tree/TreeNode.vue b/components/lib/tree/TreeNode.vue index 11bacc5e0..2c951d24d 100755 --- a/components/lib/tree/TreeNode.vue +++ b/components/lib/tree/TreeNode.vue @@ -33,10 +33,10 @@ diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 585b028df..c7cee3d8a 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -57309,6 +57309,19 @@ "returnType": "VNode[]", "description": "Custom toggler icon template." }, + { + "name": "nodeIcon", + "parameters": [ + { + "name": "scope", + "optional": false, + "type": "{\n \t node: TreeNode, // Tree node instance\n }", + "description": "togglericon slot's params." + } + ], + "returnType": "VNode[]", + "description": "Custom node icon template." + }, { "name": "checkboxicon", "parameters": [