<template><div><h2>{
{ name }}-{
{ age }}</h2><button@click="changeName">修改name</button><button@click="changeAge">修改age</button></div></template><script>import{
ref, watchEffect }from"vue";exportdefault{
setup(){
// watchEffect: 自动收集响应式的依赖const name =ref("why");const age =ref(18);constchangeName=()=>(name.value ="kobe");const