1. 程式人生 > >Element UI級聯選擇器報錯"TypeError: Cannot read property 'getElementsByClassName' of undefined"

Element UI級聯選擇器報錯"TypeError: Cannot read property 'getElementsByClassName' of undefined"

 

當點選的時候第一層出現的報錯(導致二級出不來)

原因:

value 和 label的值未正確指定,

此處value並不存在options資料中

解決: 

修改為: