xdesign-vue-next
Version:
XDesign Component for vue-next
16 lines (15 loc) • 557 B
TypeScript
import { ComputedRef } from 'vue';
import { TdInputProps } from './type';
export interface UseLengthLimitParams {
value: string;
maxlength: number;
maxcharacter: number;
allowInputOverMax: boolean;
status: TdInputProps['status'];
onValidate: TdInputProps['onValidate'];
}
export default function useLengthLimit(params: ComputedRef<UseLengthLimitParams>): {
tStatus: ComputedRef<"error" | "default" | "" | "success" | "warning">;
limitNumber: ComputedRef<string>;
getValueByLimitNumber: (inputValue: string) => string;
};