报错:Uncaught TypeError: Cannot read property ‘unshift’ of undefined
页面显示:
解决方法:
// 在新增方法中的 treeSelectData.value.unshift({id: 0, name: '无'});前 判断treeSelectData是否为空,为空则重置为数组
if (!treeSelectData.value){
treeSelectData.value = [];
}