vue-filereader

0.1.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i vue-filereader

Weekly Downloads

27

Version

0.1.1

License

MIT

Unpacked Size

105 kB

Total Files

11

Last publish

Collaborators

  • magr0s