vue-filereader

FileReader component for Vue.js
2,461 1
Install
npm install vue-filereader
Latest Version:0.1.1
Vue:2
License:MIT
Last Updated:Apr 4, 2019
Links: GitHub  ·  npm
Maintainer: magr0s

Vue FileReader Current version

Vue.js version License

Vue.js component

Install

NPM
npm i vue-filereader --save

Usage

import FileReader from 'vue-filereader'

// mount
...
components: {
  FileReader
}
...

// mount with global
Vue.component(FileReader.name, FileReader)

Default tag

<!-- 
  Output data:
  array - ArrayBuffer
  binary - BinaryString
  data - DataUrl
  text - TextString (default)
-->
<file-reader
  accept=".txt"
  output="binary"
  @reader-load="myMethod"
/>

Customization

<file-reader
  accept=".txt"
  output="binary"
  @reader-load="myMethod"
>
  <template
    #reader="props"
  >
    <input
      type="file"
      :accept="props.accept"
      @change="props.onchange"
    />
  </template>
</file-reader>

Development

Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build:lib
Lints and fixes files
npm run lint

Author

magr0s

License

MIT

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
@vueuse/shared
372,738,348 22,398
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591

Version History

Version Released Vue License
0.1.1 ^2.6.6 MIT
0.1.0 ^2.6.6 MIT