pull/5414/head
tugcekucukoglu 2024-03-13 16:12:26 +03:00
parent 31dde8355a
commit dd9f38fd35
2 changed files with 4 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import { VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { PassThroughOptions } from '../passthrough';
import { TreeNode } from '../treenode';
import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers';
import { ClassComponent, GlobalComponentConstructor, HintedString, PassThrough } from '../ts-helpers';
export declare type TreePassThroughOptionType<T = any> = TreePassThroughAttributes | ((options: TreePassThroughMethodOptions<T>) => TreePassThroughAttributes | string) | string | null | undefined;
@ -356,7 +356,7 @@ export interface TreeSlots {
* Custom node icon template.
* @param {Object} scope - togglericon slot's params.
*/
nodeIcon(scope: {
nodeicon(scope: {
/**
* Tree node instance
*/

View File

@ -32,12 +32,8 @@
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="slotProps.class" v-bind="getPTOptions('nodeCheckbox.icon')" />
</template>
</Checkbox>
<template v-if="templates['nodeIcon']">
<component :is="templates['nodeIcon']" v-bind="getPTOptions('nodeIcon')" :class="cx('nodeIcon')" :node="node"></component>
</template>
<template v-else>
<span :class="[cx('nodeIcon'), node.icon]" v-bind="getPTOptions('nodeIcon')"></span>
</template>
<component v-if="templates['nodeicon']" :is="templates['nodeicon']" :node="node"></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" />
<template v-else>{{ label(node) }}</template>