The sub-components of vue are hidden under the control of v-show. How to capture the displayed events in the sub-components.

the sub-components of vue are hidden under the control of v-show. How to capture the displayed events in the sub-components

Feb.25,2022

the parent component passes the value corresponding to v-show to the child component, and the child component watch listens


is written in this way:

  • parent component controls child components to show and hide
 <div
        class="dialog_account"
        v-show="isShowAccount" // 
      >
        <SettleAccount @hideAccountDialog="hideAccountDialog"></SettleAccount> //  @hideAccountDialog 
      </div>
  • the child component calls the parent component hide method
 <img
        src="../../assets/btn_Cancel.png"
        alt=""
        @click.stop="$emit('hideAccountDialog')" //
      >
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-1bdbbb3-307e8.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-1bdbbb3-307e8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?