Skip to content

v2.0.2 Vuejs 3 and TypeScript

Latest
Compare
Choose a tag to compare
@d2phap d2phap released this 17 Jun 08:19
· 9 commits to main since this release
19fab17

Breaking changes

  • Minimum Vuejs version: 3.2.37
  • The type of files argument in all events changed from FileList to File[]
  • The default CSS is not included by default. You need to import it to use:
    import 'vue-file-selector/dist/main.css';

New

  • Added types:
    /**
     * Validates the selected files.
     * @returns `true` if the files are valid.
     * @returns `false` if the files are valid
     */
    export declare type FsValidateFn = (files: File[]) => boolean;
    
    /**
     * The validation result.
     */
    export declare type FsValidationResult = boolean | 'MULTIFILES_ERROR' | 'EXTENSION_ERROR' | 'FILE_SIZE_ERROR';