mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
(fix) pass class to TreeNodes nodeIcon slot
This commit is contained in:
parent
71db0aea00
commit
0db9536243
2 changed files with 5 additions and 1 deletions
4
components/lib/tree/Tree.d.ts
vendored
4
components/lib/tree/Tree.d.ts
vendored
|
@ -361,6 +361,10 @@ export interface TreeSlots {
|
|||
* Tree node instance
|
||||
*/
|
||||
node: TreeNode;
|
||||
/**
|
||||
* Style class of the icon.
|
||||
*/
|
||||
class: string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom checkbox icon
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="slotProps.class" v-bind="getPTOptions('nodeCheckbox.icon')" />
|
||||
</template>
|
||||
</Checkbox>
|
||||
<component v-if="templates['nodeicon']" :is="templates['nodeicon']" :node="node"></component>
|
||||
<component v-if="templates['nodeicon']" :is="templates['nodeicon']" :node="node" :class="[cx('nodeIcon')]"></component>
|
||||
<span v-else :class="[cx('nodeIcon'), node.icon]" v-bind="getPTOptions('nodeIcon')"></span>
|
||||
<span :class="cx('label')" v-bind="getPTOptions('label')" @keydown.stop>
|
||||
<component v-if="templates[node.type] || templates['default']" :is="templates[node.type] || templates['default']" :node="node" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue