我在角应用中使用了反应形式概念,插入时间使其工作完美。但是编辑时间我试图从列表中删除数据,它在屏幕上显示错误的数据,但实际数据已经存在于json数组中。
我的实际数据是:
[
{
"purchaseDetailId": "067c5d0d-b922-4d96-a2ce-4903d4f1d059",
"description": "test1",
"piece": 12,
"unitTotalPrice": 150,
"unitPrice": "12.50",
"remarks": "tst1"
},
{
"purchaseDetailId": "d51684ee-ccb5-488f-8fea-c20254dbc9a3",
"description": "test2",
"piece": 7,
"unitTotalPrice": 120,
"unitPrice": "17.14",
"remarks": "tes2"
},
{
"purchaseDetailId": "588ee842-f18a-452b-bf09-d2be6428e549",
"description": "test3",
"piece": 8,
"unitTotalPrice": 45,
"unitPrice": "5.62",
"remarks": "tst3"
},
{
"purchaseDetailId": "f4de873f-fe19-40ad-86c5-9d4b758275e4",
"description": "test4",
"piece": 9,
"unitTotalPrice": 21,
"unitPrice": "2.33",
"remarks": "test4"
},
{
"purchaseDetailId": "e8b3f9d4-afa4-4198-9ada-2ae4ab5ded61",
"description": "test5",
"piece": 10,
"unitTotalPrice": 100,
"unitPrice": "10.00",
"remarks": "tes5"
}
]
现在我要删除第二行(行)。
在json数组中看起来像
[
{
"purchaseDetailId": "067c5d0d-b922-4d96-a2ce-4903d4f1d059",
"description": "test1",
"piece": 12,
"unitTotalPrice": 150,
"unitPrice": "12.50",
"remarks": "tst1"
},
{
"purchaseDetailId": "588ee842-f18a-452b-bf09-d2be6428e549",
"description": "test3",
"piece": 8,
"unitTotalPrice": 45,
"unitPrice": "5.62",
"remarks": "tst3"
},
{
"purchaseDetailId": "f4de873f-fe19-40ad-86c5-9d4b758275e4",
"description": "test4",
"piece": 9,
"unitTotalPrice": 21,
"unitPrice": "2.33",
"remarks": "test4"
},
{
"purchaseDetailId": "e8b3f9d4-afa4-4198-9ada-2ae4ab5ded61",
"description": "test5",
"piece": 10,
"unitTotalPrice": 100,
"unitPrice": "10.00",
"remarks": "tes5"
}
]