Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set props value on vue component

I've write a vue component that is supposed to receive the "uploadedFile" prop, but its not working. I'm just receiving the correct information on the $attrs:

enter image description here

My component:

Vue.component('table-file', {
props: ['files'],
template: '<div class="row"><table class= "table table-sm table-hover"><thead><tr><th scope="col" style="text-align: center">FILE NAME</th><th scope="col" style="text-align: center; width: 20%;" colspan="2">OPTIONS</th></tr></thead><tbody><tr v-for="(file, index) in files" :key="index" style="text-align: center;"><td scope="row" style="font-size: medium !important">{{file.FileName}}</td><td><Button class="btn btn-info btn-raised" v-on:click="downloadFile(file.ID)" style="margin: 0">Download</Button></td><td>\<Button class="btn btn-info btn-raised" v-on:click="deleteFile(file.ID)" style="margin: 0; background-color: red">Delete</Button></td></tr></tbody ></table ></div >'
})
<table-file :files="uploadedFile"></table-file>

Can anyone helps me?

like image 374
Daniel Villar Avatar asked Sep 04 '26 19:09

Daniel Villar


1 Answers

Your file is called uploadedfile and not uploadedFile

like image 139
oemera Avatar answered Sep 07 '26 08:09

oemera



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!