<button @click="cnt++"></button>
<button @mouseenter="addCnt(2)">

const addCnt = ref(0);
function click(num){
 addCnt.value = +=num;
}

<template>
  <h1 v-show="flg">v-show 입니다.</h1>
  <button @click="flg = !flg">토글</button>
</template>

<script setup>
import {ref} from 'vue';

const flg = ref(true);

</script>
<template>
  <h1 v-if="flg === '0'">0 입니다.</h1>
  <h1 v-else-if="flg === '1'">1 입니다.</h1>
  <h1 v-else>기타 입니다.</h1>
  <input v-model="flg" type="text" name="flg" id="flg">
</template>

<script setup>
import {ref} from 'vue';

const flg = ref('0');
</script>

리스트 렌더링