UNPKG

hongluan-ui

Version:
74 lines (73 loc) 4.4 kB
import type { ExtractPropTypes, h as H, VNode } from 'vue'; import type Transfer from './transfer.vue'; export declare type TransferKey = string | number; export declare type TransferDirection = 'left' | 'right'; export declare type TransferDataItem = Record<string, any>; export declare type renderContent = (h: typeof H, option: TransferDataItem) => VNode | VNode[]; export interface TransferFormat { noChecked?: string; hasChecked?: string; } export interface TransferPropsAlias { label?: string; key?: string; disabled?: string; } export interface TransferCheckedState { leftChecked: TransferKey[]; rightChecked: TransferKey[]; } export declare const LEFT_CHECK_CHANGE_EVENT = "left-check-change"; export declare const RIGHT_CHECK_CHANGE_EVENT = "right-check-change"; export declare const transferProps: { readonly data: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferDataItem[]>, unknown, unknown, () => any[], boolean>; readonly titles: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<[string, string]>, unknown, unknown, () => any[], boolean>; readonly buttonTexts: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<[string, string]>, unknown, unknown, () => any[], boolean>; readonly showButtons: import("hongluan-ui/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly filterPlaceholder: StringConstructor; readonly filterProps: import("hongluan-ui/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>; readonly filterMethod: { readonly type: import("vue").PropType<(query: string, item: TransferDataItem) => boolean>; readonly required: false; readonly validator: (val: unknown) => boolean; __epPropKey: true; }; readonly confirmMethod: { readonly type: import("vue").PropType<(mark: string) => Promise<void>>; readonly required: false; readonly validator: (val: unknown) => boolean; __epPropKey: true; }; readonly leftDefaultChecked: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferKey[]>, unknown, unknown, () => any[], boolean>; readonly rightDefaultChecked: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferKey[]>, unknown, unknown, () => any[], boolean>; readonly renderContent: { readonly type: import("vue").PropType<renderContent>; readonly required: false; readonly validator: (val: unknown) => boolean; __epPropKey: true; }; readonly modelValue: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferKey[]>, unknown, unknown, () => any[], boolean>; readonly format: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferFormat>, unknown, unknown, () => {}, boolean>; readonly filterable: BooleanConstructor; readonly props: import("hongluan-ui/es/utils").EpPropFinalized<import("vue").PropType<TransferPropsAlias>, unknown, unknown, () => import("hongluan-ui/es/utils").Mutable<{ readonly label: "label"; readonly key: "key"; readonly disabled: "disabled"; }>, boolean>; readonly targetOrder: import("hongluan-ui/es/utils").EpPropFinalized<StringConstructor, "push" | "unshift" | "original", unknown, "original", boolean>; readonly validateEvent: import("hongluan-ui/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly block: BooleanConstructor; readonly gap: StringConstructor; readonly listGap: StringConstructor; readonly itemGap: StringConstructor; }; export declare type TransferProps = ExtractPropTypes<typeof transferProps>; export declare const transferCheckedChangeFn: (value: TransferKey[], movedKeys?: TransferKey[]) => boolean; export declare const transferEmits: { change: (value: TransferKey[], direction: TransferDirection, movedKeys: TransferKey[]) => boolean; "update:modelValue": (value: TransferKey[]) => boolean; "left-check-change": (value: TransferKey[], movedKeys?: TransferKey[]) => boolean; "right-check-change": (value: TransferKey[], movedKeys?: TransferKey[]) => boolean; }; export declare type TransferEmits = typeof transferEmits; export declare type TransferInstance = InstanceType<typeof Transfer>;