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);
本文标题:ES6快速删除数组元素
本文链接:https://www.haomeiwen.com/subject/wdiblftx.html
网友评论