Created
September 9, 2017 05:04
-
-
Save martinyung/c4b70662fda4e972c0708c0b99c54754 to your computer and use it in GitHub Desktop.
[blogging purpose] file upload vuejs component - template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML Template --> | |
<template> | |
<div> | |
<div class="input-group"> | |
<input type="text" class="form-control" placeholder="Select file..." :value="file.name" readonly> | |
<span class="input-group-btn"> | |
<button class="btn btn-default" type="button" @click="selectFile">Select file</button> | |
<button class="btn btn-default" type="button" @click="uploadFile">Upload</button> | |
</span> | |
</div> | |
<input type="file" style="display:none" ref="file" v-uploader/> | |
</div> | |
</template> | |
<!-- Javascript --> | |
<script> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment