Skip to content

Property or method xxx is not defined on the instance but referenced during render. #339

@liudonghua123

Description

@liudonghua123

I have a Record component which contain a RecordHistoryModal component in its template. And the showHistoryRecords, handleSubmit are methods of Record. But when I show the RecordHistoryModal, I got Property or method "showHistoryRecords" is not defined on the instance but referenced during render. error. The full error log shown these method are not in RecordDetailModal.

vue.runtime.esm.js?2b0e:619 [Vue warn]: Property or method "showHistoryRecords" 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. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> <RecordDetailModal> at src/views/patient/RecordDetailModal.vue
       <Anonymous>
         <Anonymous>
           <Anonymous>
             <Anonymous>
               <AModal>
                 <RecordHistoryModal> at src/views/patient/RecordHistoryModal.vue
                   <AForm>
                     <class2> at src/views/patient/Record.vue
......

However the showHistoryRecords, handleSubmit did work although these errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions