I have created a project for bookshop and in the section of employee information I want to upload a PDF file using code given below.it give me the below error.I have been trying since few days but I could not get the solution if there is any sample way please guide me
any help will be highly appreciated
The given data was invalid.","errors":{"file":["The file field is
required.
controller code is
public function store(Request $request)
{
$DocumentType= new DocumentType();
$this->validate($request,[
'name'=>'required',
'file' => 'required',
]);
$DocumentType->name = $request->input('name');
$fileName = time().'.'.$request->file->extension();
$request->file->move(public_path('Files'), $fileName);
$DocumentType->file = $name;
$DocumentType->save();
return response()->json($DocumentType);
}
Vue code is
<template>
<div class="container">
<div
class="modal fade"
id="addNew"
tabindex="-1"
role="dialog"
aria-labelledby="addNewLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" v-show="!editMode" id="addNewLabel">ثبت اسناد جدید</h5>
<h5 class="modal-title" v-show="editMode" id="addNewLabel">تمدید اسناد</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true" style="margin-right: 317px;">×</span>
</button>
</div>
<form
#submit.prevent="editMode ? updateDocumentType() : createDocumentType()"
enctype="multipart/form-data"
>
<div class="modal-body">
<div class="form-group">
<input
v-model="form.name"
placeholder="نام"
type="text"
name="name"
class="form-control"
:class="{ 'is-invalid': form.errors.has('name') }"
/>
<has-error :form="form" field="name"></has-error>
</div>
<div class="form-group">
<label for="file" class="col-sm-4 control-label">File</label>
<div class="col-sm-12">
<input
type="file"
class="form-input"
:class="{ 'is-invalid': form.errors.has('file') }"
id="file"
name="file"
/>
<has-error :form="form" field="file"></has-error>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">لغو</button>
<button
v-show="editMode"
:disabled="form.busy"
type="submit"
class="btn btn-success"
>تمدید</button>
<button
v-show="!editMode"
:disabled="form.busy"
type="submit"
class="btn btn-primary"
>ثبت</button>
</div>
</div>
</form>
</div>
</div>
</div>
</template>
</div>
<script>
createDocumentType() {
// axios.get("api/getAllDocumentTypeDocumentType").then(response => {
// let data = response.data;
if (this.form.name == "") {
toast.fire({
type: "warning",
icon: "warning",
html: "<h5>نام لازم است.</h5>"
});
}
// else if (this.form.file == "") {
// toast.fire({
// type: "warning",
// icon: "warning",
// html: "<h5>لطفا،اسناد را انتخاب نماید.</h5>"
// });
// }
else {
this.form
.post("api/DocumentType")
.then(() => {
// the below function will be use to reload the page
// this.$emit("refreshPage");
$("#addNew").modal("hide");
toast.fire({
icon: "success",
type: "success",
html: "<h5> اسنادموافقانه اجاد گردید</h5>"
});
Fire.$emit("refreshPage");
this.form.reset();
// this.$Progress.finish();
})
.catch(er => {
console.log(er);
});
}
}
</script>
Migration table code
public function up()
{
Schema::create('document_types', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('file')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
Code in API route
Route::apiResources(['DocumentType'=>'API\DocumentTypeController']);
Route::get('getAllDocumentType','API\DocumentTypeController#getAll');
The given data was invalid.","errors":{"file":["The file field is required. This error is because there is no existing file in your payload upon submission of your form.
in your form, bind data to your input file like what you did to your input name. like this
<input
type="file"
v-model="form.file"
class="form-input"
:class="{ 'is-invalid': form.errors.has('file') }"
id="file"
name="file"
/>
Or, attach an event to this file input and process the file provided. like this
<input
type="file"
class="form-input"
:class="{ 'is-invalid': form.errors.has('file') }"
id="file"
name="file"
#change="selectFile"
/>
Then in your methods, create also a selectFile function
methods: {
selectFile(file) {
if(file == "") return false
this.form.file = file.target.files
console.log(this.form.file)
}
}
Related
I am getting a continuous validation error despite the data being valid. I originally had this forming working, at the time I was only storing one email at a time. When I added the "addNewRow" function, I was unable to post the data. Each time I get a validation error, I am quite new to Vue, and I'm not sure where I am going wrong with either the post method or my validation.
Here is my controller:
public function notifyTeam(Request $request, Agency $id)
{
$request->validate([
'email' => 'unique:users|required|email|max:255|unique:agency_emails',
]);
$user = Auth::user();
$agency = Agency::where('id', $user->agency_id)->first();
$subdomain = $agency->subdomain;
$emails = json_decode($request->getContent('emailArray'), true);
foreach($emails as $email){
$authorizedEmails = new AgencyEmail;
$authorizedEmails->email = $request->email;
$authorizedEmails->agency_id = $agency->id;
$authorizedEmails->save();
}
// Generate Link
// /{subdomain}/register
// Email the link to specified users
// vue component
return redirect()->route('dashboard');
}
And here is my Vue Component:
<template>
<div class="row justify-content-center">
<div class="col-md-4">
<div class="row justify-content-center">
</div>
<h1 class="agency_h1 mt-5 mb-5">ASSEMBLE THE TROOPS</h1>
<form method="POST" #submit.prevent="submit">
<input type="hidden" name="_token" :value="csrf">
<label for="email">E-mail Address</label>
<div class="form-group row" v-for="(field, k) in fields" :key="k">
<div class="input-group">
<input id="email" type="email" class="form-control" name="email[]" v-model="field.email"
required placeholder="Add An Email Address">
</div>
<div class="col">
<div class="alert alert-success alert-dismissible fade show sticky-top mt-2" role="alert"
v-show="success">
Emails Have Been Seent
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-danger alert-dismissible fade show sticky-top mt-2" role="alert"
v-if="errors && errors.email">
{{ errors.email[0] }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
</div>
<button type="submit" class="btn btn-success mb-2" #click="addNewRow">Add Row +</button>
<button type="submit" class="btn btn-primary btn-block mb-5" >Create Your Agency</button>
</form>
</div>
</div>
</template>
<script>
export default {
data() {
return {
fields: [{
email: '',
}],
errors: {},
success: false,
csrf: document.querySelector('meta[name="csrf-token"]').getAttribute('content')
}
},
methods: {
addNewRow() {
this.fields.push({
email: '',
});
},
submit() {
axios.post('/create-team', {
emailArray: this.fields
})
.then(response => {
this.fields = {};
this.success = true;
this.errors = {};
})
.catch(error => {
if (error.response.status === 422) {
this.errors = error.response.data.errors || {};
}
console.log('Still not saved');
});
},
},
}
</script>
I'm making a SPA using laravel and vue. I dont know how to show the specific image of the news when Im making a update/edit function. In laravel I know how to do it by using a #foreach and asset something like that. But in the vue component I'm having a hard time figuring it out. I'm using the vform package btw so that my form is filled automatically with the data which I want to edit but the my problem is how to show the image like i filled the text field by using fill function from the vform package. What do I need to do in order to fix my problem?
News.vue
<!-- show/edit modal extra large -->
<div class="modal fade" id="editNews" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4> <strong>Edit</strong> </h4>
</div>
<div class="modal-body">
<!-- Vform -->
<form #submit.prevent="updateNews()">
<div class="form-group">
<label>News Title</label>
<input
v-model="form.title"
type="text" name="title"
placeholder="Title"
class="form-control" :class="{ 'is-invalid': form.errors.has('title') }">
<has-error :form="form" field="title"></has-error>
</div>
<div class="form-group">
<label>Subtitle</label>
<input
v-model="form.subtitle"
type="text"
name="subtitle"
placeholder="Subtitle"
class="form-control" :class="{ 'is-invalid': form.errors.has('subtitle') }">
<has-error :form="form" field="subtitle"></has-error>
</div>
<div class="form-group">
<label>News Content</label>
<textarea
v-model="form.body"
type="text"
name="body"
placeholder="News Content"
class="form-control" :class="{ 'is-invalid': form.errors.has('body') }">
</textarea>
<has-error :form="form" field="body"></has-error>
</div>
<div class="form-group">
<label>Picture</label>
<input type="file" id="image" #change="addImage"
class="form-control" :class="{ 'is-invalid': form.errors.has('image') }">
<has-error :form="form" field="image"></has-error>
</div>
<div>
<h4>Currently Displayed News Image</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success">Submit Changes</button>
</div>
</form>
<!-- vform -->
</div>
</div>
</div>
</div>
<!-- modal edit/show -->
The script below the News.vue
<script>
export default {
data(){
return{
editmode:false,
news: {},
form: new Form({
id:"",
title: "",
subtitle:"",
body:"",
image:"",
postedby:""
})
}
},
methods: {
loadNews(){
axios.get('api/news')
.then(({data}) => (this.news = data))
},
createNews(){
// console.log('hello')
this.$Progress.start()
this.form.post("api/news")
.then(()=>{
$("#addNews").modal("hide")
$(".modal-backdrop").remove()
swal.fire("Created!", "", "success")
Fire.$emit("UpdateTable");
})
this.$Progress.finish()
},
addImage(e){
// console.log(e.target.files[0])
var fileReader = new FileReader()
fileReader.readAsDataURL(e.target.files[0])
fileReader.onload = (e) => {
this.form.image = e.target.result
}
// console.log(this.form)
},
editForm(newsdata){
//shows the modal for edit and fills the data in it.
this.editmode = true
this.form.reset()
$('#editNews').modal('show')
this.form.fill(newsdata)
},
updateNews(){
//update the news based on the modal inputs (not working need few codes in controller #update method)
this.form.put('api/news/' + this.form.id)
.then(()=>{
$('#editNews').modal('hide')
$(".modal-backdrop").remove()
swal.fire("Updated!", "", "success")
Fire.$emit('UpdateTable')
this.$Progress.finish()
})
},
},
created() {
console.log('Component mounted.')
this.loadNews();
Fire.$on("UpdateTable",()=>{
this.loadNews();
})
}
}
</script>
Add this for img:
<img src="" id="imagepreview">
Then you can simply do:
$('#imagepreview').attr('src', "IMAGEDIRECTORYHERE" + newsdata.image);
i was creating vue file for inpute Excel or csv file laravel 5.7
i was using Maatwebsite/Laravel-Excel
dont know how to route there things it if my first time to make app like laravel with vue JS
Don't know what to doo
there is Vue file
<template>
<div class="container">
<div class="row mt-5">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Students</h3>
<div class="card-tools">
<button class="btn btn-success" data-toggle="modal" data-target="#exampleModal">Add New <i class="fas fa-user-plus"></i></button>
<button class="btn btn-primary" data-toggle="modal" data-target="#importModel">Import <i class="fas fa-file-excel"></i></button>
<button class="btn btn-warning" data-toggle="modal" data-target="#export">Export <i class="fas fa-file-excel"></i></button>
</div>
</div>
</div>
<!-- /.card -->
</div>
</div><!-- /.row -->
<!-- Modal -->
<div class="modal fade" id="importModel" tabindex="-1" role="dialog" aria-labelledby="importModelLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="importModelLabel">Import Excel</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="POST" enctype="multipart/form-data">
<div class="modal-body">
<div class="form-group">
<label>Import</label>
<input type="file" name="excel_file"
class="form-control" :class="{ 'is-invalid': form.errors.has('excel_file') }">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save Student</button>
</div>
</form>
</div>
</div>
</div>
<!--Exit Modal-->
</div>
</template>
<script>
export default {
data(){
return{
form: new Form({
first_name:'',
last_name:'',
email:'',
password:'',
designation:''
})
}
},
mounted() {
console.log('Component mounted.')
}
}
</script>
set a post route to import data in web.php file
that will route the things as pr laravelExcel
Route::post('importExcel', 'API/StudentMasterController#import');
in a controller file
public function import()
{
Excel::import(new StudentImport, request()->file('excel_file'));
//return redirect('/')->with('success', 'All good!');
}
and in a APP/import/studentmaster.php file
public function model(array $row)
{
return new Student_master([
'EnrollmentNo' => $row[22],
]);
}
this is vue views and js my code :
<form method="POST" action="#" class="form-horizontal" #submit.prevent="createUpload" enctype="multipart/form-data">
<div class="box-body">
<div class="form-group row"><label for="name" class="col-sm-2 form-control-label">Parameter</label>
<div class="col-sm-10">
<input type="file" class="form-control" id="result_file" ref="myFiles" placeholder="Name Parameter" required="required" #change="previewFiles($event)">
<input type="hidden" name="result_file2" class="form-control" id="title" v-model="datafileupload.result_file3" placeholder="Name Parameter" required="required">
<input type="hidden" name="hasilcek" class="form-control" id="hasilcek" v-model="datafileupload.hasilcek3" placeholder="Name Parameter" required="required">
<input type="hidden" class="form-control" v-model="datapush.filename">
<input type="hidden" class="form-control" v-model="datapush.size">
</div><br><br><br>
<div v-if="this.hasilcekexcel > 0" class="alert alert-warning">File {{ namafile }} exists , do you want to replace it ?</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" #click="doSomethingOnHidden" >Close</button>
<input type="submit" class="btn btn-primary" id="submit_upload2" v-if="this.hasilcekexcel > 0" value="Replace">
<input type="submit" class="btn btn-primary" id="submit_upload" v-if="this.hasilcekexcel == 0" value="Upload">
</div>
</form>
js upload :
createUpload () {
var data = new FormData();
var file = this.$refs.myFiles.files[0];
var size = this.$refs.myFiles.files[0].size;
data.append('filenya', file);
data.append('namasifile', this.datafileupload.result_file3);
data.append('angkacek', this.datafileupload.hasilcek3);
axios.post('excelupload/upload', data)
.then(response => {
this.pesertas.push(response.data.data);
this.showModal =false;
});
},
controller :
$excelupload = new Exceluploads;
$hasilcek = $request->angkacek;
$requestfile = $request->namasifile;
if ($request->filenya != '') {
$input = Input::all();
$size = $request->file('filenya')->getClientSize();
$file = array_get($input,'result_file');
$userID = Auth::user()->id;
$uploaded_by = Auth::user()->name;
$destinationPath = 'excel';
// GET THE FILE EXTENSION
$extension = 'xls';
$fileName = $requestfile.'.'.$extension;
if ($hasilcek > 0) {
File::delete($destinationPath.'/'.$fileName);
$upload_success = $request->filenya->move($destinationPath, $fileName);
return response()->json(['data' => Exceluploads::find($excelupload->id)]);
}else if ($hasilcek == 0) {
$upload_success = $request->filenya->move($destinationPath, $fileName);
$excelupload->filename = $fileName;
$excelupload->directory = $destinationPath.'/'.$fileName;
$excelupload->size = $size;
//1 = not custome
$excelupload->type = 1;
$excelupload->uploaded_by = $uploaded_by;
$excelupload->save();
return response()->json(['data' => Exceluploads::find($excelupload->id)]);
}
}
I just learned vuejs with bootstrap 4 and I tried to display modal provided that when the create button was not clicked then the HTML modal tag is not displayed in the inspect element, and after the create button click bootstrap modal displayed. When the button create first time click HTML modal tag display on inspect element but bootstrap modal cannot be displayed on the browser page and the second time the bootstrap modal can be displayed. Here is the source code that I made with Laravel, can you help me on this issue, thank you.
User.vue
HTML
<template>
<div class="container">
<div class="row">
<div class="col-sm">
<div class="card-deck mb-3">
<div class="card mb-4 box-shadow">
<div class="card-header bg-success text-white">
<h4 class="my-0 font-weight-bold">
<!-- Button create user -->
<button #click="initAddUser()" class="btn btn-danger btn-sm"><i class="fa fa-plus"></i> Create New User</button>
<span class="float-right">User</span>
</h4>
</div>
<div class="card-body">
<!-- Bootstrap modal -->
<div v-if="showModal" class="modal fade" id="add_user_model" tabindex="-1" role="dialog" aria-labelledby="add_user_model_label" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header bg-info text-white">
<h5 class="modal-title" id="add_user_model_label"><i class="fa fa-plus"></i> Add New User</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<!-- Message errors create user -->
<div class="alert alert-danger" v-if="errors.length > 0">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<h5>{{ messages }}</h5>
<ul>
<li v-for="error in errors">{{ error }}</li>
</ul>
</div>
<div class="form-group">
<label class="font-weight-bold" for="name">Name :</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Name" v-model="user.name">
</div>
<div class="form-group">
<label class="font-weight-bold" for="name">Email :</label>
<input type="email" class="form-control" id="email" name="email" placeholder="E-mail" v-model="user.email">
</div>
<div class="form-group">
<label class="font-weight-bold" for="password">Password:</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Password" v-model="user.password">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-sm btn-primary" #click="createUser()">Submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
Js
<script>
export default {
data() {
return {
user: {
name: '',
email: '',
password: ''
},
errors: [],
users: [],
showModal: false,
}
},
mounted() {
this.readUsers();
},
methods: {
initAddUser() {
this.errors = [];
$("#add_user_model").modal("show");
this.showModal = true;
},
reset() {
this.user.name = '';
this.user.email = '';
this.user.password = '';
},
readUsers() {
axios.get('/user/show')
.then(response => {
this.users = response.data.users;
});
},
createUser() {
axios.post('/user', {
name: this.user.name,
email: this.user.email,
password: this.user.password,
})
.then(response => {
this.reset();
this.users.push(response.data.user);
this.readUsers();
$("#add_user_model").modal("hide");
})
.catch(error => {
this.errors = [];
this.messages = error.response.data.message;
if (error.response.data.errors.name) {
this.errors.push(error.response.data.errors.name[0]);
}
if (error.response.data.errors.email) {
this.errors.push(error.response.data.errors.email[0]);
}
if (error.response.data.errors.password) {
this.errors.push(error.response.data.errors.password[0]);
}
});
}
}
}
</script>
Result images inspect element
This image button first time click https://ibb.co/jKENbU
This image button second time click https://ibb.co/nRy4qp
This is the vuejs component for editing song info. the problem here is with tags.I cannot show the tags of the song in vue select for editing.
<template>
<div>
<a data-toggle="modal" :data-target="'#EditModal'+ modalid" #click="select(song)"><span title="edit" class="glyphicon glyphicon-pencil" ></span></a>
<a class=""><span title="delete" class="glyphicon glyphicon-trash"></span></a>
<!-- Modal for editing song tracks-->
<div class="modal fade" :id="'EditModal'+ modalid" tabindex="-1" role="dialog" aria-labelledby="EditModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="EditModalLabel">Edit Song</h5>
<button type="button" class="close" ref="closemodal" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form ref="uploadform">
<div class="form-group">
<div class="row">
<div class="col-md-12">
<div class="col-md-5">
<button type="button" #click="browseImage" class="btn btn-md btn-default">Choose image:</button>
<div id="image_previews">
<img ref='image' class="" v-bind:src="image" width="200px" height="200px" >
<input class="form-control-file" ref="imageinput" type="file" name="feature_image" #change="showImage($event)">
</div>
</div>
<div class="col-md-7">
<div class="form-group">
<label for="title">Song Title:</label>
<input type="text" v-model="esong.title" class="form-control" required maxlength="255">
</div>
<div class="form-group">
<label for="genre"> Genre (tag atleast one) </label>
<v-select :placeholder="'choose tag'" v-model="tagids" label="name" multiple :options="tags"></v-select>
</div>
<div class="form-group">
<label for="upload_type">Song Upload Type</label>
<select name="upload_type" v-model="esong.upload_type" class="form-control">
<option value="public">public( free )</option>
<option value="private">private( for sale )</option>
</select>
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">Description:</label>
<textarea class="form-control" id="message-text" v-model="esong.song_description"></textarea>
</div>
<div class="form-group" v-if="private">
<label for="upload_type">Song price</label>
<input type="text" v-model="esong.amount" class="form-control" required maxlength="255">
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" #click="edit">Save</button>
</div>
</div>
</div>
</div><!-- end of modal -->
</div>
</template>
<script>
import vSelect from 'vue-select'
export default {
props: ['song','modalid','index','tags'],
components: {vSelect},
mounted() {
},
watch: {
tagids() {
console.log('changed tagids value');
// this.value = this.tagsid;
}
},
computed: {
private() {
if(this.esong.upload_type == 'private') {
return true;
}
return false;
},
},
methods: {
select(song) {
console.log(song.title);
this.getTagIds(song);
},
edit() {
let formData = new FormData();
formData.append('title', this.esong.title);
formData.append('img', this.esong.img);
formData.append('description', this.esong.song_description);
formData.append('upload_type', this.esong.upload_type);
formData.append('amount', this.esong.amount);
formData.append('tags', JSON.stringify(this.tagids));
formData.append('_method', 'PUT');
axios.post('/artist/songs/' + this.esong.id, formData,{
headers: {
'Content-Type': 'multipart/form-data'
}
}).then(response =>{
this.$refs.closemodal.click();
toastr.success('successfully edited song.');
this.$emit('update', {song:this.esong,index:this.index});
}).catch(error => {
console.log(error);
});
},
getTagIds(song) {
axios.post('/gettagids', song ).then(response =>{
this.tagids = response.data;
}).catch(error =>{
console.log(error);
});
},
browseImage() {
this.$refs.imageinput.click();
},
showImage(event) {
this.esong.img = event.target.files[0];
this.image = URL.createObjectURL(event.target.files[0]);
}
},
data() {
return {
esong: this.song,
tagids: {id:'', name:'', label:''},
name:'name',
image:this.song.image
}
}
}
</script>
<style scoped>
input[type="file"] {
display: none;
}
#image_previews {
border-radius: 5px;background-color: whitesmoke; width: 200px; height: 200px;
}
.btn{
border-radius: 0px;
}
</style>
here I cannot get the selected value that was inserted in my table. I wanted to show the tagged values for a song. I am able to get all object of tagged songs from axios post request but v-select doesn't shows the selected value retrieved from a table.
the object received from laravel is similar to the object provided in options which work well with v-select..but it doesn't show the same structure object provided to v-model..or should I provide other props. the document for vue select has not mentioned any of these things