判断数组是否为空,如果为空返回一个空的数组,不为空则用空格分割
res.data.forEach( item => {
item.list = item.list.length === 0 ? [] : item.list.split (' ')
})
判断数组是否为空,如果为空返回一个空的数组,不为空则用空格分割
res.data.forEach( item => {
item.list = item.list.length === 0 ? [] : item.list.split (' ')
})