ES6快速删除数组元素
2018-04-27 本文已影响0人
easy_mark
list:[
{text:"大额类",value:"A"},
{text:"小额类1",value:"B"},
{text:"小额类2",value:"B"}
]
arr.splice(arr.findIndex(v => v.value=== "A"),1);
list:[
{text:"大额类",value:"A"},
{text:"小额类1",value:"B"},
{text:"小额类2",value:"B"}
]
arr.splice(arr.findIndex(v => v.value=== "A"),1);