用naive ui的选择器组件和typescript的时候,拿不到已经选中的value
//上面组件部分
<n-space vertical>
<n-select style="float: right;text-align: right;width:55%;"
placeholder="请选择你要上传的部门"
multiple
:options="options"/>
</n-space>
//返回值的数组即绑定的options
let departmentId = reactive([] as any [])
let options =reactive([] as any[] )
let department = reactive([] as any [])
department=res.data.list
// 拿到数组的name,id
department.map(item =>{
options.push({
label:item.name,
value:item.id
})
options.map((item)=>{
departmentId.join(item.value)
})
})
options能拿到,是对的,但是拿不到已选择的value
我用过各种数组的方法
我想要达到的结果departmentId里面能拿到选择器里面选种的部分