Multiple methods for vue subcomponents to call parent components

parent component:
< Dialog: dialogFormVisible = "dialogObj" @ Close= "dialogCloseUpdate" ref= "dailog" > < / Dialog >
methods: {
dialogCloseUpdate () {
alert (1)
},
dialogCloseAdd () {
alert (1)
}

}
subcomponents:
methods: {

update () {
  this.$emit("Close", data)
},
add() {
  this.$emit(?, data)
}

}

as above, I want to call the dialogCloseAdd () method of the parent component in add (). Ask the Great God for advice

Mar.16,2021

https://blog.csdn.net/meitesi.


like update, define a method, such as this.$emit ('add', data) , parent component @ add=dialogCloseAdd


you can use this.$parent.dialogCloseAdd ()

.
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-1b35cf4-2bfbd.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-1b35cf4-2bfbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?