(fix) pass class to TreeNodes nodeIcon slot
parent
71db0aea00
commit
0db9536243
|
@ -361,6 +361,10 @@ export interface TreeSlots {
|
||||||
* Tree node instance
|
* Tree node instance
|
||||||
*/
|
*/
|
||||||
node: TreeNode;
|
node: TreeNode;
|
||||||
|
/**
|
||||||
|
* Style class of the icon.
|
||||||
|
*/
|
||||||
|
class: string;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom checkbox icon
|
* Custom checkbox icon
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="slotProps.class" v-bind="getPTOptions('nodeCheckbox.icon')" />
|
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="slotProps.class" v-bind="getPTOptions('nodeCheckbox.icon')" />
|
||||||
</template>
|
</template>
|
||||||
</Checkbox>
|
</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 v-else :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" />
|
||||||
|
|
Loading…
Reference in New Issue