How to click a button in one component to hide a panel or control in another component in vue.

for example: there are two components on the page: a div B is hidden or displayed after a button is clicked on the A component.

Apr.19,2021

first of all, components An and B can pass values to each other between the parent and child components of page P
page P <-(showFlag)-> component A
page P <-(showFlag)-> component B

Page P sets a common variable showFlag, to pass to A, and A component internally modifies showFlag, to be passed to Page P by Synchronize.
component B receives a showFlag value to hide div


B components use v-show to control with a value, change this value after clicking the button on A


1, use vuex
2, use eventbus
3, and pass

through their parent components.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e944-2c42b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e944-2c42b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?