137 lines
6.5 KiB
TypeScript
137 lines
6.5 KiB
TypeScript
import type { UseEmptyValuesProps } from 'element-plus/es/hooks';
|
|
import type { PopperEffect } from 'element-plus/es/components/popper';
|
|
import type TimeSelect from './time-select.vue';
|
|
import type { CSSProperties, Component, ExtractPublicPropTypes } from 'vue';
|
|
import type { ComponentSize } from 'element-plus/es/constants';
|
|
export interface TimeSelectProps extends UseEmptyValuesProps {
|
|
/**
|
|
* @description set format of time
|
|
*/
|
|
format?: string;
|
|
/**
|
|
* @description binding value
|
|
*/
|
|
modelValue?: string | null;
|
|
/**
|
|
* @description whether TimeSelect is disabled
|
|
*/
|
|
disabled?: boolean;
|
|
/**
|
|
* @description whether the input is editable
|
|
*/
|
|
editable?: boolean;
|
|
/**
|
|
* @description Tooltip theme, built-in theme: `dark` / `light`
|
|
*/
|
|
effect?: PopperEffect;
|
|
/**
|
|
* @description whether to show clear button
|
|
*/
|
|
clearable?: boolean;
|
|
/**
|
|
* @description size of Input
|
|
*/
|
|
size?: ComponentSize;
|
|
/**
|
|
* @description placeholder in non-range mode
|
|
*/
|
|
placeholder?: string;
|
|
/**
|
|
* @description start time
|
|
*/
|
|
start?: string;
|
|
/**
|
|
* @description end time
|
|
*/
|
|
end?: string;
|
|
/**
|
|
* @description time step
|
|
*/
|
|
step?: string;
|
|
/**
|
|
* @description minimum time, any time before this time will be disabled
|
|
*/
|
|
minTime?: string | null;
|
|
/**
|
|
* @description maximum time, any time after this time will be disabled
|
|
*/
|
|
maxTime?: string | null;
|
|
/**
|
|
* @description whether `end` is included in options
|
|
*/
|
|
includeEndTime?: boolean;
|
|
/**
|
|
* @description same as `name` in native input
|
|
*/
|
|
name?: string;
|
|
/**
|
|
* @description custom prefix icon component
|
|
*/
|
|
prefixIcon?: string | Component;
|
|
/**
|
|
* @description custom clear icon component
|
|
*/
|
|
clearIcon?: string | Component;
|
|
/**
|
|
* @description custom class name for TimeSelect's dropdown
|
|
*/
|
|
popperClass?: string;
|
|
/**
|
|
* @description custom style for TimeSelect's dropdown
|
|
*/
|
|
popperStyle?: string | CSSProperties;
|
|
}
|
|
/**
|
|
* @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
|
|
*/
|
|
export declare const timeSelectProps: {
|
|
readonly emptyValues: ArrayConstructor;
|
|
readonly valueOnClear: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null))[], unknown, unknown, undefined, boolean>;
|
|
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm", boolean>;
|
|
readonly modelValue: {
|
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
readonly disabled: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
readonly editable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
readonly effect: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | ((new (...args: any[]) => string) | (() => PopperEffect))[], unknown, unknown, "light", boolean>;
|
|
readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
readonly size: {
|
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
readonly placeholder: StringConstructor;
|
|
readonly start: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "09:00", boolean>;
|
|
readonly end: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "18:00", boolean>;
|
|
readonly step: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "00:30", boolean>;
|
|
readonly minTime: {
|
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
readonly maxTime: {
|
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
readonly includeEndTime: BooleanConstructor;
|
|
readonly name: StringConstructor;
|
|
readonly prefixIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, () => any, boolean>;
|
|
readonly clearIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, () => any, boolean>;
|
|
readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
readonly popperStyle: {
|
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | ((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties))[], unknown, unknown>>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
};
|
|
export type TimeSelectPropsPublic = ExtractPublicPropTypes<typeof timeSelectProps>;
|
|
export type TimeSelectInstance = InstanceType<typeof TimeSelect> & unknown;
|