<script setup> const msg = '信息详情' const clickMsg = () =>{ console.log(2223323)} </script> <template> <div>{{ msg }}</div><br> <button @click="clickMsg" >按钮</button> </template> <style scoped> </style>
写了 setup语法糖就不用再 用rerurn 返回数据和函数
标签:rerurn,const,log,2223323,语法,msg,作用 From: https://www.cnblogs.com/xm666/p/17764406.html