tree.d.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import { EmitFn } from "../../../utils/vue/typescript.js";
  2. import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
  3. import Node from "./model/node.js";
  4. import { AllowDragFunction, AllowDropFunction, CheckedInfo, FilterNodeMethodFunction, LoadFunction, NodeDropType, RenderContentFunction, TreeData, TreeKey, TreeOptionProps } from "./tree.type.js";
  5. import * as _$vue from "vue";
  6. import { ComponentInternalInstance, PropType } from "vue";
  7. //#region ../../packages/components/tree/src/tree.d.ts
  8. declare const treeProps: {
  9. readonly data: EpPropFinalized<(new (...args: any[]) => TreeData) | (() => TreeData) | (((new (...args: any[]) => TreeData) | (() => TreeData)) | null)[], unknown, unknown, () => never[], boolean>;
  10. readonly emptyText: {
  11. readonly type: PropType<string>;
  12. readonly required: false;
  13. readonly validator: ((val: unknown) => boolean) | undefined;
  14. __epPropKey: true;
  15. };
  16. readonly renderAfterExpand: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  17. readonly nodeKey: StringConstructor;
  18. readonly checkStrictly: BooleanConstructor;
  19. readonly defaultExpandAll: BooleanConstructor;
  20. readonly expandOnClickNode: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  21. readonly checkOnClickNode: BooleanConstructor;
  22. readonly checkOnClickLeaf: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  23. readonly checkDescendants: BooleanConstructor;
  24. readonly autoExpandParent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  25. readonly defaultCheckedKeys: {
  26. readonly type: PropType<TreeKey[]>;
  27. readonly required: false;
  28. readonly validator: ((val: unknown) => boolean) | undefined;
  29. __epPropKey: true;
  30. };
  31. readonly defaultExpandedKeys: {
  32. readonly type: PropType<TreeKey[]>;
  33. readonly required: false;
  34. readonly validator: ((val: unknown) => boolean) | undefined;
  35. __epPropKey: true;
  36. };
  37. readonly currentNodeKey: {
  38. readonly type: PropType<EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>>;
  39. readonly required: false;
  40. readonly validator: ((val: unknown) => boolean) | undefined;
  41. __epPropKey: true;
  42. };
  43. readonly renderContent: {
  44. readonly type: PropType<RenderContentFunction>;
  45. readonly required: false;
  46. readonly validator: ((val: unknown) => boolean) | undefined;
  47. __epPropKey: true;
  48. };
  49. readonly showCheckbox: BooleanConstructor;
  50. readonly draggable: BooleanConstructor;
  51. readonly allowDrag: {
  52. readonly type: PropType<AllowDragFunction>;
  53. readonly required: false;
  54. readonly validator: ((val: unknown) => boolean) | undefined;
  55. __epPropKey: true;
  56. };
  57. readonly allowDrop: {
  58. readonly type: PropType<AllowDropFunction>;
  59. readonly required: false;
  60. readonly validator: ((val: unknown) => boolean) | undefined;
  61. __epPropKey: true;
  62. };
  63. readonly props: EpPropFinalized<(new (...args: any[]) => TreeOptionProps) | (() => TreeOptionProps) | (((new (...args: any[]) => TreeOptionProps) | (() => TreeOptionProps)) | null)[], unknown, unknown, () => {
  64. children: string;
  65. label: string;
  66. disabled: string;
  67. }, boolean>;
  68. readonly lazy: BooleanConstructor;
  69. readonly highlightCurrent: BooleanConstructor;
  70. readonly load: {
  71. readonly type: PropType<LoadFunction>;
  72. readonly required: false;
  73. readonly validator: ((val: unknown) => boolean) | undefined;
  74. __epPropKey: true;
  75. };
  76. readonly filterNodeMethod: {
  77. readonly type: PropType<FilterNodeMethodFunction>;
  78. readonly required: false;
  79. readonly validator: ((val: unknown) => boolean) | undefined;
  80. __epPropKey: true;
  81. };
  82. readonly accordion: BooleanConstructor;
  83. readonly indent: EpPropFinalized<NumberConstructor, unknown, unknown, 18, boolean>;
  84. readonly icon: {
  85. readonly type: PropType<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
  86. readonly required: false;
  87. readonly validator: ((val: unknown) => boolean) | undefined;
  88. __epPropKey: true;
  89. };
  90. };
  91. declare const treeEmits: {
  92. 'check-change': (data: any, checked: boolean, indeterminate: boolean) => any;
  93. 'current-change': (data: any | null, node: Node | null) => boolean;
  94. 'node-click': (data: any, node: Node, nodeInstance: ComponentInternalInstance | null, evt: MouseEvent) => any;
  95. 'node-contextmenu': (evt: Event, data: any, node: Node, nodeInstance: ComponentInternalInstance | null) => any;
  96. 'node-collapse': (data: any, node: Node, nodeInstance: ComponentInternalInstance | null) => any;
  97. 'node-expand': (data: any, node: Node, nodeInstance: ComponentInternalInstance | null) => any;
  98. check: (data: any, checkedInfo: CheckedInfo) => any;
  99. 'node-drag-start': (node: Node, evt: DragEvent) => DragEvent;
  100. 'node-drag-end': (draggingNode: Node, dropNode: Node | null, dropType: NodeDropType, evt: DragEvent) => DragEvent;
  101. 'node-drop': (draggingNode: Node, dropNode: Node, dropType: Exclude<NodeDropType, "none">, evt: DragEvent) => DragEvent;
  102. 'node-drag-leave': (draggingNode: Node, oldDropNode: Node, evt: DragEvent) => DragEvent;
  103. 'node-drag-enter': (draggingNode: Node, dropNode: Node, evt: DragEvent) => DragEvent;
  104. 'node-drag-over': (draggingNode: Node, dropNode: Node, evt: DragEvent) => DragEvent;
  105. };
  106. type TreeEmits = EmitFn<typeof treeEmits>;
  107. //#endregion
  108. export { TreeEmits, treeEmits, treeProps };