自定义集合
list:[
{name:"苹果",value:1},
{name:"香蕉",value:2},
{name:"草莓",value:3},
{name:"橘子",value:4},
]

let name="草莓"
this.list.find(item=>item.name===name)

this.list.filter(item=>item.name===name)
Logo

前往低代码交流专区

更多推荐