utils.d.ts 967 B

123456789101112131415
  1. import { HTMLAttributes, InputHTMLAttributes } from 'vue';
  2. import type { FieldRule, FieldType, FieldAutosizeConfig } from './types';
  3. export declare function isEmptyValue(value: unknown): boolean;
  4. export declare function runSyncRule(value: unknown, rule: FieldRule): boolean;
  5. export declare function runRuleValidator(value: unknown, rule: FieldRule): Promise<unknown>;
  6. export declare function getRuleMessage(value: unknown, rule: FieldRule): string;
  7. export declare function startComposing({ target }: Event): void;
  8. export declare function endComposing({ target }: Event): void;
  9. export declare function resizeTextarea(input: HTMLInputElement, autosize: true | FieldAutosizeConfig): void;
  10. export declare function mapInputType(type: FieldType): {
  11. type: InputHTMLAttributes['type'];
  12. inputmode?: HTMLAttributes['inputmode'];
  13. };
  14. export declare function getStringLength(str: string): number;
  15. export declare function cutString(str: string, maxlength: number): string;