<template>
  <a-card>
    <div>
      <h1>首页</h1>
    </div>
    <div>
      {{ state }}
      <a-button type="primary" @click="() => state.count++">点击+1</a-button>
    </div>
    <div>
      {{ i }}
      <a-button type="primary" @click="changeClick">点击+1</a-button>
    </div>
    <div>
      <RouterLink to="/site/index2">跳转到子页</RouterLink>
    </div>
  </a-card>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  // reactive
  const state = ref({ count: 0 });
  let i = ref(1);

  function changeClick() {
    i.value++;
  }
</script>
