Problem when passing data from parent component to children

0

I have a Welcome.vue parent component that I arrived at after logging in, as the template became very extensive, I took out the navigationDrawer and the Toolbar in two external components, something like:

<template> 
   <navigation-drawer :user="user"/>
   <toolbar/>
</template>

The problem is that to show / hide I must change the value of a property called drawer: null that is in the Toolbar component.

<v-toolbar-side-icon @click.stop="drawerReverse = !drawerReverse"></v-toolbar-side-icon>

When I pass it as property and click, it throws me the error:

Vue warn]: Computed property "drawerReverse" was assigned to but it has no 
setter.

found in

---> <Toolbar> at src\components\layouts\Toolbar.vue
   <VApp>
     <Welcome> at src\components\Welcome.vue
       <App> at src\App.vue
         <Root>
warn @ vue.esm.js?efeb:591
sharedPropertyDefinition.set @ vue.esm.js?efeb:3493
click @ Toolbar.vue?c3d0:21
invoker @ vue.esm.js?efeb:2027
Vue.$emit @ vue.esm.js?efeb:2538
e.(anonymous function) @ backend.js:1
click @ vuetify.js?dc48:1368
invoker @ vue.esm.js?efeb:2027
fn._withTask.fn._withTask @ vue.esm.js?efeb:1826

And he does not let me show / hide the menu, I appreciate his help.

    
asked by DVertel 31.07.2018 в 02:37
source

0 answers