dk-plus
Version:
147 lines (146 loc) • 4.43 kB
TypeScript
import type { ExtractPropTypes, InjectionKey, PropType, CSSProperties } from 'vue';
import type { SelectProvide } from './interface';
import type { dkPlusSize } from '../../_interface';
export type SelectModelValue = string | number | boolean;
export type SelectModelValueItem = SelectModelValue | Record<string, unknown>;
export type SelectModelValueType = SelectModelValueItem | SelectModelValueItem[];
export type SelectOption = Record<string, unknown>;
export interface SelectOptionsProps {
value?: string;
label?: string;
disabled?: string;
options?: string;
}
export type PopperStyle = string | CSSProperties;
export declare const dkSelectProps: {
readonly modelValue: {
readonly type: PropType<SelectModelValueType>;
readonly default: "";
};
readonly disabled: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly multiple: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly clearable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly filterable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly filterMethod: {
readonly type: PropType<(query: string) => boolean>;
readonly default: undefined;
};
readonly remote: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly remoteMethod: {
readonly type: PropType<(query: string) => void>;
readonly default: undefined;
};
readonly debounce: {
readonly type: NumberConstructor;
readonly default: 300;
};
readonly loading: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly loadingText: {
readonly type: StringConstructor;
readonly default: "Loading";
};
readonly noMatchText: {
readonly type: StringConstructor;
readonly default: "无匹配数据";
};
readonly noDataText: {
readonly type: StringConstructor;
readonly default: "无数据";
};
readonly size: {
readonly type: () => dkPlusSize | null;
readonly default: null;
};
readonly width: {
readonly type: StringConstructor;
readonly default: "240px";
};
readonly placeholder: {
readonly type: StringConstructor;
readonly default: "请选择";
};
readonly emptyText: {
readonly type: StringConstructor;
readonly default: "无匹配数据";
};
readonly clearIcon: {
readonly type: StringConstructor;
readonly default: "IconClose";
};
readonly suffixIcon: {
readonly type: StringConstructor;
readonly default: "IconCaretDown";
};
readonly multipleLimit: {
readonly type: NumberConstructor;
readonly default: 0;
};
readonly collapseTags: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly maxCollapseTags: {
readonly type: NumberConstructor;
readonly default: 1;
};
readonly valueKey: {
readonly type: StringConstructor;
readonly default: "value";
};
readonly props: {
readonly type: PropType<SelectOptionsProps>;
readonly default: () => SelectOptionsProps;
};
readonly options: {
readonly type: PropType<SelectOption[]>;
readonly default: () => never[];
};
readonly id: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly name: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly popperClass: {
readonly type: StringConstructor;
readonly default: "";
};
readonly popperStyle: {
readonly type: PropType<PopperStyle>;
readonly default: "";
};
readonly teleported: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly appendTo: {
readonly type: PropType<string | HTMLElement>;
readonly default: "body";
};
readonly offset: {
readonly type: NumberConstructor;
readonly default: 8;
};
};
export type SelectProps = ExtractPropTypes<typeof dkSelectProps>;
export declare const SELECT_PROPS_TOKEN: InjectionKey<SelectProvide>;