0.1.1 • Published 6 years ago

vue-filereader v0.1.1

Weekly downloads
92
License
MIT
Repository
github
Last release
6 years ago

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

0.1.1

6 years ago

0.1.0

6 years ago