hongluan-ui
Version:
Hongluan Component Library for Vue 3
179 lines (178 loc) • 6.52 kB
TypeScript
import Node from './node';
import type { PropType } from 'vue';
import type { CascaderValue, CascaderNodeValue, CascaderOption, RenderLabel } from './types';
declare const _default: import("vue").DefineComponent<{
border: {
type: BooleanConstructor;
default: boolean;
};
renderLabel: PropType<RenderLabel>;
modelValue: PropType<CascaderValue>;
options: {
type: PropType<CascaderOption[]>;
default: () => CascaderOption[];
};
props: {
type: PropType<import("./types").CascaderProps>;
default: () => import("./types").CascaderProps;
};
}, {
namespace: import("vue").ComputedRef<string>;
menuList: import("vue").Ref<any[]>;
menus: import("vue").Ref<{
[x: string]: any;
readonly uid: number;
readonly level: number;
readonly value: CascaderNodeValue;
readonly label: string;
readonly pathNodes: any[];
readonly pathValues: CascaderNodeValue[];
readonly pathLabels: string[];
childrenData: {
[x: string]: unknown;
label?: string;
value?: CascaderNodeValue;
children?: any[];
disabled?: boolean;
leaf?: boolean;
}[];
children: any[];
text: string;
loaded: boolean;
checked: boolean;
indeterminate: boolean;
loading: boolean;
readonly data: {
[x: string]: unknown;
label?: string;
value?: CascaderNodeValue;
children?: any[];
disabled?: boolean;
leaf?: boolean;
};
readonly config: {
expandTrigger: import("./types").ExpandTrigger;
multiple: boolean;
checkStrictly: boolean;
emitPath: boolean;
lazy: boolean;
lazyLoad: import("./types").LazyLoad;
value: string;
label: string;
children: string;
disabled: string | import("./types").isDisabled;
leaf: string | import("./types").isLeaf;
hoverThreshold: number;
};
readonly parent?: any;
readonly root: boolean;
readonly isDisabled: boolean;
readonly isLeaf: boolean;
readonly valueByOption: CascaderNodeValue | CascaderNodeValue[];
appendChild: (childData: CascaderOption) => Node;
calcText: (allLevels: boolean, separator: string) => string;
broadcast: (event: string, ...args: unknown[]) => void;
emit: (event: string, ...args: unknown[]) => void;
onParentCheck: (checked: boolean) => void;
onChildCheck: () => void;
setCheckState: (checked: boolean) => void;
doCheck: (checked: boolean) => void;
}[][]>;
checkedNodes: import("vue").Ref<{
[x: string]: any;
readonly uid: number;
readonly level: number;
readonly value: CascaderNodeValue;
readonly label: string;
readonly pathNodes: any[];
readonly pathValues: CascaderNodeValue[];
readonly pathLabels: string[];
childrenData: {
[x: string]: unknown;
label?: string;
value?: CascaderNodeValue;
children?: any[];
disabled?: boolean;
leaf?: boolean;
}[];
children: any[];
text: string;
loaded: boolean;
checked: boolean;
indeterminate: boolean;
loading: boolean;
readonly data: {
[x: string]: unknown;
label?: string;
value?: CascaderNodeValue;
children?: any[];
disabled?: boolean;
leaf?: boolean;
};
readonly config: {
expandTrigger: import("./types").ExpandTrigger;
multiple: boolean;
checkStrictly: boolean;
emitPath: boolean;
lazy: boolean;
lazyLoad: import("./types").LazyLoad;
value: string;
label: string;
children: string;
disabled: string | import("./types").isDisabled;
leaf: string | import("./types").isLeaf;
hoverThreshold: number;
};
readonly parent?: any;
readonly root: boolean;
readonly isDisabled: boolean;
readonly isLeaf: boolean;
readonly valueByOption: CascaderNodeValue | CascaderNodeValue[];
appendChild: (childData: CascaderOption) => Node;
calcText: (allLevels: boolean, separator: string) => string;
broadcast: (event: string, ...args: unknown[]) => void;
emit: (event: string, ...args: unknown[]) => void;
onParentCheck: (checked: boolean) => void;
onChildCheck: () => void;
setCheckState: (checked: boolean) => void;
doCheck: (checked: boolean) => void;
}[]>;
handleKeyDown: (e: KeyboardEvent) => void;
handleCheckChange: (node: Node, checked: boolean, emitClose?: boolean) => void;
getFlattedNodes: (leafOnly: boolean) => Node[];
/**
* @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
*/
getCheckedNodes: (leafOnly: boolean) => Node[];
/**
* @description clear checked nodes
*/
clearCheckedNodes: () => void;
calculateCheckedValue: () => void;
scrollToExpandingNode: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "expand-change")[], "update:modelValue" | "change" | "close" | "expand-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
border: {
type: BooleanConstructor;
default: boolean;
};
renderLabel: PropType<RenderLabel>;
modelValue: PropType<CascaderValue>;
options: {
type: PropType<CascaderOption[]>;
default: () => CascaderOption[];
};
props: {
type: PropType<import("./types").CascaderProps>;
default: () => import("./types").CascaderProps;
};
}>> & {
onChange?: (...args: any[]) => any;
onClose?: (...args: any[]) => any;
"onUpdate:modelValue"?: (...args: any[]) => any;
"onExpand-change"?: (...args: any[]) => any;
}, {
props: import("./types").CascaderProps;
border: boolean;
options: CascaderOption[];
}>;
export default _default;