setup 读取 data
<pre><code class="language-javascript"> data() {
return {
coco: &quot;123&quot;,
};
},
setup() {
const updata = getCurrentInstance();
onMounted(() =&gt; {
let name = updata.data.coco;
console.log(name);
});
}
</code></pre>