If you render a child component in vue render, how do you get the child component in the parent component?

    The
  1. onPoperShow function uses ref to get the loaded component PopTipTransfer, to call the method through the acquired subcomponent. It didn"t work out.
  2. subcomponent PopTipTransfer ref is named pop
render: (h, params) => {
    return h("div", [
        h(PopTipTransfer, {
            ref: "pop",
            props: {
                visible: this.poptipTransferVisible
            },
            on: {
                onPopperShow: (value) => {
                    this.$nextTick(() => {
                        console.log(this.$refs);
                    });
                },
            }
        })
 })

log is as follows, which only contains the components that I defined in the template template, but cannot be obtained by the pop component:

clipboard.png

Mar.28,2021

1. First of all, the idea that you want to invoke subcomponents directly is unscientific and does not conform to the concept of unidirectional data flow such as vue or mvvm framework
2. If you need the child component to perform an action when the parent component satisfies certain conditions, you can pass the watch props, in the props, subcomponent to the child component and perform the corresponding action

after the props change meets your condition.
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-1b3590d-2bfb9.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-1b3590d-2bfb9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?