项目是react+antd。
现在要根据type=1 2 3,把数组拆分成三个不同的数组,要怎么写?
data: {
list: [
{
quantity: 0.3,
receiveCompany: "有限公司",
receiveNumbers: "J134",
shipName: "2号",
state: "0",
taskCompany: "码头",
taskMode: "0",
taskTime: "2021-01-01 09:52:33",
type: "1"
},
{
quantity: 0.3,
receiveCompany: "有限公司",
receiveNumbers: "J1",
shipName: "2号",
state: "0",
taskCompany: "码头",
taskMode: "0",
taskTime: "2021-01-01 09:52:33",
type: "2"
},
{
quantity: 0.3,
receiveCompany: "有限公司",
receiveNumbers: "J1",
shipName: "2号",
state: "0",
taskCompany: "码头",
taskMode: "0",
taskTime: "2021-01-01 09:52:33",
type: "1"
},
{
quantity: 0.3,
receiveCompany: "有限公司",
receiveNumbers: "J1",
shipName: "2号",
state: "0",
taskCompany: "码头",
taskMode: "0",
taskTime: "2021-01-01 09:52:33",
type: "3"
},
{
quantity: 0.3,
receiveCompany: "有限公司",
receiveNumbers: "J1",
shipName: "2号",
state: "0",
taskCompany: "码头",
taskMode: "0",
taskTime: "2021-01-01 09:52:33",
type: "1"
},
]
}