7
değil
<image-upload v-model="form.image"></image-upload>
ve imgeUpload
bileşen içinde bu kod var
<input type="file" accept="images/*" class="file-input" @change="upload">
upload:(e)=>{
const files = e.target.files;
if(files && files.length > 0){
console.log(files[0])
this.$emit('input',files[0])
}
}
ve ben
alınanUncaught TypeError: _this.$emit is not a function
Teşekkür
Yağ ok işlevleriyle 'yöntemleri 'tanımlama. http://stackoverflow.com/documentation/vue.js/9350/using-this-in-vue/28958/wrong-using-an-arrow-function-to-define-a-method-that-refers-to- Bu # t = 201703281535474331805 – Bert
Başar, Teşekkür ederim :) –