[英]How to access header component in home.vue in Vue js
I need to hide a button in header by accessing the component inside Home.vue using Javascript. 我需要通过使用Javascript访问Home.vue内部的组件来隐藏标题中的按钮。 Could anyone suggest any syntax?
有人可以建议任何语法吗?
I tried to get elementID of the button inside Home.vue, but still it's not accessible. 我试图获取Home.vue中按钮的elementID,但仍然无法访问。
使用event bus
或将该变量存储在Vuex
以便您可以访问和变异该变量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.