ref 响应式
<p>作用:定义一个响应式数据</p>
<pre><code class="language-javascript">const name = ref(&quot;Andy&quot;);
console.log(name);</code></pre>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=87181afc5debf689974bf6043e165a58" alt="" /></p>
<pre><code class="language-javascript">const obj = ref({
age: 18,
sex: &quot;男&quot;,
});
console.log(obj);</code></pre>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=914820e2fec754b33f0c00f0317f9334" alt="" /></p>
<pre><code class="language-javascript">RefImpl (reference implement)
引用实现对象</code></pre>