2019-01-01 12:13:51 +08:00
|
|
|
// Project: https://github.com/vueComponent/ant-design-vue
|
|
|
|
// Definitions by: akki-jat <https://github.com/akki-jat>
|
|
|
|
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
|
|
|
|
|
|
|
import { AntdComponent } from './component';
|
2020-08-17 21:30:14 +08:00
|
|
|
import { VNodeChild } from 'vue';
|
2019-01-01 12:13:51 +08:00
|
|
|
|
|
|
|
export declare class TreeNode extends AntdComponent {
|
2020-08-17 21:30:14 +08:00
|
|
|
$props: {
|
|
|
|
/**
|
|
|
|
* Class
|
|
|
|
* @description className
|
|
|
|
* @type string
|
|
|
|
*/
|
|
|
|
class?: string;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Style
|
|
|
|
* @description style of tree node
|
|
|
|
* @type string | object
|
|
|
|
*/
|
|
|
|
style?: string | object;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* When Tree is checkable, set TreeNode display Checkbox or not
|
|
|
|
* @version 1.5.0
|
|
|
|
*/
|
|
|
|
checkable?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Disable Checkbox
|
|
|
|
* @description Disables the checkbox of the treeNode
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
disableCheckbox?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Disabled
|
|
|
|
* @description Disabled or not
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Icon
|
|
|
|
* @description customize icon. When you pass component, whose render will receive full TreeNode props as component props
|
|
|
|
* @type any (slot | slot-scope)
|
|
|
|
*/
|
|
|
|
icon?: VNodeChild | JSX.Element;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Is Leaf?
|
|
|
|
* @description Leaf node or not
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
isLeaf?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Key
|
|
|
|
* @description Required property, should be unique in the tree
|
|
|
|
* (In tree: Used with (default)ExpandedKeys / (default)CheckedKeys / (default)SelectedKeys)
|
|
|
|
* @default internal calculated position of treeNode or undefined
|
|
|
|
* @type string | number
|
|
|
|
*/
|
|
|
|
key?: string | number;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Selectable
|
|
|
|
* @description Set whether the treeNode can be selected
|
|
|
|
* @default true
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
selectable?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Title
|
|
|
|
* @description Content showed on the treeNodes
|
|
|
|
* @default '---'
|
|
|
|
* @type any (string | slot)
|
|
|
|
*/
|
|
|
|
title?: VNodeChild | JSX.Element;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Value
|
|
|
|
* @description Will be treated as treeNodeFilterProp by default, should be unique in the tree
|
|
|
|
* @default undefined
|
|
|
|
* @type string
|
|
|
|
*/
|
|
|
|
value?: string;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 21:30:14 +08:00
|
|
|
/**
|
|
|
|
* Slots
|
|
|
|
* @description When using treeNodes, you can use this property to configure the properties that support the slot,
|
|
|
|
* such as slots: { title: 'XXX'}
|
|
|
|
* @type object
|
|
|
|
*/
|
|
|
|
slots?: object;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When using treeNodes, you can use this property to configure the events,
|
|
|
|
* such as on: { click: () => {}}
|
|
|
|
*/
|
|
|
|
on?: object;
|
|
|
|
};
|
2019-01-01 12:13:51 +08:00
|
|
|
}
|