yanzhen-design-vue
Version:
106 lines (105 loc) • 5.07 kB
TypeScript
import { Contacts } from './constants/contacts';
import { ContactsEmits, ContactsProps } from './contacts';
import { TabsProps } from 'ant-design-vue/es/tabs';
import { ContactsItem, ContactsValue } from './constants';
import { SetupContext } from 'vue';
export declare const useContacts: (props: ContactsProps, emit: SetupContext<ContactsEmits>["emit"]) => {
readonly handleSearch: (debounce?: boolean) => Promise<void>;
readonly handleLoadMore: (options?: Record<string, any> & {
force?: boolean;
}) => Promise<void>;
readonly handleTreeExpand: (expandedKeys: import('ant-design-vue/es/vc-tree/interface').Key[], info: {
node: import('ant-design-vue/es/tree').EventDataNode;
expanded: boolean;
nativeEvent: MouseEvent;
}) => void;
readonly handleTreeSelect: (selectedKeys: import('ant-design-vue/es/vc-tree/interface').Key[], info: {
event: "select";
selected: boolean;
node: import('ant-design-vue/es/tree').EventDataNode;
selectedNodes: import('ant-design-vue/es/tree').DataNode[];
nativeEvent: MouseEvent;
}) => void;
readonly handleDelete: <I extends ContactsItem>(item: I) => void;
readonly handleAllDelete: () => void;
readonly handleItemClick: <I extends ContactsItem>(item: I) => void;
readonly handleTabChange: (key?: Parameters<TabsProps["onChange"]>[0]) => void;
readonly handleAllSelectTrigger: (_state: any) => void;
readonly slots: Readonly<{
[name: string]: import('vue').Slot<any>;
}>;
readonly ctx: {
multiple: import('vue').Ref<any, any>;
allExpand: import('vue').Ref<any, any>;
title: import('vue').Ref<any, any>;
_ref: import('vue').Ref<HTMLElement, HTMLElement>;
_noMore: import('vue').WritableComputedRef<boolean, boolean>;
_modelValue: import('vue').WritableComputedRef<import('./hook/use-contacts-model-value').ContactsModelValue, import('./hook/use-contacts-model-value').ContactsModelValue>;
_dataSource: import('vue').ComputedRef<ContactsItem[]>;
dataSource: import('./enum').ContactsDefaultRefs<ContactsItem>;
searchQueryList: import('vue').WritableComputedRef<ContactsItem[], ContactsItem[]>;
_query: import('vue').Ref<{
keywords: string;
loading: boolean;
}, {
keywords: string;
loading: boolean;
} | {
keywords: string;
loading: boolean;
}>;
_placeholder: import('vue').ComputedRef<string>;
_contactsTabs: import('vue').ComputedRef<{
value: Contacts;
label: string;
}[]>;
_activeTab: import('vue').Ref<Contacts, Contacts>;
_userTabs: import('vue').ComputedRef<{
value: import('./constants').User;
label: string;
}[]>;
_userActiveTab: import('vue').Ref<import('./constants').User, import('./constants').User>;
_props: import('vue').ComputedRef<{
title: any;
multiple: any;
isTreeMode: boolean;
}>;
_loading: import('vue').WritableComputedRef<boolean, boolean>;
_rightElRef: import('vue').Ref<HTMLElement, HTMLElement>;
_leftElRef: import('vue').Ref<HTMLElement, HTMLElement>;
_listScrollRef: import('vue').Ref<HTMLElement, HTMLElement>;
_selectedValue: import('vue').WritableComputedRef<ContactsItem[], ContactsItem[]>;
_selectedIds: import('vue').ComputedRef<ContactsValue[]>;
_disabledIds: import('vue').ComputedRef<(string | number)[]>;
_isTreeMode: import('vue').ComputedRef<boolean>;
selectState: import('vue').ComputedRef<{
show: boolean;
checked: boolean;
indeterminate: boolean;
dataSource: ContactsItem[];
}>;
};
readonly methods: {
readonly handleSearch: (debounce?: boolean) => Promise<void>;
readonly handleLoadMore: (options?: Record<string, any> & {
force?: boolean;
}) => Promise<void>;
readonly handleTreeExpand: (expandedKeys: import('ant-design-vue/es/vc-tree/interface').Key[], info: {
node: import('ant-design-vue/es/tree').EventDataNode;
expanded: boolean;
nativeEvent: MouseEvent;
}) => void;
readonly handleTreeSelect: (selectedKeys: import('ant-design-vue/es/vc-tree/interface').Key[], info: {
event: "select";
selected: boolean;
node: import('ant-design-vue/es/tree').EventDataNode;
selectedNodes: import('ant-design-vue/es/tree').DataNode[];
nativeEvent: MouseEvent;
}) => void;
readonly handleDelete: <I extends ContactsItem>(item: I) => void;
readonly handleAllDelete: () => void;
readonly handleItemClick: <I extends ContactsItem>(item: I) => void;
readonly handleTabChange: (key?: Parameters<TabsProps["onChange"]>[0]) => void;
readonly handleAllSelectTrigger: (_state: any) => void;
};
};