1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<script setup> const count = ref(0) </script> <template> <button @click="count++"> {{ count }} </button> </template> <style scoped> button { border: 1px #ddd solid; padding: 3px 10px; border-radius: 5px; } </style>