VUE3 之 toRefs
定义:toRefs可以将对象(只能接收ractive对象)中的属性变成响应式
正常reactive对象数据也是响应式的,如果用toRefs解构出去会更加方便
用法:
<h3>{{name}}</h3>
     let obj = reactive({
         name:'kebi'
      })
     return {
          ...toRefs(obj)
      }
用法:
<h3>{{name}}</h3>
     let obj = reactive({
         name:'kebi'
      })
     return {
          ...toRefs(obj)
      }
