Vue 3 (compsition API) 从带有 ref (unref deep) 的对象列表中删除所有 ref

Vue 3 (compsition API) remove all ref from list of objects with ref (unref deep)

是否有任何简单的方法(无需创建自定义助手)取消引用(arr),其中 arr 包含具有引用、计算和其他反应属性的对象?

一个简单的方法就是迭代列表并迭代每个对象的属性......但是必须有比这个更简单的方法吗?我正在寻找类似

的东西

const arr = ref([])

//some code that will fill the arr with objs. props can be ref(someting) or computed

cost req = unref(arr, deep: true)

await api.post(req)

有人用好的方法做到了吗?

/J

toRaw - 这是您要找的吗?

我有同样的问题,所以我做了:https://www.npmjs.com/package/vue-deepunref