0.1.1 • Published 7 years ago
vue-filereader v0.1.1
Vue FileReader 
Vue.js component
Install
NPM
npm i vue-filereader --saveUsage
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 serveCompiles and minifies for production
npm run build:libLints and fixes files
npm run lint