I currently have code fragments within my index.blade.php
file that look like this:
The content
section:
.
.
.
<div class="col-12 col-md-12 mb-3">
<label for="attachment" text-muted">Attachment</label>
<div class="col-md-12">
<div>
<b-form-file
ref="attachment"
id="attachment"
v-model.trim="$v.feedback.upload.attachment.$model"
placeholder="Click to upload..."
></b-form-file>
</div>
</div>
</div>
.
.
.
The script
section:
.
.
.
var app = new Vue({
el: '#app',
data() {
return {
'feedback': { 'upload': {'attachment': null} }
}
}
})
.
.
.
Whenever I attempt to load the page, it triggers the following error message:
[Vue warn]: Error in render: "TypeError: $v.feedback.upload is undefined" (found in Root)
I am seeking assistance to understand what is causing the aforementioned error, as commenting out the line
v-model.trim="$v.feedback.upload.attachment.$model"
resolves the issue and allows everything to load correctly.
Thank you in advance for any guidance or insights.