Element UI级联选择器报错"TypeError: Cannot read property 'getElementsByClassName' of undefined"

点击的时候第一层出现了但是点击指南或者资源的时候,他就报错Cannot read property 'getElementsByClassName' of undefined

<el-cascader
                      :options="options2"
                      @change="handleItemChange"
                      v-model="filters.chapterid"
                      :props="props"
                      :show-all-levels="false"
                      placeholder="知识点"
                    ></el-cascader>

data里面定义:

 options2: [],
                    props: {
                      label: 'label',
                      children: 'children'
                    },

Element UI级联选择器报错"TypeError: Cannot read property 'getElementsByClassName' of undefined"

看官网例子是Element UI级联选择器报错"TypeError: Cannot read property 'getElementsByClassName' of undefined"

我们之间的差别是我用的id存的value的值。

所以我在data里面要定义指定我的value在哪里

修改data里面的 props: {
                      value: 'id',
                      children: 'children'
                    },

相关文章:

  • 2021-12-24
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-07-16
  • 2021-09-09
  • 2021-06-26
猜你喜欢
  • 2021-12-24
  • 2021-09-17
  • 2021-04-02
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案