export function flatten(arr, result = []) {
for (let i = 0; i < arr.length; i++) {
const item = arr[i];
if (arr[i].childNodes) {
result.push(item);
flatten(item.childNodes, result);
} else {
result.push(item);
}
}
return result;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…