const changeTab = (tab) => { if (tab === '全部') { Status.value.displayedOrders = Status.value.orders; } else { Status.value.displayedOrders = Status.value.orders.filter(order => { switch (tab) { case '待支付': for(let i in Status.value.orders){ return Status.value.orders[i].orderStatus === '待支付';} case '代发货': for(let i in Status.value.orders){ return Status.value.orders[i].orderStatus === '代发货';} case '已发货': for(let i in Status.value.orders){ return Status.value.orders[i].orderStatus === '已发货';} case '售后': for(let i in Status.value.orders){ return Status.value.orders[i].orderStatus === '售后';} default: return false; } }); } }