UNPKG

tdesign-mobile-vue

Version:
14 lines (13 loc) 452 B
import { ComputedRef } from 'vue'; import { TdInputProps } from '@/components'; export interface UseLengthLimitParams { value: string; maxlength: number; maxcharacter: number; allowInputOverMax: boolean; onValidate?: TdInputProps['onValidate']; } export default function useLengthLimit(params: ComputedRef<UseLengthLimitParams>): { limitNumber: ComputedRef<string>; getValueByLimitNumber: (inputValue: string) => string; };