js中删除列表中的某一行 // 删除商品 function removeItem(id) { cartItems.value = cartItems.value.filter(item => item.id !== id); } 或