<template><div style="margin: 30px">{{ count }} <button @click="changeCount">clcik</button></div></template><script>import { ref, watch } from "vue";export default {setup(props) {const count =ref(0);const changeCount = ()=>{count.value = count.value+10;}watch(count,(newVale,oldValue)=> {console.log(newVale,oldValue)})return {count,changeCount};},};</script>
