Finish ability to add files to versions and create new versions

This commit is contained in:
Jai A
2020-10-23 13:48:42 -07:00
parent 663418e943
commit 7b4398dfee
5 changed files with 146 additions and 18 deletions

View File

@@ -2,14 +2,14 @@
<div>
<slot></slot>
<input
:id="id"
:id="inputId"
class="file-input"
type="file"
:accept="accept"
:multiple="multiple"
:accept="inputAccept"
:multiple="inputMultiple"
@change="onChange"
/>
<label :for="id">{{ text }}</label>
<label :for="inputId">{{ text }}</label>
</div>
</template>
@@ -41,7 +41,7 @@ export default {
},
methods: {
onChange(files) {
const length = files.target.length
const length = files.target.files.length
if (length === 0) {
this.text = this.defaultText