Cannot read property 'setCheckedKeys' of undefined

uses the Dialog dialog box of element-ui. There is a Tree tree control in the dialog box that can select the tree node. When I first opened the Dialog and initialized the node of the Tree tree control, I reported an error, Cannot read property "setCheckedKeys" of undefined, and then the second time I opened it, it will not report an error, and the data can be rendered normally. How to solve

Jun.17,2021

the idea goes something like this:

// 
<button @click="update"></button>
<v-tree-dialog :is-show="isShow" ref="treeUpdate" ></v-tree-dialog> 

update() {
  this.isShow= true
  this.$nextTick(() => {
    this.$refs.treeUpdate.init()
  })
}
// 
<el-tree
  :data="treeData"
  show-checkbox
  node-key="id"
  ref="tree"
>
</el-tree>

init() {
 this.$refs.tree.setCheckedKeys([1])
},

I have the same problem, especially when putting tree in form tickles

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