Node icon fixes

pull/4844/head
tugcekucukoglu 2023-11-17 20:06:08 +03:00
parent a699338e38
commit e0c634a1f8
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="cx('checkboxIcon')" v-bind="getPTOptions('checkboxIcon')" /> <component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="cx('checkboxIcon')" v-bind="getPTOptions('checkboxIcon')" />
</div> </div>
</div> </div>
<span :class="cx('nodeIcon')" v-bind="getPTOptions('nodeIcon')"></span> <span :class="[cx('nodeIcon'), node.icon]" v-bind="getPTOptions('nodeIcon')"></span>
<span :class="cx('label')" v-bind="getPTOptions('label')" @keydown.stop> <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" /> <component v-if="templates[node.type] || templates['default']" :is="templates[node.type] || templates['default']" :node="node" />
<template v-else>{{ label(node) }}</template> <template v-else>{{ label(node) }}</template>

View File

@ -122,7 +122,7 @@ const classes = {
} }
], ],
checkboxIcon: 'p-checkbox-icon', checkboxIcon: 'p-checkbox-icon',
nodeIcon: ({ instance }) => ['p-treenode-icon', instance.node.icon], nodeIcon: 'p-treenode-icon',
label: 'p-treenode-label', label: 'p-treenode-label',
subgroup: 'p-treenode-children' subgroup: 'p-treenode-children'
}; };