vue3 computed如何传参/接受参数

<div v-for="item in list">
	{{ textComputed(item) }}
div>
const list = [
	{ id: 0, name:'aaa' }, 
	{ id: 1, name:'bbb' }, 
	{ id: 2, name:'ccc' }, 
]

const textComputed = (()=>(item:any)=>{
	return item.id
})

你可能感兴趣的:(vue,javascript,前端,vue3,computed,computed传参,vue3)