Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
fix(#44): add prop to place files slot first
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
alexsasharegan committed May 6, 2018
1 parent 7b4bfd4 commit 55e9a24
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/VueTransmit.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<component :is="tag">
<slot v-if="filesSlotFirst"
name="files"
v-bind="fileSlotBindings" />
<div class="v-transmit__upload-area"
:class="[isDraggingClass, uploadAreaClasses]"
:draggable="!disableDraggable"
Expand All @@ -14,8 +17,9 @@
@drop.prevent.stop="handleDrop">
<slot></slot>
</div>
<slot name="files"
v-bind="fileSlotBindings"></slot>
<slot v-if="!filesSlotFirst"
name="files"
v-bind="fileSlotBindings" />
<form :style="formStyles"
ref="uploadForm">
<input type="file"
Expand Down Expand Up @@ -109,6 +113,10 @@ export default Vue.extend({
type: String,
default: null,
},
filesSlotFirst: {
type: Boolean,
default: false,
},
/**
* Sets the maximum number of uploads that can be running at a given time.
*/
Expand Down

0 comments on commit 55e9a24

Please sign in to comment.