SoFunction
Updated on 2025-04-04

Vue can render with prop but the printing station error can be solved.

When passing the vue attribute, the following error will sometimes be reported.

?f959:610 [Vue warn]: Error in render: "TypeError: Cannot read property 'RegistrationAuthority' of undefined"

found in

---> <DialogHistory> at src/components/tools/dialog_history.vue
    <NurseInfor> at src/components/router_components/nurse_infor/nurse_infor.vue
     <Index> at src/components/
      <App> at src/
       <Root>

The data received in the subcomponent is data

props:["data"],

The actual format of data is

data:{
"xxx":{},
"yyy":{},
}

When the parent element is passed, it is not written to the internal object.

data:{}

So it will be displayed that it cannot be found, so just assign the internal object directly when passing it

   data(){
     return {
      data:{
        "FirstRegistration":{},
        "RegistrationOfChange":{},
        "ContinuedRegistration":{},
      }
     }

If the type passed in is another type, such as an array, it also declares the type.

   data(){
     return {
      data:[]
      }
     }

The above article vue can be rendered using prop, but the solution to the printing station error is all the content I share with you. I hope it can give you a reference and I hope you support me more.