Answer the question
In order to leave comments, you need to log in
Why does the "Property or method "item_" is not defined" error in a component occur in one of two places of use?
Attention, mystic! The component is used in two places. The dropdown list is rendered:
<select class="form-control form-control-sm client-file"
v-model="attachedFileType" id="file_type"
name="file_type">
<option v-for="(item, index) in filesTypes" :value="item.id">
{{item.item_title}}
</option>
</select>
[Vue warn]: Property or method "item" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
Vue.component('pdf-viewer-dialog', {
props: ['file', 'clientId'],
data: function () {
return {
componentHeight: '',
modalId: '',
pdfId: '',
email_email: '',
email_subject: '',
email_text: '',
attachedFileType: '',
attachedFileDescription: '',
filesTypes: <?= CommonHelper::getArrayArraysAsJsArray(\app\models\ClientFile::getTypes()); ?>
}
},
Answer the question
In order to leave comments, you need to log in
The solution, maybe someone will come in handy,
try using instead:
here is a template connection:
I mean exactly the syntax with slash quotes.
this is not very convenient, because the IDE does not work adequately with such HTML. But, you can use php variable:
template: `<?= $template ?>`
// $template получаю ob_get_clean() , зато все на одной странице и html полноценно форматируется и редактируется IDE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question