element-plus
Version:
A Component Library for Vue 3
83 lines (82 loc) • 2.71 kB
TypeScript
import type { Component } from 'vue';
import type { RateProps } from './rate';
declare function setCurrentValue(value: number, event?: MouseEvent): void;
declare function resetCurrentValue(): void;
declare const __VLS_export: import("vue").DefineComponent<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<RateProps>, {
modelValue: number;
id: undefined;
lowThreshold: number;
highThreshold: number;
max: number;
colors: () => string[];
voidColor: string;
disabledVoidColor: string;
icons: () => any[];
voidIcon: () => any;
disabledVoidIcon: () => any;
disabled: undefined;
textColor: string;
texts: () => string[];
scoreTemplate: string;
}>, {
/** @description set current value */
setCurrentValue: typeof setCurrentValue;
/** @description reset current value */
resetCurrentValue: typeof resetCurrentValue;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:modelValue": (value: number) => void;
change: (value: number) => void;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<RateProps>, {
modelValue: number;
id: undefined;
lowThreshold: number;
highThreshold: number;
max: number;
colors: () => string[];
voidColor: string;
disabledVoidColor: string;
icons: () => any[];
voidIcon: () => any;
disabledVoidIcon: () => any;
disabled: undefined;
textColor: string;
texts: () => string[];
scoreTemplate: string;
}>>> & {
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
onChange?: ((value: number) => any) | undefined;
}, {
disabled: boolean;
id: string;
modelValue: number;
max: number;
textColor: string;
colors: string[] | Record<number, string>;
lowThreshold: number;
highThreshold: number;
voidColor: string;
disabledVoidColor: string;
icons: Array<string | Component> | Record<number, string | Component>;
voidIcon: string | Component;
disabledVoidIcon: string | Component;
texts: string[];
scoreTemplate: string;
}, {}>;
declare const _default: typeof __VLS_export;
export default _default;
type __VLS_TypePropsToOption<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<Required<T>[K]>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaultsLocal<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_PrettifyLocal<T> = {
[K in keyof T as K]: T[K];
} & {};