this.$el.querySelectorAll is not a function [How to Solve]

Problem description
when using El tree, the error this. $el.queryselectorall is not a function is reported, which makes the tree unable to render

Problem resolution
refer to the following code snippet

	<el-tree
        :data="treeData"
        show-checkbox
        node-key="id"
        ref="functionTree"
    ></el-tree>

Most of the errors reported are incorrect data bound by El tree. Data errors can be divided into the following two types:

Case 1:

Cause: wrong format of treeData data.
Solution: check the treeData data format, the data bound by :data must be an array.

Case 2:

Cause: The treeData array contains dirty data such as null
Solution: Delete the null and other dirty data in the data

Read More: